diff --git a/freqtrade/exchange/binance.py b/freqtrade/exchange/binance.py index 9ac1b0d97..1b0b60824 100644 --- a/freqtrade/exchange/binance.py +++ b/freqtrade/exchange/binance.py @@ -58,9 +58,19 @@ class Binance(Exchange): # TradingMode.SPOT always supported and not required in this list # (TradingMode.MARGIN, MarginMode.CROSS), # (TradingMode.FUTURES, MarginMode.CROSS), - (TradingMode.FUTURES, MarginMode.ISOLATED) + (TradingMode.FUTURES, MarginMode.ISOLATED), ] + def get_proxy_coin(self) -> str: + """ + Get the proxy coin for the given coin + Falls back to the stake currency if no proxy coin is found + :return: Proxy coin or stake currency + """ + if self.margin_mode == MarginMode.CROSS: + return "BNFCR" + return self._config["stake_currency"] + def get_tickers( self, symbols: list[str] | None = None, diff --git a/freqtrade/exchange/exchange.py b/freqtrade/exchange/exchange.py index 932d74922..c28f072ea 100644 --- a/freqtrade/exchange/exchange.py +++ b/freqtrade/exchange/exchange.py @@ -1864,6 +1864,14 @@ class Exchange: except ccxt.BaseError as e: raise OperationalException(e) from e + def get_proxy_coin(self) -> str: + """ + Get the proxy coin for the given coin + Falls back to the stake currency if no proxy coin is found + :return: Proxy coin or stake currency + """ + return self._config["stake_currency"] + def get_conversion_rate(self, coin: str, currency: str) -> float | None: """ Quick and cached way to get conversion rate one currency to the other.