Fix small bug in examples/websocket/ticker.py demo.

This commit is contained in:
Davide Casale
2023-02-17 04:04:50 +01:00
parent 4d0fa49e22
commit 9eb2c73407
2 changed files with 3 additions and 3 deletions

View File

@@ -96,8 +96,8 @@ class BfxWebsocketClient(object):
if await asyncio.gather(*[on_open_event.wait() for on_open_event in self.on_open_events]):
self.event_emitter.emit("open")
if self.credentials != None:
await self.__authenticate(**self.credentials)
if credentials and credentials["API_KEY"] and credentials["API_SECRET"]:
await self.__authenticate(**credentials)
async for message in websocket:
message = json.loads(message)