From 54542ac23b3449cc4b3ee3016b920be8e8a1df21 Mon Sep 17 00:00:00 2001 From: Davide Casale Date: Thu, 10 Nov 2022 12:24:50 +0100 Subject: [PATCH] Add bfxapi/websocket/typing.py script and define some custom types. --- bfxapi/websocket/typings.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 bfxapi/websocket/typings.py diff --git a/bfxapi/websocket/typings.py b/bfxapi/websocket/typings.py new file mode 100644 index 0000000..f1e39ec --- /dev/null +++ b/bfxapi/websocket/typings.py @@ -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] \ No newline at end of file