Exchange Wire Formats

Bitget Spot wire format

This page shows how Bitget 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 Bitget 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 subscribes to the books, trade and ticker channels with instType SPOT for every online spot pair that Bitget does not restrict by region (areaSymbol no). The examples use BTCUSDT. The messages and the conversion are the same as for Bitget Futures.

  • Public WebSocket V2 (order book, trades, ticker): wss://ws.bitget.com/v2/ws/public

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

Trades

One row per trade from the trade channel.

  • WebSocket trade

Trade snapshot after subscription

Immediately after the collector subscribes, Bitget sends the recent trades again as one snapshot message, newest first. We publish them like all other trades, with the oldest trade first. We remove the trades that we already published in an earlier hour, or earlier in the same hour.

Shortened: The snapshot contained the 50 most recent trades. This example shows the newest three.

WebSocket message · tradereceived 2026-10-05 19:11:22.145390 UTC
{
"action": "snapshot",
"arg": {
"instType": "SPOT",
"channel": "trade",
"instId": "BTCUSDT"
},
"data": [
{
"ts": "1791227477947",
"price": "85640.81",
"size": "0.000167",
"side": "sell",
"tradeId": "1491081603666657280"
},
{
"ts": "1791227476436",
"price": "85640.82",
"size": "0.000292",
"side": "buy",
"tradeId": "1491081597329063936"
},
{
"ts": "1791227476429",
"price": "85638.99",
"size": "0.000292",
"side": "buy",
"tradeId": "1491081597299703808"
}
],
"ts": 1791227482019
}

Published rows · 3

received_time1791227482145390000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Bitget does not send this value.
event_time1791227476429data[].tsCopied from the fill time of the trade, data[].ts, not from the envelope ts. Milliseconds.
symbolBTCUSDTarg.instIdCopied.
trade_id1491081597299703808data[].tradeIdCopied. We store it as an integer.
price85638.99data[].priceCopied as the exact decimal string.
quantity0.000292data[].sizeCopied as the exact decimal string. Base asset units.
trade_time1791227476429data[].tsCopied. Milliseconds. Same value as event_time.
is_buyer_makerfalsedata[].sidetrue when the taker side (side) is sell. false when it is buy.
order_typeMARKET—Always MARKET. Bitget does not send an order type, so this value is a placeholder.

Trade update

Later messages contain only new trades. One message can contain several trades, newest first. Each trade becomes its own row.

WebSocket message · tradereceived 2026-10-05 19:11:35.006347 UTC
{
"action": "update",
"arg": {
"instType": "SPOT",
"channel": "trade",
"instId": "BTCUSDT"
},
"data": [
{
"ts": "1791227494878",
"price": "85639.46",
"size": "0.000583",
"side": "sell",
"tradeId": "1491081674680418304"
}
],
"ts": 1791227494879
}

Published row

received_time1791227495006347000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Bitget does not send this value.
event_time1791227494878data[].tsCopied from the fill time of the trade, data[].ts, not from the envelope ts. Milliseconds.
symbolBTCUSDTarg.instIdCopied.
trade_id1491081674680418304data[].tradeIdCopied. We store it as an integer.
price85639.46data[].priceCopied as the exact decimal string.
quantity0.000583data[].sizeCopied as the exact decimal string. Base asset units.
trade_time1791227494878data[].tsCopied. Milliseconds. Same value as event_time.
is_buyer_makertruedata[].sidetrue when the taker side (side) is sell. false when it is buy.
order_typeMARKET—Always MARKET. Bitget does not send an order type, so this value is a placeholder.

Notes

  • The Bitget side is the side of the taker. Bitget does not send an order type, so order_type is always MARKET. Use is_buyer_maker for the aggressor side.
  • Trade IDs increase over time, but they are not consecutive. Do not use gaps in trade_id to find trades that the collector did not receive.

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

Order Book

One row per price level from the books channel. The channel sends a snapshot after the collector subscribes, then incremental updates.

  • WebSocket books

Order book snapshot

The first books message after the collector subscribes (and after each reconnection) is a snapshot of the order book. Each level becomes one snapshot row.

Shortened: Bitget sent 500 bid levels and 500 ask levels in this snapshot. This example shows the best three of each.

WebSocket message · booksreceived 2026-10-05 19:11:22.328415 UTC
{
"action": "snapshot",
"arg": {
"instType": "SPOT",
"channel": "books",
"instId": "BTCUSDT"
},
"data": [
{
"asks": [
["85639.47", "0.329203"],
["85643.99", "0.000527"],
["85644", "0.000527"]
],
"bids": [
["85639.46", "0.316465"],
["85638.38", "0.00253"],
["85638.37", "0.060218"]
],
"ts": "1791227481900",
"seq": 885104208381,
"pseq": 0
}
],
"ts": 1791227481952
}

Published rows · 6

received_time1791227482328415000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Bitget does not send this value.
event_time1791227481952tsCopied from the envelope ts, Bitget's push time. Milliseconds.
transaction_time1791227481900data[].tsCopied from data[].ts, the matching-engine time. Milliseconds.
symbolBTCUSDTarg.instIdCopied.
event_typesnapshotactionsnapshot when action is snapshot.
first_update_idnull—Null. Bitget sends one sequence number per push, not a range.
final_update_id885104208381data[].seqCopied.
prev_final_update_idnull—Null for snapshots, because a snapshot starts a new seq chain. Bitget sends pseq 0 with snapshots.
last_update_idnull—Null. Bitget does not send a separate last update ID.
sidebiddata[].bidsdata[].asksbid for levels in bids, ask for levels in asks. One row per level.
price85639.46data[].bids[][0]data[].asks[][0]Copied as the exact decimal string.
quantity0.316465data[].bids[][1]data[].asks[][1]Copied as the exact decimal string. The value is the total size at that price. Base asset units.
order_countnull—Null. The Bitget books channel does not send order counts.

Order book update

The first update after the snapshot above. Its pseq equals the seq of the snapshot, so the sequence chain has no break.

Shortened: Bitget sent no bid levels and 9 ask levels in this update. This example shows 3 of the ask levels.

WebSocket message · booksreceived 2026-10-05 19:11:22.328616 UTC
{
"action": "update",
"arg": {
"instType": "SPOT",
"channel": "books",
"instId": "BTCUSDT"
},
"data": [
{
"asks": [
["85645.91", "0"],
["85666.66", "0.233691"],
["85679.99", "0.233541"]
],
"bids": [],
"ts": "1791227482000",
"seq": 885104210890,
"pseq": 885104208381
}
],
"ts": 1791227482001
}

Published rows · 3

received_time1791227482328616000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Bitget does not send this value.
event_time1791227482001tsCopied from the envelope ts, Bitget's push time. Milliseconds.
transaction_time1791227482000data[].tsCopied from data[].ts, the matching-engine time. Milliseconds.
symbolBTCUSDTarg.instIdCopied.
event_typeupdateactionupdate when action is update.
first_update_idnull—Null. Bitget sends one sequence number per push, not a range.
final_update_id885104210890data[].seqCopied.
prev_final_update_id885104208381data[].pseqCopied. The seq of the previous push on this subscription. If it is different from the final_update_id of the previous message, there is a gap. All rows of one message have the same value. Thus, check it one time per message, not per row.
last_update_idnull—Null. Bitget does not send a separate last update ID.
sideaskdata[].bidsdata[].asksbid for levels in bids, ask for levels in asks. One row per level.
price85645.91data[].asks[][0]Copied as the exact decimal string.
quantity0data[].asks[][1]Copied as the exact decimal string. The value is the new total size at that price. Base asset units. 0 removes the level.
order_countnull—Null. The Bitget books channel does not send order counts.

Notes

  • From the October 2026 pipeline update, transaction_time contains the matching-engine time. In files that we wrote before this update, it is null. In all files, event_time is the push time.
  • The prev_final_update_id (pseq) of each update equals the final_update_id (seq) of the previous message. A different value shows a lost message. If this occurs, start again from the next snapshot. The Bitget spot documentation does not list pseq, but the spot books channel sends it. Rows from messages without pseq have a null prev_final_update_id.
  • We publish a message with no bid levels and no ask levels as one row with side noop, price 0 and quantity 0. Thus, the seq chain stays complete. A noop update does not change a level. A noop snapshot means that the order book is empty. When you replay it, clear your order book.
  • A file can start with a checkpoint snapshot of the order book that we kept from the previous hour. Its received_time is the start of the hour, and its transaction_time is null. Its final_update_id and last_update_id both contain the seq of the last message that we applied. The prev_final_update_id of the next update links to this checkpoint.

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

Ticker

One row per ticker push.

  • WebSocket ticker
WebSocket message · tickerreceived 2026-10-05 19:11:22.218598 UTC
{
"action": "snapshot",
"arg": {
"instType": "SPOT",
"channel": "ticker",
"instId": "BTCUSDT"
},
"data": [
{
"instId": "BTCUSDT",
"lastPr": "85640.81",
"open24h": "85265.09",
"high24h": "86993.9",
"low24h": "84980.62",
"change24h": "0.00301",
"bidPr": "85639.46",
"askPr": "85639.47",
"bidSz": "0.310626",
"askSz": "0.507108",
"baseVolume": "2723.070875",
"quoteVolume": "234243302.169137",
"openUtc": "86511.00",
"changeUtc24h": "-0.01006",
"ts": "1791227482089"
}
],
"ts": 1791227482092
}

Published row

received_time1791227482218598000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Bitget does not send this value.
event_time1791227482092tsCopied from the envelope ts, Bitget's push time. Milliseconds.
symbolBTCUSDTdata[].instIdCopied.
price_changenull—Null. Bitget does not send the absolute 24h price change.
price_change_percent0.301data[].change24hchange24h multiplied by 100. Bitget sends a fraction (0.01 is 1 %). The column is in percent.
weighted_average_pricenull—Null. Bitget does not send a weighted average price.
last_price85640.81data[].lastPrCopied.
last_quantitynull—Null. Bitget's ticker does not send the last trade size.
open_price85265.09data[].open24hCopied. The price 24 hours ago (rolling window), not the open price of the UTC day.
high_price86993.9data[].high24hCopied. Rolling 24 hours.
low_price84980.62data[].low24hCopied. Rolling 24 hours.
base_asset_volume2723.070875data[].baseVolumeCopied. 24h volume in base asset units.
quote_asset_volume234243302.169137data[].quoteVolumeCopied. 24h volume in quote asset units.
statistics_open_timenull—Null. Bitget does not send the window bounds.
statistics_close_timenull—Null. Bitget does not send the window bounds.
first_trade_idnull—Null. Bitget does not send trade ID ranges.
last_trade_idnull—Null. Bitget does not send trade ID ranges.
total_tradesnull—Null. Bitget does not send a trade count.

Notes

  • From the October 2026 pipeline update, price_change_percent is in percent. Files that we wrote before this update contain the Bitget fraction without changes (0.01 for 1 %). Multiply those values by 100.
  • We do not publish the best bid and ask of the ticker (bidPr, askPr, bidSz, askSz), openUtc or changeUtc24h.

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

Not published

  • Mark Price: Spot markets have no mark price. We published empty mark_price files from 2025-07-15 to 2026-09-20. We plan to remove these files.
  • Open Interest: Spot markets have no open interest. We published empty open_interest files from 2025-07-15 to 2026-09-20. We plan to remove these files.
  • Liquidations: Bitget does not publish a spot liquidation feed. Its liquidation topic covers only the futures product types.

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

Contact support