From 28c00d460b6155787c60d7a4e7a4b3cb09de20de Mon Sep 17 00:00:00 2001 From: Davide Casale Date: Tue, 24 Jan 2023 19:02:44 +0100 Subject: [PATCH] Exclude subId field from every subscription dictionary. --- bfxapi/websocket/handlers.py | 2 +- bfxapi/websocket/subscriptions.py | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/bfxapi/websocket/handlers.py b/bfxapi/websocket/handlers.py index f2fd7ea..c56046a 100644 --- a/bfxapi/websocket/handlers.py +++ b/bfxapi/websocket/handlers.py @@ -30,7 +30,7 @@ class PublicChannelsHandler(object): _clear = lambda dictionary, *args: { key: value for key, value in dictionary.items() if key not in args } if channel := subscription["channel"] or channel in self.__handlers.keys(): - return self.__handlers[channel](_clear(subscription, "event", "channel"), *stream) + return self.__handlers[channel](_clear(subscription, "event", "channel", "subId"), *stream) def __ticker_channel_handler(self, subscription, *stream): if subscription["symbol"].startswith("t"): diff --git a/bfxapi/websocket/subscriptions.py b/bfxapi/websocket/subscriptions.py index 2acc1af..e22bb5e 100644 --- a/bfxapi/websocket/subscriptions.py +++ b/bfxapi/websocket/subscriptions.py @@ -24,7 +24,6 @@ class Book(TypedDict): prec: str freq: str len: str - subId: int pair: str class Candles(TypedDict):