Websocket futures with buggy tick data

I’ve made a trading bot that I’ve connected to the websocket data stream (futures trade stream, tick data). About once every 24 hours I’m seeing large spikes in prices in the websocket data streams. The same spikes are not showing in Binance’s own trading app. Here’s an example for the BCHUSDT data stream (my bot on top, Binance’s app on the bottom, 1 minute, same period):


Is anyone else seeing anything similar?

In case it wasn’t obvious; the big red up arrow is the abnormalty (it indicates a big loss on a stop loss trade from a huge price move). Since my bot has much tighter stop loss limits than this candle it kind of confirms that this is an abnormal series of trades (a move of almost 3.5% price difference in a couple of ticks).

So I found the answer by logging abnormal ticks. Basically, inbetween “normal” market trades, there is something tagged INSURANCE_FUND that pops up at least once or twice every 24 hours (see below). Filtering these out should solve it.

2024-06-12T12:47:40.808Z  >=2% price move in one tick, buggy data?? {
  msg: {
    e: 'trade',
    E: 1718196460656,
    T: 1718196460656,
    s: 'BCHUSDT',
    t: 794874338,
    p: '510.20',
    q: '0.016',
    X: 'INSURANCE_FUND',
    m: true
  },
  prev_msg: {
    e: 'trade',
    E: 1718196460280,
    T: 1718196460280,
    s: 'BCHUSDT',
    t: 794874337,
    p: '462.98',
    q: '0.191',
    X: 'MARKET',
    m: false
  }
}

Thx mate, documentation is incomplete You Saved me lot of time with realising what ‘X’ could be