orderbook_v3 channels — carries a version: a
single string that increases as the book changes.
version applies only to the orderbook channels —
orderbook_v3 and
orderbook_v3_event — and the REST snapshot that
seeds them.The apply rule
Apply a payload only when its version is strictly greater than the one you hold:BigInt.
Keep state per market, and seed it from REST
version is per market, so key your state by marketHash before you compare. Seed
from the REST snapshot at startup, then apply only live publications that have a version greater than the seed or previous message.
Gaps are normal
version is not a counter but it is increasing. Consecutive changes on a market jump by arbitrary amounts, not by 1.
Related
Recovery & reliability
Recovery, ordering and deduplication across reconnects.
Get orderbook snapshot
The REST seed that carries the same version.
Fetching odds
Seeding and subscribing to the book and best odds.