Change examples to use new Client module

This commit is contained in:
Jacob Plaster
2018-11-19 16:50:40 +00:00
parent 4be08dfa43
commit 02e232362b
6 changed files with 45 additions and 45 deletions

View File

@@ -2,18 +2,18 @@ import os
import sys
sys.path.append('../')
from bfxapi.websockets.LiveWebsocket import LiveBfxWebsocket
from bfxapi import Client
ws = LiveBfxWebsocket(
bfx = Client(
logLevel='INFO'
)
@ws.on('error')
@bfx.ws.on('error')
def log_error(msg):
print ("Error: {}".format(msg))
@ws.on('all')
@bfx.ws.on('all')
async def log_output(output):
print ("WS: {}".format(output))
ws.run()
bfx.ws.run()