Add authenticate method in BfxWebsocketClient. Add API_KEY and API_SECRET to Client's constructor parameters. Add new AuthenticationCredentialsError exception.

This commit is contained in:
Davide Casale
2022-11-09 18:26:30 +01:00
parent 7e416219e0
commit 1fc9aacd86
3 changed files with 51 additions and 13 deletions

View File

@@ -7,5 +7,5 @@ class Constants(str, Enum):
PUB_WSS_HOST = "wss://api-pub.bitfinex.com/ws/2"
class Client(object):
def __init__(self, WSS_HOST: str = Constants.WSS_HOST):
self.wss = BfxWebsocketClient(host=WSS_HOST)
def __init__(self, WSS_HOST: str = Constants.WSS_HOST, API_KEY: str = None, API_SECRET: str = None):
self.wss = BfxWebsocketClient(host=WSS_HOST, API_KEY=API_KEY, API_SECRET=API_SECRET)