Datasets:
- The six files
- Line format
- One clock
polymarket.btc.5m— the prediction marketbinance.btc— spot and USDT-M perpetualokx.btc— spot and swapbybit.btc— spot and linear perpetualcoinbase.btc— spot, the USD legchainlink.btc— the oracle the market resolves against- What it is good for
- Provenance and caveats
- Licence and attribution
BTC Up/Down 5m — the raw tapes, market and underlying on one clock
Polymarket runs a Bitcoin Up or Down market every five minutes, resolved off a Chainlink TWAP of BTC/USD. This is one hour of that market's raw order-book tape — and, on the same clock, the raw spot and perpetual tape from the four exchanges the price comes from, plus the oracle stream the market resolves against.
Nothing is aggregated: raw messages in arrival order, microsecond-stamped, so all six tapes merge into one stream where the whole chain is visible — a trade on Binance, the oracle picking it up, the market repricing — in the order one observer saw it.
A free sample from keydata.shop/samples: one hour of the real thing, same format and naming as a paid order. Full days and more coins at keydata.shop.
Want bars instead of messages? The same hour as one-second Parquet aggregates, with the winning outcome already joined onto the prediction-market rows: https://huggingface.co/datasets/RabbitGo777/btc_20260818T1100.v2.1s.parquet
The six files
| File | Source | Lines | Compressed | Raw |
|---|---|---|---|---|
polymarket.btc.5m_20260818T1100.v2.jsonl.zst |
Polymarket CLOB + Gamma | 1,233,535 | 64.5 MiB | 870 MiB |
binance.btc_20260818T1100.v2.jsonl.zst |
Binance spot + USDT-M perp | 944,499 | 17.3 MiB | 262 MiB |
bybit.btc_20260818T1100.v2.jsonl.zst |
Bybit spot + linear perp | 250,013 | 6.4 MiB | 67 MiB |
okx.btc_20260818T1100.v2.jsonl.zst |
OKX spot + swap | 164,180 | 7.8 MiB | 79 MiB |
coinbase.btc_20260818T1100.v2.jsonl.zst |
Coinbase Advanced Trade | 92,562 | 5.0 MiB | 85 MiB |
chainlink.btc_20260818T1100.v2.jsonl.zst |
Chainlink Data Streams | 10,046 | 0.2 MiB | 2.8 MiB |
| Total | 2,694,835 | 101 MiB | 1.34 GiB |
All six cover 2026-08-18 11:00:00 – 11:59:59 UTC, continuously. Each is a single zstd stream — one compressed file, one text file inside, no directories.
Line format
The .jsonl extension is a convention here, not a promise: a line is not a JSON object.
It is three |-separated fields, and only the third is JSON — receive timestamp in
microseconds, channel name, then the venue's original payload:
1787050800001156 | polymarket.meta.btc.5m | {"condition_id":"0xd6e0…","coin":"btc",…}
Split on the first two | only — JSON payloads contain | inside strings.
Payloads are stored byte-for-byte as each venue sent them, with no normalising into a common schema. Prices and sizes arrive as JSON strings: parse them as decimals, not floats, if exact tick arithmetic matters.
One clock
The first field is local receive time in microseconds, stamped by one collector for all six tapes — a single Hetzner server in Finland, NTP-disciplined. Each file is already sorted by it, so combining them is a merge, not a join: interleave the six on that field and you get 2.7 million messages in arrival order, the channel saying where each came from. No alignment, no drift correction, no resampling.
Two limits. Receive time is the collector's, not the venue's — payloads keep the venue's own timestamp where sent, and the gap between them is the network hop plus the venue's clock error, kept as data. Since the collector sits in Finland, that hop is not symmetric across venues. And cross-venue ordering is ordering at the collector: two events a millisecond apart on two continents may have happened in the other order at the venues. Right frame for "could a trader have acted on this", wrong one for "what happened first physically".
Within one file ordering is exact, and each venue's sequence numbers are preserved.
The files, one at a time
polymarket.btc.5m — the prediction market
Thirteen consecutive 5-minute BTC Up/Down markets. Prices are probabilities, quoted in USDC.
| Channel | Lines | What it is |
|---|---|---|
polymarket.clob.btc.5m |
1,232,270 | The CLOB websocket feed |
polymarket.meta.btc.5m |
1,210 | Which condition/token ids the tape is about |
polymarket.gamma.markets |
55 | Periodic Gamma API market-list snapshots |
Event types inside the CLOB channel, counting events rather than lines:
event_type |
Events | Payload |
|---|---|---|
price_change |
1,132,965 | A list of {asset_id, price, size, side, hash, best_bid, best_ask} |
best_bid_ask |
44,638 | asset_id, best_bid, best_ask, spread |
book |
35,192 | Full depth snapshot: bids / asks as price-size pairs |
last_trade_price |
16,867 | Trade print: price, size, side, fee_rate_bps, transaction_hash |
new_market |
2,560 | Market announcements: id, question, slug, description |
tick_size_change |
48 | old_tick_size, new_tick_size |
market_resolved |
11 | winning_asset_id, winning_outcome — the label |
Events and lines differ because a CLOB payload is usually one event object, but not
always. In 35 lines it is an array: 23 carry two book snapshots at once (the outcome-token
pair, sent on subscribe and reconnect) and 12 are empty arrays. Readers must accept both.
polymarket.meta.btc.5m is emitted by the collector, so the tape is self-describing: each
record names the market's condition_id, coin, interval, its window as start_ts/end_ts,
and the outcome token ids — y_token is Up, n_token is Down, and those are the
asset_id values used throughout the CLOB channel.
polymarket.gamma.markets snapshots the Gamma REST list for fields the websocket never sends
— liquidity, volume, outcome prices, end date, resolution source. Payloads are always
arrays and are not filtered to BTC: they carry the whole Up/Down board (btc, eth, sol,
xrp, doge, bnb, zec, hype), as do the new_market events.
binance.btc — spot and USDT-M perpetual
binance.perp.btc 692,609 lines, binance.spot.btc 251,890. Combined-stream envelope:
| Stream | Lines (both) | What it is |
|---|---|---|
btcusdt@bookTicker |
761,052 | Best bid/ask, every update |
btcusdt@trade |
112,051 | Individual trade prints |
btcusdt@depth@100ms |
71,276 | Incremental depth diffs, 100 ms batches |
Depth is a diff stream with no REST snapshot included, so depth is relative and
bookTicker is the reliable top-of-book. For a full Binance book, the one-second aggregate
of this hour has ten levels per side already built.
okx.btc — spot and swap
okx.perp.btc 110,561 lines, okx.spot.btc 53,619:
| Feed | Instrument | Lines |
|---|---|---|
bbo-tbt |
BTC-USDT-SWAP |
57,242 |
books |
BTC-USDT-SWAP |
34,733 |
books |
BTC-USDT |
32,728 |
trades |
BTC-USDT-SWAP |
18,406 |
bbo-tbt |
BTC-USDT |
16,152 |
trades |
BTC-USDT |
4,563 |
bbo-tbt is tick-by-tick best bid/offer — every change, not a sampled ticker. books is
400-level depth, snapshot then updates, so the book rebuilds from this file alone. The
swap's contract size is 0.01 BTC against 1 for spot; sizes are not comparable without it.
bybit.btc — spot and linear perpetual
bybit.perp.btc 155,820 lines, bybit.spot.btc 94,193:
| Topic | Lines (both) | What it is |
|---|---|---|
orderbook.50.BTCUSDT |
162,230 | 50-level depth |
orderbook.1.BTCUSDT |
71,932 | Top-of-book |
publicTrade.BTCUSDT |
15,443 | Trade prints |
Depth is marked snapshot or delta with update ids, so the book rebuilds from this file
alone. One publicTrade message can carry several trades, so prints outnumber lines.
coinbase.btc — spot, the USD leg
All on channel coinbase.spot.btc, product BTC-USD:
| Feed | Lines | What it is |
|---|---|---|
l2_data |
66,479 | Level-2 book: one snapshot, then updates |
ticker |
12,452 | Price and 24h stats on every trade |
market_trades |
10,145 | Trade prints |
heartbeats |
3,478 | Once a second — proof the socket was alive |
subscriptions |
8 | Subscription acks, including after reconnects |
The only USD-quoted venue here, so it separates a move in bitcoin from a move in USDT. The book rebuilds from this file alone. Coinbase does not label the taker side, so anything downstream has to infer it. The heartbeat feed distinguishes "the market was quiet" from "the collector was disconnected" — otherwise unrecoverable from a tape.
chainlink.btc — the oracle the market resolves against
10,046 lines, all on channel chainlink.rtds:
| Topic | Lines | What it is |
|---|---|---|
crypto_prices_chainlink |
3,349 | The spot Chainlink BTC/USD price |
crypto_prices_twap_sixty |
3,349 | 60-second TWAP — the resolution source |
crypto_prices_twap_thirty |
3,348 | 30-second TWAP |
Each record carries the symbol, the value as a float, the same value as an on-chain integer with 18 decimals, the oracle's timestamp, and the window length for TWAP topics.
The float loses precision; the 18-decimal integer is exact — use the integer for anything reproducing an on-chain comparison, such as deciding how a market resolved. The oracle's timestamp runs a second or two behind receive time: these are published values, not a continuous feed. A market resolving at time T is decided by a value stamped earlier than T.
What it is good for
Thirteen markets, each with its full life — announcement, book build-up, five minutes of trading, and a resolution naming the winner. That resolution is free ground truth and the Chainlink stream is the input that produced it. At message level this also answers what bars cannot: queue position, the sequence of events inside a second, how a book was built rather than how it looked.
An hour is a sample, not a study — enough to build and debug a parser against, not enough to fit anything on.
Provenance and caveats
- Collected on a single Hetzner server in Finland, subscribing to each venue's public websocket API and Polymarket's Gamma REST API. Payloads are stored verbatim: nothing deduplicated, reordered, corrected or back-filled.
- A websocket tape records what one subscriber received. Gaps, reconnects and duplicate snapshots are part of the record; treat it as observed, not authoritative.
- Book reconstruction is self-contained for OKX, Bybit and Coinbase; Binance depth is diff-only and needs a REST snapshot that is not included.
- All venues are BTC/USDT except Coinbase and Chainlink, which are BTC/USD. The USDT basis over this hour is not corrected for.
- The dataset viewer is off deliberately: the lines are not JSON objects and the payloads are six different venue schemas. The Parquet aggregates of the same hour are viewable.
v2is the archive format version, not a data revision.
Licence and attribution
CC BY 4.0 — free to use, share and build on, including commercially, provided you credit the source:
Data: keydata.shop — https://keydata.shop
The underlying data is derived from each venue's public APIs and remains subject to their respective terms. Provided as-is, with no warranty. Not investment advice. Not affiliated with or endorsed by Polymarket, Binance, OKX, Bybit, Coinbase or Chainlink.
- Downloads last month
- 145