Exchange assert is only relevant for live mode.

This commit is contained in:
Matthias
2024-04-05 07:09:54 +02:00
parent 28e4711ee9
commit f32154f380

View File

@@ -512,9 +512,9 @@ class DataProvider:
:param copy: copy dataframe before returning if True.
Use False only for read-only operations (where the dataframe is not modified)
"""
if self._exchange is None:
raise OperationalException(NO_EXCHANGE_EXCEPTION)
if self.runmode in (RunMode.DRY_RUN, RunMode.LIVE):
if self._exchange is None:
raise OperationalException(NO_EXCHANGE_EXCEPTION)
_candle_type = CandleType.from_string(
candle_type) if candle_type != '' else self._config['candle_type_def']
return self._exchange.trades(