Skip to main content

Polymarket Historical Data API: Trades, Price History and Volume

Polymarket historical data on Bitquery covers every on-chain trade, outcome price, resolution and payout on Polygon. This page shows how to read it with the Polymarket historical data API: past trades of a market, Polymarket price history as candles, volume per day, a wallet's past trades and resolved markets.

The same Polymarket data is served in three layers. Pick the layer by how far back you need to go.

You needUseExample
Trades, prices and volume from the last few daysPredictionTrades on dataset: realtimeTrade history of a market
Price history (odds) of one outcome as candlesPredictionTrades with a time intervalHourly candles
Daily volume, or trades from weeks or months ago, back to 1 September 2025PredictionTrades on dataset: combinedDaily volume of a market
Resolved markets and payoutsPredictionManagements and PredictionSettlementsResolved markets
Full history as files, for backtests and warehousesBitquery Data StorePolymarket exports

How to get Polymarket historical data​

All queries on this page run on EVM(network: matic) and select Polymarket with Marketplace: { ProtocolName: { is: "polymarket" } }. The dataset argument picks the layer.

DatasetCoversAccess
realtimeAbout the last 4 daysEvery plan, including the free trial
archiveFrom 1 September 2025 up to the realtime windowPolymarket Historical Data add-on
combinedarchive and realtime together, up to the current blockPolymarket Historical Data add-on

Steps:

  1. Open the Bitquery IDE and paste a query from this page. Each one runs as written.
  2. Replace the market ID, outcome label or wallet with your own.
  3. Move the time window with since_relative, after_relative and before_relative.
  4. To call the API from code, generate an access token.

For history before 1 September 2025, or for a bulk load of the whole history, use the Bitquery Data Store. File layout and schemas are on the Polymarket exports page.

Fields used on this page​

FieldCubeWhat it holds
Block.Time, Block.DateAllTime and day of the event. Use them for the time bound and the order.
Trade.Prediction.Question.MarketIdPredictionTradesPolymarket market ID. The simplest filter for one market.
Trade.Prediction.Question.TitlePredictionTradesMarket question text.
Trade.Prediction.Outcome.LabelPredictionTradesOutcome traded, for example Yes or No.
Trade.Prediction.OutcomeToken.AssetIdPredictionTradesToken ID of the outcome.
Trade.OutcomeTrade.PricePredictionTradesPrice of one outcome share, between 0 and 1. It reads as the implied probability.
Trade.OutcomeTrade.AmountPredictionTradesOutcome shares traded.
Trade.OutcomeTrade.CollateralAmountInUSDPredictionTradesUSD value of the trade.
Trade.OutcomeTrade.Buyer, SellerPredictionTradesThe two sides of the trade.
Trade.OutcomeTrade.IsOutcomeBuyPredictionTradesTrade direction. See trade direction.
Management.EventTypePredictionManagementsCreated or Resolved.
Management.Prediction.Outcome.LabelPredictionManagementsWinning outcome on a Resolved row.
Settlement.EventTypePredictionSettlementsRedemption, Split or Merge.
Settlement.HolderPredictionSettlementsAccount that redeemed.
Settlement.Amounts.CollateralAmountInUSDPredictionSettlementsPayout in USD.

Polymarket historical data examples​

The examples use the market "New NVIDIA CEO named by December 31, 2026?" with market ID 6977205. Swap in any market ID from the Polymarket Markets API.

Trade history of a market​

This query returns the latest 50 trades of one market over the last 3 days, newest first. Run in the IDE.

  • Question.MarketId selects the market.
  • Block.Time with since_relative sets the window.
  • TransactionStatus: { Success: true } keeps confirmed trades.
{
EVM(dataset: realtime, network: matic) {
PredictionTrades(
where: {
TransactionStatus: { Success: true }
Block: { Time: { since_relative: { days_ago: 3 } } }
Trade: {
Prediction: {
Marketplace: { ProtocolName: { is: "polymarket" } }
Question: { MarketId: { is: "6977205" } }
}
}
}
orderBy: { descending: Block_Time }
limit: { count: 50 }
) {
Block {
Time
}
Transaction {
Hash
}
Trade {
OutcomeTrade {
Buyer
Seller
Amount
CollateralAmountInUSD
Price
IsOutcomeBuy
}
Prediction {
Question {
Title
MarketId
}
Outcome {
Label
}
OutcomeToken {
AssetId
}
}
}
}
}
}

To page further back, add offset to limit, for example limit: { count: 50, offset: 50 }.

Polymarket price history as hourly candles​

This query returns Polymarket price history for the Yes outcome of one market as hourly candles, newest first. Run in the IDE.

  • Outcome.Label picks the outcome. Each outcome has its own price, so always filter to one.
  • Time(interval: { count: 1, in: hours }) sets the candle size. Change in to minutes or days for other sizes.
  • open and close are the first and last trade price in the hour. high and low are the highest and lowest.
{
EVM(dataset: realtime, network: matic) {
PredictionTrades(
where: {
TransactionStatus: { Success: true }
Block: { Time: { since_relative: { days_ago: 3 } } }
Trade: {
Prediction: {
Marketplace: { ProtocolName: { is: "polymarket" } }
Question: { MarketId: { is: "6977205" } }
Outcome: { Label: { is: "Yes" } }
}
}
}
orderBy: { descending: Block_Time }
limit: { count: 72 }
) {
Block {
Time(interval: { count: 1, in: hours })
}
Trade {
OutcomeTrade {
open: Price(minimum: Block_Time)
high: Price(maximum: Trade_OutcomeTrade_Price)
low: Price(minimum: Trade_OutcomeTrade_Price)
close: Price(maximum: Block_Time)
}
}
volume_usd: sum(of: Trade_OutcomeTrade_CollateralAmountInUSD)
trades: count
}
}
}

A price of 0.85 means the market gives that outcome an 85% chance. The 72 rows are 3 days of hours.

Daily volume history of a market​

This query returns one row per day for one market over the last 14 days: USD volume, shares traded and trade count. Run in the IDE.

  • dataset: combined reaches past the realtime window, so the range can go back to 1 September 2025.
  • Block.Date with since_relative sets the range in whole days.
  • Grouping by Block { Date } makes each row one UTC day.
{
EVM(dataset: combined, network: matic) {
PredictionTrades(
where: {
TransactionStatus: { Success: true }
Block: { Date: { since_relative: { days_ago: 14 } } }
Trade: {
Prediction: {
Marketplace: { ProtocolName: { is: "polymarket" } }
Question: { MarketId: { is: "6977205" } }
}
}
}
orderBy: { descending: Block_Date }
limit: { count: 14 }
) {
Block {
Date
}
volume_usd: sum(of: Trade_OutcomeTrade_CollateralAmountInUSD)
shares: sum(of: Trade_OutcomeTrade_Amount)
trades: count
}
}
}

Daily volume across all Polymarket markets​

This query returns total Polymarket volume per day for the last 3 days, with the number of trades and of markets traded each day. Run in the IDE.

  • No market filter is set, so every Polymarket market is counted.
  • count(distinct: ...) counts the markets that had at least one trade that day.
{
EVM(dataset: realtime, network: matic) {
PredictionTrades(
where: {
TransactionStatus: { Success: true }
Block: { Date: { since_relative: { days_ago: 3 } } }
Trade: {
Prediction: { Marketplace: { ProtocolName: { is: "polymarket" } } }
}
}
orderBy: { descending: Block_Date }
limit: { count: 10 }
) {
Block {
Date
}
volume_usd: sum(of: Trade_OutcomeTrade_CollateralAmountInUSD)
shares: sum(of: Trade_OutcomeTrade_Amount)
trades: count
markets: count(distinct: Trade_Prediction_Question_MarketId)
}
}
}

Trade history of a wallet​

This query returns the latest 50 trades of one wallet across all markets in the last 3 days, newest first. Run in the IDE.

  • The any block matches trades where the wallet is the Buyer or the Seller.
  • Each row carries the market title and outcome, so one query shows everything the wallet traded.
{
EVM(dataset: realtime, network: matic) {
PredictionTrades(
where: {
TransactionStatus: { Success: true }
Block: { Time: { since_relative: { days_ago: 3 } } }
Trade: {
Prediction: { Marketplace: { ProtocolName: { is: "polymarket" } } }
}
any: [
{ Trade: { OutcomeTrade: { Buyer: { is: "0x821dab0565ebf5b327f51db06223fdcfe01acf16" } } } }
{ Trade: { OutcomeTrade: { Seller: { is: "0x821dab0565ebf5b327f51db06223fdcfe01acf16" } } } }
]
}
orderBy: { descending: Block_Time }
limit: { count: 50 }
) {
Block {
Time
}
Transaction {
Hash
}
Trade {
OutcomeTrade {
Buyer
Seller
Amount
CollateralAmountInUSD
Price
IsOutcomeBuy
}
Prediction {
Question {
Title
MarketId
}
Outcome {
Label
}
}
}
}
}
}

For totals per wallet and profit and loss, see the Wallet API and realized PnL pages.

Resolved markets history​

This query returns the markets that resolved in the last 3 days, newest first, with the winning outcome. Run in the IDE.

  • EventType: { is: "Resolved" } keeps resolution events only.
  • Outcome.Label is the winning outcome and OutcomeToken.AssetId is the token that pays out.
  • Condition.Id is the key to use when you look up the same market's trades or payouts.
{
EVM(dataset: realtime, network: matic) {
PredictionManagements(
where: {
Block: { Time: { since_relative: { days_ago: 3 } } }
Management: {
EventType: { is: "Resolved" }
Prediction: { Marketplace: { ProtocolName: { is: "polymarket" } } }
}
}
orderBy: { descending: Block_Time }
limit: { count: 50 }
) {
Block {
Time
}
Transaction {
Hash
}
Management {
EventType
Prediction {
Question {
Title
MarketId
ResolutionSource
}
Condition {
Id
Oracle
}
Outcome {
Index
Label
}
OutcomeToken {
AssetId
}
}
}
}
}
}

Settled market payouts history​

This query returns the latest 50 payouts on settled Polymarket markets in the last 3 days, newest first. Run in the IDE.

  • EventType: { is: "Redemption" } keeps payouts and leaves out splits and merges.
  • IsRepeat: false counts each payout once.
  • Holder is the account that redeemed, and CollateralAmountInUSD is what it received.
{
EVM(dataset: realtime, network: matic) {
PredictionSettlements(
where: {
Block: { Time: { since_relative: { days_ago: 3 } } }
Settlement: {
EventType: { is: "Redemption" }
IsRepeat: false
Prediction: { Marketplace: { ProtocolName: { is: "polymarket" } } }
}
}
orderBy: { descending: Block_Time }
limit: { count: 50 }
) {
Block {
Time
}
Transaction {
Hash
}
Settlement {
EventType
Holder
Amounts {
Amount
CollateralAmount
CollateralAmountInUSD
}
Prediction {
Question {
Title
MarketId
}
Outcome {
Label
}
CollateralToken {
Symbol
}
}
}
}
}
}

To read the payouts of one market, add ConditionId inside Prediction, as on the Prediction Settlements API page.

Trades of a market in a past window​

This query returns trades of one market from a two-day slice that ended 12 days ago, newest first. Run in the IDE.

  • dataset: combined serves windows older than the realtime layer.
  • after_relative and before_relative set the start and the end of the slice. Move both to replay any period back to 1 September 2025.
  • Keep the slice to a few days and page with limit and offset.
{
EVM(dataset: combined, network: matic) {
PredictionTrades(
where: {
TransactionStatus: { Success: true }
Block: {
Time: {
after_relative: { days_ago: 14 }
before_relative: { days_ago: 12 }
}
}
Trade: {
Prediction: {
Marketplace: { ProtocolName: { is: "polymarket" } }
Question: { MarketId: { is: "6977205" } }
}
}
}
orderBy: { descending: Block_Time }
limit: { count: 50 }
) {
Block {
Time
}
Transaction {
Hash
}
Trade {
OutcomeTrade {
Buyer
Seller
Amount
CollateralAmountInUSD
Price
}
Prediction {
Outcome {
Label
}
}
}
}
}
}

Bulk Polymarket history from the Data Store​

For the whole history in one load, use files instead of queries. The Bitquery Data Store ships Polymarket trades and settlements as Parquet, already joined with the market question and outcome label.

  • Good for: backtests, model training, leaderboards and warehouse joins.
  • Delivery: cloud bucket download, or a share in your own warehouse.
  • Schemas and sample files: on the Polymarket exports page.

Things to know​

  • Time bound: always set one. A bounded query on a few days returns in seconds.
  • Order: sort by Block_Time or Block_Date. Both are indexed.
  • Price is a probability: every outcome trades between 0 and 1. Read the price of one outcome, not an average across outcomes.
  • One market, several outcomes: filter by Outcome.Label or OutcomeToken.AssetId when you build a price series.
  • Market ID or condition ID: Question.MarketId and ConditionId both identify one market. Titles can repeat, for example the same two teams in different seasons.
  • Volume: CollateralAmountInUSD is the USD that changed hands. Amount is the number of outcome shares.
  • Collateral: Polymarket settles in pUSD since April 2026. ProtocolName: "polymarket" covers trades before and after that change.
  • Dataset choice: use realtime for the last few days and combined for longer ranges that end now.
  • Live data: change query to subscription to stream new trades. See the Polymarket API page.

Frequently Asked Questions

How do I get Polymarket historical data?

Query PredictionTrades on EVM(network: matic) with ProtocolName polymarket and a time bound. The realtime dataset holds about the last 4 days. The archive and combined datasets go back to 1 September 2025 with the Polymarket Historical Data add-on. For the full history as files, use the Bitquery Data Store.

Is there a Polymarket historical data API?

Yes. The Bitquery GraphQL API returns past Polymarket trades, prices, volume, resolutions and payouts. Every example on this page runs as written in the Bitquery IDE, and the same query works from code with an access token.

How do I get Polymarket price history for one outcome?

Filter PredictionTrades by the market ID and the outcome label, group by Block Time with an interval, and read open, high, low and close from Trade.OutcomeTrade.Price. The hourly candles example on this page does this.

How far back does Polymarket data go on Bitquery?

The API serves Polymarket history from 1 September 2025 through the archive and combined datasets. Earlier history and bulk loads are delivered as Parquet exports from the Bitquery Data Store.

Can I download Polymarket historical data in bulk?

Yes. The Bitquery Data Store delivers Polymarket trades and settlements as Parquet files that load into your own cloud storage or data warehouse. Schemas and sample files are on the Polymarket exports page.

How do I get the past trades of a Polymarket wallet?

Filter PredictionTrades where the wallet is the Buyer or the Seller, add a time bound and order by Block_Time descending. The wallet trade history example on this page shows the full query.

How do I find which Polymarket markets resolved and how?

Query PredictionManagements with EventType Resolved. Each row has the market title, the resolution time and the winning outcome. Payouts to holders are in PredictionSettlements with EventType Redemption.

Build with Bitquery

Ready to run this in production?

Get an API key and run these queries in minutes, or talk to us about plans and enterprise delivery.