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
{"stream": "btcusdt@trade","data": {"e": "trade","E": 1791227746836,→ event_time"s": "BTCUSDT",→ symbol"t": 6738013629,→ trade_id"p": "85667.22000000",→ price"q": "0.00018000",→ quantity"T": 1791227746835,→ trade_time"m": true,→ is_buyer_maker"M": true}}
Published row
true means the seller was the aggressor.MARKET. This value is a placeholder, because the spot trade stream has no order type field.Notes
order_typeis alwaysMARKETas a placeholder. Useis_buyer_makerfor the aggressor side.- We do not publish the
Mfield. 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.
{"stream": "btcusdt@depth@100ms","data": {"e": "depthUpdate",→ event_type"E": 1791227816014,→ event_time"s": "BTCUSDT",→ symbol"U": 101075721603,→ first_update_id"u": 101075721609,→ final_update_id"b": [→ side["85517.96000000", "0.00000000"],→ side · price · quantity["68521.58000000", "0.00261000"]→ side · price · quantity],"a": [→ side["85774.91000000", "0.00000000"]→ side · price · quantity]}}
Published rows · 3
update for every depthUpdate message.pu. The U of the next message is the u of this message + 1. A larger U shows a gap.bid for levels in b, ask for levels in a. One row per level.0.00000000 removes the level.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.
{"lastUpdateId": 101075699690,→ final_update_id · last_update_id"bids": [→ side["85667.22000000", "3.87307000"],→ side · price · quantity["85667.21000000", "0.00030000"],→ side · price · quantity["85666.80000000", "0.00008000"],→ side · price · quantity["85666.66000000", "0.00341000"],→ side · price · quantity["85665.76000000", "0.00014000"]→ side · price · quantity],"asks": [→ side["85667.23000000", "5.95855000"],→ side · price · quantity["85667.24000000", "0.00042000"],→ side · price · quantity["85667.30000000", "0.00351000"],→ side · price · quantity["85667.92000000", "0.00006000"],→ side · price · quantity["85668.04000000", "0.00008000"]→ side · price · quantity]}
Published rows · 10
snapshot for every REST snapshot.final_update_id ≤ this value. Replay from the first later update that has first_update_id ≤ this value + 1 ≤ final_update_id.bid for levels in bids, ask for levels in asks. One row per level.Notes
- Spot updates do not have
pu, soprev_final_update_idis always null. To check continuity between updates, make sure thatfirst_update_id= thefinal_update_idof the previous update + 1. The first update after a snapshot can overlap the snapshot instead. That update continues the snapshot whenfirst_update_id≤ thelast_update_idof 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_timeof a snapshot is our clock, not an exchange time. Do not compare it with the exchangeevent_timeof updates. - We do not publish an update row if its
final_update_idequals thelastUpdateIdof a snapshot in the same hour. The snapshot already contains these updates. - A depth update with no levels becomes one row with
sidenoop, and withpriceandquantity0. This row contains the update IDs and does not change the order book. An empty REST snapshot becomes onenoopsnapshotrow. 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
snapshotrows. These rows havereceived_timeat the start of the hour and theevent_timeof the last exchange event before that time. Theirtransaction_timeis null. Theirfinal_update_idandlast_update_idcontain 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.
{"stream": "btcusdt@ticker","data": {"e": "24hrTicker","E": 1791227747016,→ event_time"s": "BTCUSDT",→ symbol"p": "276.01000000",→ price_change"P": "0.323",→ price_change_percent"w": "86032.94355095",→ weighted_average_price"x": "85391.21000000","c": "85667.22000000",→ last_price"Q": "0.06326000",→ last_quantity"b": "85667.22000000","B": "3.80987000","a": "85667.23000000","A": "5.98305000","o": "85391.21000000",→ open_price"h": "86999.11000000",→ high_price"l": "84972.01000000",→ low_price"v": "17674.90865000",→ base_asset_volume"q": "1520624418.15357380",→ quote_asset_volume"O": 1791141347009,→ statistics_open_time"C": 1791227747009,→ statistics_close_time"F": 6734725364,→ first_trade_id"L": 6738013629,→ last_trade_id"n": 3288266→ total_trades}}
Published row
0.323 means +0.323 %.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.