We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Strange results for download-data
I recalled #2716, tried to reproduce and obtained very strange results:

* remove config.json
* then run:
```
$ freqtrade download-data --exchange gemini --pairs 'BTC/USD' 'LTC/USD' 'BCH/USD' 'ETH/USD' -t 1h --days 5 -v
2020-02-08 03:48:33,819 - freqtrade.loggers - INFO - Verbosity set to 1
2020-02-08 03:48:33,819 - freqtrade.configuration.configuration - INFO - Using exchange gemini
2020-02-08 03:48:33,819 - freqtrade.configuration.configuration - INFO - Using user-data directory: /home/user/freqtrade-wrk/github-hroff-1902/freqtrade/user_data ...
2020-02-08 03:48:33,819 - freqtrade.configuration.configuration - INFO - Using data directory: /home/user/freqtrade-wrk/github-hroff-1902/freqtrade/user_data/data/gemini ...
2020-02-08 03:48:33,819 - freqtrade.configuration.configuration - INFO - Using pairs ['BTC/USD', 'LTC/USD', 'BCH/USD', 'ETH/USD']
2020-02-08 03:48:33,820 - freqtrade.configuration.configuration - INFO - timeframes --timeframes: ['1h']
2020-02-08 03:48:33,820 - freqtrade.configuration.configuration - INFO - Detected --days: 5
2020-02-08 03:48:33,820 - freqtrade.configuration.check_exchange - INFO - Checking exchange...
2020-02-08 03:48:33,820 - freqtrade.configuration.check_exchange - WARNING - Exchange "gemini" is known to the the ccxt library, available for the bot, but not officially supported by the Freqtrade development team. It may work flawlessly (please report back) or have serious issues. Use it at your own discretion.
2020-02-08 03:48:33,820 - freqtrade.configuration.deprecated_settings - WARNING - DEPRECATED: Pairlists must be defined explicitly in the future.Defaulting to StaticPairList for now.
2020-02-08 03:48:33,820 - freqtrade.configuration.config_validation - INFO - Validating configuration ...
2020-02-08 03:48:33,824 - freqtrade.commands.data_commands - INFO - About to download pairs: ['BTC/USD', 'LTC/USD', 'BCH/USD', 'ETH/USD'], intervals: ['1h'] to /home/user/freqtrade-wrk/github-hroff-1902/freqtrade/user_data/data/gemini
2020-02-08 03:48:33,824 - freqtrade.resolvers.exchange_resolver - INFO - No Gemini specific subclass found. Using the generic class instead.
2020-02-08 03:48:33,824 - freqtrade.exchange.exchange - INFO - Instance is running with dry_run enabled
2020-02-08 03:48:33,826 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'enableRateLimit': True}
2020-02-08 03:48:33,826 - asyncio - DEBUG - Using selector: EpollSelector
2020-02-08 03:48:33,828 - freqtrade.exchange.exchange - INFO - Using Exchange "Gemini"
2020-02-08 03:48:35,437 - chardet.charsetprober - DEBUG - utf-8  confidence = 0.99
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - SHIFT_JIS Japanese confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - EUC-JP Japanese confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - GB2312 Chinese confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - EUC-KR Korean confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - CP949 Korean confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - Big5 Chinese confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - EUC-TW Taiwan confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - windows-1251 Russian confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - KOI8-R Russian confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - ISO-8859-5 Russian confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - MacCyrillic Russian confidence = 0.0
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - IBM866 Russian confidence = 0.0
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - IBM855 Russian confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - ISO-8859-7 Greek confidence = 0.0
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - windows-1253 Greek confidence = 0.0
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - ISO-8859-5 Bulgairan confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - windows-1251 Bulgarian confidence = 0.01
2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - TIS-620 Thai confidence = 0.0
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - ISO-8859-9 Turkish confidence = 0.6551158277756192
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - windows-1255 Hebrew confidence = 0.0
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - windows-1255 Hebrew confidence = 0.0
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - windows-1255 Hebrew confidence = 0.0
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - utf-8  confidence = 0.99
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - SHIFT_JIS Japanese confidence = 0.01
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - EUC-JP Japanese confidence = 0.01
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - GB2312 Chinese confidence = 0.01
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - EUC-KR Korean confidence = 0.01
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - CP949 Korean confidence = 0.01
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - Big5 Chinese confidence = 0.01
2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - EUC-TW Taiwan confidence = 0.01
2020-02-08 03:48:35,441 - freqtrade - ERROR -  is not available as stake on Gemini. Available currencies are: BCH, BTC, ETH, LTC, USD
2020-02-08 03:48:35,441 - freqtrade.exchange.exchange - DEBUG - Exchange object destroyed, closing async loop
```

-- note 1) strange messages from "chardet.charsetprober" module;  2) empty "something" between "ERROR -  is not available". 3) strange module "freqtrade" for this message...

download-data validates whitelist when --pairs is used
The download-data subcommands validates whitelist when `--pairs` is used:

```
$ freqtrade download-data -c config.json --exchange kraken --pairs BTC/USD -t 1d --days 100 -v
...
2019-12-17 20:07:49,885 - freqtrade - ERROR - Pair NXT/BTC is not available on Kraken. Please remove NXT/BTC from your whitelist.
```

Expected behavior: ignore pair_whitelist, work only with pairs set in the cli.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `freqtrade/commands/data_commands.py`
Content:
```
1 import logging
2 import sys
3 from typing import Any, Dict, List
4 
5 import arrow
6 
7 from freqtrade.configuration import TimeRange, setup_utils_configuration
8 from freqtrade.data.history import (convert_trades_to_ohlcv,
9                                     refresh_backtest_ohlcv_data,
10                                     refresh_backtest_trades_data)
11 from freqtrade.exceptions import OperationalException
12 from freqtrade.resolvers import ExchangeResolver
13 from freqtrade.state import RunMode
14 
15 logger = logging.getLogger(__name__)
16 
17 
18 def start_download_data(args: Dict[str, Any]) -> None:
19     """
20     Download data (former download_backtest_data.py script)
21     """
22     config = setup_utils_configuration(args, RunMode.UTIL_EXCHANGE)
23 
24     timerange = TimeRange()
25     if 'days' in config:
26         time_since = arrow.utcnow().shift(days=-config['days']).strftime("%Y%m%d")
27         timerange = TimeRange.parse_timerange(f'{time_since}-')
28 
29     if 'pairs' not in config:
30         raise OperationalException(
31             "Downloading data requires a list of pairs. "
32             "Please check the documentation on how to configure this.")
33 
34     logger.info(f'About to download pairs: {config["pairs"]}, '
35                 f'intervals: {config["timeframes"]} to {config["datadir"]}')
36 
37     pairs_not_available: List[str] = []
38 
39     # Init exchange
40     exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config)
41     try:
42 
43         if config.get('download_trades'):
44             pairs_not_available = refresh_backtest_trades_data(
45                 exchange, pairs=config["pairs"], datadir=config['datadir'],
46                 timerange=timerange, erase=bool(config.get("erase")))
47 
48             # Convert downloaded trade data to different timeframes
49             convert_trades_to_ohlcv(
50                 pairs=config["pairs"], timeframes=config["timeframes"],
51                 datadir=config['datadir'], timerange=timerange,
52                 erase=bool(config.get("erase")))
53         else:
54             pairs_not_available = refresh_backtest_ohlcv_data(
55                 exchange, pairs=config["pairs"], timeframes=config["timeframes"],
56                 datadir=config['datadir'], timerange=timerange,
57                 erase=bool(config.get("erase")))
58 
59     except KeyboardInterrupt:
60         sys.exit("SIGINT received, aborting ...")
61 
62     finally:
63         if pairs_not_available:
64             logger.info(f"Pairs [{','.join(pairs_not_available)}] not available "
65                         f"on exchange {exchange.name}.")
66
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/freqtrade/commands/data_commands.py b/freqtrade/commands/data_commands.py
--- a/freqtrade/commands/data_commands.py
+++ b/freqtrade/commands/data_commands.py
@@ -37,7 +37,12 @@
     pairs_not_available: List[str] = []
 
     # Init exchange
-    exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config)
+    exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config, validate=False)
+    # Manual validations of relevant settings
+    exchange.validate_pairs(config['pairs'])
+    for timeframe in config['timeframes']:
+        exchange.validate_timeframes(timeframe)
+
     try:
 
         if config.get('download_trades'):

{"golden_diff": "diff --git a/freqtrade/commands/data_commands.py b/freqtrade/commands/data_commands.py\n--- a/freqtrade/commands/data_commands.py\n+++ b/freqtrade/commands/data_commands.py\n@@ -37,7 +37,12 @@\n     pairs_not_available: List[str] = []\n \n     # Init exchange\n-    exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config)\n+    exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config, validate=False)\n+    # Manual validations of relevant settings\n+    exchange.validate_pairs(config['pairs'])\n+    for timeframe in config['timeframes']:\n+        exchange.validate_timeframes(timeframe)\n+\n     try:\n \n         if config.get('download_trades'):\n", "issue": "Strange results for download-data\nI recalled #2716, tried to reproduce and obtained very strange results:\r\n\r\n* remove config.json\r\n* then run:\r\n```\r\n$ freqtrade download-data --exchange gemini --pairs 'BTC/USD' 'LTC/USD' 'BCH/USD' 'ETH/USD' -t 1h --days 5 -v\r\n2020-02-08 03:48:33,819 - freqtrade.loggers - INFO - Verbosity set to 1\r\n2020-02-08 03:48:33,819 - freqtrade.configuration.configuration - INFO - Using exchange gemini\r\n2020-02-08 03:48:33,819 - freqtrade.configuration.configuration - INFO - Using user-data directory: /home/user/freqtrade-wrk/github-hroff-1902/freqtrade/user_data ...\r\n2020-02-08 03:48:33,819 - freqtrade.configuration.configuration - INFO - Using data directory: /home/user/freqtrade-wrk/github-hroff-1902/freqtrade/user_data/data/gemini ...\r\n2020-02-08 03:48:33,819 - freqtrade.configuration.configuration - INFO - Using pairs ['BTC/USD', 'LTC/USD', 'BCH/USD', 'ETH/USD']\r\n2020-02-08 03:48:33,820 - freqtrade.configuration.configuration - INFO - timeframes --timeframes: ['1h']\r\n2020-02-08 03:48:33,820 - freqtrade.configuration.configuration - INFO - Detected --days: 5\r\n2020-02-08 03:48:33,820 - freqtrade.configuration.check_exchange - INFO - Checking exchange...\r\n2020-02-08 03:48:33,820 - freqtrade.configuration.check_exchange - WARNING - Exchange \"gemini\" is known to the the ccxt library, available for the bot, but not officially supported by the Freqtrade development team. It may work flawlessly (please report back) or have serious issues. Use it at your own discretion.\r\n2020-02-08 03:48:33,820 - freqtrade.configuration.deprecated_settings - WARNING - DEPRECATED: Pairlists must be defined explicitly in the future.Defaulting to StaticPairList for now.\r\n2020-02-08 03:48:33,820 - freqtrade.configuration.config_validation - INFO - Validating configuration ...\r\n2020-02-08 03:48:33,824 - freqtrade.commands.data_commands - INFO - About to download pairs: ['BTC/USD', 'LTC/USD', 'BCH/USD', 'ETH/USD'], intervals: ['1h'] to /home/user/freqtrade-wrk/github-hroff-1902/freqtrade/user_data/data/gemini\r\n2020-02-08 03:48:33,824 - freqtrade.resolvers.exchange_resolver - INFO - No Gemini specific subclass found. Using the generic class instead.\r\n2020-02-08 03:48:33,824 - freqtrade.exchange.exchange - INFO - Instance is running with dry_run enabled\r\n2020-02-08 03:48:33,826 - freqtrade.exchange.exchange - INFO - Applying additional ccxt config: {'enableRateLimit': True}\r\n2020-02-08 03:48:33,826 - asyncio - DEBUG - Using selector: EpollSelector\r\n2020-02-08 03:48:33,828 - freqtrade.exchange.exchange - INFO - Using Exchange \"Gemini\"\r\n2020-02-08 03:48:35,437 - chardet.charsetprober - DEBUG - utf-8  confidence = 0.99\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - SHIFT_JIS Japanese confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - EUC-JP Japanese confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - GB2312 Chinese confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - EUC-KR Korean confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - CP949 Korean confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - Big5 Chinese confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - EUC-TW Taiwan confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - windows-1251 Russian confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - KOI8-R Russian confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - ISO-8859-5 Russian confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - MacCyrillic Russian confidence = 0.0\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - IBM866 Russian confidence = 0.0\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - IBM855 Russian confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - ISO-8859-7 Greek confidence = 0.0\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - windows-1253 Greek confidence = 0.0\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - ISO-8859-5 Bulgairan confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - windows-1251 Bulgarian confidence = 0.01\r\n2020-02-08 03:48:35,438 - chardet.charsetprober - DEBUG - TIS-620 Thai confidence = 0.0\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - ISO-8859-9 Turkish confidence = 0.6551158277756192\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - windows-1255 Hebrew confidence = 0.0\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - windows-1255 Hebrew confidence = 0.0\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - windows-1255 Hebrew confidence = 0.0\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - utf-8  confidence = 0.99\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - SHIFT_JIS Japanese confidence = 0.01\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - EUC-JP Japanese confidence = 0.01\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - GB2312 Chinese confidence = 0.01\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - EUC-KR Korean confidence = 0.01\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - CP949 Korean confidence = 0.01\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - Big5 Chinese confidence = 0.01\r\n2020-02-08 03:48:35,439 - chardet.charsetprober - DEBUG - EUC-TW Taiwan confidence = 0.01\r\n2020-02-08 03:48:35,441 - freqtrade - ERROR -  is not available as stake on Gemini. Available currencies are: BCH, BTC, ETH, LTC, USD\r\n2020-02-08 03:48:35,441 - freqtrade.exchange.exchange - DEBUG - Exchange object destroyed, closing async loop\r\n```\r\n\r\n-- note 1) strange messages from \"chardet.charsetprober\" module;  2) empty \"something\" between \"ERROR -  is not available\". 3) strange module \"freqtrade\" for this message...\r\n\ndownload-data validates whitelist when --pairs is used\nThe download-data subcommands validates whitelist when `--pairs` is used:\r\n\r\n```\r\n$ freqtrade download-data -c config.json --exchange kraken --pairs BTC/USD -t 1d --days 100 -v\r\n...\r\n2019-12-17 20:07:49,885 - freqtrade - ERROR - Pair NXT/BTC is not available on Kraken. Please remove NXT/BTC from your whitelist.\r\n```\r\n\r\nExpected behavior: ignore pair_whitelist, work only with pairs set in the cli.\r\n\n", "before_files": [{"content": "import logging\nimport sys\nfrom typing import Any, Dict, List\n\nimport arrow\n\nfrom freqtrade.configuration import TimeRange, setup_utils_configuration\nfrom freqtrade.data.history import (convert_trades_to_ohlcv,\n                                    refresh_backtest_ohlcv_data,\n                                    refresh_backtest_trades_data)\nfrom freqtrade.exceptions import OperationalException\nfrom freqtrade.resolvers import ExchangeResolver\nfrom freqtrade.state import RunMode\n\nlogger = logging.getLogger(__name__)\n\n\ndef start_download_data(args: Dict[str, Any]) -> None:\n    \"\"\"\n    Download data (former download_backtest_data.py script)\n    \"\"\"\n    config = setup_utils_configuration(args, RunMode.UTIL_EXCHANGE)\n\n    timerange = TimeRange()\n    if 'days' in config:\n        time_since = arrow.utcnow().shift(days=-config['days']).strftime(\"%Y%m%d\")\n        timerange = TimeRange.parse_timerange(f'{time_since}-')\n\n    if 'pairs' not in config:\n        raise OperationalException(\n            \"Downloading data requires a list of pairs. \"\n            \"Please check the documentation on how to configure this.\")\n\n    logger.info(f'About to download pairs: {config[\"pairs\"]}, '\n                f'intervals: {config[\"timeframes\"]} to {config[\"datadir\"]}')\n\n    pairs_not_available: List[str] = []\n\n    # Init exchange\n    exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config)\n    try:\n\n        if config.get('download_trades'):\n            pairs_not_available = refresh_backtest_trades_data(\n                exchange, pairs=config[\"pairs\"], datadir=config['datadir'],\n                timerange=timerange, erase=bool(config.get(\"erase\")))\n\n            # Convert downloaded trade data to different timeframes\n            convert_trades_to_ohlcv(\n                pairs=config[\"pairs\"], timeframes=config[\"timeframes\"],\n                datadir=config['datadir'], timerange=timerange,\n                erase=bool(config.get(\"erase\")))\n        else:\n            pairs_not_available = refresh_backtest_ohlcv_data(\n                exchange, pairs=config[\"pairs\"], timeframes=config[\"timeframes\"],\n                datadir=config['datadir'], timerange=timerange,\n                erase=bool(config.get(\"erase\")))\n\n    except KeyboardInterrupt:\n        sys.exit(\"SIGINT received, aborting ...\")\n\n    finally:\n        if pairs_not_available:\n            logger.info(f\"Pairs [{','.join(pairs_not_available)}] not available \"\n                        f\"on exchange {exchange.name}.\")\n", "path": "freqtrade/commands/data_commands.py"}], "after_files": [{"content": "import logging\nimport sys\nfrom typing import Any, Dict, List\n\nimport arrow\n\nfrom freqtrade.configuration import TimeRange, setup_utils_configuration\nfrom freqtrade.data.history import (convert_trades_to_ohlcv,\n                                    refresh_backtest_ohlcv_data,\n                                    refresh_backtest_trades_data)\nfrom freqtrade.exceptions import OperationalException\nfrom freqtrade.resolvers import ExchangeResolver\nfrom freqtrade.state import RunMode\n\nlogger = logging.getLogger(__name__)\n\n\ndef start_download_data(args: Dict[str, Any]) -> None:\n    \"\"\"\n    Download data (former download_backtest_data.py script)\n    \"\"\"\n    config = setup_utils_configuration(args, RunMode.UTIL_EXCHANGE)\n\n    timerange = TimeRange()\n    if 'days' in config:\n        time_since = arrow.utcnow().shift(days=-config['days']).strftime(\"%Y%m%d\")\n        timerange = TimeRange.parse_timerange(f'{time_since}-')\n\n    if 'pairs' not in config:\n        raise OperationalException(\n            \"Downloading data requires a list of pairs. \"\n            \"Please check the documentation on how to configure this.\")\n\n    logger.info(f'About to download pairs: {config[\"pairs\"]}, '\n                f'intervals: {config[\"timeframes\"]} to {config[\"datadir\"]}')\n\n    pairs_not_available: List[str] = []\n\n    # Init exchange\n    exchange = ExchangeResolver.load_exchange(config['exchange']['name'], config, validate=False)\n    # Manual validations of relevant settings\n    exchange.validate_pairs(config['pairs'])\n    for timeframe in config['timeframes']:\n        exchange.validate_timeframes(timeframe)\n\n    try:\n\n        if config.get('download_trades'):\n            pairs_not_available = refresh_backtest_trades_data(\n                exchange, pairs=config[\"pairs\"], datadir=config['datadir'],\n                timerange=timerange, erase=bool(config.get(\"erase\")))\n\n            # Convert downloaded trade data to different timeframes\n            convert_trades_to_ohlcv(\n                pairs=config[\"pairs\"], timeframes=config[\"timeframes\"],\n                datadir=config['datadir'], timerange=timerange,\n                erase=bool(config.get(\"erase\")))\n        else:\n            pairs_not_available = refresh_backtest_ohlcv_data(\n                exchange, pairs=config[\"pairs\"], timeframes=config[\"timeframes\"],\n                datadir=config['datadir'], timerange=timerange,\n                erase=bool(config.get(\"erase\")))\n\n    except KeyboardInterrupt:\n        sys.exit(\"SIGINT received, aborting ...\")\n\n    finally:\n        if pairs_not_available:\n            logger.info(f\"Pairs [{','.join(pairs_not_available)}] not available \"\n                        f\"on exchange {exchange.name}.\")\n", "path": "freqtrade/commands/data_commands.py"}]}