fix: add workaround for missing kraken balance mapping

closes #11118
This commit is contained in:
Matthias
2025-01-05 11:30:25 +01:00
parent b70d02e46d
commit 98e49ab187
2 changed files with 2 additions and 1 deletions

View File

@@ -70,6 +70,7 @@ class Kraken(Exchange):
consolidated: CcxtBalances = {}
for currency, balance in balances.items():
base_currency = currency[:-2] if currency.endswith(".F") else currency
base_currency = self._api.commonCurrencies.get(base_currency, base_currency)
if base_currency in consolidated:
consolidated[base_currency]["free"] += balance["free"]
consolidated[base_currency]["used"] += balance["used"]

View File

@@ -128,7 +128,7 @@ def test_get_balances_prod_kraken(default_conf, mocker):
default_conf["dry_run"] = False
exchange = get_patched_exchange(mocker, default_conf, api_mock, exchange="kraken")
balances = exchange.get_balances()
assert len(balances) == 8
assert len(balances) == 7
assert balances["1ST"]["free"] == 9.0
assert balances["1ST"]["total"] == 10.0