mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
Rewrite reconnection system with numerous fixes.
This commit is contained in:
@@ -7,7 +7,7 @@ from typing import List
|
||||
from bfxapi import Client, Constants
|
||||
|
||||
from bfxapi.websocket import subscriptions
|
||||
from bfxapi.websocket.enums import Channels, Error
|
||||
from bfxapi.websocket.enums import Channel, Error
|
||||
from bfxapi.websocket.types import TradingPairRawBook
|
||||
|
||||
class RawOrderBook(object):
|
||||
@@ -47,7 +47,7 @@ def on_wss_error(code: Error, msg: str):
|
||||
@bfx.wss.on("open")
|
||||
async def on_open():
|
||||
for symbol in SYMBOLS:
|
||||
await bfx.wss.subscribe(Channels.BOOK, symbol=symbol, prec="R0")
|
||||
await bfx.wss.subscribe(Channel.BOOK, symbol=symbol, prec="R0")
|
||||
|
||||
@bfx.wss.on("subscribed")
|
||||
def on_subscribed(subscription):
|
||||
|
||||
Reference in New Issue
Block a user