I’ve been looking at trade and usersocket history of my program and found that there has been unsent ‘account_update’ user socket that made my program to run into errors.
as you can see below a sell order has been sent at 8:09
2021-12-06 08:09:00.194991
{‘e’: ‘ORDER_TRADE_UPDATE’, ‘T’: 1638745740166, ‘E’: 1638745740173, ‘o’: {‘s’: ‘BTCUSDT’, ‘c’: ‘AmO3X3WoDlF2mKRtfvHu91’, ‘S’: ‘SELL’, ‘o’: ‘MARKET’, ‘f’: ‘GTC’, ‘q’: ‘0.017’, ‘p’: ‘0’, ‘ap’: ‘0’, ‘sp’: ‘0’, ‘x’: ‘NEW’, ‘X’: ‘NEW’, ‘i’: 37370839949, ‘l’: ‘0’, ‘z’: ‘0’, ‘L’: ‘0’, ‘T’: 1638745740166, ‘t’: 0, ‘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}}
and no account_update has been sent to me which made my program to think the order was not made and kept making sell market for every minute
I assume that it has the potential of causing a bigger problem in the future
How could I detect whether the user socket has not been sent?