Don't convert trades to OHLCV unless explicitly specified
This commit is contained in:
@@ -629,17 +629,22 @@ def download_data_main(config: Config) -> None:
|
|||||||
trading_mode=config.get("trading_mode", TradingMode.SPOT),
|
trading_mode=config.get("trading_mode", TradingMode.SPOT),
|
||||||
)
|
)
|
||||||
|
|
||||||
# Convert downloaded trade data to different timeframes
|
if config.get("convert_trades", False) or not exchange.get_option(
|
||||||
convert_trades_to_ohlcv(
|
"ohlcv_has_history", True
|
||||||
pairs=expanded_pairs,
|
):
|
||||||
timeframes=config["timeframes"],
|
# Convert downloaded trade data to different timeframes
|
||||||
datadir=config["datadir"],
|
# Only auto-convert for exchanges without historic klines
|
||||||
timerange=timerange,
|
|
||||||
erase=bool(config.get("erase")),
|
convert_trades_to_ohlcv(
|
||||||
data_format_ohlcv=config["dataformat_ohlcv"],
|
pairs=expanded_pairs,
|
||||||
data_format_trades=config["dataformat_trades"],
|
timeframes=config["timeframes"],
|
||||||
candle_type=config.get("candle_type_def", CandleType.SPOT),
|
datadir=config["datadir"],
|
||||||
)
|
timerange=timerange,
|
||||||
|
erase=bool(config.get("erase")),
|
||||||
|
data_format_ohlcv=config["dataformat_ohlcv"],
|
||||||
|
data_format_trades=config["dataformat_trades"],
|
||||||
|
candle_type=config.get("candle_type_def", CandleType.SPOT),
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
if not exchange.get_option("ohlcv_has_history", True):
|
if not exchange.get_option("ohlcv_has_history", True):
|
||||||
raise OperationalException(
|
raise OperationalException(
|
||||||
|
|||||||
Reference in New Issue
Block a user