From 9db9b1ebe99be2778cfa4000e646a527f74708fa Mon Sep 17 00:00:00 2001 From: Jacob Plaster Date: Wed, 28 Nov 2018 13:29:00 +0000 Subject: [PATCH] examples: update wallet examples --- bfxapi/examples/wallet_balance.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/bfxapi/examples/wallet_balance.py b/bfxapi/examples/wallet_balance.py index 73fbea2..0d9ab35 100644 --- a/bfxapi/examples/wallet_balance.py +++ b/bfxapi/examples/wallet_balance.py @@ -14,12 +14,15 @@ bfx = Client( ) @bfx.ws.on('wallet_snapshot') -def log_snapshot(data): - print ("Opening balance: {}".format(data)) +def log_snapshot(wallets): + for wallet in wallets: + print (wallet) + + # or bfx.ws.wallets.get_wallets() @bfx.ws.on('wallet_update') -def log_update(data): - print ("Balance updates: {}".format(data)) +def log_update(wallet): + print ("Balance updates: {}".format(wallet)) @bfx.ws.on('error') def log_error(msg):