From 7b1ea81a275d927d3fa0c326a1665f6bc8567f3f Mon Sep 17 00:00:00 2001 From: Matthias Date: Wed, 18 Dec 2024 06:34:51 +0100 Subject: [PATCH] chore: use safe_value_fallback to get currency rate --- freqtrade/exchange/exchange.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 8ac4900c8..4c945ce86 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1903,7 +1903,7 @@ class Exchange: ) ticker = tickers_other.get(pair, None) if ticker: - rate: float | None = ticker.get("last", None) + rate: float | None = safe_value_fallback2(ticker, ticker, "last", "ask", None) if rate and pair.startswith(currency) and not pair.endswith(currency): rate = 1.0 / rate return rate