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:
@@ -3,7 +3,7 @@
|
||||
from bfxapi import Client, Constants
|
||||
|
||||
from bfxapi.websocket import subscriptions
|
||||
from bfxapi.websocket.enums import Channels
|
||||
from bfxapi.websocket.enums import Channel
|
||||
from bfxapi.websocket.types import TradingPairTicker
|
||||
|
||||
bfx = Client(WSS_HOST=Constants.PUB_WSS_HOST)
|
||||
@@ -16,6 +16,6 @@ def on_t_ticker_update(subscription: subscriptions.Ticker, data: TradingPairTick
|
||||
|
||||
@bfx.wss.once("open")
|
||||
async def open():
|
||||
await bfx.wss.subscribe(Channels.TICKER, symbol="tBTCUSD")
|
||||
await bfx.wss.subscribe(Channel.TICKER, symbol="tBTCUSD")
|
||||
|
||||
bfx.wss.run()
|
||||
Reference in New Issue
Block a user