Skip to main content
The book channel includes a CRC32 checksum with each update. Validating it confirms your local book is correctly synchronised with the exchange. Checksum verification is optional. You can validate on every update or periodically depending on throughput requirements. The checksum is always calculated over the top 10 price levels regardless of subscription depth.

Maintaining the book

  • Process all price level updates in a message before calculating the checksum.
  • An update with "qty": 0 means that price level should be removed.
  • After each update, truncate your book to the subscribed depth — you will not receive "qty": 0 for levels that fall out of scope.

Checksum calculation

Parse price and qty fields using a decimal or string decoder to preserve full precision through deserialisation.

Algorithm

1

Build the asks string

For each of the top 10 ask price levels, sorted by price low to high:
  • Remove . from price"45285.2""452852"
  • Remove leading zeros → "452852""452852"
  • Remove . from qty"0.00100000""000100000"
  • Remove leading zeros → "000100000""100000"
  • Append price + qty to the asks string → "452852100000"
2

Build the bids string

For each of the top 10 bid price levels, sorted by price high to low, apply the same formatting and append to the bids string.
3

Concatenate and hash

Concatenate asks + bids strings, then pass the result to a CRC32 function. Cast the result to an unsigned 32-bit integer and compare to the checksum field in the message.

Example

Input snapshot:
Asks string (low → high):
Bids string (high → low):
Concatenated input to CRC32:
Expected result: 3310070434