When subscribing to instrument depth streams for both Binance Spot and Futures, the data received is often incorrect. Specifically, the provided prices and volumes often do not abide by PRICE_FILTER and LOT_SIZE filters defined in the instruments definition.
This is not due to tick sizes being changed, instead just misrepresented data. I noticed other data sources also contain these invalid values, therefore I believe it unlikely to be the handling of websocket streams in my code.
For example this snippet of a depth update for BTCUSDT on Binance Futures [β42106.00β,β0.028β],[β42105.97β,β0.001β],[β42105.60β,β0.500β]. β42105.97β does not follow the tick size rule of 0.1. Rounding does not work in this case, what is the correct way to handle these values, and similarly for updates with invalid volumes?
These problems make it impossible to properly manage an orderbook with no consistency in updates.
In the example I provided it βdoes not follow the tick size rule of 0.1β, not talking about the volume. Often the volume is also wrong though. Could you explain the incorrect price?
Would be really good to get an answer please. This even occurs with levels where volume is supposed to be removed e.g. [β43149.92β,β0.000β] for Binance futures BTCUSDT which has a price filter rule of 0.1. Of course I can make assumptions, but there is a pretty big risk with that i.e in this example removing levels which should not have been.
Also, to reiterate, the examples I have provided are invalid prices. I can provide examples with invalid volumes, however that is self explanatory.
For anyone else that comes across this post, which there was a similar unanswered question previously, I canβt find any assumptions which are consistent for all instruments unfortunately.
I appreciate those who tried to answer, however the main point of my question was ignored, Binance websocket API price and volume data canβt really be trusted, just try your best and have so many checks that your local orderbook is not actually true, however at least itβs not false.
Some feedback to Binance
provide real time L2 data
validate the data being sent is correct
some better docs
The solution I came to was ignore all prices which are incorrect, and just round the volumes. If this is obviously wrong, I would appreciate someone pointing it out.