mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-30 20:14:20 +01:00
Fix and rewrite all logic in class BfxWebSocketBucket.
This commit is contained in:
@@ -102,7 +102,7 @@ async def on_checksum(subscription: Book, value: int):
|
||||
print("Mismatch between local and remote checksums: "
|
||||
f"restarting book for symbol <{symbol}>...")
|
||||
|
||||
await bfx.wss.resubscribe(sub_id=subscription["subId"])
|
||||
await bfx.wss.resubscribe(sub_id=subscription["sub_id"])
|
||||
|
||||
order_book.cooldown[symbol] = True
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ async def on_checksum(subscription: Book, value: int):
|
||||
print("Mismatch between local and remote checksums: "
|
||||
f"restarting book for symbol <{symbol}>...")
|
||||
|
||||
await bfx.wss.resubscribe(sub_id=subscription["subId"])
|
||||
await bfx.wss.resubscribe(sub_id=subscription["sub_id"])
|
||||
|
||||
raw_order_book.cooldown[symbol] = True
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ bfx = Client(wss_host=PUB_WSS_HOST)
|
||||
|
||||
@bfx.wss.on("t_ticker_update")
|
||||
def on_t_ticker_update(subscription: Ticker, data: TradingPairTicker):
|
||||
print(f"Subscription with subId: {subscription['subId']}")
|
||||
print(f"Subscription with sub_id: {subscription['sub_id']}")
|
||||
|
||||
print(f"Data: {data}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user