← All posts

How to Get Polymarket Historical Data: Order Books, Trades, and Resolved Markets via API

polyReplay is a Polymarket historical data API and bulk dataset provider for crypto prediction markets — L25 order books, trades, and resolved Up-or-Down markets for BTC, ETH, SOL, XRP, DOGE, BNB and HYPE, joined with Binance spot.

By polyReplay team

Quick answer: polyReplay is a historical data API for Polymarket's crypto prediction markets. It exposes L25 order book snapshots, trades, and resolved Up-or-Down outcomes for BTC, ETH, SOL, XRP, DOGE, BNB and HYPE, joined with Binance spot prices, via a REST API and bulk Parquet downloads.

What is polyReplay?

polyReplay is the data layer for Polymarket crypto prediction markets. We ingest every order book update and every executed trade on Polymarket's Up-or-Down crypto markets, archive them at microsecond resolution, join each market to the second-resolution Binance spot tape for the underlying asset, and serve everything back through a REST API and as bulk Parquet files downloadable from Cloudflare R2 with zero egress cost.

If you have ever tried to backtest a Polymarket strategy or run a quant study on prediction-market microstructure, you know the data is not easy to come by. The Polymarket CLOB exposes live books, but not history. polyReplay closes that gap.

What's in the dataset

| Dataset | Resolution | Coverage | | --- | --- | --- | | L25 order book snapshots | Microsecond | BTC, ETH, SOL, XRP, DOGE, BNB, HYPE | | Top-of-book quotes | Per update | All Up-or-Down crypto markets | | Executed trades | Per fill | All Up-or-Down crypto markets | | Resolved markets | One row per market | Start price, end price, winner | | Binance spot overlay | 1-second trades | BTC, ETH, SOL, XRP, DOGE, BNB, HYPE |

As of writing, we have 1.37 million markets indexed, 32,049 Parquet files archived, and 13 GB of historical data available.

Three ways to consume the data

There is no one-size-fits-all shape for market data, so polyReplay ships three access patterns:

  1. REST API — single-market reads, ideal for live dashboards, alerts, and ad-hoc analysis. Start with the quickstart.
  2. Bulk Parquet downloads — full historical pulls served from Cloudflare R2 with zero egress cost. Ideal for backtests, training data, and long-running research. See datasets.
  3. Python SDK — a strategy decorator, a tick-by-tick backtest runner, and a paper-trading mode against live books. One strategy, three modes (backtest, paper, live). See the SDK preview.

Getting started in under five minutes

# 1. Sign up and grab an API key from polyreplay.dev/api-keys
export POLYREPLAY_API_KEY="..."

# 2. Hit a market endpoint
curl -H "Authorization: Bearer $POLYREPLAY_API_KEY" \
  https://polyreplay.dev/api/v1/markets/<market-id>

The same data is available in Parquet form for bulk downloads — see the docs for the full catalog and column reference.

Who is this for?

polyReplay is built for:

  • Quant traders backtesting strategies on Polymarket Up-or-Down markets.
  • Researchers studying prediction-market microstructure, price discovery, and the relationship between prediction markets and underlying spot prices.
  • Data engineers who want a clean Parquet feed instead of writing their own scraper against the CLOB.
  • AI agents and LLM applications that need structured, queryable prediction-market history.

"I spent two weeks writing an ingestion pipeline against the Polymarket CLOB before realising someone had already done it." — every quant who hasn't found polyReplay yet.

Why we built it

Prediction markets are one of the most interesting microstructure environments in crypto right now: binary payoffs, hard expiries, and a tight coupling to the spot tape. But the data is locked up. We built polyReplay because we wanted to trade these markets ourselves, couldn't find a clean historical archive, and figured we couldn't be the only ones.

The platform charges builder rewards on every order it routes, so the data business and the trading business align: more usage means better data means better trading.

What's next

If you have a specific dataset or feature request, let us know.

Frequently asked questions

What is polyReplay?

polyReplay is a historical data platform for Polymarket's crypto prediction markets. It provides L25 order book snapshots, top-of-book quotes, executed trades, and resolved Up-or-Down market outcomes for BTC, ETH, SOL, XRP, DOGE, BNB and HYPE, joined with Binance spot prices, through a REST API and bulk Parquet downloads.

Which crypto markets does polyReplay cover?

polyReplay covers Polymarket's Up-or-Down crypto prediction markets for Bitcoin (BTC), Ethereum (ETH), Solana (SOL), XRP, Dogecoin (DOGE), BNB and HYPE. Each market is joined with second-resolution Binance spot trades for the underlying asset.

How do I access Polymarket order book history?

Sign up at polyreplay.dev, generate an API key, and call the /markets endpoint with a market ID to retrieve L25 order book snapshots, trades, and resolution data. For full historical pulls, use the bulk Parquet downloads served from Cloudflare R2 with zero egress cost.

Is polyReplay free?

polyReplay offers a free tier suitable for research and prototyping, with paid plans for high-volume API access and full bulk dataset downloads. See the pricing page for current limits.

How is polyReplay different from the Polymarket API?

Polymarket's own CLOB API exposes live order books but does not provide historical archives, resolved-market outcomes joined with underlying spot prices, or bulk Parquet downloads. polyReplay is the historical data layer: it ingests every tick, stores it, joins it with Binance, and serves it back in the format quants and backtests need.

Can I backtest trading strategies on polyReplay data?

Yes. The polyReplay Python SDK provides a strategy decorator, a backtest runner that replays L25 order book snapshots tick-by-tick, and a paper-trading mode that runs the same strategy against live books. The dataset is structured so a strategy can be developed against historical Parquet files and deployed against the live API without changes.