examples: update wallet examples

This commit is contained in:
Jacob Plaster
2018-11-28 13:29:00 +00:00
parent ee544fff31
commit 9db9b1ebe9

View File

@@ -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):