Closed jlixfeld closed 2 years ago
Thank you :)
I think the problem is that you provide the stream_id in string format!
Just wrap it in UUID()
as returned from get_stream_id_by_label()
:
ubwam.get_stream_info(UUID('24e798fe-0b9e-4e7b-9802-efc3a36b2830'))
!
I tried that previously as well, with no success:
In [14]: vars.ubwam.print_summary()
====================== unicorn-binance-websocket-api_1.31.0-python_3.8.2 ======================
exchange: binance.com
uptime: 21m:17s since 2021-08-14, 14:36:51 UTC
streams: 1
active_streams: 1
subscriptions: 316
stream_buffer_stored_items: 71557
stream_buffer_byte_size: 29311041 (27.95 mB)
current_receiving_speed: 26.08 kB/s
average_receiving_speed: 22.4 kB/s (per day 1.85 gB)
highest_receiving_speed: 44.42 kB/s (reached at 2021-08-14, 14:55:13 UTC)
total_receives: 71557
total_received_bytes: 29311041 (27.95 mB)
total_transmitted_payloads: 1
process_ressource_usage: cpu=10.3%, memory=259.2 mB, threads=8
---------------------------------------------------------------------------------------------
stream_id | stream_label | last | average | most | recon
---------------------------------------------------------------------------------------------
40ab11e7-4589-4fc8-9544-e3f82660cc9d | stream | 65 | 56.01 | 111 | 0
---------------------------------------------------------------------------------------------
all_streams | 65 | 56.01 | 111 | 0
===============================================================================================
In [15]: vars.ubwam.get_stream_info(UUID('40ab11e7-4589-4fc8-9544-e3f82660cc9d'))
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
~/Documents/Development/crypto/binance/main.py in <module>
----> 1 vars.ubwam.get_stream_info(UUID('40ab11e7-4589-4fc8-9544-e3f82660cc9d'))
NameError: name 'UUID' is not defined
In [16]:
do import uuid
before!
Really weird. This doesn't work:
In [13]: ubwam.print_summary()
====================== unicorn-binance-websocket-api_1.31.0-python_3.8.2 ======================
exchange: binance.com
uptime: 12m:29s since 2021-08-15, 01:38:23 UTC
streams: 1
active_streams: 1
subscriptions: 316
stream_buffer_stored_items: 32917
stream_buffer_byte_size: 13452138 (12.83 mB)
current_receiving_speed: 11.61 kB/s
average_receiving_speed: 17.54 kB/s (per day 1.45 gB)
highest_receiving_speed: 35.54 kB/s (reached at 2021-08-15, 01:41:42 UTC)
total_receives: 32917
total_received_bytes: 13452138 (12.83 mB)
total_transmitted_payloads: 1
process_ressource_usage: cpu=10.5%, memory=148.39 mB, threads=8
---------------------------------------------------------------------------------------------
stream_id | stream_label | last | average | most | recon
---------------------------------------------------------------------------------------------
34055c58-405f-402a-888f-5a59c96f02fd | stream | 29 | 43.98 | 89 | 0
---------------------------------------------------------------------------------------------
all_streams | 29 | 43.98 | 89 | 0
===============================================================================================
In [14]: ubwam.get_stream_info(UUID('34055c58-405f-402a-888f-5a59c96f02fd'))
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
~/Documents/Development/crypto/binance/main.py in <module>
----> 1 ubwam.get_stream_info(UUID('34055c58-405f-402a-888f-5a59c96f02fd'))
NameError: name 'UUID' is not defined
In [15]:
But this does work...
In [15]: ubwam.get_stream_info(ubwam.get_stream_id_by_label('stream'))
Out[15]:
{'exchange': 'binance.com',
'stream_id': UUID('34055c58-405f-402a-888f-5a59c96f02fd'),
'recent_socket_id': UUID('c4e86c3d-ae5f-4759-9746-2292af2b5e15'),
'channels': ['kline_1h'],
'markets': ['dcrusdt',
'drepusdt',
'ardrusdt',
...
...
...
Hi Oliver,
I'm so grateful for the hard work that you've put into your Unicorn Binance suite! I'm working on migrated over to it from Sam McHardy's API.
From
IPython
, I can callprint_summary()
and get astream_id
, but when I try to callget_stream_info()
using theUUID
I getFalse
returned. I'm not sure what I'm doing wrong in formatting that call. Do you have any tips?Thanks!