Exchange Wire Formats

Binance Spot wire format

This page shows how Binance 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 Binance 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.

  • Trades WebSocket: wss://stream.binance.com:9443/stream?streams=<symbol>@trade/…
  • Depth WebSocket: wss://stream.binance.com:9443/stream?streams=<symbol>@depth@100ms/…
  • Ticker WebSocket: wss://stream.binance.com:9443/stream?streams=<symbol>@ticker/…
  • REST: https://api.binance.com

Exchange API reference: developers.binance.com. For the conventions that apply to all exchanges, refer to the wire formats overview.

Trades

One row per trade from the <symbol>@trade stream.

  • WebSocket <symbol>@trade
WebSocket message · <symbol>@tradereceived 2026-10-05 19:15:46.969645 UTC
{
"stream": "btcusdt@trade",
"data": {
"e": "trade",
"E": 1791227746836,
"s": "BTCUSDT",
"t": 6738013629,
"p": "85667.22000000",
"q": "0.00018000",
"T": 1791227746835,
"m": true,
"M": true
}
}

Published row

received_time1791227746969645000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Binance does not send this value.
event_time1791227746836data.ECopied. Milliseconds.
symbolBTCUSDTdata.sCopied.
trade_id6738013629data.tCopied.
price85667.22000000data.pCopied as the exact decimal string that Binance sent.
quantity0.00018000data.qCopied as the exact decimal string. Base asset units.
trade_time1791227746835data.TCopied. Milliseconds.
is_buyer_makertruedata.mCopied. true means the seller was the aggressor.
order_typeMARKET—Always MARKET. This value is a placeholder, because the spot trade stream has no order type field.

Notes

  • order_type is always MARKET as a placeholder. Use is_buyer_maker for the aggressor side.
  • We do not publish the M field. The Binance documentation says that you can ignore it.

For the column types and descriptions, refer to the Trades schema.

Order Book

One row per price level. Updates come from the <symbol>@depth@100ms stream. REST snapshots set the initial state of the order book.

  • WebSocket <symbol>@depth@100ms
  • REST GET /api/v3/depth

Depth update

Binance sends at most one depthUpdate per symbol every 100 ms, with the levels that changed in that interval.

WebSocket message · <symbol>@depth@100msreceived 2026-10-05 19:16:56.142210 UTC
{
"stream": "btcusdt@depth@100ms",
"data": {
"e": "depthUpdate",
"E": 1791227816014,
"s": "BTCUSDT",
"U": 101075721603,
"u": 101075721609,
"b": [
["85517.96000000", "0.00000000"],
["68521.58000000", "0.00261000"]
],
"a": [
["85774.91000000", "0.00000000"]
]
}
}

Published rows · 3

received_time1791227816142210000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Binance does not send this value.
event_time1791227816014data.ECopied. Milliseconds.
transaction_timenull—Null. Spot depth updates do not contain a transaction time.
symbolBTCUSDTdata.sCopied.
event_typeupdatedata.eupdate for every depthUpdate message.
first_update_id101075721603data.UCopied.
final_update_id101075721609data.uCopied.
prev_final_update_idnull—Null. Spot depth updates do not contain pu. The U of the next message is the u of this message + 1. A larger U shows a gap.
last_update_idnull—Null. Depth updates do not contain a separate last update ID.
sideaskdata.bdata.abid for levels in b, ask for levels in a. One row per level.
price85774.91000000data.b[][0]data.a[][0]Copied as the exact decimal string.
quantity0.00000000data.b[][1]data.a[][1]Copied as the exact decimal string. The value is the new total at that price. 0.00000000 removes the level.
order_countnull—Null. Binance does not send order counts.

REST depth snapshot

The collector requests a REST snapshot when it connects. It also requests one after a sequence gap, when it must reset its order book. We publish only the snapshots that the collector applied to its order book. Each level becomes one snapshot row.

Shortened: We requested this example with limit=5 to keep it short. The collector requests limit=100.

REST responsereceived 2026-10-05 19:15:44.966619 UTC
GET https://api.binance.com/api/v3/depth?symbol=BTCUSDT&limit=5
{
"lastUpdateId": 101075699690,
"bids": [
["85667.22000000", "3.87307000"],
["85667.21000000", "0.00030000"],
["85666.80000000", "0.00008000"],
["85666.66000000", "0.00341000"],
["85665.76000000", "0.00014000"]
],
"asks": [
["85667.23000000", "5.95855000"],
["85667.24000000", "0.00042000"],
["85667.30000000", "0.00351000"],
["85667.92000000", "0.00006000"],
["85668.04000000", "0.00008000"]
]
}

Published rows · 10

received_time1791227744966619918—Our collector's clock when it received the REST response, in nanoseconds since the Unix epoch.
event_time1791227744966—Our collector's clock when it decoded the response, in milliseconds. The spot depth endpoint does not return an event time.
transaction_timenull—Null. The spot depth endpoint does not return a transaction time.
symbolBTCUSDT—The symbol that the collector requested.
event_typesnapshot—snapshot for every REST snapshot.
first_update_idnull—Null for snapshots.
final_update_id101075699690lastUpdateIdCopied.
prev_final_update_idnull—Null for snapshots.
last_update_id101075699690lastUpdateIdCopied. The snapshot already contains the updates that have final_update_id ≤ this value. Replay from the first later update that has first_update_id ≤ this value + 1 ≤ final_update_id.
sideaskbidsasksbid for levels in bids, ask for levels in asks. One row per level.
price85667.23000000bids[][0]asks[][0]Copied as the exact decimal string.
quantity5.95855000bids[][1]asks[][1]Copied as the exact decimal string.
order_countnull—Null. Binance does not send order counts.

Notes

  • Spot updates do not have pu, so prev_final_update_id is always null. To check continuity between updates, make sure that first_update_id = the final_update_id of the previous update + 1. The first update after a snapshot can overlap the snapshot instead. That update continues the snapshot when first_update_id ≤ the last_update_id of the snapshot + 1 ≤ final_update_id.
  • REST snapshots contain up to 100 levels per side. Levels outside the snapshot are unknown until an update changes them.
  • The event_time of a snapshot is our clock, not an exchange time. Do not compare it with the exchange event_time of updates.
  • We do not publish an update row if its final_update_id equals the lastUpdateId of a snapshot in the same hour. The snapshot already contains these updates.
  • A depth update with no levels becomes one row with side noop, and with price and quantity 0. This row contains the update IDs and does not change the order book. An empty REST snapshot becomes one noop snapshot row. When you replay this row, clear the order book.
  • A file can start with a checkpoint. A checkpoint is the order book that we replayed up to the hour boundary, as snapshot rows. These rows have received_time at the start of the hour and the event_time of the last exchange event before that time. Their transaction_time is null. Their final_update_id and last_update_id contain the last update ID that we applied. We write a checkpoint only after we make sure that the order book is current. If a file has no checkpoint, continue from the order book of the previous hour or wait for the next snapshot.

For the column types and descriptions, refer to the Order Book schema.

Ticker

One row per <symbol>@ticker message, about one per second per symbol.

  • WebSocket <symbol>@ticker

Rolling 24-hour statistics, not statistics of the UTC day.

WebSocket message · <symbol>@tickerreceived 2026-10-05 19:15:47.154175 UTC
{
"stream": "btcusdt@ticker",
"data": {
"e": "24hrTicker",
"E": 1791227747016,
"s": "BTCUSDT",
"p": "276.01000000",
"P": "0.323",
"w": "86032.94355095",
"x": "85391.21000000",
"c": "85667.22000000",
"Q": "0.06326000",
"b": "85667.22000000",
"B": "3.80987000",
"a": "85667.23000000",
"A": "5.98305000",
"o": "85391.21000000",
"h": "86999.11000000",
"l": "84972.01000000",
"v": "17674.90865000",
"q": "1520624418.15357380",
"O": 1791141347009,
"C": 1791227747009,
"F": 6734725364,
"L": 6738013629,
"n": 3288266
}
}

Published row

received_time1791227747154175000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Binance does not send this value.
event_time1791227747016data.ECopied. Milliseconds.
symbolBTCUSDTdata.sCopied.
price_change276.01000000data.pCopied.
price_change_percent0.323data.PCopied. Percent: 0.323 means +0.323 %.
weighted_average_price86032.94355095data.wCopied.
last_price85667.22000000data.cCopied.
last_quantity0.06326000data.QCopied. Base asset units.
open_price85391.21000000data.oCopied.
high_price86999.11000000data.hCopied.
low_price84972.01000000data.lCopied.
base_asset_volume17674.90865000data.vCopied. Base asset units.
quote_asset_volume1520624418.15357380data.qCopied. Quote asset units.
statistics_open_time1791141347009data.OCopied. Milliseconds.
statistics_close_time1791227747009data.CCopied. Milliseconds.
first_trade_id6734725364data.FCopied.
last_trade_id6738013629data.LCopied.
total_trades3288266data.nCopied.

Notes

  • We do not publish the price of the last trade before the 24-hour window (x) or the best bid and ask (b, B, a, A).

For the column types and descriptions, refer to the Ticker schema.

Not published

  • Mark Price: Spot markets have no mark price or funding rate.
  • Open Interest: Spot markets have no open interest.
  • Liquidations: Binance does not publish spot liquidations.

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

Contact support