Exchange Wire Formats

Bybit Spot wire format

This page shows how Bybit 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 Bybit 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 orderbook.50.<symbol>, publicTrade.<symbol> and tickers.<symbol> for each trading spot pair. The same code as for Bybit Futures parses and postprocesses the messages.

  • Public WebSocket: wss://stream.bybit.com/v5/public/spot
  • REST (trade backfill): https://api.bybit.com

Exchange API reference: bybit-exchange.github.io. For the conventions that apply to all exchanges, refer to the wire formats overview.

Trades

One row per trade from the publicTrade.<symbol> topic. Also, one row per trade that the collector recovers through REST after a reconnect.

  • WebSocket publicTrade.<symbol>
  • REST GET /v5/market/recent-trade

Trade message

Bybit sends trades in batches. This message contains 2 trades, and each trade becomes a separate row.

WebSocket message · publicTrade.<symbol>received 2026-10-05 19:15:00.442966 UTC
{
"topic": "publicTrade.BTCUSDT",
"ts": 1791227700350,
"type": "snapshot",
"data": [
{
"i": "2290000001224566789",
"T": 1791227700349,
"p": "85663.7",
"v": "0.0024",
"S": "Sell",
"seq": 114993707179,
"s": "BTCUSDT",
"BT": false,
"RPI": false
},
{
"i": "2290000001224566790",
"T": 1791227700349,
"p": "85663.7",
"v": "0.002853",
"S": "Sell",
"seq": 114993707179,
"s": "BTCUSDT",
"BT": false,
"RPI": false
}
]
}

Published rows · 2

received_time1791227700442966000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Bybit does not send this value.
event_time1791227700350tsCopied from the message ts, the time when Bybit generated the push. Milliseconds. All trades in the message have the same value.
symbolBTCUSDTdata[].sCopied.
trade_id2290000001224566789data[].iBybit sends a numeric string. We publish it as the same integer.
price85663.7data[].pCopied as the exact decimal string that Bybit sent.
quantity0.0024data[].vCopied as the exact decimal string. Base asset units.
trade_time1791227700349data[].TCopied. The time when the trade was filled. Milliseconds.
is_buyer_makertruedata[].Strue if the taker side S is Sell. false if it is Buy.
order_typeMarket—Always Market. This is a placeholder value because Bybit sends no order type.

REST trade backfill

Bybit does not replay trades after a subscription. Each time a trade connection opens or opens again, the collector requests the latest trades from GET /v5/market/recent-trade. Then it publishes the trades that it did not receive through the WebSocket. If the trade_time of a backfilled trade is not in the hour of the file, we do not publish the trade.

Shortened: We requested this example with limit=1 to keep it short. The collector requests limit=60, the maximum that Bybit returns.

REST responsereceived 2026-10-05 19:18:36.073946 UTC
GET https://api.bybit.com/v5/market/recent-trade?category=spot&symbol=BTCUSDT&limit=1
{
"retCode": 0,
"retMsg": "OK",
"result": {
"category": "spot",
"list": [
{
"execId": "2290000001224568695",
"symbol": "BTCUSDT",
"price": "85782.8",
"size": "0.005246",
"side": "Sell",
"time": "1791227915828",
"isBlockTrade": false,
"isRPITrade": false,
"seq": "114993797995"
}
]
},
"retExtInfo": {},
"time": 1791227915979
}

Published row

received_time1791227916073946027—Our collector's clock when it received the REST response, in nanoseconds since the Unix epoch. This time is later than the trade, frequently by some seconds.
event_time1791227915828result.list[].timeThe trade time. REST responses have no push time, thus event_time is equal to trade_time on backfilled rows. Milliseconds.
symbolBTCUSDTresult.list[].symbolCopied.
trade_id2290000001224568695result.list[].execIdBybit sends a numeric string. We publish it as the same integer.
price85782.8result.list[].priceCopied as the exact decimal string.
quantity0.005246result.list[].sizeCopied as the exact decimal string. Base asset units.
trade_time1791227915828result.list[].timeParsed from the string. Milliseconds.
is_buyer_makertrueresult.list[].sidetrue if the taker side side is Sell. false if it is Buy.
order_typeMarket—Always Market. This is a placeholder value because Bybit sends no order type.

Notes

  • The rows are sorted by trade_time, then by seq (the Bybit cross sequence), then by trade_id.
  • We do not publish the block-trade flag BT, the RPI flag RPI, the tick direction L and seq. We publish block trades and RPI trades as normal rows.
  • If the collector receives a trade through the WebSocket and through the REST backfill, we publish it one time, with the WebSocket values. On a backfilled row, event_time is equal to trade_time, and received_time can be seconds after the trade.
  • The Bybit REST endpoint returns only the latest 60 spot trades. Thus, the collector recovers only a part of a longer reconnect gap.

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

Order Book

One row per price level from the orderbook.50.<symbol> topic. We publish the levels as Bybit sent them.

  • WebSocket orderbook.50.<symbol>

Order book snapshot

Bybit sends a snapshot of the 50-level order book when the subscription starts. Bybit also sends a snapshot after a problem on its side or after a service restart (u = 1). Each level becomes a snapshot row.

Shortened: Bybit sent 50 bid levels and 50 ask levels. This example shows the best three of each.

WebSocket message · orderbook.50.<symbol>received 2026-10-05 19:14:58.426402 UTC
{
"topic": "orderbook.50.BTCUSDT",
"ts": 1791227698276,
"type": "snapshot",
"data": {
"s": "BTCUSDT",
"b": [
["85666.4", "0.134992"],
["85666.3", "0.000915"],
["85665.9", "0.006238"]
],
"a": [
["85666.5", "0.596838"],
["85666.7", "0.024785"],
["85667.8", "0.000835"]
],
"u": 311718506,
"seq": 114993705748
},
"cts": 1791227698274
}

Published rows · 6

received_time1791227698426402000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Bybit does not send this value.
event_time1791227698276tsCopied. The time when Bybit generated the push. Milliseconds.
transaction_time1791227698274ctsCopied. The time of the matching engine. Milliseconds.
symbolBTCUSDTtopicThe symbol part of the topic (orderbook.50.BTCUSDT). It is equal to data.s.
event_typesnapshottypesnapshot for type: "snapshot". This message has all levels of the 50-level order book. A message with u = 1 (Bybit service restart) is also a snapshot.
first_update_idnull—Null for snapshots.
final_update_id311718506data.uCopied. This value starts a new chain. The next delta has u + 1.
prev_final_update_idnull—Null. Bybit sends no previous update ID.
last_update_id114993705748data.seqCopied from seq, the Bybit cross sequence. It gives the order of the messages, but it can skip values.
sidebiddata.bdata.abid for levels in b, ask for levels in a. One row per level.
price85666.4data.b[][0]data.a[][0]Copied as the exact decimal string.
quantity0.134992data.b[][1]data.a[][1]Copied as the exact decimal string.
order_countnull—Null. Bybit does not report order counts.

Order book delta

WebSocket message · orderbook.50.<symbol>received 2026-10-05 19:14:58.426900 UTC
{
"topic": "orderbook.50.BTCUSDT",
"ts": 1791227698296,
"type": "delta",
"data": {
"s": "BTCUSDT",
"b": [
["85666.4", "0.139984"],
["85662.9", "0"],
["85662.2", "0.00447"]
],
"a": [
["85668.3", "0.000111"],
["85693.8", "0.075584"],
["85694.5", "0"]
],
"u": 311718507,
"seq": 114993705774
},
"cts": 1791227698295
}

Published rows · 6

received_time1791227698426900000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Bybit does not send this value.
event_time1791227698296tsCopied. The time when Bybit generated the push. Milliseconds.
transaction_time1791227698295ctsCopied. The time of the matching engine. Milliseconds.
symbolBTCUSDTtopicThe symbol part of the topic (orderbook.50.BTCUSDT). It is equal to data.s.
event_typeupdatetypeupdate for type: "delta".
first_update_id311718507data.uCopied from u. Each delta covers exactly one update ID, thus first_update_id = final_update_id.
final_update_id311718507data.uCopied. One more than the u of the previous message. A larger step is a gap.
prev_final_update_idnull—Null. Bybit sends no previous update ID.
last_update_id114993705774data.seqCopied from seq, the Bybit cross sequence. It gives the order of the messages, but it can skip values.
sidebiddata.bdata.abid for levels in b, ask for levels in a. One row per level.
price85666.4data.b[][0]data.a[][0]Copied as the exact decimal string.
quantity0.139984data.b[][1]data.a[][1]Copied as the exact decimal string. It is the new total at that price. 0 removes the level.
order_countnull—Null. Bybit does not report order counts.

Notes

  • The collector subscribes only to the 50-level order book. WebSocket snapshots are the start points of this order book. Bybit REST depth snapshots have the update IDs of the 1,000-level stream. Thus, they cannot be a start point for this order book, and we do not publish them.
  • Before the collector writes, it makes sure that the u of each delta is one more than the u of the previous message. After a gap, it connects again and starts from a new WebSocket snapshot.
  • We publish a delta with no levels as one row with side = noop and with price and quantity 0. Thus, the update-ID chain has no gaps. Ignore these rows when you rebuild the order book.
  • A file can start with a checkpoint snapshot of the order book that continues from the previous hour. In this snapshot, received_time is the start of the hour and transaction_time is null. final_update_id is the last u that we applied, and last_update_id is its seq.
  • Quantities are in base asset units (BTC for BTCUSDT). Bybit does not include Retail Price Improvement (RPI) orders in the order book stream.
  • Files that we wrote before the October 2026 pipeline update can also contain snapshot rows that we made from REST depth snapshots. Their update IDs are from the Bybit 1,000-level stream and do not continue the 50-level chain. Ignore these rows when you replay the data.

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

Ticker

One row per tickers.<symbol> message.

  • WebSocket tickers.<symbol>

Bybit spot tickers are always full snapshots, thus each row comes from one message.

WebSocket message · tickers.<symbol>received 2026-10-05 19:14:56.423462 UTC
{
"topic": "tickers.BTCUSDT",
"ts": 1791227696127,
"type": "snapshot",
"cs": 114993705064,
"data": {
"symbol": "BTCUSDT",
"lastPrice": "85666.5",
"highPrice24h": "86996.9",
"lowPrice24h": "84978.5",
"prevPrice24h": "85386",
"volume24h": "7322.439121",
"turnover24h": "630464015.32595089",
"price24hPcnt": "0.0033",
"usdIndexPrice": "85662.421591"
}
}

Published row

received_time1791227696423462000—Our collector's clock when it received the message, in nanoseconds since the Unix epoch. Bybit does not send this value.
event_time1791227696127tsCopied. The time when Bybit generated the push. Milliseconds.
symbolBTCUSDTdata.symbolCopied.
price_change280.5data.lastPricedata.prevPrice24hlastPrice − prevPrice24h, calculated exactly in decimal.
price_change_percent0.33data.price24hPcntBybit sends a fraction. We multiply it exactly by 100, thus the column is in percent. 0.0033 becomes 0.33.
weighted_average_pricenull—Null. Bybit sends no weighted average price.
last_price85666.5data.lastPriceCopied.
last_quantitynull—Null. Bybit sends no last trade quantity.
open_price85386data.prevPrice24hCopied from prevPrice24h, the price 24 hours ago.
high_price86996.9data.highPrice24hCopied.
low_price84978.5data.lowPrice24hCopied.
base_asset_volume7322.439121data.volume24hCopied. The 24h volume in base asset units.
quote_asset_volume630464015.32595089data.turnover24hCopied. The 24h turnover in quote asset units.
statistics_open_timenull—Null. Bybit sends no statistics window.
statistics_close_timenull—Null. Bybit sends no statistics window.
first_trade_idnull—Null. Bybit sends no trade IDs in tickers.
last_trade_idnull—Null. Bybit sends no trade IDs in tickers.
total_tradesnull—Null. Bybit sends no trade count.

Notes

  • usdIndexPrice is not published.
  • price_change_percent is in percent since the 2026-09 data-integrity release. Earlier files contain the Bybit fraction.

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

Not published

  • Mark Price: Bybit spot tickers have no mark price or funding rate.
  • Open Interest: Spot markets have no open interest.
  • Liquidations: Bybit's allLiquidation topic covers derivatives only.

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

Contact support