Revert "Remove the guards against downloading data in futures mode."

This reverts commit 82cdfba494.
This commit is contained in:
Wade Dyck 2021-12-28 11:35:17 -07:00
parent 82cdfba494
commit 5bb2d3baea
2 changed files with 5 additions and 1 deletions

View File

@ -64,6 +64,8 @@ def start_download_data(args: Dict[str, Any]) -> None:
try:
if config.get('download_trades'):
if config.get('trading_mode') == 'futures':
raise OperationalException("Trade download not supported for futures.")
pairs_not_available = refresh_backtest_trades_data(
exchange, pairs=expanded_pairs, datadir=config['datadir'],
timerange=timerange, new_pairs_days=config['new_pairs_days'],

View File

@ -822,8 +822,10 @@ def test_download_data_trades(mocker, caplog):
"--trading-mode", "futures",
"--dl-trades"
]
with pytest.raises(OperationalException,
match="Trade download not supported for futures."):
start_download_data(get_args(args))
start_download_data(get_args(args))
def test_start_convert_trades(mocker, caplog):