example: creates connect example

This commit is contained in:
Jacob Plaster
2018-11-16 14:39:18 +00:00
parent 33205a8e0b
commit e5f0f5493d

View File

@@ -0,0 +1,19 @@
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()