Use last to get rates for /balance endpoints

This commit is contained in:
Matthias
2022-03-13 17:53:52 +01:00
parent 32c06f4a05
commit c63b5fbbbf
2 changed files with 5 additions and 6 deletions

View File

@@ -582,7 +582,7 @@ class RPC:
else:
try:
pair = self._freqtrade.exchange.get_valid_pair_combination(coin, stake_currency)
rate = tickers.get(pair, {}).get('bid', None)
rate = tickers.get(pair, {}).get('last', None)
if rate:
if pair.startswith(stake_currency) and not pair.endswith(stake_currency):
rate = 1.0 / rate