Add generic error handling (UnknownGenericError in bfxapi/rest/exceptions.py). Add support for new endpoints in _RestAuthenticatedEndpoints class. Extend serializers.py and typings.py.

This commit is contained in:
Davide Casale
2022-12-20 17:48:12 +01:00
parent 7d16c4e4b8
commit 87bb6dc5c7
6 changed files with 154 additions and 14 deletions

View File

@@ -7,7 +7,7 @@ from bfxapi.websocket.typings import Subscriptions, TradingPairTicker
bfx = Client(WSS_HOST=Constants.PUB_WSS_HOST)
@bfx.wss.on("t_ticker_update")
def on_t_ticker_update(subscription: Subscriptions.TradingPairsTicker, data: TradingPairTicker):
def on_t_ticker_update(subscription: Subscriptions.TradingPairTicker, data: TradingPairTicker):
print(f"Subscription with channel ID: {subscription['chanId']}")
print(f"Data: {data}")