← Back to blog

How to Get Historical Polymarket Order Book Data

By ZenHodl. Dataset documentation, research and model evaluations are linked in the article. A separate filtered ledger of bot-attributed trades, including losses and its admission rules, is public at /results.

For a Polymarket backtest, distinguish price history and executed trades from recorded resting book states. A price series alone cannot show how much size was available at a past quote. This guide explains source options and the schema checks needed before treating an archive as an execution replay.

What the Polymarket API actually gives you

Polymarket's CLOB API is genuinely good for live trading. What it returns:

What it does not return:

This is the same gap on Kalshi: the API exposes current depth and trades, not a historical depth archive. (We cover the broader landscape in our complete guide to prediction market APIs and the practical Polymarket API guide.)

Why you can't just backfill it

Executed trades do not identify every unexecuted resting order. Reconstructing a ladder needs recorded snapshots or a sufficiently complete, time-ordered update stream with a valid initial state. If a provider already recorded it, you may obtain that history later; absence from your own recorder is not proof that nobody has it. Check current official endpoints and third-party archives for the exact period and granularity you need.

Your source options

1. Record it yourself, going forward. Stand up a websocket client against both venues, snapshot the book on every update, and store it. This works — it's exactly how the data gets created — but it has two costs: you get zero history before the day you start, and capturing clean, gap-free, multi-venue depth at scale (with reconnection handling and clock discipline) is more engineering than it first appears.

2. Use historical prices. This is simpler than recording a book, but prices alone do not tell you the spread or size available for a hypothetical fill. Do not assume a price-series observation is an executable bid or ask.

3. Inspect a free recorded archive. PMXT offers recorded Polymarket and Kalshi files, and Marketlens publishes selected Polymarket books, trades and outcomes. Neither listing proves that your particular market/window is complete.

4. Buy a recorded archive. Evaluate its specific schema, observed coverage, clocks and license against those free options. A provider’s advertised row count is not evidence of full exchange or season coverage.

Match the archive to the research question

Check the fields in the specific product schema before choosing an archive:

A quote midpoint is a recorded price calculation, not a fill. Missing observations are not unchanged quotes.

A concrete example

Start with the free Kalshi-side CSV. Inspect its actual columns and a few rows in DuckDB:

DESCRIBE SELECT * FROM read_csv_auto('orderbook_archive_sample.csv');
SELECT * FROM read_csv_auto('orderbook_archive_sample.csv') LIMIT 5;

The free CSV and paid Parquet files have distinct contracts; check each schema and price unit before comparing values. The paid legacy archive schema defines Kalshi prices in cents and Polymarket prices in 0–1 dollars. For the paid Kalshi file, this query makes the unit conversion explicit:

SELECT datetime_utc, period, time_remaining, home_score, away_score,
       yes_bid / 100.0 AS bid_dollars,
       yes_ask / 100.0 AS ask_dollars,
       mid / 100.0 AS midpoint_dollars
FROM 'kalshi_snapshots.parquet'
ORDER BY datetime_utc;

Game state in the paid archive belongs only to Kalshi and reflects capture time. The Polymarket table has no score or game-clock fields and is not pre-keyed to Kalshi. Inspect recorded quotes alongside that observed context; these files alone cannot establish a sporting event time, a score-response delay or an executable trading edge. Event-time work needs a separately verified timeline.

Where to get it

We publish distinct archive contracts rather than one interchangeable data feed:

Start with the free Polymarket sports CSV and its schema and capture limits. If the fields suit your analysis, test your pipeline on the $9 two-day tryout before choosing the $149 larger archive. The free CSV is a sample, not the complete paid tryout.

For other datasets, browse the samples and schemas and all data archives. Confirm the fields, price units, observed window, mapping requirements and gaps for the artifact you intend to buy. Our historical-data buyer's guide compares source options.

Historical book observations must have been captured when the book was visible. That does not make the archive complete or every other data type non-backfillable: inspect the specific capture and its limits.

Related reading

Get ZenHodl Weekly

Dataset releases, research notes, and public results, including corrections.

Research and dataset updates from ZenHodl.

Need historical Polymarket sports order-book data?

Inspect the measured coverage, schema, known gaps, and free sample before buying.