Prediction Market data is currently in beta and actively being worked on. Both Polymarket and Kalshi data are available now.At least for the time being, these endpoints require a Growth or Enterprise plan. Learn more.
Platform Information
| Property | Value |
|---|---|
| Platform | Kalshi |
| Protocol Filter | KALSHI |
| Status | Live |
| Type | Regulated Exchange (CFTC) |
Why Use Codex Over the Kalshi API Directly?
| Codex API | Kalshi API | |
|---|---|---|
| Rate Limits | 1,000+ req/s | ~20 req/s |
| Query Speed | Optimized for fast responses | Slower for queries |
| Filtering | Extensive filtering on events and markets (by volume, liquidity, category, etc) | Limited filtering options |
| Aggregated Data | Pre-computed stats like trending scores, 24h volume, and market-level analytics | Must compute aggregates yourself from raw data |
| Unified Schema | Same GraphQL API works across tokens, Kalshi, Polymarket, and future platforms | Kalshi-only |
Understanding Events and Markets
Events are collections of related markets. For example:- Event: “Champions League Final 2026”
- Market 1: “Will Team A win?”
- Market 2: “Will the score be over 2.5 goals?”
- Market 3: “Will there be a penalty?”
filterPredictionEvents to find trending high-level topics. Use filterPredictionMarkets to find trending markets.
ID Formats
Kalshi uses specific ID formats to uniquely identify markets, events, and traders across the platform:Market ID
Format:<marketSlug>:Kalshi
Example: KXMVECROSSCATEGORY-S2026A4A05B370DF-F1FBA451AA9:Kalshi
marketSlug: The Kalshi market identifier (venue market slug)Kalshi: The protocol identifier
Event ID
Format:<eventSlug>:Kalshi
Example: KXMVESPORTSMULTIGAMEEXTENDED-S2026350C4EF9BCE:Kalshi
eventSlug: The Kalshi event identifier (venue event slug)Kalshi: The protocol identifier
Kalshi uses slug-based identifiers rather than blockchain addresses since it operates as a centralized, CFTC-regulated exchange (not on-chain like Polymarket).
Kalshi-Specific Limitations
Supported APIs
Market & Event API
- Filter Prediction Events — Query Kalshi events with advanced filtering
- Filter Prediction Markets — Search and filter Kalshi markets by volume, liquidity, category, and other criteria
- Get Detailed Event Stats — Fetch detailed statistics for Kalshi events
- Get Detailed Market Stats — Retrieve comprehensive trading metrics for any Kalshi market
- Get Event Price Bars — Retrieve event-level price history for charting
- Get Market Price Bars — Fetch OHLC price data for Kalshi markets
Trading & Activity API
- Get Prediction Trades — Query trade history and aggregate trading activity on Kalshi (no individual trader data)
Market Discovery API
- Get Prediction Categories — Browse Kalshi categories (Politics, Economics, Weather, etc.)
Example Queries (Available Soon)
Find Trending Kalshi Events
Find Top Kalshi Markets by 24h Volume
Find Kalshi Markets in Economics Category
Get Price History for a Market
Try It in the Explorer
Test any Kalshi query directly in the Codex GraphQL Explorer.Recipes
Step-by-step guides for building with prediction market data:Discover Prediction Markets
Browse categories, trending events, and filter markets.
Prediction Charts
Outcome probability charts, multi-market comparisons, and OHLC data.
Prediction Event Dashboard
Build a complete event detail page with real-time data.
Related Resources
- Supported Prediction Markets Overview — All supported platforms
- Polymarket API — Live prediction market data