This quickstart demonstrates how to use the Prediction Market Metadata API to
build discovery UIs. For trading tokens, see the Trade Tokens
guide.
Overview
The DFlow Prediction Market Metadata API includes multiple ways to discover prediction market outcome tokens:- Fetch all events
- Fetch events by market status
- Get events by relevant categories and tags
1
Fetch Events with Nested Markets
Use the
/api/v1/events endpoint with withNestedMarkets=true to retrieve events along with their associated markets. Each market contains token addresses in the accounts field that you can use for trading.Get All Events with Markets
Get All Events with Markets
2
Fetch Events by Market Status
Use the status filter on
/api/v1/events endpoint to retrieve and markets that are actively available for trading or markets that are coming soon.Get Events with Open Markets
Get Events with Open Markets
Get Events with Initialized Markets
Get Events with Initialized Markets
3
Get Events by Categories and Tags
Use categories tags to filter series and find relevant events and markets. This approach involves: (1) retrieving available tags organized by category, (2) filtering series by tags or categories, and (3) fetching events filtered by series tickers (comma-separated) to discover markets.
Get Categories and Tags
Get Categories and Tags
Filter Series by Category and Tags
Filter Series by Category and Tags
Get Events Filtered by Series Tickers
Get Events Filtered by Series Tickers
API Response Structure
Events Response
The events endpoint returns:- Event Information: Ticker, title, subtitle, series ticker
- Nested Markets (when
withNestedMarkets=true): Array of markets with:- Market ticker, title, status
- Accounts: Object containing
yesMintandnoMinttoken addresses - Volume, open interest, timing information
Tags by Categories Response
Returns a mapping of categories to arrays of tags:Series Response
Returns series templates with:- Ticker: Used to filter events
- Title: Human-readable series name
- Category: Series category
- Tags: Array of associated tags
- Frequency: How often events in this series occur