mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 14:54:21 +01:00
20 lines
310 B
Python
20 lines
310 B
Python
import os
|
|
import sys
|
|
sys.path.append('../')
|
|
|
|
from bfxapi.websockets.LiveWebsocket import LiveBfxWebsocket
|
|
|
|
ws = LiveBfxWebsocket(
|
|
logLevel='INFO'
|
|
)
|
|
|
|
@ws.on('error')
|
|
def log_error(msg):
|
|
print ("Error: {}".format(msg))
|
|
|
|
@ws.on('all')
|
|
async def log_output(output):
|
|
print ("WS: {}".format(output))
|
|
|
|
ws.run()
|