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

@@ -2,7 +2,7 @@ from decimal import Decimal
from datetime import datetime
from typing import Type, NewType, Tuple, List, Dict, TypedDict, Union, Optional, Any
from typing import Type, Tuple, List, Dict, TypedDict, Union, Optional, Any
from ..utils.integers import Int16, Int32, Int45, Int64
@@ -11,22 +11,22 @@ JSON = Union[Dict[str, "JSON"], List["JSON"], bool, int, float, str, Type[None]]
#region Type hinting for subscription objects
class Subscriptions:
class TradingPairsTicker(TypedDict):
class TradingPairTicker(TypedDict):
chanId: int
symbol: str
pair: str
class FundingCurrenciesTicker(TypedDict):
class FundingCurrencyTicker(TypedDict):
chanId: int
symbol: str
currency: str
class TradingPairsTrades(TypedDict):
class TradingPairTrades(TypedDict):
chanId: int
symbol: str
pair: str
class FundingCurrenciesTrades(TypedDict):
class FundingCurrencyTrades(TypedDict):
chanId: int
symbol: str
currency: str
@@ -280,7 +280,7 @@ class BalanceInfo(TypedDict):
#endregion
#region Serializers definition for Notifications channel
#region Type hinting for Notifications channel
class Notification(TypedDict):
MTS: int