@@ -331,7 +331,7 @@ def __init__(self,
331
331
self .websocket_base_uri = websocket_base_uri or CONNECTION_SETTINGS [self .exchange ][1 ]
332
332
self .websocket_api_base_uri = websocket_api_base_uri or CONNECTION_SETTINGS [self .exchange ][2 ]
333
333
self .restful_base_uri = restful_base_uri
334
- self .exchange_type = exchange_type
334
+ self .exchange_type : Literal [ 'cex' , 'dex' , None ] = exchange_type
335
335
if self .exchange_type is None :
336
336
if self .exchange in DEX_EXCHANGES :
337
337
self .exchange_type = "dex"
@@ -346,8 +346,8 @@ def __init__(self,
346
346
self .socks5_proxy_server = socks5_proxy_server
347
347
if socks5_proxy_server is None :
348
348
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
351
351
self .socks5_proxy_port = None
352
352
else :
353
353
# Prepare Socks Proxy usage
@@ -3059,7 +3059,7 @@ def get_stream_buffer_length(self, stream_buffer_name=False):
3059
3059
number += len (self .stream_buffers [stream_buffer_name ])
3060
3060
return number
3061
3061
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 ] :
3063
3063
"""
3064
3064
Get the stream_id of a specific stream by stream label
3065
3065
@@ -3284,7 +3284,7 @@ def get_stream_statistic(self, stream_id):
3284
3284
except KeyError :
3285
3285
return None
3286
3286
3287
- def get_the_one_active_websocket_api (self ) -> str :
3287
+ def get_the_one_active_websocket_api (self ) -> Optional [ str ] :
3288
3288
"""
3289
3289
This function is needed to simplify the access to the websocket API, if only one API stream exists it is clear
3290
3290
that only this stream can be used for the requests and therefore will be used.
0 commit comments