mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-19 14:54:21 +01:00
examples: change to use client module
This commit is contained in:
@@ -1,19 +1,19 @@
|
||||
import os
|
||||
import sys
|
||||
sys.path.append('../')
|
||||
|
||||
from bfxapi import Client
|
||||
|
||||
bfx = Client(
|
||||
logLevel='INFO'
|
||||
)
|
||||
|
||||
@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()
|
||||
import os
|
||||
import sys
|
||||
sys.path.append('../')
|
||||
|
||||
from bfxapi import Client
|
||||
|
||||
bfx = Client(
|
||||
logLevel='INFO'
|
||||
)
|
||||
|
||||
@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()
|
||||
|
||||
Reference in New Issue
Block a user