From 1310a7b5473a53be10784451473851de34b434a8 Mon Sep 17 00:00:00 2001 From: Matthias Date: Thu, 4 Feb 2021 19:58:44 +0100 Subject: [PATCH] Fix bug with wrong conversion for BTCST/BTC This can happen if a pair starts with the stake-currency closes #4307 --- freqtrade/rpc/rpc.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/rpc/rpc.py b/freqtrade/rpc/rpc.py index 491d1cde6..b17183be2 100644 --- a/freqtrade/rpc/rpc.py +++ b/freqtrade/rpc/rpc.py @@ -451,7 +451,7 @@ class RPC: pair = self._freqtrade.exchange.get_valid_pair_combination(coin, stake_currency) rate = tickers.get(pair, {}).get('bid', None) if rate: - if pair.startswith(stake_currency): + if pair.startswith(stake_currency) and not pair.endswith(stake_currency): rate = 1.0 / rate est_stake = rate * balance.total except (ExchangeError):