mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 06:44:22 +01:00
Add bfxapi/enums.py file. Split enumerations in bfxapi/rest/enums.py and bfxapi/websocket/enums.py. Rename enumeration classes to use singular name identifiers.
This commit is contained in:
@@ -5,7 +5,7 @@ from typing import List
|
||||
from bfxapi import Client, Constants
|
||||
|
||||
from bfxapi.websocket import BfxWebsocketClient
|
||||
from bfxapi.websocket.enums import Channels, Errors
|
||||
from bfxapi.websocket.enums import Channels, Error
|
||||
from bfxapi.websocket.typings import Subscriptions, TradingPairRawBook
|
||||
|
||||
class RawOrderBook(object):
|
||||
@@ -39,7 +39,7 @@ raw_order_book = RawOrderBook(symbols=SYMBOLS)
|
||||
bfx = Client(WSS_HOST=Constants.PUB_WSS_HOST)
|
||||
|
||||
@bfx.wss.on("wss-error")
|
||||
def on_wss_error(code: Errors, msg: str):
|
||||
def on_wss_error(code: Error, msg: str):
|
||||
print(code, msg)
|
||||
|
||||
@bfx.wss.on("open")
|
||||
|
||||
Reference in New Issue
Block a user