mirror of
https://github.com/aljazceru/bitfinex-api-py.git
synced 2025-12-23 00:34:22 +01:00
examples: update wallet examples
This commit is contained in:
@@ -14,12 +14,15 @@ bfx = Client(
|
|||||||
)
|
)
|
||||||
|
|
||||||
@bfx.ws.on('wallet_snapshot')
|
@bfx.ws.on('wallet_snapshot')
|
||||||
def log_snapshot(data):
|
def log_snapshot(wallets):
|
||||||
print ("Opening balance: {}".format(data))
|
for wallet in wallets:
|
||||||
|
print (wallet)
|
||||||
|
|
||||||
|
# or bfx.ws.wallets.get_wallets()
|
||||||
|
|
||||||
@bfx.ws.on('wallet_update')
|
@bfx.ws.on('wallet_update')
|
||||||
def log_update(data):
|
def log_update(wallet):
|
||||||
print ("Balance updates: {}".format(data))
|
print ("Balance updates: {}".format(wallet))
|
||||||
|
|
||||||
@bfx.ws.on('error')
|
@bfx.ws.on('error')
|
||||||
def log_error(msg):
|
def log_error(msg):
|
||||||
|
|||||||
Reference in New Issue
Block a user