Fix bug with wrong conversion for BTCST/BTC
This can happen if a pair starts with the stake-currency closes #4307
This commit is contained in:
parent
17e1cfbd43
commit
1310a7b547
@ -451,7 +451,7 @@ class RPC:
|
|||||||
pair = self._freqtrade.exchange.get_valid_pair_combination(coin, stake_currency)
|
pair = self._freqtrade.exchange.get_valid_pair_combination(coin, stake_currency)
|
||||||
rate = tickers.get(pair, {}).get('bid', None)
|
rate = tickers.get(pair, {}).get('bid', None)
|
||||||
if rate:
|
if rate:
|
||||||
if pair.startswith(stake_currency):
|
if pair.startswith(stake_currency) and not pair.endswith(stake_currency):
|
||||||
rate = 1.0 / rate
|
rate = 1.0 / rate
|
||||||
est_stake = rate * balance.total
|
est_stake = rate * balance.total
|
||||||
except (ExchangeError):
|
except (ExchangeError):
|
||||||
|
Loading…
Reference in New Issue
Block a user