Binance Spot wire format
How Binance Spot messages become rows in our Parquet files. Each data type below shows a real message next to the rows we publish for it, with the source and the rule for every column. Hover a line or a column to see how they connect.
Checked against our pipeline
These messages were captured from Binance Spot on 2026-10-05. Our test suite replays each one through the production collector parser and postprocessor, and fails if the published rows differ from the rows on this page. Files written before a change to the pipeline can differ; see 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. Conventions shared by every exchange are on 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. A placeholder: the spot trade stream has no order type field.Notes
order_typeis alwaysMARKETas a placeholder. Useis_buyer_makerfor the aggressor side.- The
Mfield is not published; Binance documents it as ignorable.
Column types and descriptions: Trades schema.
Order Book
One row per price level. Updates come from the <symbol>@depth@100ms stream; REST snapshots anchor the 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 next message's U is this message's u + 1, and a larger U is 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 fetches a REST snapshot when it connects and when it has to re-anchor the book after a sequence gap. Only snapshots the collector applied to its book are published, as one snapshot row per level.
Abridged: Requested with limit=5 to keep the example 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 are already in the snapshot. Replay from the first later update whose 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 have no
pu, soprev_final_update_idis always null. Between updates, check continuity withfirst_update_id= previous update'sfinal_update_id+ 1. The first update after a snapshot can overlap it instead: it continues the snapshot whenfirst_update_id≤ snapshotlast_update_id+ 1 ≤final_update_id. - REST snapshots hold up to 100 levels per side. Levels outside the snapshot are unknown until an update changes them.
- Snapshot
event_timeis our clock, not an exchange time. Do not compare it with the exchangeevent_timeof updates. - Update rows whose
final_update_idequals a snapshot'slastUpdateIdin the same hour are not published: the snapshot already contains them. - A depth update with no levels becomes one row with
sidenoopandpriceandquantity0. It carries the update IDs and does not change the book. An empty REST snapshot becomes onenoopsnapshotrow: clear the book on it. - A file can start with a checkpoint: our replayed book at the hour boundary, as
snapshotrows withreceived_timeat the hour start, theevent_timeof the last exchange event before it, nulltransaction_time, and the last applied update ID infinal_update_idandlast_update_id. A checkpoint is written only when the book is proven current. Without one, continue from the previous hour's book or wait for the next snapshot.
Column types and descriptions: 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
- The price of the last trade before the 24-hour window (
x) and the best bid and ask (b,B,a,A) are not published.
Column types and descriptions: 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.