Fix Kraken balance update error

closes #4873
This commit is contained in:
Matthias
2021-05-05 06:47:26 +02:00
parent 4d9dc2a2ff
commit da47f4e1a4
2 changed files with 4 additions and 1 deletions

View File

@@ -53,6 +53,8 @@ class Kraken(Exchange):
# x["side"], x["amount"],
) for x in orders]
for bal in balances:
if not isinstance(balances[bal], dict):
continue
balances[bal]['used'] = sum(order[1] for order in order_list if order[0] == bal)
balances[bal]['free'] = balances[bal]['total'] - balances[bal]['used']