examples: seperate ws and rest examples

This commit is contained in:
Jacob Plaster
2018-12-03 14:40:44 +00:00
parent 405c1a7b7b
commit d683faf459
9 changed files with 207 additions and 207 deletions

View File

@@ -0,0 +1,19 @@
import os
import sys
sys.path.append('../')
from bfxapi import Client
bfx = Client(
logLevel='DEBUG'
)
@bfx.ws.on('error')
def log_error(msg):
print ("Error: {}".format(msg))
@bfx.ws.on('all')
async def log_output(output):
print ("WS: {}".format(output))
bfx.ws.run()