Orderbook stream invalid prices and volumes

Hi,

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.

Cheers


{
       "filterType": "LOT_SIZE",
       "stepSize": "0.001",
       "minQty": "0.001",
       "maxQty": "1000"
}

The BTCUSDT symbol has the LOT_SIZE filter, so the qty of 0.001 is correct.

1 Like

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?

1 Like

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.

Thanks,

If you use reduceOnly, you don’t need to meet with those rules.

Sorry I’m not sure how that’s relevant to correctly managing a local orderbook.

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.