diff --git a/freqtrade/data/history/history_utils.py b/freqtrade/data/history/history_utils.py index a5d5afc24..164a9f34a 100644 --- a/freqtrade/data/history/history_utils.py +++ b/freqtrade/data/history/history_utils.py @@ -679,11 +679,17 @@ def download_data( ) else: if not exchange.get_option("ohlcv_has_history", True): - raise OperationalException( - f"Historic klines not available for {exchange.name}. " - "Please use `--dl-trades` instead for this exchange " - "(will unfortunately take a long time)." - ) + if not exchange.get_option("trades_has_history", True): + raise OperationalException( + f"Historic data not available for {exchange.name}. " + f"{exchange.name} does not support downloading trades or ohlcv data." + ) + else: + raise OperationalException( + f"Historic klines not available for {exchange.name}. " + "Please use `--dl-trades` instead for this exchange " + "(will unfortunately take a long time)." + ) migrate_data(config, exchange) pairs_not_available = refresh_backtest_ohlcv_data( exchange, diff --git a/tests/data/test_download_data.py b/tests/data/test_download_data.py index ef1d938d3..16a3f5559 100644 --- a/tests/data/test_download_data.py +++ b/tests/data/test_download_data.py @@ -102,3 +102,16 @@ def test_download_data_main_data_invalid(mocker): ) with pytest.raises(OperationalException, match=r"Historic klines not available for .*"): download_data_main(config) + + patch_exchange(mocker, exchange="hyperliquid") + mocker.patch(f"{EXMS}.get_markets", return_value={"ETH/USDC": {}}) + config2 = setup_utils_configuration({"exchange": "hyperliquid"}, RunMode.UTIL_EXCHANGE) + config2.update( + { + "days": 20, + "pairs": ["ETH/USDC", "XRP/USDC"], + "timeframes": ["5m", "1h"], + } + ) + with pytest.raises(OperationalException, match=r"Historic data not available for .*"): + download_data_main(config2)