mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
chore: use safe_value_fallback to get currency rate
This commit is contained in:
@@ -1903,7 +1903,7 @@ class Exchange:
|
|||||||
)
|
)
|
||||||
ticker = tickers_other.get(pair, None)
|
ticker = tickers_other.get(pair, None)
|
||||||
if ticker:
|
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):
|
if rate and pair.startswith(currency) and not pair.endswith(currency):
|
||||||
rate = 1.0 / rate
|
rate = 1.0 / rate
|
||||||
return rate
|
return rate
|
||||||
|
|||||||
Reference in New Issue
Block a user