Sequence Numbers, Gaps, and Order-Book Reconstruction
An order book rebuilt from a feed is only as good as the messages it received. How sequence numbers make missing data detectable — and bounded.

Order-book feeds usually send an initial snapshot followed by incremental updates: new orders, modifications, and cancellations. Applying those updates in order reproduces the venue’s book. Missing even one update can leave the reconstructed book permanently wrong until the next snapshot.
Detecting loss
- Sequence numbers: a skipped number proves a message was missed.
- Checksums: a venue-provided checksum of the top of book reveals divergence even without sequence numbers.
- Heuristics: crossed books and implausibly old quotes suggest, but do not prove, missing data.
Where a venue provides neither sequence numbers nor checksums, gaps cannot be detected with certainty. Such data should carry lower confidence throughout, and research relying on precise book state should account for that.
Gap statistics are themselves valuable. Rates of message loss by venue and time of day form part of the QA scorecard attached to every release.
This publication is provided for informational purposes only and does not constitute investment, legal, or tax advice, or an offer or solicitation to buy or sell any asset. Live figures are computed from third-party public market data and may be delayed, incomplete, or inaccurate.




