Skip to content

Commit 98e49ab

Browse files
committed
fix: add workaround for missing kraken balance mapping
closes freqtrade#11118
1 parent b70d02e commit 98e49ab

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

freqtrade/exchange/kraken.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ def consolidate_balances(self, balances: CcxtBalances) -> CcxtBalances:
7070
consolidated: CcxtBalances = {}
7171
for currency, balance in balances.items():
7272
base_currency = currency[:-2] if currency.endswith(".F") else currency
73+
base_currency = self._api.commonCurrencies.get(base_currency, base_currency)
7374
if base_currency in consolidated:
7475
consolidated[base_currency]["free"] += balance["free"]
7576
consolidated[base_currency]["used"] += balance["used"]

tests/exchange/test_kraken.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ def test_get_balances_prod_kraken(default_conf, mocker):
128128
default_conf["dry_run"] = False
129129
exchange = get_patched_exchange(mocker, default_conf, api_mock, exchange="kraken")
130130
balances = exchange.get_balances()
131-
assert len(balances) == 8
131+
assert len(balances) == 7
132132

133133
assert balances["1ST"]["free"] == 9.0
134134
assert balances["1ST"]["total"] == 10.0

0 commit comments

Comments
 (0)