I am requesting a snapshot to build a local orderbook (Spot). However, the first/last update IDs I receive don’t match the guidance written on the API page.
Example:
For a symbol (Spot) I receive the following depth updates:
- First update ID 382 last update ID: 382
- Request snapshot, snapshot last update ID is 394
- First update ID 383 last update ID: 383
- First update ID 384 last update ID: 384
- First update ID 553 last update ID: 556
I assume the snapshot should be processed and then depth update with 556?
However, the API page gives this inequality to determine which depth update to process first:
The first processed event should have U
<= lastUpdateId
+1 AND u
>= lastUpdateId
+1.
and the problem is 556 fails the above inequality.
Am I doing something wrong?
Or is the above inequality wrong?
Or are the messages in the feed wrong?
(I see this problem across many different symbols)