

Prediction Markets Are Booming. The Data Is Already Indexed.
Two years ago, prediction markets were a curiosity that economists studied and crypto Twitter argued about. Combined lifetime volume on Polymarket and Kalshi had already , and , more than . Polymarket and Kalshi now own most of the category, and . The unprecedented growth we’re seeing is about to soon face its biggest seasonal catalyst. The NFL season kicks off September 9, 2026 and prediction markets are projected to trade a whopping $36.8 billion on football outcomes this season, more than double 2025’s volume, and for the first time, supersede traditional U.S. sportsbooks
While the money remains the headline, what runs underneath it is widely underdiscussed.
How Prediction Markets Actually Work Onchain
A prediction market is easy to describe. You buy a share in an outcome (say, "Yes, the rate cut happens") for somewhere between zero and one dollar. If you are right, the share is redeemed for a dollar. If you are wrong, it is worth nothing. The price in between is the crowd's live estimate of how likely the event is. That is what makes these markets useful: they compress thousands of scattered opinions into a single, moving number that has consistently beaten polls and pundits.
Turning a real-world event into a trustless, tradeable contract takes machinery most traders never see. Three pieces have to work together.
First, the outcome has to become a token. Most serious onchain markets use the (yes, ), which locks collateral and mints a matched set of "Yes" and "No" tokens that always sum to a dollar. One contract can run thousands of markets at once.
Second, when the event is over, something has to declare the answer. This is the resolution layer, and it is what separates prediction markets from ordinary derivatives. A futures contract settles against a price feed. A prediction market settles against a fact, did the thing happen or not, which requires an oracle that can interpret a plain-language question and produce a verifiable result. Polymarket leans on , where answers are proposed and anyone can dispute them.
Third, buyers and sellers need to be matched. Polymarket runs an order book that matches offchain in milliseconds while settling onchain, giving traders tight spreads without asking them to give up custody or transparency.
Each step throws off a stream of onchain events: markets created, positions split and merged, orders filled, disputes raised, outcomes resolved, winnings redeemed. That stream is one of the core infrastructure challenges.
Why Onchain Prediction Market Data Is Hard to Use
All that onchain activity is public, but it is not legible. A condition ID is a hash, not a question. A resolution is a number, not "the Eagles covered." Order-book depth lives offchain in a matching engine. Answering something as basic as "what is this wallet holding, and what is this market's live probability?" means stitching together typed outcome tokens, oracle events, and offchain question text across contracts.
Every team building here hits a similar wall. Before you can do backtesting, ship a trading interface, a risk model, a leaderboard, or a forecasting agent, you have to index the chain. Doing that from scratch is slow and brittle, and everyone ends up rebuilding the same pipeline.
How The Graph Indexes Polymarket Data
This is the problem The Graph, the indexing and query layer of web3, exists to solve. Instead of running its own indexing backend, a team defines a Subgraph (an open API for a specific slice of onchain data), deploys it to The Graph Network, and queries it with GraphQL. For Polymarket, most of that work is already done.
The Graph ecosystem serves Polymarket data through three distinct products. Each one fits a different job, and all three are built for the same end goal: backtest a strategy against real history before you risk capital on it.
Subgraphs are best for structured history you query with GraphQL. Start with the , which walks through querying live markets in a few lines of GraphQL. The canonical source is the , which indexes the full position lifecycle: Split (a trader locks USDC and mints a matched set of Yes/No tokens), Merge (the reverse), Redemption (claiming a payout after a market resolves), and neg-risk conversions for multi-candidate events, plus the Condition, Position, and market-maker records that tie each token back to its market. Companion Subgraphs on cover order fills, open interest, and profit-and-loss. Use Subgraphs to build leaderboards, position and P&L analytics, and clean historical datasets to backtest against.
Substreams are best when you need the data in your own infra. Search "Polymarket" on and several production packages will come up – two of particular interest. streams order fills, market statistics, and trader analytics, and it indexes both CLOB v1 and v2 across Polymarket's April 2026 migration so a single stream spans the change. tracks user positions, realized P&L, and platform-wide volume from the CTF Exchange events as they happen. Use Substreams when speed matters most, like during a Sunday NFL slate, or on a surprise macro print, to power live dashboards, instant alerts on contested resolutions, and your own datastore.
Token API is best when you need REST endpoints you can call in one line. When you want data without deploying anything, is the fastest path. Pinax’s Token API is built on the Substreams packages above, so the same onchain data arrives as plain JSON. The /v1/polymarket/* endpoints cover markets, OHLCV, open interest, activity, positions, users, and platform aggregates, with per-user cost basis and realized vs. unrealized P&L already computed. Pinax documents three common patterns: replay historical OHLCV plus the activity feed to , watch the user leaderboard to build a copy-trading app, or read positions to build a portfolio and tax dashboard. The coverage extends to HyperLiquid HIP-4 outcome markets too. Grab a key at and call it from a notebook, an app, or an MCP client.
For teams building AI-native tools (forecasting agents, natural-language market intelligence, automated traders), the path is shorter still. A community server called exposes this Subgraph data to any MCP-compatible client, including Claude and Cursor, with tools for market data, trader leaderboards, open interest, and activity feeds. Setup takes about two minutes with a free API key from .
Which one to reach for. Query a Subgraph when you want structured history and GraphQL. Run a Substreams package when you want a real-time stream or want to shape the raw data yourself. Call the Token API when you want computed metrics over HTTP with nothing to deploy. The hardest indexing work in the category already exists. Point your product at it and build the part that is actually yours.
The Opportunity for Prediction Market Builders
Prediction markets show a pattern that runs through all of DeFi: the application everyone sees is only as good as the data layer nobody talks about. Deterministic contract events, typed outcome tokens, a clean lifecycle from creation to resolution: this vertical suits structured indexing better than most, and the tooling is already live. Football sharpens the case. Game-day markets (spreads, props, live in-game trading) throw off orders, fills, and resolutions at a pace that election markets don’t really ever reach, and every one of those events has to be indexed accordingly.
If you are building the next forecasting venue, analytics product, or trading agent, the advice is short. Don't write indexers from scratch. The Subgraphs are deployed and the data is served. Point your product at it and build the part that is actually yours.
Explore prediction market data through , spin up your own API in , or connect an agent through The Graph's .
About The Graph
The Graph is a suite of blockchain data infrastructure products that extract, process, and deliver scalable blockchain data solutions across 60+ networks. The Graph enables application developers, data analysts, AI agents, and enterprise teams that need structured, real-time access to blockchain data. Products include Subgraphs, Firehose, Substreams, and Amp. As of early 2026, The Graph has served over 1.27 trillion queries to more than 75,000 projects, powered by a network of independent Indexers around the world.
Follow The Graph on , , , and . Join the community on The Graph’s , join technical discussions on The Graph’s .
