Skip to main content
Polymarket is the world’s largest decentralized prediction market platform, built on Polygon. Codex indexes all Polymarket markets, events, trades, and trader activity, providing comprehensive access to market data, outcome prices, trading volumes, and real-time event streams through a unified GraphQL API.
Prediction Market data is currently in beta. It is actively being worked on and improved, but may be unreliable.At least for the time being, these endpoints require a Growth or Enterprise plan. Learn more.

Platform Information

PropertyValue
PlatformPolymarket
NetworkPolygon
Chain ID137
Protocol FilterPOLYMARKET
StatusLive

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

Polymarket uses specific ID formats to uniquely identify markets, events, and traders across the platform:

Market ID

Format: <marketAddress>:Polymarket:<exchangeAddress>:<networkId> Example: 0x25aa90b3cd98305e849189b4e8b770fc77fe89bccb7cf9656468414e01145d38:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137
  • marketAddress: The unique contract address for this specific market outcome
  • Polymarket: The protocol identifier
  • exchangeAddress: The Polymarket exchange contract address (typically 0xc5d563a36ae78145c45a50134d48a1215220f80a)
  • networkId: The blockchain network ID (137 for Polygon)

Event ID

Format: <eventSlug>:Polymarket:<exchangeAddress>:<networkId> Example: 67284:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137
  • eventSlug: The Polymarket event identifier (venue ID)
  • Polymarket: The protocol identifier
  • exchangeAddress: The Polymarket exchange contract address
  • networkId: The blockchain network ID (137 for Polygon)

Trader ID

Format: <address>:Polymarket Example: 0x742d35cc6634c0532925a3b844bc9e7595f0beb6:Polymarket
  • address: The trader’s wallet address
  • Polymarket: The protocol identifier

Supported APIs

Market & Event API

Trading & Activity API

Market Discovery API

Example Queries

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

Find Top Polymarket Markets by 24h Volume

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

Find Polymarket Markets in Politics Category

{
  filterPredictionMarkets(
    filters: {
      protocol: POLYMARKET
      status: OPEN
      categories: ["politics"]
    }
    rankings: [{ attribute: volumeUsd24h, direction: DESC }]
    limit: 20
  ) {
    count
    results {
      id
      eventLabel
      market {
        question
      }
      categories
      volumeUsd24h
      liquidityUsd
      outcome0 {
        label
        lastPriceUsd
      }
      outcome1 {
        label
        lastPriceUsd
      }
    }
  }
}

Find Top Polymarket Traders

{
  filterPredictionTraders(
    filters: { protocol: POLYMARKET }
    rankings: [{ attribute: TOTAL_VOLUME_USD_ALL, direction: DESC }]
    limit: 50
  ) {
    count
    results {
      trader {
        primaryAddress
        alias
        isVerified
      }
      totalVolumeUsdAll
      totalProfitUsdAll
      totalTradesAll
      activeMarketsCount
      winRate24h
      realizedPnlUsd24h
    }
  }
}

Get Price History for a Market

{
  predictionMarketBars(
    input: {
      marketId: "0x25aa90b3cd98305e849189b4e8b770fc77fe89bccb7cf9656468414e01145d38:Polymarket:0xc5d563a36ae78145c45a50134d48a1215220f80a:137"
      resolution: hour1
      from: 1772665600
      to: 1773270400
    }
  ) {
    marketId
    bars {
      t
      volumeUsd
      trades
      uniqueTraders
      outcome0 {
        priceUsd {
          o
          h
          l
          c
        }
      }
      outcome1 {
        priceUsd {
          o
          h
          l
          c
        }
      }
    }
  }
}

Try It in the Explorer

Test any Polymarket query directly in the Codex GraphQL Explorer.