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.
Subscription example
Usage Guidelines
- Market ID format:
- Polymarket:
<marketAddress>:Polymarket:<exchangeAddress>:<networkId>(e.g.,0x25aa90b3cd98305e849189b4e8b770fc77fe89bccb7cf9656468414e01145d38:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137) - Kalshi:
<marketSlug>:Kalshi(e.g.,KXMVECROSSCATEGORY-S2026A4A05B370DF-F1FBA451AA9:Kalshi)
- Polymarket:
- Subscribe using
marketIdto receive live bar chart data for a specific prediction market (outcome) - Price OHLC values range from 0.00 to 1.00, representing the probability (0% to 100%) of that outcome
- Updates stream in real-time as trades occur on the specific market
Troubleshooting Tips
What's the difference between market bars and event bars?
What's the difference between market bars and event bars?
onPredictionMarketBarsUpdated) track individual outcomes with price OHLC data, while event bars (onPredictionEventBarsUpdated) aggregate data across all outcomes. Use market bars for charting outcome probabilities and event bars for overall event activity.How do I interpret outcome0, outcome1, etc.?
How do I interpret outcome0, outcome1, etc.?
outcomeX field represents one possible result in the market. For binary markets, outcome0 is typically “Yes” and outcome1 is “No”. For multi-outcome markets, there may be outcome2, outcome3, etc. Check the market metadata via getPredictionMarkets to see outcome labels.Why do outcome prices not always sum to 1.00?
Why do outcome prices not always sum to 1.00?
What's the difference between volumeShares and volumeUsd?
What's the difference between volumeShares and volumeUsd?
Which resolution should I use for price charts?
Which resolution should I use for price charts?
min1 or min5. For intraday charts, use min15 or hour1. For daily overviews, use hour4 or day1. Higher resolutions reduce noise but may miss short-term price movements. Request only needed resolutions to minimize data transfer.How do I track buy vs. sell pressure?
How do I track buy vs. sell pressure?
buys and sells counts along with buyVolumeUsd and sellVolumeUsd within each outcome’s data. More buys than sells (or higher buy volume) indicates bullish sentiment on that outcome, while the opposite suggests bearish sentiment.