Pair is a positional argument.
This commit is contained in:
parent
a7c3eaf586
commit
f0c7b5a8f3
1 changed files with 7 additions and 6 deletions
|
@ -78,21 +78,22 @@ def build_parser():
|
||||||
fetch_parser = subparsers.add_parser(
|
fetch_parser = subparsers.add_parser(
|
||||||
"fetch",
|
"fetch",
|
||||||
help="fetch prices",
|
help="fetch prices",
|
||||||
usage="pricehist fetch ID [-h] -p PAIR (-s DATE | -sx DATE) [-e DATE] [-o FMT]",
|
usage=(
|
||||||
|
"pricehist fetch SOURCE PAIR "
|
||||||
|
"[-h] (-s DATE | -sx DATE) [-e DATE] [-o FMT]"
|
||||||
|
),
|
||||||
)
|
)
|
||||||
fetch_parser.add_argument(
|
fetch_parser.add_argument(
|
||||||
"source",
|
"source",
|
||||||
metavar="ID",
|
metavar="SOURCE",
|
||||||
type=str,
|
type=str,
|
||||||
choices=sources.by_id.keys(),
|
choices=sources.by_id.keys(),
|
||||||
help="the source identifier",
|
help="the source identifier",
|
||||||
)
|
)
|
||||||
fetch_parser.add_argument(
|
fetch_parser.add_argument(
|
||||||
"-p",
|
"pair",
|
||||||
"--pair",
|
metavar="PAIR",
|
||||||
dest="pair",
|
|
||||||
type=str,
|
type=str,
|
||||||
required=True,
|
|
||||||
help="pair, usually BASE/QUOTE, e.g. BTC/USD",
|
help="pair, usually BASE/QUOTE, e.g. BTC/USD",
|
||||||
)
|
)
|
||||||
fetch_start_group = fetch_parser.add_mutually_exclusive_group(required=True)
|
fetch_start_group = fetch_parser.add_mutually_exclusive_group(required=True)
|
||||||
|
|
Loading…
Add table
Reference in a new issue