Data
Polymarket order book data
Marketlens records the complete L2 order book for every recurring Polymarket market: 604,843 markets and counting, as full snapshots anchoring a stream of price changes with millisecond timestamps. The book at any instant since March 1, 2026 reconstructs exactly, level by level, through a REST API, a Python SDK, and bulk Parquet exports. This page is about the order book dataset itself; for provider comparisons see compare, and for endpoint reference see the docs.
What the dataset contains
Three linked record types per market. Snapshots: the full book, every price level with its size, captured about every 60 seconds. Deltas: every individual price change between snapshots, each with a millisecond timestamp and its parent snapshot id, so snapshot[n+1] equals snapshot[n] plus deltas[n] by construction. Trades and candles complete the picture. Resolution outcomes are stored once markets settle, currently 600,816 resolved markets.
Change level capture is the property that matters for microstructure work. Sampled feeds (whether 1 minute or 300ms) interpolate what happened between samples; queue position, fleeting liquidity, and slippage live exactly there. A delta stream does not interpolate anything.
Query it in Python
from marketlens import MarketLens
client = MarketLens()
# current book for any market
book = client.orderbook.get(market_id)
# replay historical books tick by tick
for market, book in client.orderbook.walk(
"btc-up-or-down-5m",
after="2026-07-01T00:00:00Z",
before="2026-07-01T01:00:00Z",
):
print(book.as_of, book.bids[0], book.asks[0])The same replay engine powers the SDK's backtester, which fills simulated orders against this depth with FIFO queue priority, latency, and fees. See backtesting.
How providers capture the book
marketlens
polymarketdata.co
pmdata.dev
Capture method is the deepest difference between providers; the full field is on the comparison page. Browse what is recorded per series, with market counts and resolution splits, in the data catalog.
FAQ
Common questions
Where can I get Polymarket order book data?
Marketlens serves historical L2 order book data for 604,843 Polymarket markets through a REST API, a Python SDK (pip install marketlens), and bulk Parquet exports. Books are stored as periodic full snapshots plus every price change with a millisecond timestamp, so any instant reconstructs exactly. The free tier includes 5M events per day with full archive access.
Does Polymarket have an official order book history API?
No. Polymarket's CLOB API serves the current book and live streams, not history. To study past books you need a service that has been recording them; Marketlens has recorded every recurring Polymarket market continuously since March 2026.
What resolution is the order book data?
Change level: every individual price change carries a millisecond timestamp, chained to full L2 snapshots captured about every 60 seconds. Replay reconstructs the exact book at any moment between snapshots, which sampled data (1 minute, 300ms, or sub second intervals) cannot guarantee.
What formats can I download order book data in?
JSON through the REST API and SDK (with pandas DataFrame helpers), or bulk Parquet exports per market covering snapshots, deltas, trades, and candles. Export results feed directly into the SDK's offline backtesting mode.
Which markets have order book history?
Every recurring Polymarket market type: crypto up/down (5 minutes to daily) and multi-strike structures, live per game sports (MLB, NBA, NFL, NHL, tennis, UFC, soccer), daily weather buckets by city, equities earnings, indices, commodities, and macro markets. 644 series in total, browsable in the data catalog.
Try it
Pull your first book in two minutes
The free tier includes 5M events per day with full API and full archive access, no card required.
$ pip install marketlens