Connected to testnet using the user_socket() stream, but it doesn’t get any messages. In order to test it, I create a limit order, but I don’t receive any messages when the order is filled.
Here is the code:
ts = bm.user_socket()
async with ts as tscm:
while True:
print('start websocket')
res = await tscm.recv()
print('User data socket!!')
print(res)
Socket seems to be correctly established, since listen key is returned in ts var:
<binance.streams.KeepAliveWebsocket object at 0x00000169D26213C0>
Yes, it’s connected to testnet. In fact, I’m currently using other websockets, like ticker_socket() and kline_socket() and have no problem with any of them. In addition, this user_socket() gets a KeepAliveWebsocket object, as I posted.
Has this user_socket() some kind of problem with testnet? Is it a problem regarding python-binance? Is difficult to test it on mainnet, since it requires an account change or a placed order…