Documentation Index
Fetch the complete documentation index at: https://docs.codex.io/llms.txt
Use this file to discover all available pages before exploring further.
Query example
Get all categories with subcategoriesUsage Guidelines
- Categories form a 3-level hierarchy: top-level categories contain subcategories, which may contain sub-subcategories
- Each category has a
name(display name) andslug(URL-friendly identifier) - Use the
slugvalues to filter markets infilterPredictionMarkets(e.g.,filters: { categories: ["sports", "nba"] }) - Category matching in filters is case-insensitive
- Categories are dynamically generated based on active markets across all protocols
Understanding the Category Hierarchy
The category structure has up to 3 levels of nesting:- Top-level categories (e.g., “Politics”, “Sports”, “Crypto”) - Broad topic areas
- Subcategories (e.g., “Basketball”, “White House”) - More specific topics within the top-level category
- Sub-subcategories (e.g., “NBA”, “Donald Trump”) - Highly specific topics
slug field when filtering markets by category. The name field is the human-readable display name.
Common Categories
Top-level categories include:- Politics - Elections, White House, Congress, Approval Ratings
- Sports - Basketball (NBA), Football (NFL), Soccer, Baseball, MMA, Tennis
- Crypto - Bitcoin, Ethereum, DeFi, NFTs
- Finance - Stocks, Earnings, Markets
- Economy - Fed decisions, Inflation, GDP
- Tech - AI, Companies, Products
- Culture - Entertainment, Media, Awards
- World - Geopolitics, International events
- Climate & Science - Weather, Research, Environment
Troubleshooting Tips
How do I use categories to filter markets?
How do I use categories to filter markets?
categories array in filterPredictionMarkets. You can specify one or more categories at any level. For example, categories: ["sports", "nba"] returns markets tagged with either Sports or NBA. Category matching is case-insensitive and hierarchical.Why do some categories appear empty?
Why do some categories appear empty?
filterPredictionMarkets with that category slug and check the count.Can I search for markets by category name?
Can I search for markets by category name?
phrase parameter in filterPredictionMarkets along with the categories filter. The phrase searches market questions and event labels, while categories filter by assigned tags. Combining both gives precise results.How often are categories updated?
How often are categories updated?
What's the difference between category and eventLabel?
What's the difference between category and eventLabel?
Can markets have multiple categories?
Can markets have multiple categories?
filterPredictionMarkets with multiple category filters to find markets at the intersection.How do I find the most popular categories?
How do I find the most popular categories?
filterPredictionMarkets to query markets by category and check the count field in the response. You can also rank by trendingScore24h or volumeUsd24h to find the most active markets within each category.Related Recipes
- Discover Prediction Markets: Use categories to build filter UIs for event and market discovery