Remove BfxWebsocketClient::once. Replace all occurrences with BfxWebsocketClient::on. Add BfxWebsocketClient::ONCE_EVENTS class variable.

This commit is contained in:
Davide Casale
2023-04-19 04:20:53 +02:00
parent 3441d2af2f
commit 3d9e7c7b25
4 changed files with 15 additions and 27 deletions

View File

@@ -20,7 +20,7 @@ def on_t_trade_executed(_sub: subscriptions.Trades, trade: TradingPairTrade):
def on_wss_error(code: Error, msg: str):
print(code, msg)
@bfx.wss.once("open")
@bfx.wss.on("open")
async def on_open():
await bfx.wss.subscribe(Channel.CANDLES, key="trade:1m:tBTCUSD")