Futures websocket API delay

I’m having some trouble understanding lag that I’m getting with some websockets.
I’m placing an order and expecting it to traded. This order is rejected (expired), however a subsequent
websocket depth feed indicates its still there. Having a look at the event timestamps on the messages, it seems there is lag on websocket market data feeds. The order response is received BEFORE the depth feed despite the depth feed timestamp occurring before the order response timestamp.

Why is this ?

[13:13:24.682] [INFO] [on_price_depth_diff ] ins=OMGUSDT price_depth diff received (175.6@13.636, 258.2@13.6366)

[13:13:24.689] [INFO] [insert_order ] inserting order ins_id=OMGUSDT order_type=1 buy_sell=SELL 7.1 @ 13.6354 order_id=XXXXXXXXX version=1 request_tag=41 double_down=False eeid=eventId: 3381800253038355

[13:13:24.704] [INFO] [response] {‘orderId’: XXXXXXXXXXX, ‘symbol’: ‘OMGUSDT’, ‘status’: ‘NEW’, ‘clientOrderId’: ‘XXXXXXXXXXX’, ‘price’: ‘13.6354’, ‘avgPrice’: ‘0.00000’, ‘origQty’: ‘7.1’, ‘executedQty’: ‘0’, ‘cumQty’: ‘0’, ‘cumQuote’: ‘0’, ‘timeInForce’: ‘IOC’, ‘type’: ‘LIMIT’, ‘reduceOnly’: False, ‘closePosition’: False, ‘side’: ‘SELL’, ‘positionSide’: ‘BOTH’, ‘stopPrice’: ‘0’, ‘workingType’: ‘CONTRACT_PRICE’, ‘priceProtect’: False, ‘origType’: ‘LIMIT’, ‘updateTime’: 1635513204714}

The event time for this depth was 1635513204709
[13:13:24.718] [INFO] [on_price_depth_diff ] ins=OMGUSDT price_depth diff received (7.6@13.636, 250.3@13.6365)

Hi,

Latency from requests is to be expected. From the timestamps you provided 1635513204714 - 1635513204709 it seems that the difference between the two is of 5ms. At this discrepancy, it is perfectly acceptable for events not be received in chronological order.