> ## 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.

# Supported Prediction Markets

> Access real-time prediction market data from leading platforms with the Codex API. Track market prices, trading activity, events, and trader analytics.

Codex provides comprehensive prediction market data coverage across major platforms. Access real-time market prices, outcome probabilities, trading volumes, event data, and trader analytics through a unified GraphQL API.

<Info>
  **Prediction Market data is currently in beta**. It is actively being worked on and improved, but may be unreliable. Polymarket and Kalshi data are live.

  At least for the time being, these endpoints require a Growth or Enterprise plan. [Learn more](https://dashboard.codex.io/dashboard/billing?utm_source=codex\&utm_medium=docs\&utm_campaign=billing).
</Info>

## Featured Prediction Market Platforms

<CardGroup cols={2}>
  <Card title="Polymarket" icon="https://mintcdn.com/codex-dfdf2708/PrZZ9X_vBR9H4bfJ/images/prediction-markets/polymarket.png?fit=max&auto=format&n=PrZZ9X_vBR9H4bfJ&q=85&s=3f6c942225e6b0297bad0530503f6db9" href="/prediction-markets/polymarket" width="180" height="180" data-path="images/prediction-markets/polymarket.png">
    Leading on-chain prediction market platform on Polygon.
  </Card>

  <Card title="Kalshi" icon="https://mintcdn.com/codex-dfdf2708/PrZZ9X_vBR9H4bfJ/images/prediction-markets/kalshi.png?fit=max&auto=format&n=PrZZ9X_vBR9H4bfJ&q=85&s=d578c682b614cb847233e6c8d12c7f41" href="/prediction-markets/kalshi" width="192" height="192" data-path="images/prediction-markets/kalshi.png">
    CFTC-regulated prediction market exchange.
  </Card>
</CardGroup>

## Supported Prediction Market Platforms

Below is the complete list of prediction market platforms supported by Codex. Use the Protocol value to filter [`filterPredictionEvents`](/api-reference/queries/filterpredictionevents) and [`filterPredictionMarkets`](/api-reference/queries/filterpredictionmarkets).

| Platform                                     | Protocol Filter | Status |
| -------------------------------------------- | --------------- | ------ |
| [Polymarket](/prediction-markets/polymarket) | `POLYMARKET`    | Live   |
| [Kalshi](/prediction-markets/kalshi)         | `KALSHI`        | Live   |

## 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`](/api-reference/queries/filterpredictionevents) to find trending high-level topics. Use [`filterPredictionMarkets`](/api-reference/queries/filterpredictionmarkets) to find trending markets.

## Supported APIs

### Market & Event API

* [Filter Prediction Events](/api-reference/queries/filterpredictionevents) — Query prediction events across platforms
* [Filter Prediction Markets](/api-reference/queries/filterpredictionmarkets) — Search and filter prediction markets by volume, liquidity, and other criteria
* [Get Detailed Event Stats](/api-reference/queries/detailedpredictioneventstats) — Fetch detailed statistics for prediction events
* [Get Detailed Market Stats](/api-reference/queries/detailedpredictionmarketstats) — Retrieve comprehensive trading metrics for any market
* [Get Event Price Bars](/api-reference/queries/predictioneventbars) — Retrieve event-level price history
* [Get Market Price Bars](/api-reference/queries/predictionmarketbars) — Fetch OHLC price data for prediction markets

### Trading & Activity API

* [Get Prediction Trades](/api-reference/queries/predictiontrades) — Query trade history across prediction markets
* [Get Trader Stats](/api-reference/queries/detailedpredictiontraderstats) — Retrieve comprehensive trader performance metrics
* [Filter Traders](/api-reference/queries/filterpredictiontraders) — Discover top traders by volume, PnL, and other metrics
* [Get Trader Market Stats](/api-reference/queries/predictiontradermarketsstats) — Analyze trader performance across markets

### Market Discovery API

* [Get Prediction Categories](/api-reference/queries/predictioncategories) — Browse available market categories
* [Get Token Holders](/api-reference/queries/predictiontokenholders) — Query outcome token holders and positions

## Querying Prediction Markets

Use the filter queries to discover markets and events. Both support optional protocol filtering:

### Find trending events

```graphql theme={null}
{
  filterPredictionEvents(
    filters: {
      protocol: POLYMARKET
      status: OPEN
    }
    rankings: [{ attribute: trendingScore24h, direction: DESC }]
    limit: 10
  ) {
    count
    results {
      event {
        question
        description
      }
      marketCount
      volumeUsd24h
      trendingScore24h
    }
  }
}
```

### Find top markets by 24h volume

```graphql theme={null}
{
  filterPredictionMarkets(
    filters: {
      protocol: POLYMARKET
      status: OPEN
    }
    rankings: [{ attribute: volumeUsd24h, direction: DESC }]
    limit: 10
  ) {
    count
    results {
      id
      eventLabel
      market {
        question
        protocol
      }
      volumeUsd24h
      liquidityUsd
      outcome0 {
        label
        lastPriceUsd
      }
      outcome1 {
        label
        lastPriceUsd
      }
    }
  }
}
```

See the [GraphQL Explorer](/explore) to try it out.

## Recipes

Step-by-step guides for building with prediction market data:

<CardGroup cols={2}>
  <Card title="Discover Prediction Markets" icon="magnifying-glass" href="/recipes/predictions/discover-markets">
    Browse categories, trending events, and filter markets.
  </Card>

  <Card title="Prediction Traders" icon="users" href="/recipes/predictions/traders">
    Trader leaderboards, profiles, and performance analytics.
  </Card>

  <Card title="Prediction Charts" icon="chart-line" href="/recipes/predictions/charts">
    Outcome probability charts, multi-market comparisons, and OHLC data.
  </Card>

  <Card title="Prediction Event Dashboard" icon="table-columns" href="/recipes/predictions/event-dashboard">
    Build a complete event detail page with real-time data.
  </Card>
</CardGroup>

<Info>
  Interested in data from a prediction market platform we don't support yet? [Let us know](mailto:hello@codex.io?subject=Prediction%20Market%20Indexing) — we're expanding our coverage regularly.
</Info>
