Skip to content

Commit 3cfa366

Browse files
committed
fix: validate trading-mode support when downloading data
closes freqtrade#12458
1 parent baa5b1a commit 3cfa366

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

freqtrade/data/history/history_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -693,6 +693,9 @@ def download_data(
693693
"""
694694
Download data function. Used from both cli and API.
695695
"""
696+
exchange.validate_trading_mode_and_margin_mode(
697+
config.get("trading_mode", TradingMode.SPOT), None, allow_none_margin_mode=True
698+
)
696699
timerange = TimeRange()
697700
if "days" in config and config["days"] is not None:
698701
time_since = (datetime.now() - timedelta(days=config["days"])).strftime("%Y%m%d")

0 commit comments

Comments
 (0)