I’ve asked a similar question before, however I believe this example clearly shows something is very incorrect with the Binance API.
On Binance Spot, the ETHBTC instrument snapshot request (https://api.binance.com/api/v3/depth?symbol=ETHBTC&limit=5000) is full of incorrect prices.
Note that the filter {“filterype”:“PRICE_FILTER”,“minPrice”:“0.00001000”,“maxPrice”:“922327.00000000”,“tickSize”:“0.00001000”} has a tick size of 0.00001. Does this not mean all prices should be an multiple of this increment? For this instrument, when I tested this, it would go from the expected 5000 levels on each side to bids size: 2790 asks size: 2029. Half the book is wiped out!!!
This is such a clear problem with no documented solution. Sometimes these incorrect prices will land between levels, so it’s literally a level which cannot exist with no assumption to where it should be. This also commonly happens with volumes. These incorrect levels are also seen on the diff streams.
How is it possible to maintain an the correct local orderbook? What assumptions do I need to make? There are updates which say to remove levels which can’t exist! What do these updates mean? Are there stale levels removing in my orderbook?
To be clear, I’ve seen this happen with most instruments I’ve tried subscribing to. Yes the documents say ignore removing volumes with prices that don’t exist, however surely this is related to the potential deep levels which are being removed which weren’t covered by the snapshot?