Docs
Search⌘ K
  • Home
  • About The Graph
  • Supported Networks
  • Protocol Contracts
  • Subgraphs
    • Substreams
      • Token API
        • Hypergraph
          • AI Suite
            • Indexing
              • Graph Horizon
                • Resources
                  Token API > Guides

                  3 minutes

                  Polymarket Data Overview

                  The Graph’s Token API provides a complete set of REST endpoints for querying Polymarket’s on-chain prediction market data. These endpoints are purpose-built for research, analytics, and historical analysis — covering markets, platform-wide aggregates, and individual user performance.

                  Why Use The Graph for Polymarket Data

                  Polymarket already exposes its own API for real-time order flow and WebSocket feeds optimized for low-latency trading. The Graph’s Polymarket endpoints serve a different purpose: they give researchers, analysts, and builders structured access to aggregated, historical, and cross-market data that Polymarket’s native API doesn’t surface.

                  What Users Get with The Graph’s Token API

                  • Platform-wide aggregates: Daily or weekly volume, open interest, fees, and split/merge activity rolled up across every Polymarket market. Track the platform’s growth trajectory, not just individual markets.
                  • User leaderboards and PnL breakdowns: Paginated rankings by volume, realized PnL, unrealized PnL, or trade count. Drill into any address to see per-token position history, cost basis, and entry prices.
                  • Market-level open interest time-series: Track collateral flows (splits, merges, redemptions) over time for any market. Understand conviction shifts beyond price alone.
                  • On-chain activity feeds: Chronological trade, split, merge, and redemption logs with transaction hashes and block numbers for full auditability.
                  • OHLCV price history: Standard candlestick data for any outcome token, ready for charting and backtesting.

                  A note on latency: If you need sub-second order book data or execution, Polymarket’s native WebSocket endpoints are the right tool. The Graph’s Polymarket endpoints are optimized for structured queries over historical and aggregated data, which feeds dashboards, research reports, and strategy backtests.

                  Getting Started

                  All Polymarket endpoints are available under the Token API base URL:

                  1https://token-api.thegraph.com/v1/polymarket/

                  You’ll need a Token API key. See the Quick Start guide⁠ to create one.

                  • Market Endpoints
                  • Platform Endpoints
                  • User Endpoints

                  You can also set up the Token API MCP to query Polymarket in your AI assistant.

                  Polymarket Endpoints at a Glance

                  GroupEndpointWhat it returns
                  Markets/v1/polymarket/marketsMarket metadata (question, outcomes, token IDs, volume, status)
                  Markets/v1/polymarket/markets/ohlcvOHLCV candlestick data per outcome token
                  Markets/v1/polymarket/markets/open-interestOpen interest time-series (splits, merges, redemptions)
                  Markets/v1/polymarket/markets/activityOnchain trade and position activity feed
                  Markets/v1/polymarket/markets/positionsAll user positions for a given outcome token (leaderboard)
                  Platform/v1/polymarket/platformPlatform-wide volume, OI, fees, and trade aggregates
                  Users/v1/polymarket/usersUser stats and leaderboard (volume, PnL, trade counts)
                  Users/v1/polymarket/users/positionsPer-user position breakdown with cost basis and PnL

                  Recommended Use Cases

                  1. Portfolio review and self-analysis

                  Use the User Lookup and User Positions endpoints to audit your own Polymarket account. See total PnL (realized and unrealized), review every position’s cost basis and entry price, and identify which markets drove gains or losses. This is the fastest path to a personal Polymarket PnL statement.

                  2. Leaderboard research and strategy mirroring

                  Use User Lookup without an address to pull the global leaderboard ranked by PnL, volume, or trade count. Identify top-performing wallets, then drill into their positions via User Positions to study what they’re buying, their sizing patterns, and where they’re concentrated. Combine with Market OHLCV to backtest whether mirroring their entries would have been profitable.

                  3. Market-level conviction analysis

                  Use Market Open Interest alongside OHLCV to separate price moves from real capital commitment. A price spike with flat open interest is noise. A price move backed by rising OI (new splits) signals genuine conviction. Market Activity gives you the raw on-chain logs to verify.

                  4. Platform health and trend monitoring

                  Use Platform Aggregates to track Polymarket’s overall trajectory, including daily volume trends, total open interest growth, fee revenue, and the split-to-merge ratio. This is essential context for anyone writing about prediction markets, building analytics dashboards, or evaluating Polymarket as a platform.

                  5. AI-assisted research with MCP tools

                  Pair these endpoints with The Graph’s Token API MCP server to let AI agents query Polymarket data conversationally. Ask questions like “Who are the top 10 traders by PnL this week?” or “What was the open interest trend on the 2026 election market?” and get structured answers grounded in on-chain data.

                  ⁠Edit on GitHub⁠

                  Create Custom GPTsFAQ
                  On this page
                  • Why Use The Graph for Polymarket Data
                  • What Users Get with The Graph’s Token API
                  • Getting Started
                  • Polymarket Endpoints at a Glance
                  • Recommended Use Cases
                  • 1. Portfolio review and self-analysis
                  • 2. Leaderboard research and strategy mirroring
                  • 3. Market-level conviction analysis
                  • 4. Platform health and trend monitoring
                  • 5. AI-assisted research with MCP tools
                  The GraphStatusTestnetBrand AssetsForumSecurityPrivacy PolicyTerms of Service