Implement to json
This commit is contained in:
parent
150a497cb4
commit
0b03c6c786
@ -37,7 +37,7 @@ 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", "list_pairs_all"]
|
||||
|
||||
ARGS_TEST_PAIRLIST = ["config", "quote_currencies"]
|
||||
ARGS_TEST_PAIRLIST = ["config", "quote_currencies", "print_one_column", "list_pairs_print_json"]
|
||||
|
||||
ARGS_CREATE_USERDIR = ["user_data_dir", "reset"]
|
||||
|
||||
|
@ -344,4 +344,13 @@ def start_test_pairlist(args: Dict[str, Any]) -> None:
|
||||
|
||||
for curr, pairlist in results.items():
|
||||
print(f"Pairs for {curr}: ")
|
||||
summary_str = ""
|
||||
if args.get('print_list', False):
|
||||
# print data as a list, with human-readable summary
|
||||
print(f"{summary_str}: {', '.join(pairlist)}.")
|
||||
elif args.get('print_one_column', False):
|
||||
print('\n'.join(pairlist))
|
||||
elif args.get('list_pairs_print_json', False):
|
||||
print(rapidjson.dumps(list(pairlist), default=str))
|
||||
else:
|
||||
print(pairlist)
|
||||
|
Loading…
Reference in New Issue
Block a user