Provides 50-level bid/ask order book data. The first frame after subscription is a full snapshot (depthAction = 0); subsequent frames are incremental updates (depthAction = 1) to be merged into the local order book
Units
Timestamps in microseconds (µs), but only accurate to milliseconds. Append 000 to a millisecond timestamp to get the microsecond format. E.g., millisecond timestamp 1726233600001 corresponds to µs timestamp 1726233600001000
Heartbeat: Send text frame "ping" every 30 seconds, server responds with "pong"
Message Protocol: JSON text frames during subscription phase; SBE binary frames during market data push phase,
distinguished by WebSocket opCode (opCode=1 for text, opCode=2 for binary)
The seq field is a monotonically increasing sequence number used to detect out-of-order packets
The pseq field carries the seq of the previous frame, used together with seq to detect packet loss. It is 0
for snapshot frames
After subscription confirmation, an SBE binary frame is pushed every 20ms. The first frame after subscription is a full
snapshot (depthAction = 0); all subsequent frames are incremental updates (depthAction = 1). The depthAction field
distinguishes them explicitly — merge each update frame into the local order book built from the preceding snapshot.
All SBE messages must include a fixed 8-byte header for parsing and identifying subsequent data.
Field
Type
Length (Byte)
Description
blockLength
uint16
2
Root block length
templateId
uint16
2
Channel unique identifier, fixed value = 1001
schemaId
uint16
2
Schema ID
version
uint16
2
Schema version
Message Field Definitions
Note: priceExponent and sizeExponent are fixed values in the XML Schema. Prices and sizes are represented using
mantissa and exponent.
#
Field
Type
Description
-
messageHeader
Composite
Fixed header, contains blockLength, templateId, schemaId, version
1
ts
uint64
Matching engine timestamp µs timestamp, but only accurate to milliseconds. Append 000 to a millisecond timestamp to get the microsecond format. E.g., millisecond timestamp 1726233600001 → µs 1726233600001000
2
seq
uint64
Message sequence number, used to detect packet loss or out-of-order delivery
The seq of the previous frame, used to detect packet loss or out-of-order delivery of incremental updates. It is 0 for snapshot frames
8
depthAction
uint8
Push action: 0 = Snapshot (full snapshot), 1 = Update (incremental update, only changed levels are included)
100
padding
uint8
Padding bytes
200
asks
groupSize16Encoding
Fixed 50-entry ask array
201
bids
groupSize16Encoding
Fixed 50-entry bid array
300
symbol
varString[8]
Symbol name, UTF-8 format
Asks Group
#
Field
Type
Description
1
price
int64
Ask price Actual price = price × 10^priceExponent
2
size
int64
Ask size Actual size = size × 10^sizeExponent
Bids Group
#
Field
Type
Description
1
price
int64
Bid price Actual price = price × 10^priceExponent
2
size
int64
Bid size Actual size = size × 10^sizeExponent
Depth Action Values
The depthAction field tells you how to interpret the asks / bids groups of the current frame.
Value
Name
Description
0
Snapshot
Full snapshot. The asks / bids groups contain the complete level set, and pseq is 0
1
Update
Incremental update. Only the levels that changed since the previous frame are included; a level pushed with size = 0 means that price level was removed
For depthAction = 1 frames, apply the received levels onto the local order book: overwrite the price level with the
new size, or delete it when size = 0.
The frame below is an incremental update (depthAction = 1) carrying the changed ask and bid levels only. A Snapshot
frame (depthAction = 0) has the same layout, except that pseq is 0 and the asks / bids groups hold the complete
level set.