Hello. I am using Diff. Depth stream endpoint to maintain actual orderbook state and accurately follow provided instructions. Once an hour I request and receive new snapshot via REST and comparing this snapshot to my calculated orderbook state. Some markets show reasonable percent of deviation while some other markets deviation percent can reach 50% value. I am most worried about falsely present price levels in my calculated orderbook state, that are not present in received snapshot, despite that I haven’t received any deltas that would remove such price levels.
Deviation is calculated as follows:
I have old snapshot, for which I processed all deltas with last delta timestamp Td
I receive Orderbook snapshot, which timestamp is Ts, and save min bid price and max ask price
I process necessary additional deltas to old snapshot and to new snapshot, so they both had last processed delta with the same timestamp (time sync)
Then I compare all price levels between saved min bid price and max ask price.
My deviation formula: (amount of missing price levels + amount of false present price levels + amount of price levels with wrong volume) / total price levels amount in new snapshot with provided deltas between saved min bid price and max ask price.
So my questions are:
What can be the reason of it?
Is it in general possible to calculate the equivalent snapshot by applying every delta to what I get by REST?