mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 23:04:21 +01:00
Fix bug in bfxapi.websocket.subscriptions.
This commit is contained in:
@@ -107,7 +107,7 @@ class BfxWebSocketClient:
|
|||||||
|
|
||||||
await self.__connect()
|
await self.__connect()
|
||||||
|
|
||||||
#pylint: disable-next=too-many-statements
|
#pylint: disable-next=too-many-statements,too-many-branches
|
||||||
async def __connect(self):
|
async def __connect(self):
|
||||||
Reconnection = namedtuple("Reconnection", ["status", "attempts", "timestamp"])
|
Reconnection = namedtuple("Reconnection", ["status", "attempts", "timestamp"])
|
||||||
reconnection = Reconnection(status=False, attempts=0, timestamp=None)
|
reconnection = Reconnection(status=False, attempts=0, timestamp=None)
|
||||||
@@ -118,6 +118,7 @@ class BfxWebSocketClient:
|
|||||||
def _on_wss_timeout():
|
def _on_wss_timeout():
|
||||||
on_timeout_event.set()
|
on_timeout_event.set()
|
||||||
|
|
||||||
|
#pylint: disable-next=too-many-branches
|
||||||
async def _connection():
|
async def _connection():
|
||||||
nonlocal reconnection, timer, tasks
|
nonlocal reconnection, timer, tasks
|
||||||
|
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ __all__ = [
|
|||||||
|
|
||||||
_Header = TypedDict("_Header", { "event": Literal["subscribed"], "channel": str, "chanId": int })
|
_Header = TypedDict("_Header", { "event": Literal["subscribed"], "channel": str, "chanId": int })
|
||||||
|
|
||||||
Subscription = Union["Ticker", "Trades", "Book", "Candles", "Status"]
|
Subscription = Union[_Header, "Ticker", "Trades", "Book", "Candles", "Status"]
|
||||||
|
|
||||||
class Ticker(TypedDict):
|
class Ticker(TypedDict):
|
||||||
subId: str
|
subId: str
|
||||||
|
|||||||
Reference in New Issue
Block a user