Skip to content

Commit

Permalink
2.7.0 RC1
Browse files Browse the repository at this point in the history
  • Loading branch information
oliver-zehentleitner committed May 11, 2024
1 parent 1f6d055 commit 954d1b2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions unicorn_binance_websocket_api/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ def __init__(self,
self.websocket_base_uri = websocket_base_uri or CONNECTION_SETTINGS[self.exchange][1]
self.websocket_api_base_uri = websocket_api_base_uri or CONNECTION_SETTINGS[self.exchange][2]
self.restful_base_uri = restful_base_uri
self.exchange_type = exchange_type
self.exchange_type: Literal['cex', 'dex', None] = exchange_type
if self.exchange_type is None:
if self.exchange in DEX_EXCHANGES:
self.exchange_type = "dex"
Expand All @@ -346,8 +346,8 @@ def __init__(self,
self.socks5_proxy_server = socks5_proxy_server
if socks5_proxy_server is None:
self.socks5_proxy_address = None
self.socks5_proxy_user: str = None
self.socks5_proxy_pass: str = None
self.socks5_proxy_user: Optional[str] = None
self.socks5_proxy_pass: Optional[str] = None
self.socks5_proxy_port = None
else:
# Prepare Socks Proxy usage
Expand Down Expand Up @@ -3059,7 +3059,7 @@ def get_stream_buffer_length(self, stream_buffer_name=False):
number += len(self.stream_buffers[stream_buffer_name])
return number

def get_stream_id_by_label(self, stream_label: str = None) -> str:
def get_stream_id_by_label(self, stream_label: str = None) -> Optional[str]:
"""
Get the stream_id of a specific stream by stream label
Expand Down Expand Up @@ -3284,7 +3284,7 @@ def get_stream_statistic(self, stream_id):
except KeyError:
return None

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

0 comments on commit 954d1b2

Please sign in to comment.