Hello all,
I encounter the following issues with the event ACCOUNT_UPDATE.
- ACCOUNT_UPDATE is massively delayed compared to ORDER_TRADE_UPDATE (see example below)
- ACCOUNT_UPDATE is sometimes not sent, even though I receive ORDER_TRADE_UPDATE with filled order
Examples from my log files:
Delay
- 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”:
09:30:13
{'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?
Cheers