Our WebSocket API v1 order book feed includes a CRC32 checksum with each update message, that can be used to confirm the validity and correctness of a locally maintained order book (an order book that has been created by interpreting the order book feed).
The details of the CRC32 checksum calculation are available in our WebSocket API documentation, allowing the order book checksum to be implemented using any programming language that supports a CRC32 function (or that can be coded to support a CRC32).
In addition to the checksum implementation details, it can be helpful to have a confirmed correct checksum value for any given order book (to compare to the checksum value from your own code), so we provide the following checksum calculator for this purpose.
- Open the order book checksum calculator in Chrome (or any other recent web browser)
- Make a copy of the calculator to your own Google Drive via the File -> Make a copy menu (you will need to sign in to your Google account for this step)
- Copy/paste a valid order book using the same JSON format as the example (essentially two objects containing arrays of the best 10 bid and ask price levels)
- Compare the displayed order book checksum to the checksum calculated by your own code (the two values should match exactly)