Skip to main content
Kalshi is the first CFTC-regulated prediction market exchange in the United States, offering event contracts on topics ranging from politics and economics to weather and technology. Codex will index all Kalshi markets, events, trades, and trader activity, providing comprehensive access to market data through a unified GraphQL API.
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

Why Use Codex Over the Kalshi API Directly?

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?”
Use 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

Trader data is not available for Kalshi. Due to privacy considerations on Kalshi’s regulated exchange, individual trader information is not exposed through their API. This means:
  • No traderId filtering is available on any endpoints
  • Trader-specific queries and endpoints cannot be used with Kalshi data
  • Trade data shows aggregate activity but not individual trader identities
  • Trade events show TRADE type only (no distinction between BUY/SELL)

Supported APIs

Market & Event API

Trading & Activity API

  • Get Prediction Trades — Query trade history and aggregate trading activity on Kalshi (no individual trader data)

Market Discovery API

Example Queries (Available Soon)

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.