From db17b20e26a563048838d98ca5c6cc4f35381fc1 Mon Sep 17 00:00:00 2001 From: Matthias Date: Fri, 21 Jun 2019 20:21:03 +0200 Subject: [PATCH] Don't require pairs but fall back to pair_whitelist instead --- freqtrade/arguments.py | 1 - freqtrade/tests/test_arguments.py | 8 -------- scripts/plot_dataframe.py | 5 ++++- 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/freqtrade/arguments.py b/freqtrade/arguments.py index 59123a14b..3075dd0fe 100644 --- a/freqtrade/arguments.py +++ b/freqtrade/arguments.py @@ -444,7 +444,6 @@ class Arguments(object): '-p', '--pairs', help='Show profits for only this pairs. Pairs are comma-separated.', dest='pairs', - required=True ) def download_data_options(self) -> None: diff --git a/freqtrade/tests/test_arguments.py b/freqtrade/tests/test_arguments.py index 4c2bf708d..d9292bdb5 100644 --- a/freqtrade/tests/test_arguments.py +++ b/freqtrade/tests/test_arguments.py @@ -203,14 +203,6 @@ def test_plot_dataframe_options() -> None: assert pargs.plot_limit == 30 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: diff --git a/scripts/plot_dataframe.py b/scripts/plot_dataframe.py index a17076085..4aacc99dd 100755 --- a/scripts/plot_dataframe.py +++ b/scripts/plot_dataframe.py @@ -104,7 +104,10 @@ def analyse_and_plot_pairs(config: Dict[str, Any]): exchange = ExchangeResolver(exchange_name, config).exchange 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 timerange = Arguments.parse_timerange(config["timerange"])