Don't require pairs but fall back to pair_whitelist instead

This commit is contained in:
Matthias 2019-06-21 20:21:03 +02:00
parent a581ca66bf
commit db17b20e26
3 changed files with 4 additions and 10 deletions

View File

@ -444,7 +444,6 @@ class Arguments(object):
'-p', '--pairs', '-p', '--pairs',
help='Show profits for only this pairs. Pairs are comma-separated.', help='Show profits for only this pairs. Pairs are comma-separated.',
dest='pairs', dest='pairs',
required=True
) )
def download_data_options(self) -> None: def download_data_options(self) -> None:

View File

@ -203,14 +203,6 @@ def test_plot_dataframe_options() -> None:
assert pargs.plot_limit == 30 assert pargs.plot_limit == 30
assert pargs.pairs == "UNITTEST/BTC" assert pargs.pairs == "UNITTEST/BTC"
# Pop pairs argument
args = args[:-2]
arguments = Arguments(args, '')
arguments.common_scripts_options()
arguments.plot_dataframe_options()
with pytest.raises(SystemExit, match=r'2'):
arguments.parse_args(True)
def test_check_int_positive() -> None: def test_check_int_positive() -> None:

View File

@ -104,7 +104,10 @@ def analyse_and_plot_pairs(config: Dict[str, Any]):
exchange = ExchangeResolver(exchange_name, config).exchange exchange = ExchangeResolver(exchange_name, config).exchange
strategy = StrategyResolver(config).strategy strategy = StrategyResolver(config).strategy
pairs = config["pairs"].split(',') if "pairs" in config:
pairs = config["pairs"].split(',')
else:
pairs = config["exchange"]["pair_whitelist"]
# Set timerange to use # Set timerange to use
timerange = Arguments.parse_timerange(config["timerange"]) timerange = Arguments.parse_timerange(config["timerange"])