Polymarket GraphQL Reference
Polymarket's on-chain prediction markets — events and the YES/NO outcome tokens that trade against them, with OHLC candles, minute-fidelity price history, and the full public trade tape.
Every GraphQL type, relation, argument, and field — generated from the served schema, so it can never disagree with the API. Each column is documented inline; relations and foreign keys link straight to the type they resolve to. Root fields take the same filters as REST; requests are metered by rows resolved, nested lists included.
Main
PolymarketEventsleague_code.Fields (19)
idBigIntkeyPrimary Key
condition_idStringPolymarket event condition ID (stable identifier)
10354slugStringURL slug, e.g. "nba-dal-phx-2026-04-08"
nba-play-in-lakers-vs-pelicanstitleStringNBAdescriptionStringnullableasdstart_dateStringnullable2024-08-17T12:00:00.000Zend_dateStringnullable2025-02-09T12:00:00.000ZstatusString"active", "closed", "resolved"
closedValues:closedactiveneg_riskBooleanTrue for multi-outcome groups (e.g., 30-team NBA Champion)
falseValues:falsetruecompetition_idBigIntnullablePolymorphic cross-schema ref — {league}.games (team sports) or golf.tournaments (golf), resolved at app level by slug parsing via league_code. Dereference via main.competitions. NULL until linked.
124game_dateStringnullableGame date parsed from slug
2025-04-11T04:00:00.000Zhome_teamStringnullableTricode: "PHX"
PHIaway_teamStringnullableTricode: "DAL"
MINleague_codeStringnullablee.g. "nba", denormalized for filtering
nbaValues:nbanflmlbnhlvolumeBigIntnullableLifetime volume in USDC minor units
150liquidityBigIntnullableCurrent liquidity in USDC minor units
272market_countIntnullable1created_atStringupdated_atStringRelations (3)
polymarket.markets rows whose event_id references this row.
polymarket.tokens rows whose event_id references this row.
The sporting event this row prices, resolved through the cross-sport competition registry via (league_code, competition_id); null when the row is not linked to a game or tournament.
Arguments (6)
firstIntPage size; clamped to the table's REST default/max limits.afterBigIntKeyset cursor — returns rows with id > after, ordered by id ascending.league_codeStringFilter to events for a single league/sport slug (e.g., "nba", "nfl", "soccer").competition_idIntFilter to events linked to a specific competition (cross-schema game; resolved from slug).statusStringFilter by event status — "active" or "closed".game_dateStringFilter to events scheduled on a specific date (YYYY-MM-DD).
PolymarketTokensmarket_id.Fields (11)
idBigIntkeyPrimary Key
Polymarket clobTokenId (used for CLOB API queries)
1120519926146711332015924000509699530433233388327217789336221677999766207942481outcomeStringOutcome label: team name, "Yes", "No"
Yesoutcome_indexInt0-based index of this outcome within the market
0price_bpsIntnullableLatest price in basis points (0-10000)
10000winnerBooleannullableTrue if this outcome won, null if unresolved
falseValues:falsetruecreated_atStringupdated_atStringfinal_price_bpsIntnullableSettlement price (10000 for winner, 0 for loser)
10000Relations (2)
The polymarket.markets row referenced by market_id; null when unlinked.
The polymarket.events row referenced by event_id; null when unlinked.
Arguments (4)
firstIntPage size; clamped to the table's REST default/max limits.afterBigIntKeyset cursor — returns rows with id > after, ordered by id ascending.market_idIntFilter to outcome tokens for a single Polymarket market.event_idIntFilter to tokens linked to a single event (denormalized for direct event queries).
PolymarketMarketsevent_id | competition_id.Fields (22)
idBigIntkeyPrimary Key
condition_idStringPolymarket market condition ID (stable identifier)
0x141f2fb7dc316ca019d7ce9d0fe530a78e18b637ea84211d8f4cebe43742a7bb1088questionStringnullableFull question text
Over 229.5slugStringnullablenba-play-in-lakers-vs-pelicanscompetition_idBigIntnullablePolymorphic cross-schema ref (denormalized from event) resolved at app level by league_code. Dereference via main.competitions. NULL until linked.
4801neg_riskBooleanfalseValues:falsetruestatusString"active", "closed", "resolved"
closedresultStringnullableWinning outcome string, null if unresolved
Overoutcome_countIntNumber of tokens/outcomes (2 for binary, N for multi-outcome)
2activeBooleantrueValues:truefalseclosedBooleantruevolumeBigIntnullable150liquidityBigIntnullablebest_bid_bpsIntnullableBasis points (0-10000)
100best_ask_bpsIntnullableBasis points (0-10000)
10000last_trade_price_bpsIntnullableBasis points (0-10000)
10000created_atStringupdated_atStringresolved_atStringnullableWhen the market was resolved
2026-06-30T19:02:32.753Zresolution_sourceStringnullable"uma", "manual", etc.
umaToken ID that paid out at 1.00 (winner)
112051992614671133201592400050969953043323338832721778933622167799976620794248Relations (7)
The polymarket.events row referenced by event_id; null when unlinked.
polymarket.tokens rows whose market_id references this row.
polymarket.candles rows whose market_id references this row.
polymarket.price_histories rows whose market_id references this row.
polymarket.public_trades rows whose market_id references this row.
polymarket.order_book_snapshots rows whose market_id references this row.
polymarket.market_snapshots rows whose market_id references this row.
Arguments (6)
firstIntPage size; clamped to the table's REST default/max limits.afterBigIntKeyset cursor — returns rows with id > after, ordered by id ascending.event_idIntFilter to all markets that belong to a single Polymarket event.competition_idIntFilter to markets linked to a specific competition (denormalized from event).statusStringFilter by market status — "active" or "closed" ("resolved" appears only on 22 legacy rows that carry no resolution data; resolution fields live on closed rows).activeBooleanFilter by active status (defaults to true to show only currently-active rows; pass active=false to include inactive).
Markets
PolymarketCandlesmarket_id.Fields (13)
idBigIntkeyPrimary Key
6633524850201500306499107584968898210303462811722892789428192097795393573838051150period_intervalIntPeriod length in seconds (1, 60, 300, 3600)
1end_period_tsIntUnix epoch second of period end
1775238091open_bpsIntnullable9980high_bpsIntnullable9980low_bpsIntnullable9980close_bpsIntnullable9980volumeIntTrade count in period
1sizeBigIntTotal share size in micro-units
5000000created_atStringupdated_atStringRelations (1)
The polymarket.markets row referenced by market_id; null when unlinked.
Arguments (5)
firstIntPage size; clamped to the table's REST default/max limits.afterBigIntKeyset cursor — returns rows with id > after, ordered by id ascending.market_idIntFilter to candles for all tokens in a single Polymarket market.token_idStringFilter to candles for a single outcome token (clobTokenId).period_intervalIntBin width in seconds. Currently every row is period_interval=1 (event-driven captures, irregular spacing) — resample client-side for fixed OHLC bins.
PolymarketPriceHistoriestoken_id.Fields (12)
idBigIntkeyPrimary Key
Polymarket clobTokenId
5771676627182954113677164857547228277089396639521594262964034606220001939923interval_secondsIntPeriod length in seconds (60, 3600, 86400)
86400period_startStringStart of this OHLC period
2026-04-03T03:36:43.000Zopen_bpsIntOpening price in basis points
5high_bpsInt5low_bpsInt5close_bpsInt5volumeBigIntnullablePeriod volume
created_atStringupdated_atStringRelations (1)
The polymarket.markets row referenced by market_id; null when unlinked.
Arguments (5)
firstIntPage size; clamped to the table's REST default/max limits.afterBigIntKeyset cursor — returns rows with id > after, ordered by id ascending.token_idStringFilter to price history for a single Polymarket outcome token (clobTokenId).market_idIntFilter to price history for all tokens in a single market.interval_secondsIntUpstream fetch-window label (currently always 86400) — NOT a bin width; points within a window are irregularly spaced. Resample client-side.
PolymarketPublicTradesmarket_id.Fields (12)
idBigIntkeyPrimary Key
trade_idStringTrade ID from Polymarket API
0x8cf169f32ea173f635deebbeab98aeb505e9b654687ec7a243d288e3ab12a3f3Polymarket clobTokenId
44914465637297319816681463234953032477919413063019359633128421605039733545953sideString"BUY" or "SELL"
BUYValues:BUYSELLprice_bpsIntTrade price in basis points (0-10000)
6300sizeBigIntTrade size (number of shares)
5000000traded_atString2026-03-18T20:53:01.000Zcreated_atStringupdated_atStringmaker_addressStringnullableMaker address (limit order provider) from on-chain event
0x88906147a72d6e22a916f9bd17351a01e045cefbtaker_addressStringnullableTaker address (market order) from on-chain event
0x4bfb41d5b3570defd03c39a9a4d8de6bd8b8982eRelations (1)
The polymarket.markets row referenced by market_id; null when unlinked.
Arguments (4)
firstIntPage size; clamped to the table's REST default/max limits.afterBigIntKeyset cursor — returns rows with id > after, ordered by id ascending.market_idIntFilter to trades on a single Polymarket market.token_idStringFilter to trades for a single outcome token (clobTokenId).
Misc
PolymarketMarketSnapshotsmarket_id.Fields (11)
idBigIntmarket_idBigIntcondition_idStringbest_bid_bpsIntbest_ask_bpsIntlast_trade_price_bpsIntvolumeBigIntliquidityBigIntcaptured_atStringcreated_atStringupdated_atStringRelations (1)
The polymarket.markets row referenced by market_id; null when unlinked.
Arguments (3)
firstIntPage size; clamped to the table's REST default/max limits.afterBigIntKeyset cursor — returns rows with id > after, ordered by id ascending.market_idIntFilter to snapshots for a single Polymarket market.
PolymarketOrderBookSnapshotsmarket_id.Fields (12)
idBigInttoken_idStringmarket_idBigIntsideStringprice_bpsIntsizeBigIntdepth_rankIntspread_bpsIntmidpoint_bpsIntcaptured_atStringcreated_atStringupdated_atStringRelations (1)
The polymarket.markets row referenced by market_id; null when unlinked.
Arguments (4)
firstIntPage size; clamped to the table's REST default/max limits.afterBigIntKeyset cursor — returns rows with id > after, ordered by id ascending.market_idIntFilter to order-book snapshots for all tokens in a single Polymarket market.token_idStringFilter to order-book snapshots for a single outcome token (clobTokenId).
PolymarketTokenSnapshotstoken_id.Fields (7)
idBigInttoken_idStringmarket_idBigIntprice_bpsIntcaptured_atStringcreated_atStringupdated_atStringArguments (4)
firstIntPage size; clamped to the table's REST default/max limits.afterBigIntKeyset cursor — returns rows with id > after, ordered by id ascending.token_idStringFilter to snapshots for a single Polymarket outcome token (clobTokenId).market_idIntFilter to snapshots for all tokens in a single market (denormalized for market-level queries).