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

Why Use Codex Over the Polymarket 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

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

Find Top Polymarket Markets by 24h Volume

Find Polymarket Markets in Politics Category

Find Top Polymarket Traders

Get Price History for a Market

Try It in the Explorer

Test any Polymarket query directly in the Codex GraphQL Explorer.

Recipes

Step-by-step guides for building with Polymarket data:

Discover Prediction Markets

Browse categories, trending events, and filter markets.

Prediction Traders

Trader leaderboards, profiles, and performance analytics.

Prediction Charts

Outcome probability charts, multi-market comparisons, and OHLC data.

Prediction Event Dashboard

Build a complete event detail page with real-time data.