Kraken Spot wire format
This page shows how Kraken Spot messages become rows in our Parquet files. For each data type below, you see a real message next to the rows that we publish for it. The page also gives the source and the rule for each column. Put the pointer on a line or a column to see how they connect.
Checked against our pipeline
We recorded these messages from Kraken Spot on 2026-10-05. Our test suite replays each message through the production collector parser and the postprocessor. The test fails if the published rows are different from the rows on this page. Files that we wrote before a change to the pipeline can be different. Refer to Known Gaps & Corrections.
The collector uses the book (depth 1,000), trade and ticker channels of Kraken's WebSocket v2. Kraken v2 sends prices and sizes as JSON numbers, for example 0.00005100. We keep the exact digits of each number, with the trailing zeros. Thus, price and quantity contain the literal value that Kraken sent. We store and publish each entry of the data array of a message separately.
- Public WebSocket v2 (book, trade, ticker channels):
wss://ws.kraken.com/v2 - REST (trade gap backfill):
https://api.kraken.com/0/public/Trades
Exchange API reference: docs.kraken.com. For the conventions that apply to all exchanges, refer to the wire formats overview.
Trades
One row per trade from the trade channel. Also one row per trade that the collector recovers from REST when it finds a gap in trade_id.
- WebSocket trade
- REST GET /0/public/Trades
Trade
{"channel": "trade","type": "update","data": [{"symbol": "BTC/USD",→ symbol"side": "sell",→ is_buyer_maker"price": 85676.6,→ price"qty": 0.00001764,→ quantity"ord_type": "limit",→ order_type"trade_id": 110284812,→ trade_id"timestamp": "2026-10-05T19:18:02.218613Z"→ event_time · trade_time}]}
Published row
timestamp in milliseconds since the Unix epoch. We truncate the microseconds. The same value as trade_time.BTC/USD.timestamp in milliseconds since the Unix epoch. We truncate the microseconds. If we cannot parse the timestamp, we use our receive time in milliseconds.true when side is sell. Kraken's side is the taker's side.limit or market.Subscription trade snapshot
The collector subscribes with snapshot: true. Thus, after each subscription, also after a reconnect, Kraken sends the 50 most recent trades of the pair again. These trades fill the trades that the collector did not receive during the reconnect. We drop a trade if we already received its trade_id or published it in an earlier hour. We also drop a trade if its time is more than 5 seconds before the hour that we process. We received this snapshot 9.7 seconds after 20:00 UTC. Its oldest trades are 4.7 and 2.6 seconds before the hour. They are in that margin, thus we publish them in the 20:00 hour.
Shortened: Kraken sent 50 trades in this snapshot. The example shows the two oldest trades and the newest trade. Each trade becomes a separate row.
{"channel": "trade","type": "snapshot","data": [{"symbol": "BTC/USD",→ symbol"side": "sell",→ is_buyer_maker"price": 85706.1,→ price"qty": 0.00023200,→ quantity"ord_type": "limit",→ order_type"trade_id": 110288956,→ trade_id"timestamp": "2026-10-05T19:59:55.347091Z"→ event_time · trade_time},{"symbol": "BTC/USD",→ symbol"side": "buy",→ is_buyer_maker"price": 85706.0,→ price"qty": 0.00043755,→ quantity"ord_type": "limit",→ order_type"trade_id": 110288957,→ trade_id"timestamp": "2026-10-05T19:59:57.436061Z"→ event_time · trade_time},{"symbol": "BTC/USD",→ symbol"side": "sell",→ is_buyer_maker"price": 85723.2,→ price"qty": 0.00001322,→ quantity"ord_type": "limit",→ order_type"trade_id": 110289005,→ trade_id"timestamp": "2026-10-05T20:00:08.679839Z"→ event_time · trade_time}]}
Published rows · 3
timestamp in milliseconds since the Unix epoch. We truncate the microseconds. The same value as trade_time.BTC/USD.timestamp in milliseconds since the Unix epoch. We truncate the microseconds. If we cannot parse the timestamp, we use our receive time in milliseconds.true when side is sell. Kraken's side is the taker's side.limit or market.REST backfill of a trade ID gap
Sometimes the trade_id of a trade is more than one higher than the last trade_id that the collector received for the pair. Then the collector requests the IDs that it did not receive from REST GET /0/public/Trades. Each request starts at the time of the last received trade and gives up to 1,000 trades. The collector stores each of these trades as a line with the same shape as a WebSocket message. It does not store the trades that it received on the WebSocket again. In this example, we use trade 110285002 as a trade that the collector did not receive.
Shortened: We sent this request with count=3 to keep the example short. The collector requests count=1000.
{"error": [],"result": {"BTC/USD": [["85788.50000", "0.00043713", 1791227953.2866168, "s", "l", "", 110285002],→ event_time · trade_id · price · quantity · trade_time · is_buyer_maker · order_type["85788.50000", "0.00010000", 1791227953.2866168, "s", "l", "", 110285003],→ event_time · trade_id · price · quantity · trade_time · is_buyer_maker · order_type["85783.20000", "0.00043715", 1791227953.6063356, "s", "l", "", 110285004]→ event_time · trade_id · price · quantity · trade_time · is_buyer_maker · order_type],"last": "1791227953606335684"}}
Published row
trade_time.85788.50000) that WebSocket rows do not have.true when the side is s (the taker sold).limit for l, market for m.Notes
trade_idis consecutive for each pair. If a jump stays after the REST backfill, it is a real gap.- Rows that we recover from REST keep the REST decimal strings. These strings can have trailing zeros (
85788.50000) where WebSocket rows have none (85788.5). Compare prices as numbers. - Before the 2026-09 data-integrity release, the collector did not recover trades that occurred while it reconnected. Thus, in older files, the trades from a few seconds around a reconnect can be absent.
For the column types and descriptions, refer to the Trades schema.
Order Book
One row per price level from the book channel at depth 1,000. A snapshot comes after each subscription, then updates follow.
- WebSocket book
Order book snapshot
The collector subscribes with depth: 1000. After each subscription, also after a reconnect, Kraken sends the best 1,000 levels of each side in one snapshot message.
Shortened: Kraken sent 1000 bid levels and 1000 ask levels. The example shows the best three levels of each side.
{"channel": "book","type": "snapshot",→ event_type"data": [{"symbol": "BTC/USD",→ symbol"bids": [→ side{→ side"price": 85676.6,→ side · price"qty": 0.09509427→ side · quantity},{→ side"price": 85675.9,→ side · price"qty": 0.04469152→ side · quantity},{→ side"price": 85675.8,→ side · price"qty": 0.17507841→ side · quantity}],"asks": [→ side{→ side"price": 85676.7,→ side · price"qty": 1.22854301→ side · quantity},{→ side"price": 85676.9,→ side · price"qty": 0.19258045→ side · quantity},{→ side"price": 85677.0,→ side · price"qty": 0.18888516→ side · quantity}],"checksum": 1875766410,"timestamp": "2026-10-05T19:18:01.569744Z"→ transaction_time}]}
Published rows · 6
received_time / 1,000,000). This is not Kraken's timestamp.timestamp in milliseconds since the Unix epoch. We truncate the microseconds.BTC/USD.snapshot for type snapshot.bid for levels in bids, ask for levels in asks. One row per level.Order book update
Each update lists the levels that changed. In this example, Kraken removes an ask and adds the ask that becomes the 1,000th level.
{"channel": "book","type": "update",→ event_type"data": [{"symbol": "BTC/USD",→ symbol"bids": [],"asks": [→ side{→ side"price": 85677.6,→ side · price"qty": 0.00000000→ side · quantity},{→ side"price": 88527.7,→ side · price"qty": 0.00223800→ side · quantity}],"checksum": 3606623782,"timestamp": "2026-10-05T19:18:01.705851Z"→ transaction_time}]}
Published rows · 2
received_time / 1,000,000). This is not Kraken's timestamp.timestamp in milliseconds since the Unix epoch. We truncate the microseconds.BTC/USD.update for type update.bid for levels in bids, ask for levels in asks. One row per level.0.00000000 removes the level.Update that pushes a level out of the 1,000-level window
Kraken keeps each side at the subscribed 1,000 levels. But when a new level pushes a level past the 1,000th position, Kraken does not send a delete for that level. Kraken expects clients to drop it. The collector keeps an order book for each connection and finds the level that left the window. It publishes that level as a delete row (quantity 0) after the levels that Kraken sent. In this example, the new bid at 85650.2 pushes out the 1,000th bid, 82879.7. Kraken added that bid one message earlier.
We replay 5 earlier messages (not shown) before this message. These messages set the start state for this message.
Shortened: We replay this example after the snapshot and the four updates between the snapshot and this message. That setup does not include the 1,000 asks of the snapshot. This message changes only bids.
{"channel": "book","type": "update",→ event_type"data": [{"symbol": "BTC/USD",→ symbol"bids": [→ side{→ side"price": 85650.2,→ side · price"qty": 2.91790845→ side · quantity}],"asks": [],"checksum": 2228140126,"timestamp": "2026-10-05T19:18:01.714665Z"→ transaction_time}]}
Published rows · 2
received_time / 1,000,000). This is not Kraken's timestamp.timestamp in milliseconds since the Unix epoch. We truncate the microseconds.BTC/USD.update for all rows, also for the added delete row.bid for levels in bids. The added delete row is on the side where the window overflowed.0.Notes
event_timeis our receive time. Kraken's own time is intransaction_time.- We do not publish Kraken's
checksum(CRC32 of the top 10 bids and asks). Spot order book messages have no sequence numbers. Thus, you cannot find gaps from the rows. Replay the rows inreceived_timeorder. Each reconnect starts with a newsnapshot. - Before the 2026-09 data-integrity release, a level that a new level pushed out of the 1,000-level window had no delete row. For earlier files, keep only the best 1,000 levels for each side after each update.
- Kraken spot files do not start with a checkpoint snapshot at the start of the hour. Continue from the order book of the previous hour, or wait for the next snapshot.
- Files from before the October 2026 pipeline update have
event_timein nanoseconds. Divide values above 10^14 by 10^6. These files can also containsnapshotrows from REST depth snapshots (at most 500 levels, no sequence). Current files contain only the WebSocket order book.
For the column types and descriptions, refer to the Order Book schema.
Ticker
One row per pair per ticker message. Kraken sends an update after each trade.
- WebSocket ticker
Kraken sends a snapshot after the subscription and an update after each trade. We map the two message types in the same way.
{"channel": "ticker","type": "update","data": [{"symbol": "BTC/USD",→ symbol"bid": 85676.6,"bid_qty": 0.43273545,"ask": 85676.7,"ask_qty": 0.17561447,"last": 85676.6,→ last_price · open_price"volume": 2558.74399215,→ base_asset_volume"vwap": 85941.9,→ weighted_average_price"low": 84965.7,→ low_price"high": 86973.6,→ high_price"change": 300.7,→ price_change · open_price"change_pct": 0.35,→ price_change_percent"trades": 142899,"timestamp": "2026-10-05T19:18:02.218613Z"}]}
Published row
received_time / 1,000,000). We do not publish Kraken's timestamp.BTC/USD.0.35 means +0.35 %.last − change. We calculate it as an exact decimal. Kraken does not send the 24-hour open.trades field.Notes
event_timeis our receive time, not Kraken'stimestamp. Files from before the October 2026 pipeline update have it in nanoseconds. Divide values above 10^14 by 10^6.
For the column types and descriptions, refer to the Ticker schema.
Not published
- Mark Price: Kraken spot has no mark price or funding.
- Open Interest: Spot markets have no open interest.
- Liquidations: Kraken does not publish spot liquidations.