Skip to content

Commit 954d1b2

Browse files
2.7.0 RC1
1 parent 1f6d055 commit 954d1b2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

unicorn_binance_websocket_api/manager.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ def __init__(self,
331331
self.websocket_base_uri = websocket_base_uri or CONNECTION_SETTINGS[self.exchange][1]
332332
self.websocket_api_base_uri = websocket_api_base_uri or CONNECTION_SETTINGS[self.exchange][2]
333333
self.restful_base_uri = restful_base_uri
334-
self.exchange_type = exchange_type
334+
self.exchange_type: Literal['cex', 'dex', None] = exchange_type
335335
if self.exchange_type is None:
336336
if self.exchange in DEX_EXCHANGES:
337337
self.exchange_type = "dex"
@@ -346,8 +346,8 @@ def __init__(self,
346346
self.socks5_proxy_server = socks5_proxy_server
347347
if socks5_proxy_server is None:
348348
self.socks5_proxy_address = None
349-
self.socks5_proxy_user: str = None
350-
self.socks5_proxy_pass: str = None
349+
self.socks5_proxy_user: Optional[str] = None
350+
self.socks5_proxy_pass: Optional[str] = None
351351
self.socks5_proxy_port = None
352352
else:
353353
# Prepare Socks Proxy usage
@@ -3059,7 +3059,7 @@ def get_stream_buffer_length(self, stream_buffer_name=False):
30593059
number += len(self.stream_buffers[stream_buffer_name])
30603060
return number
30613061

3062-
def get_stream_id_by_label(self, stream_label: str = None) -> str:
3062+
def get_stream_id_by_label(self, stream_label: str = None) -> Optional[str]:
30633063
"""
30643064
Get the stream_id of a specific stream by stream label
30653065
@@ -3284,7 +3284,7 @@ def get_stream_statistic(self, stream_id):
32843284
except KeyError:
32853285
return None
32863286

3287-
def get_the_one_active_websocket_api(self) -> str:
3287+
def get_the_one_active_websocket_api(self) -> Optional[str]:
32883288
"""
32893289
This function is needed to simplify the access to the websocket API, if only one API stream exists it is clear
32903290
that only this stream can be used for the requests and therefore will be used.

0 commit comments

Comments
 (0)