Remove --active-only, introduce -a/--all instead

This commit is contained in:
hroff-1902 2019-10-17 02:42:07 +03:00
parent 92fda0f76c
commit a8ffd29e18
3 changed files with 10 additions and 7 deletions

View File

@ -35,7 +35,7 @@ ARGS_LIST_EXCHANGES = ["print_one_column", "list_exchanges_all"]
ARGS_LIST_TIMEFRAMES = ["exchange", "print_one_column"]
ARGS_LIST_PAIRS = ["exchange", "print_list", "list_pairs_print_json", "print_one_column",
"print_csv", "base_currencies", "quote_currencies", "active_only"]
"print_csv", "base_currencies", "quote_currencies", "list_pairs_all"]
ARGS_CREATE_USERDIR = ["user_data_dir"]

View File

@ -256,6 +256,12 @@ AVAILABLE_CLI_OPTIONS = {
action='store_true',
),
# List pairs / markets
"list_pairs_all": Arg(
'-a', '--all',
help='Print all pairs or market symbols. By default only active '
'ones are shown.',
action='store_true',
),
"print_list": Arg(
'--print-list',
help='Print list of pairs or market symbols. By default data is '
@ -283,11 +289,6 @@ AVAILABLE_CLI_OPTIONS = {
help='Specify base currency(-ies). Space-separated list.',
nargs='+',
),
"active_only": Arg(
'--active-only',
help='Print only active pairs or markets.',
action='store_true',
),
# Script options
"pairs": Arg(
'-p', '--pairs',

View File

@ -136,7 +136,9 @@ def start_list_pairs(args: Dict[str, Any], pairs_only: bool = False) -> None: #
# Init exchange
exchange = ExchangeResolver(config['exchange']['name'], config).exchange
active_only = args.get('active_only', False)
# By default only active pairs/markets are to be shown
active_only = not args.get('list_pairs_all', False)
base_currencies = args.get('base_currencies', [])
quote_currencies = args.get('quote_currencies', [])