Improve client._get_ws_token docstring

small_kucoin_fixes
jaredgoldman 2023-04-12 20:37:10 -04:00
parent ace04af21a
commit ff0f8dfaca
1 changed files with 3 additions and 0 deletions

View File

@ -253,6 +253,8 @@ class Client:
''' '''
Fetch ws token needed for sub access: Fetch ws token needed for sub access:
https://docs.kucoin.com/#apply-connect-token https://docs.kucoin.com/#apply-connect-token
returns a token and the interval we must ping
the server at to keep the connection alive
''' '''
token_type = 'private' if private else 'public' token_type = 'private' if private else 'public'
@ -261,6 +263,7 @@ class Client:
) )
if data and 'token' in data: if data and 'token' in data:
# ping_interval is in ms
ping_interval: int = data['instanceServers'][0]['pingInterval'] ping_interval: int = data['instanceServers'][0]['pingInterval']
return data['token'], ping_interval return data['token'], ping_interval
elif data: elif data: