Don't require pairs but fall back to pair_whitelist instead
This commit is contained in:
parent
a581ca66bf
commit
db17b20e26
@ -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:
|
||||
|
@ -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:
|
||||
|
||||
|
@ -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"])
|
||||
|
Loading…
Reference in New Issue
Block a user