Add bfxapi/websocket/typing.py script and define some custom types.

This commit is contained in:
Davide Casale
2022-11-10 12:24:50 +01:00
parent 61b082db2e
commit 54542ac23b

View File

@@ -0,0 +1,16 @@
from typing import TypedDict, Optional
class BalanceUpdateStream(TypedDict):
AUM: float
AUM_NET: float
class WalletUpdateStream(TypedDict):
WALLET_TYPE: str
CURRENCY: str
BALANCE: float
UNSETTLED_INTEREST: float
BALANCE_AVAILABLE: Optional[float]
DESCRIPTION: str
META: dict
WalletSnapshotStream = list[WalletUpdateStream]