Skip to main content

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.

eventId
String!
required
The event ID to fetch top markets for
from
Int!
required
Unix timestamp (seconds) for the start of the range
to
Int!
required
Unix timestamp (seconds) for the end of the range
resolution
PredictionMarketBarsResolution!
required
Resolution for the bars (e.g., min1, min5, hour1, day1) See PredictionMarketBarsResolution
countback
Int
Number of bars to fetch backwards from ‘to’ (alternative to ‘from’)
limit
Int
Maximum number of markets to return (default 5, max 10)
useLeaderboard
Boolean
Use pre-computed leaderboard ranking (overrides rankBy options when true)
rankBy
PredictionMarketRankingAttribute
Market-level attribute to rank by (use this OR rankByOutcome + rankByOutcomeAttribute) See PredictionMarketRankingAttribute
rankByOutcome
PredictionOutcomeIndex
Which outcome to rank by (use with rankByOutcomeAttribute) See PredictionOutcomeIndex
rankByOutcomeAttribute
PredictionOutcomeRankingAttribute
Outcome-level attribute to rank by (requires rankByOutcome) See PredictionOutcomeRankingAttribute
rankDirection
RankingDirection
Direction to rank (DESC = highest first) See RankingDirection
removeEmptyBars
Boolean
Whether to remove empty bars from the response
marketIds
[String!]
Explicit list of market IDs to fetch (overrides ranking if provided)

Used By

Used as input by