Polymarket historical data: the full L2 order book archive
Every book snapshot, price change and trade the recorder received since 2026-07-25, plus top-of-book quotes: one Parquet file per stream per UTC day, and the same files cut by market family. Free key; the samples need no key.
“Give me the download link for the BTC 5-minute quotes of 2026-11-02”
polymarket_archive“Which days of the Polymarket archive are the largest, and how big is a day of book_events?”
polymarket_archive- Open a sample
One complete market in all three streams, the same columns as the archive. No key.
- Find the day
/archive/datasetslists every file with its size and, where recorded, its rows. - Download it
/archive/urlwithredirect=truehands you the file; downloads are not counted against your limit.
A day of trades in one command
The same three steps in cURL, Python and the CLI.
curl -O https://data.vike.io/archive/samples/trades.parquet # sample, no key
curl -H "X-API-KEY: $VIKE_API_KEY" \
"https://data.vike.io/v1/polymarket/archive/datasets?stream=trades&from=2026-11-02&to=2026-11-02"
curl -L -o trades-2026-11-02.parquet -H "X-API-KEY: $VIKE_API_KEY" \
"https://data.vike.io/v1/polymarket/archive/url?date=2026-11-02&stream=trades&redirect=true"
import os, requests
import polars as pl
H = {"X-API-KEY": os.environ["VIKE_API_KEY"]}
day, stream = "2026-11-02", "trades"
r = requests.get("https://data.vike.io/v1/polymarket/archive/url",
params={"date": day, "stream": stream, "redirect": "true"}, headers=H, stream=True)
r.raise_for_status()
with open(f"{stream}-{day}.parquet", "wb") as f:
for chunk in r.iter_content(1 << 20):
f.write(chunk)
print(pl.read_parquet(f"{stream}-{day}.parquet").head())
vike-data pm archive --stream trades --date-from 2026-11-02 --date-to 2026-11-02 # the day's files, sizes and rows
vike-data pm archive --view url --stream trades --date 2026-11-02 # a 7-day download link
- Download whole files, then read them locally; do not point a Parquet reader at the remote URL.
- Archive downloads do not count against the hourly limit. The samples and
manifest.jsonneed no key. - A link from
/archive/urlis valid 7 days and needs no key, so do not share it. Asking for one is one ordinary request. - Not every market is in the files: see Coverage.
- Licence: personal use under the Terms of Service, not for passing on; commercial use needs a written agreement (details).
Archive calendar · /archive/datasets
/v1/polymarket/archive/datasets?limit=1000Which file to take
l1_quotes if top of book is enough, trades for the tape, book_events for full depth: the other two derive from it and are far smaller.
| File | A day’s file, average of the last 7 days | What is inside | Take it for |
|---|---|---|---|
l1_quotes | best bid and ask with sizes, one row per change | prices, spreads, a backtest on top of book | |
trades | the taker prints | volume, the tape, buy and sell pressure | |
book_events | full L2: snapshots, deltas, trades, markers | rebuilding the book at any moment, depth, slippage |
Top-of-book quotes
Derived top of book — bid, ask and both sizes, one row per change.
- Route
GET /v1/polymarket/archive/url- Cadence
- One partition per UTC day
- Coverage
- Archive only: l1_quotes.parquet per UTC day from 2026-07-25, derived from book_events and published separately because it is far smaller, so it covers the same markets (/data/polymarket/historical-data#coverage). Resolve a file with /archive/url (redirect=1 for a 302); /archive/datasets lists every partition with its size and, where recorded, its row count.
- Rows
Fields
| Field | Type | Description |
|---|---|---|
token_id | String | The outcome token |
condition_id | String | The market, 0x-prefixed |
ts | Int64 | Quote time, epoch milliseconds |
local_ts | Int64 | Receive time, epoch milliseconds |
bid | Decimal(9, 4) | Best bid |
ask | Decimal(9, 4) | Best ask |
bid_size | Decimal(18, 6) | Shares at the best bid |
ask_size | Decimal(18, 6) | Shares at the best ask |
Real rows
Top-of-book quotes · rows
Load it
curl -H "X-API-KEY: $VIKE_API_KEY" \
"https://data.vike.io/v1/polymarket/archive/datasets?limit=1000"
# Full history is the Parquet archive. Pick a date from manifest.json (no key needed),
# download the whole file, then read it locally:
DAY=YYYY-MM-DD
curl -L -o l1_quotes-$DAY.parquet -H "X-API-KEY: $VIKE_API_KEY" \
"https://data.vike.io/v1/polymarket/archive/url?date=$DAY&stream=l1_quotes&redirect=true"
# Or the free sample — one complete market, no key:
curl -O https://data.vike.io/archive/samples/l1_quotes.parquet
import os, requests
import pyarrow.parquet as pq
H = {"X-API-KEY": os.environ["VIKE_API_KEY"]}
day = "YYYY-MM-DD" # any date listed in https://data.vike.io/archive/manifest.json
url = "https://data.vike.io/v1/polymarket/archive/url"
# Download the whole file once, then read it locally — a remote Parquet
# reader re-fetches the footer and column chunks on every query.
with requests.get(url, headers=H, params={"date": day, "stream": "l1_quotes", "redirect": "true"},
stream=True, timeout=600) as r:
r.raise_for_status()
with open("l1_quotes.parquet", "wb") as f:
for chunk in r.iter_content(1 << 20):
f.write(chunk)
table = pq.read_table("l1_quotes.parquet")
print(table.num_rows, table.schema.names)
import polars as pl
df = pl.read_parquet("l1_quotes.parquet") # downloaded first — see the cURL tab
df = df.with_columns(pl.from_epoch("ts", time_unit="ms").alias("time"))
spread = (
df.with_columns((pl.col("ask") - pl.col("bid")).alias("spread"))
.group_by("token_id")
.agg(pl.len().alias("changes"), pl.col("spread").mean().alias("avg_spread"))
.sort("changes", descending=True)
)
print(spread.head())
-- l1_quotes.parquet downloaded first (see the cURL tab), then read locally
SELECT token_id,
count(*) AS changes,
avg(ask - bid) AS avg_spread,
epoch_ms(min(ts)) AS first_quote,
epoch_ms(max(ts)) AS last_quote
FROM 'l1_quotes.parquet'
GROUP BY token_id
ORDER BY changes DESC
LIMIT 10;
Download whole files, then read them locally — do not point a Parquet reader at the remote URL. Archive downloads need a key but do not count against the hourly limit.
Full reference for /v1/polymarket/archive/url → · every dataset
Order-book events
The full L2 tape — book snapshots, price_change deltas, trades, status markers and, from November 2026, tick-size markers (earlier days have none).
- Route
GET /v1/polymarket/events- Cadence
- Continuous; archive one partition per UTC day
- Coverage
- API: /events returns up to 24 hours per call and up to 50,000 events per page (next_cursor + has_more), from 2026-07-25; /orderbook returns the nearest book snapshot at or before any instant from then on, depth up to 25. Archive: book_events.parquet per UTC day from 2026-07-25, which also carries condition_id and tick_size. Not every market: /data/polymarket/historical-data#coverage has which ones, by period.
- Rows
Fields
| Field | Type | Description |
|---|---|---|
token_id | string | The outcome token (ERC-1155 id) |
ts | integer | Event time, epoch milliseconds |
local_ts | integer | Receive time, epoch milliseconds |
seq | integer | The recorder's own count of the frames it applied for this token, not a venue number; 0 on trade, status and tick_size_change rows. It runs on across a lost connection and starts again at 1 after a recorder restart. A jump means rows dropped after they arrived |
event_type | string | book | price_change | trade | tick_size_change | status |
is_snapshot | integer | 1 on a full-book row, 0 otherwise |
side | string | none | buy | sell |
price | number | The changed level (price_change) or the print (trade) |
size | number | Shares at that level, or traded |
best_bid | number | Best bid after the event, recorded since 2026-11-05 18:02 UTC: Polymarket's own on price_change, the ladder's on book. 0.0 on trade and status rows and on every earlier row |
best_ask | number | Best ask after the event, recorded since 2026-11-05 18:02 UTC: Polymarket's own on price_change, the ladder's on book. 0.0 on trade and status rows and on every earlier row |
bids | string | JSON [[price, size], …] carried as a string; empty when absent |
asks | string | JSON [[price, size], …] carried as a string; empty when absent |
status | string | Marker on status rows: gap_start (the socket was lost), live_resume (it answered again, rows may not have resumed yet: the token's next row says when), stale (no fresh data though the socket stayed up); empty otherwise |
tick_size | number | The new tick, on tick_size_change rows only: no other row has this field. Those rows exist from November 2026, earlier days have none |
Real rows
Order-book events · rows
Load it
# replace each {placeholder} with your own value
curl -H "X-API-KEY: $VIKE_API_KEY" \
"https://data.vike.io/v1/polymarket/events?token_id={token_id}&from_ms={from_ms}&to_ms={to_ms}&event_type=price_change&limit=50"
# Full history is the Parquet archive. Pick a date from manifest.json (no key needed),
# download the whole file, then read it locally:
DAY=YYYY-MM-DD
curl -L -o book_events-$DAY.parquet -H "X-API-KEY: $VIKE_API_KEY" \
"https://data.vike.io/v1/polymarket/archive/url?date=$DAY&stream=book_events&redirect=true"
# Or the free sample — one complete market, no key:
curl -O https://data.vike.io/archive/samples/book_events.parquet
import os, requests
import pyarrow.parquet as pq
H = {"X-API-KEY": os.environ["VIKE_API_KEY"]}
day = "YYYY-MM-DD" # any date listed in https://data.vike.io/archive/manifest.json
url = "https://data.vike.io/v1/polymarket/archive/url"
# Download the whole file once, then read it locally — a remote Parquet
# reader re-fetches the footer and column chunks on every query.
with requests.get(url, headers=H, params={"date": day, "stream": "book_events", "redirect": "true"},
stream=True, timeout=600) as r:
r.raise_for_status()
with open("book_events.parquet", "wb") as f:
for chunk in r.iter_content(1 << 20):
f.write(chunk)
table = pq.read_table("book_events.parquet")
print(table.num_rows, table.schema.names)
import polars as pl
df = pl.read_parquet("book_events.parquet") # downloaded first — see the cURL tab
df = df.with_columns(pl.from_epoch("ts", time_unit="ms").alias("time"))
print(df.group_by("event_type").len().sort("len", descending=True))
-- book_events.parquet downloaded first (see the cURL tab), then read locally
SELECT event_type,
count(*) AS events,
count(DISTINCT token_id) AS tokens
FROM 'book_events.parquet'
GROUP BY event_type
ORDER BY events DESC;
Download whole files, then read them locally — do not point a Parquet reader at the remote URL. Archive downloads need a key but do not count against the hourly limit.
trades.parquet, the third stream, has its fields, real rows and loading code on the Trades page, beside the on-chain trades with wallets.Which markets the order book holds
The recorder does not hold every Polymarket market. This is what it held, measured against the markets that traded on-chain.
| Period | Markets recorded | Of traded markets | Of fills | Of notional |
|---|---|---|---|---|
| 2026-07-25 to 2026-11-05 18:30 UTC | about 2,140: the biggest 2,100 by lifetime volume, plus the crypto up/down series | 17-19% | 72-74% | 75-82% |
| since 2026-11-05 19:01 UTC | about 7,400: also the busiest 6,000 over the last 24 hours | 62% | 96% | 98.6% |
- The share is of the markets that traded on-chain in an hour. The earlier period is three whole days; the newer one is one hour so far, 19:03 to 20:03 UTC on 2026-11-05. Between 18:30 and 19:01 UTC that day the list held the busiest 3,000.
- What is not recorded is mostly small and short-lived: the markets outside the list carried 1.4% of the notional in that hour.
- 4-hour up/down markets are missing from about 2026-11-01 04:00 to 2026-11-05 17:27 UTC.
- A market joins the list about 2 minutes after it starts trading, so its first minutes can be missing.
- Past days cannot be re-recorded. Trades with wallets, from /v1/polymarket/markets/{id}/trades, come from the chain and cover every market.
Spans with no data
A gap is a span in which Polymarket was trading and the archive holds no row from any market: from the last row before it to the first row after it, to the millisecond.
Gaps of 30 seconds or more:
| From (UTC) | To | Seconds | Expected rows |
|---|---|---|---|
| 2026-07-28 05:21:24.838 | 05:22:29.030 | 64.2 | 325,828 |
| 2026-07-28 23:11:31.491 | 2026-07-29 05:20:46.331 | 22,154.8 | 98,174,742 |
| 2026-07-29 05:23:00.046 | 05:25:04.605 | 124.6 | 551,958 |
| 2026-07-29 05:35:56.939 | 05:38:14.378 | 137.4 | 609,033 |
| 2026-08-02 08:24:24.658 | 08:32:03.024 | 458.4 | 1,944,725 |
| 2026-08-05 04:22:33.310 | 04:23:17.077 | 43.8 | 209,190 |
| 2026-08-05 04:29:25.260 | 04:30:56.886 | 91.6 | 437,939 |
| 2026-08-05 04:40:47.526 | 04:41:39.491 | 52.0 | 248,374 |
| 2026-08-13 04:47:34.468 | 04:50:06.756 | 152.3 | 595,265 |
| 2026-08-13 19:16:35.053 | 21:26:22.715 | 7,787.7 | 30,440,478 |
| 2026-08-28 04:16:25.905 | 04:20:50.512 | 264.6 | 1,075,504 |
| 2026-08-28 23:12:00.543 | 2026-08-29 03:03:13.145 | 13,872.6 | 44,040,078 |
| 2026-08-29 03:03:33.297 | 03:04:04.494 | 31.2 | 99,038 |
| 2026-09-01 22:43:47.505 | 22:45:34.875 | 107.4 | 398,250 |
| 2026-09-05 23:25:21.692 | 23:30:58.017 | 336.3 | 1,255,498 |
| 2026-09-11 06:46:41.627 | 06:47:17.925 | 36.3 | 160,409 |
| 2026-09-11 16:23:53.036 | 16:24:45.061 | 52.0 | 229,910 |
| 2026-09-11 17:35:18.024 | 17:36:28.274 | 70.2 | 310,451 |
| 2026-09-20 12:39:20.836 | 12:39:53.935 | 33.1 | 199,094 |
| 2026-09-27 04:02:10.586 | 04:05:05.020 | 174.4 | 929,149 |
| 2026-10-02 00:45:01.400 | 00:46:36.918 | 95.5 | 676,665 |
| 2026-10-02 00:46:51.873 | 00:48:57.247 | 125.4 | 888,170 |
| 2026-10-02 00:48:57.247 | 00:49:31.641 | 34.4 | 243,653 |
| 2026-10-08 04:02:11.157 | 04:05:42.965 | 211.8 | 1,469,231 |
| 2026-10-13 15:42:50.398 | 16:48:14.792 | 3,924.4 | 26,057,126 |
| 2026-10-22 05:03:43.401 | 05:05:10.366 | 87.0 | 578,554 |
| 2026-10-27 15:22:50.729 | 15:23:49.281 | 58.6 | 361,087 |
| 2026-10-27 15:35:00.023 | 15:36:50.269 | 110.2 | 679,881 |
| 2026-10-29 05:29:30.809 | 05:30:24.901 | 54.1 | 372,629 |
| 2026-11-05 06:08:28.453 | 06:09:38.824 | 70.4 | 512,896 |
Expected rows: at the day's median rate.
By day, or by market family
The same recording and the same columns, cut two ways.
| Layout | By day | By market family |
|---|---|---|
| File | venue=polymarket/date=YYYY-MM-DD/{stream}.parquet | venue=polymarket/asset=<asset>/tenor=<tenor>/date=YYYY-MM-DD/{stream}.parquet |
| For | everything that day | one family without downloading the whole day |
| Families | — | btc, eth, sol, xrp, doge, bnb, hype × 5m, 15m, 4h; other/other holds every other market and is the largest |
| From | 2026-07-25 | 2026-07-26 |
| A date is | Since 2026-11-05 the UTC day a row was received (local_ts); before that, the UTC day of ts | |
curl -L -o btc-5m-l1.parquet -H "X-API-KEY: $VIKE_API_KEY" \
"https://data.vike.io/v1/polymarket/archive/url?date=2026-11-02&stream=l1_quotes&asset=btc&tenor=5m&redirect=true"
vike-data pm archive --view url --stream l1_quotes --date 2026-11-02 --asset btc --tenor 5m