mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-12-14 11:51:19 +00:00
feat: add trading-mode to list-timeframes
some exchanges provide different timeframe configurations depending on the market type
This commit is contained in:
@@ -430,7 +430,15 @@ class Exchange:
|
||||
|
||||
@property
|
||||
def timeframes(self) -> list[str]:
|
||||
return list((self._api.timeframes or {}).keys())
|
||||
market_type = (
|
||||
"spot"
|
||||
if self.trading_mode != TradingMode.FUTURES
|
||||
else self._ft_has["ccxt_futures_name"]
|
||||
)
|
||||
timeframes = self._api.options.get("timeframes", {}).get(market_type)
|
||||
if timeframes is None:
|
||||
timeframes = self._api.timeframes
|
||||
return list((timeframes or {}).keys())
|
||||
|
||||
@property
|
||||
def markets(self) -> dict[str, Any]:
|
||||
|
||||
Reference in New Issue
Block a user