API
Polymarket historical data API
The Marketlens Polymarket historical data API returns the past of every Polymarket market: the order book at any moment, every trade, candles at any resolution, and the outcome once it resolves. Recording has run continuously since March 1, 2026, so the archive is complete from there, not a rolling window. The same endpoints power the Python SDK, the MCP server, and bulk Parquet exports.
What is included
Every recurring Polymarket market type: crypto up or down from 5 minute to daily, sports per game, weather, esports, macro, equities, and since August 15, 2026 the standalone events that sustain trading volume. 903,238 markets today, 883,443 of them resolved with the winning outcome stored. For each: full order book snapshots about every 60 seconds with every price change between them at millisecond resolution, every executed trade with price, size and side, and OHLCV candles at ten resolutions from 1 second to 1 day.
Polymarket historical data API endpoints
The archive is organised the way Polymarket is: a series slug (btc-up-or-down-5m, mlb, a weather city) names a market family, and each market carries its outcome token ids, so nothing has to be looked up elsewhere first. Timestamps are epoch milliseconds or ISO 8601; list endpoints paginate with a cursor and the SDK follows it. Every market carries data_start and data_end, the window it was live in the archive.
API example: one series, every market
The resolved markets of one series over a half hour in curl, then the same walk in Python with each market's last candle and its order book two minutes before close.
$ curl -H "Authorization: Bearer mk_..." \
"https://api.marketlens.trade/v1/markets?series_id=btc-up-or-down-5m\
&status=resolved&close_after=1789041600000&close_before=1789043400000"from marketlens import MarketLens
client = MarketLens() # reads MARKETLENS_API_KEY
# walk a series over a window; each market is the handle for its history
for market in client.series.walk(
"btc-up-or-down-5m", status="resolved",
after="2026-09-10T12:00:00Z", before="2026-09-10T12:30:00Z",
):
candles = client.markets.candles(market.id, resolution="1m",
after=market.data_start, before=market.data_end).to_dataframe()
book = client.orderbook.get(market.id, at=market.close_time - 120_000)
print(market.question, market.winning_outcome,
candles.close.iloc[-1], book.bid_depth, book.ask_depth)Candles come back as a DataFrame indexed by open_time with open, high, low, close, VWAP, volume, and trade count. The walk is for rolling series; leagues and weather cities use markets.list(series_id=, close_after=, close_before=) with a bet type filter such as subtype="moneyline".
Pricing and free tier
Free: 600 requests per minute and 25 million data rows per day, one key, full archive, no card. Pro ($39 per month): 3,600 requests per minute, 5 billion rows per month, five keys. Scale ($199 per month): 10,800 requests per minute, 50 billion rows per month, 25 keys. Every tier reaches the same endpoints and the same history; the tiers differ only in rate and volume. Bulk exports charge rows once per file and re-downloads are free.
Rows are metered per data row returned, so an hour of 1 minute candles costs 60 rows and a day of order book history on a busy market costs what it holds; the response headers report the remaining budget on every call. See errors and rate limits.
Polymarket's own API vs a historical data API
Polymarket's APIs are the right place for live data and trading: the current order book, a live stream of updates, and one price series per outcome token at minute fidelity. None of them return a past order book, a trade history, or bulk data. Marketlens is the recorder that sits next to them, keyed by the same series slugs and condition ids, so a market found on either side is the same market on the other. The Polymarket API guide covers all four official APIs, and price history shows the archive on a real market.
FAQ
Polymarket historical data API questions
Does Polymarket have a historical data API?
Not for order books or trades. Polymarket's own API serves the current order book and one price series per outcome. The Marketlens Polymarket historical data API is the recorded archive: 903,238 markets since March 1, 2026, 37.9B order book rows, 280M trades, through REST, a Python SDK, and Parquet exports.
What does the Polymarket historical data API return?
Every market of a series over a window; the full order book at any past moment; the book's snapshots and every price change over a window; best bid and ask, spread and depth per time bucket; every executed trade; OHLCV candles from 1 second to 1 day; implied probability surfaces; Binance reference prices; and bulk Parquet exports per market or series.
How far back does the historical data go?
Complete from March 1, 2026 for every recurring Polymarket market type, and from August 15, 2026 for standalone events with real trading volume. Each market reports its own data_start and data_end. The most recent few hours are still being built, so end windows a little in the past.
Is the Polymarket historical data API free?
The free tier includes 600 requests per minute and 25 million data rows per day with full archive access, no card. Pro is $39 per month (3,600 requests per minute, 5 billion rows per month); Scale is $199 per month (10,800 requests per minute, 50 billion rows). Every tier reaches the same endpoints and the same history.
Is there a Polymarket historical prices API?
Yes. GET /v1/markets/{market_id}/candles returns OHLCV candles at 1s, 5s, 10s, 30s, 1m, 5m, 15m, 1h, 4h, or 1d, built from executed trades, and the order book endpoint returns the full book behind any price. The walkthrough is at marketlens.trade/polymarket-price-history.
Try it
Get a key and query the archive
600 requests per minute and 25M rows per day on the free tier, with full API and full archive access, no card required.
$ pip install marketlens