download-data will now check if freqai is active in config, and if so will also download data for corr_pairlist

This commit is contained in:
robcaulk 2022-05-19 17:55:00 +02:00
parent 89eacf2f47
commit 67eb94c69d

View File

@ -50,6 +50,12 @@ def start_download_data(args: Dict[str, Any]) -> None:
exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config, validate=False)
markets = [p for p, m in exchange.markets.items() if market_is_active(m)
or config.get('include_inactive')]
if config.get('freqai') is not None:
assert config['freqai'].get('corr_pairlist'), "No corr_pairlist found in config."
full_pairs = config['pairs'] + [pair for pair in config['freqai']['corr_pairlist']
if pair not in config['pairs']]
expanded_pairs = expand_pairlist(full_pairs, markets)
else:
expanded_pairs = expand_pairlist(config['pairs'], markets)
# Manual validations of relevant settings