Binance Spot ETHBTC orderbook snapshot largely incorrect

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?

I’m not sure what do you mean here, if you got 2790 bids from the depth endpoint, it means when the request hit the backend, there are only 2790 different bid prices in the orderbook. Is there anything I missed here?

Sorry I was not perfectly clear. 2790 bids and 2029 asks were left after removing levels which contained prices which were not an increment of the price filter tick size.

The problem is incredibly often binance rest and websocket orderbook data will contain incorrect data with no clear way to handle it.