ACCOUNT_UPDATE in futures websocket is delayed

Hello all,

I encounter the following issues with the event ACCOUNT_UPDATE.

  1. ACCOUNT_UPDATE is massively delayed compared to ORDER_TRADE_UPDATE (see example below)
  2. ACCOUNT_UPDATE is sometimes not sent, even though I receive ORDER_TRADE_UPDATE with filled order

Examples from my log files:

  • I place a market order on ATOMUSDT:
    ORDER_EXECUTION for symbol ATOMUSDT: SELL 35.6 units - value 250.357 at 09:30:13
  • I receive within same second ORDER_TRADE_UPDATE with info “FILLED”:
{'e': 'ORDER_TRADE_UPDATE', 'T': 1695720613067, 'E': 1695720613069, 'o': {'s': 'ATOMUSDT', 'c': '64ca8d23-6817-4914-b436-8641a06f2485', 'S': 'SELL', 'o': 'MARKET', 'f': 'GTC', 'q': '35.60', 'p': '0', 'ap': '7.03200', 'sp': '0', 'x': 'TRADE', 'X': 'FILLED', 'i': 16801854863, 'l': '35.60', 'z': '35.60', 'L': '7.032', 'n': '0.10013568', 'N': 'USDT', 'T': 1695720613067, 't': 574288085, 'b': '0', 'a': '0', 'm': False, 'R': False, 'wt': 'CONTRACT_PRICE', 'ot': 'MARKET', 'ps': 'BOTH', 'cp': False, 'rp': '0', 'pP': False, 'si': 0, 'ss': 0, 'V': 'NONE', 'pm': 'NONE', 'gtd': 0}}
  • 2 ACCOUNT_UPDATED are received at 09:30:38:
{'e': 'ACCOUNT_UPDATE', 'T': 1695720638062, 'E': 1695720638065, 'a': {'B': [{'a': 'USDT', 'wb': 'xxx', 'cw': 'xxx', 'bc': '0'}], 'P': [{'s': 'ATOMUSDT', 'pa': '-42.10', 'ep': '7.03', 'cr': '-117.05707995', 'up': '-0.06065262', 'mt': 'isolated', 'iw': '295.90526742', 'ps': 'BOTH', 'ma': 'USDT', 'bep': '7.027188'}], 'm': 'ORDER'}}
{'e': 'ACCOUNT_UPDATE', 'T': 1695720638062, 'E': 1695720638065, 'a': {'B': [{'a': 'USDT', 'wb': 'xxx', 'cw': 'xxx', 'bc': '0'}], 'P': [{'s': 'ATOMUSDT', 'pa': '-77.32', 'ep': '7.03', 'cr': '-117.05707995', 'up': '-0.11139337', 'mt': 'isolated', 'iw': '543.45356952', 'ps': 'BOTH', 'ma': 'USDT', 'bep': '7.027188'}], 'm': 'ORDER'}}

Why do I even get 2 updates even though I just filled 1 market order?

Honestly, I think the account_update events are not working as they should.

In the end, what I need is a correct and swift tracking of my positions and corresponding unrealized pnls while I execute my orders.

Any ideas?


Hi there,

It seems like the behaviour is correct as there were 2 events in the process you’ve outlined in your post. 1. you placed the trade/trade was accepted as NEW, and 2. the trade was successfully filled.

As for the delay, this is not unusual. WebSocket events are not guaranteed to arrive at the exact same time as when it was executed, and delays can occur due to network conditions, server load, or other factors. This is normal behaviour for WebSockets in general.