Exchange Wire Formats

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

WebSocket message · tradereceived 2026-10-05 19:18:02.245217 UTC
{
"channel": "trade",
"type": "update",
"data": [
{
"symbol": "BTC/USD",
"side": "sell",
"price": 85676.6,
"qty": 0.00001764,
"ord_type": "limit",
"trade_id": 110284812,
"timestamp": "2026-10-05T19:18:02.218613Z"
}
]
}

Published row

received_time1791227882245217000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Kraken does not send this value.
event_time1791227882218data[].timestampKraken's RFC 3339 timestamp in milliseconds since the Unix epoch. We truncate the microseconds. The same value as trade_time.
symbolBTC/USDdata[].symbolCopied, for example BTC/USD.
trade_id110284812data[].trade_idCopied. Kraken gives consecutive numbers to the trades of each pair. Thus, a jump is a gap.
price85676.6data[].priceCopied with the exact digits of Kraken's JSON number. Trailing zeros stay.
quantity0.00001764data[].qtyCopied with the exact digits of Kraken's JSON number. Trailing zeros stay. Base asset units.
trade_time1791227882218data[].timestampKraken's RFC 3339 timestamp in milliseconds since the Unix epoch. We truncate the microseconds. If we cannot parse the timestamp, we use our receive time in milliseconds.
is_buyer_makertruedata[].sidetrue when side is sell. Kraken's side is the taker's side.
order_typelimitdata[].ord_typeCopied. The type of the taker order: 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.

WebSocket message · tradereceived 2026-10-05 20:00:09.717900 UTC
{
"channel": "trade",
"type": "snapshot",
"data": [
{
"symbol": "BTC/USD",
"side": "sell",
"price": 85706.1,
"qty": 0.00023200,
"ord_type": "limit",
"trade_id": 110288956,
"timestamp": "2026-10-05T19:59:55.347091Z"
},
{
"symbol": "BTC/USD",
"side": "buy",
"price": 85706.0,
"qty": 0.00043755,
"ord_type": "limit",
"trade_id": 110288957,
"timestamp": "2026-10-05T19:59:57.436061Z"
},
{
"symbol": "BTC/USD",
"side": "sell",
"price": 85723.2,
"qty": 0.00001322,
"ord_type": "limit",
"trade_id": 110289005,
"timestamp": "2026-10-05T20:00:08.679839Z"
}
]
}

Published rows · 3

received_time1791230409717900000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Kraken does not send this value.
event_time1791230395347data[].timestampKraken's RFC 3339 timestamp in milliseconds since the Unix epoch. We truncate the microseconds. The same value as trade_time.
symbolBTC/USDdata[].symbolCopied, for example BTC/USD.
trade_id110288956data[].trade_idCopied. Kraken gives consecutive numbers to the trades of each pair. Thus, a jump is a gap.
price85706.1data[].priceCopied with the exact digits of Kraken's JSON number. Trailing zeros stay.
quantity0.00023200data[].qtyCopied with the exact digits of Kraken's JSON number. Trailing zeros stay. Base asset units.
trade_time1791230395347data[].timestampKraken's RFC 3339 timestamp in milliseconds since the Unix epoch. We truncate the microseconds. If we cannot parse the timestamp, we use our receive time in milliseconds.
is_buyer_makertruedata[].sidetrue when side is sell. Kraken's side is the taker's side.
order_typelimitdata[].ord_typeCopied. The type of the taker order: 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.

REST responsereceived 2026-10-05 19:20:13.148740 UTC
GET https://api.kraken.com/0/public/Trades?pair=BTC/USD&since=1791227953000000000&count=3
{
"error": [],
"result": {
"BTC/USD": [
["85788.50000", "0.00043713", 1791227953.2866168, "s", "l", "", 110285002],
["85788.50000", "0.00010000", 1791227953.2866168, "s", "l", "", 110285003],
["85783.20000", "0.00043715", 1791227953.6063356, "s", "l", "", 110285004]
],
"last": "1791227953606335684"
}
}

Published row

received_time1791228013148740113—Our collector's clock when it wrote the recovered trades, in nanoseconds since the Unix epoch. This time is later than the time of the trade.
event_time1791227953286result.BTC/USD[][2]The REST time in seconds. We cut it to microseconds as an RFC 3339 time, then change it to milliseconds since the Unix epoch. The same value as trade_time.
symbolBTC/USD—The pair that the collector requested.
trade_id110285002result.BTC/USD[][6]Copied.
price85788.50000result.BTC/USD[][0]Copied with the exact digits of Kraken's REST decimal string. Thus, REST rows keep trailing zeros (85788.50000) that WebSocket rows do not have.
quantity0.00043713result.BTC/USD[][1]Copied with the exact digits of the REST decimal string. Base asset units.
trade_time1791227953286result.BTC/USD[][2]The REST time in seconds. We cut it to microseconds, then change it to milliseconds since the Unix epoch.
is_buyer_makertrueresult.BTC/USD[][3]true when the side is s (the taker sold).
order_typelimitresult.BTC/USD[][4]limit for l, market for m.

Notes

  • trade_id is 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.

WebSocket message · bookreceived 2026-10-05 19:18:01.660108 UTC
{
"channel": "book",
"type": "snapshot",
"data": [
{
"symbol": "BTC/USD",
"bids": [
{
"price": 85676.6,
"qty": 0.09509427
},
{
"price": 85675.9,
"qty": 0.04469152
},
{
"price": 85675.8,
"qty": 0.17507841
}
],
"asks": [
{
"price": 85676.7,
"qty": 1.22854301
},
{
"price": 85676.9,
"qty": 0.19258045
},
{
"price": 85677.0,
"qty": 0.18888516
}
],
"checksum": 1875766410,
"timestamp": "2026-10-05T19:18:01.569744Z"
}
]
}

Published rows · 6

received_time1791227881660108000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Kraken does not send this value.
event_time1791227881660—Our receive time in milliseconds (received_time / 1,000,000). This is not Kraken's timestamp.
transaction_time1791227881569data[].timestampKraken's RFC 3339 timestamp in milliseconds since the Unix epoch. We truncate the microseconds.
symbolBTC/USDdata[].symbolCopied, for example BTC/USD.
event_typesnapshottypesnapshot for type snapshot.
first_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
final_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
prev_final_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
last_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
sidebiddata[].bidsdata[].asksbid for levels in bids, ask for levels in asks. One row per level.
price85676.6data[].bids[].pricedata[].asks[].priceCopied with the exact digits of Kraken's JSON number. Trailing zeros stay.
quantity0.09509427data[].bids[].qtydata[].asks[].qtyCopied with the exact digits of Kraken's JSON number. Trailing zeros stay. Base asset units.
order_countnull—Null. Kraken does not report order counts.

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.

WebSocket message · bookreceived 2026-10-05 19:18:01.726469 UTC
{
"channel": "book",
"type": "update",
"data": [
{
"symbol": "BTC/USD",
"bids": [],
"asks": [
{
"price": 85677.6,
"qty": 0.00000000
},
{
"price": 88527.7,
"qty": 0.00223800
}
],
"checksum": 3606623782,
"timestamp": "2026-10-05T19:18:01.705851Z"
}
]
}

Published rows · 2

received_time1791227881726469000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Kraken does not send this value.
event_time1791227881726—Our receive time in milliseconds (received_time / 1,000,000). This is not Kraken's timestamp.
transaction_time1791227881705data[].timestampKraken's RFC 3339 timestamp in milliseconds since the Unix epoch. We truncate the microseconds.
symbolBTC/USDdata[].symbolCopied, for example BTC/USD.
event_typeupdatetypeupdate for type update.
first_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
final_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
prev_final_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
last_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
sideaskdata[].asksbid for levels in bids, ask for levels in asks. One row per level.
price85677.6data[].asks[].priceCopied with the exact digits of Kraken's JSON number. Trailing zeros stay.
quantity0.00000000data[].asks[].qtyCopied with the exact digits of Kraken's JSON number. Trailing zeros stay. The new total at that price. 0.00000000 removes the level.
order_countnull—Null. Kraken does not report order counts.

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.

WebSocket message · bookreceived 2026-10-05 19:18:01.735746 UTC
{
"channel": "book",
"type": "update",
"data": [
{
"symbol": "BTC/USD",
"bids": [
{
"price": 85650.2,
"qty": 2.91790845
}
],
"asks": [],
"checksum": 2228140126,
"timestamp": "2026-10-05T19:18:01.714665Z"
}
]
}

Published rows · 2

received_time1791227881735746000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Kraken does not send this value.
event_time1791227881735—Our receive time in milliseconds (received_time / 1,000,000). This is not Kraken's timestamp.
transaction_time1791227881714data[].timestampKraken's RFC 3339 timestamp in milliseconds since the Unix epoch. We truncate the microseconds.
symbolBTC/USDdata[].symbolCopied, for example BTC/USD.
event_typeupdatetypeupdate for all rows, also for the added delete row.
first_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
final_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
prev_final_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
last_update_idnull—Null. The order book messages of Kraken spot have no sequence numbers.
sidebiddata[].bidsbid for levels in bids. The added delete row is on the side where the window overflowed.
price85650.2data[].bids[].priceCopied with the exact digits of Kraken's JSON number. Trailing zeros stay. The added delete row has the price of the level that left the window, as Kraken last sent that price.
quantity2.91790845data[].bids[].qtyCopied with the exact digits of Kraken's JSON number. Trailing zeros stay. The added delete row has 0.
order_countnull—Null. Kraken does not report order counts.

Notes

  • event_time is our receive time. Kraken's own time is in transaction_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 in received_time order. Each reconnect starts with a new snapshot.
  • 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_time in nanoseconds. Divide values above 10^14 by 10^6. These files can also contain snapshot rows 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.

WebSocket message · tickerreceived 2026-10-05 19:18:02.242456 UTC
{
"channel": "ticker",
"type": "update",
"data": [
{
"symbol": "BTC/USD",
"bid": 85676.6,
"bid_qty": 0.43273545,
"ask": 85676.7,
"ask_qty": 0.17561447,
"last": 85676.6,
"volume": 2558.74399215,
"vwap": 85941.9,
"low": 84965.7,
"high": 86973.6,
"change": 300.7,
"change_pct": 0.35,
"trades": 142899,
"timestamp": "2026-10-05T19:18:02.218613Z"
}
]
}

Published row

received_time1791227882242456000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Kraken does not send this value.
event_time1791227882242—Our receive time in milliseconds (received_time / 1,000,000). We do not publish Kraken's timestamp.
symbolBTC/USDdata[].symbolCopied, for example BTC/USD.
price_change300.7data[].changeCopied with the exact digits of Kraken's JSON number. Trailing zeros stay. The 24-hour change in quote currency.
price_change_percent0.35data[].change_pctCopied with the exact digits of Kraken's JSON number. Trailing zeros stay. Percent: 0.35 means +0.35 %.
weighted_average_price85941.9data[].vwapCopied with the exact digits of Kraken's JSON number. Trailing zeros stay. 24-hour VWAP.
last_price85676.6data[].lastCopied with the exact digits of Kraken's JSON number. Trailing zeros stay.
last_quantitynull—Null. Kraken's ticker has no last trade size.
open_price85375.9data[].lastdata[].changelast − change. We calculate it as an exact decimal. Kraken does not send the 24-hour open.
high_price86973.6data[].highCopied with the exact digits of Kraken's JSON number. Trailing zeros stay.
low_price84965.7data[].lowCopied with the exact digits of Kraken's JSON number. Trailing zeros stay.
base_asset_volume2558.74399215data[].volumeCopied with the exact digits of Kraken's JSON number. Trailing zeros stay. 24-hour volume in base asset units.
quote_asset_volumenull—Null. Kraken's ticker has no quote volume.
statistics_open_timenull—Null. Kraken does not send the limits of the window. The window is the last 24 hours.
statistics_close_timenull—Null. Kraken does not send the limits of the window.
first_trade_idnull—Null. Kraken does not send this value.
last_trade_idnull—Null. Kraken does not send this value.
total_tradesnull—Null. We do not publish Kraken's trades field.

Notes

  • event_time is our receive time, not Kraken's timestamp. 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.

If you cannot find the information that you need, tell us. We also help with integrations.

Contact support