mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 23:04:21 +01:00
Fix bug in method BfxWebSocketBucket::unsubscribe.
This commit is contained in:
@@ -113,12 +113,11 @@ class BfxWebSocketBucket(Connection):
|
|||||||
|
|
||||||
@Connection.require_websocket_connection
|
@Connection.require_websocket_connection
|
||||||
async def unsubscribe(self, sub_id: str) -> None:
|
async def unsubscribe(self, sub_id: str) -> None:
|
||||||
for subscription in self.__subscriptions.values():
|
for chan_id, subscription in self.__subscriptions.items():
|
||||||
if subscription["subId"] == sub_id:
|
if subscription["subId"] == sub_id:
|
||||||
data = { "event": "unsubscribe", \
|
message = json.dumps({
|
||||||
"chanId": subscription["subId"] }
|
"event": "unsubscribe",
|
||||||
|
"chanId": chan_id })
|
||||||
message = json.dumps(data)
|
|
||||||
|
|
||||||
await self._websocket.send(message)
|
await self._websocket.send(message)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user