Closed DennyZen closed 3 years ago
Hi Denny! There was a time when UserData worked... The lib needs a revision
But i dont have the time atm....
Hello, Sorry for reopening the issue. I have the same error today when listening on UserData Stream. I have verified the version of unicorn-fy, it's 0.6.0.
File "/usr/lib/python3.7/threading.py", line 926, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/home/jean/myriad/projects/pyenv/crypto/lib/python3.7/site-packages/unicorn_binance_websocket_api/unicorn_binance_websocket_api_manager.py", line 415, in _create_stream_thread
loop.run_until_complete(socket.start_socket())
File "/usr/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
return future.result()
File "/home/jean/myriad/projects/pyenv/crypto/lib/python3.7/site-packages/unicorn_binance_websocket_api/unicorn_binance_websocket_api_socket.py", line 114, in start_socket
received_stream_data = self.unicorn_fy.binance_com_websocket(received_stream_data_json)
File "/home/jean/myriad/projects/pyenv/crypto/lib/python3.7/site-packages/unicorn_fy/unicorn_fy.py", line 85, in binance_com_websocket
return UnicornFy.binance_websocket(stream_data_json, exchange="binance.com", show_deprecated_warning=False)
File "/home/jean/myriad/projects/pyenv/crypto/lib/python3.7/site-packages/unicorn_fy/unicorn_fy.py", line 249, in binance_websocket
if stream_data['data']['e'] == 'aggTrade':
KeyError: 'data'
[Update] I have identified the response that causes the error.
{
"e": "listStatus",
"E": 1606754342870,
"s": "BTCUSDT",
"g": 10610159,
"c": "OCO",
"l": "EXEC_STARTED",
"L": "EXECUTING",
"r": "NONE",
"C": "VR0br4b4QJEFkbMqCsDUBJ",
"T": 1606754342869,
"O": [{
"s": "BTCUSDT",
"i": xxx,
"c": "xxx"
}, {
"s": "BTCUSDT",
"i": xxx,
"c": "xxx"
}]
}
Can you add support for this ? Thanks in advance for your help!
@giahung24 Hello! I moved your post into a new issue! thanks for reporting it! Yes i will add it asap! Best regards!
Hi i've added userData stream.
binance_com_user_data_stream_id = binance_com_websocket_api_manager.create_stream('arr', '!userData')
Can UnicornFy work with this kind of stream? userData stream don't have data in response and i got this:info from response :