Add a fail case ws token request
parent
52a015d927
commit
b00abd0e51
|
@ -258,9 +258,13 @@ class Client:
|
|||
|
||||
'''
|
||||
token_type = 'private' if private else 'public'
|
||||
try:
|
||||
data: dict[str, Any] | None = await self._request(
|
||||
'POST', f'/bullet-{token_type}', 'v1'
|
||||
)
|
||||
except Exception as e:
|
||||
log.error(f'Error making request for Kucoin ws token -> {str(e)}')
|
||||
return None
|
||||
|
||||
if data and 'token' in data:
|
||||
# ping_interval is in ms
|
||||
|
@ -271,6 +275,7 @@ class Client:
|
|||
f'Error making request for Kucoin ws token -> {data.json()["msg"]}'
|
||||
)
|
||||
|
||||
|
||||
async def _get_pairs(
|
||||
self,
|
||||
) -> dict[str, KucoinMktPair]:
|
||||
|
|
Loading…
Reference in New Issue