use folder user_data/data/exchangename by default and pick pairs.json from that folder by default
This commit is contained in:
parent
e10279b7b4
commit
6891054b84
@ -291,7 +291,6 @@ class Arguments(object):
|
|||||||
'--pairs-file',
|
'--pairs-file',
|
||||||
help='File containing a list of pairs to download',
|
help='File containing a list of pairs to download',
|
||||||
dest='pairs_file',
|
dest='pairs_file',
|
||||||
required=True,
|
|
||||||
default=None
|
default=None
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import arrow
|
|||||||
|
|
||||||
from freqtrade import (exchange, arguments, misc)
|
from freqtrade import (exchange, arguments, misc)
|
||||||
|
|
||||||
DEFAULT_DL_PATH = 'freqtrade/tests/testdata'
|
DEFAULT_DL_PATH = 'user_data/data'
|
||||||
|
|
||||||
arguments = arguments.Arguments(sys.argv[1:], 'download utility')
|
arguments = arguments.Arguments(sys.argv[1:], 'download utility')
|
||||||
arguments.testdata_dl_options()
|
arguments.testdata_dl_options()
|
||||||
@ -16,12 +16,16 @@ args = arguments.parse_args()
|
|||||||
|
|
||||||
TICKER_INTERVALS = ['1m', '5m']
|
TICKER_INTERVALS = ['1m', '5m']
|
||||||
|
|
||||||
with open(args.pairs_file) as file:
|
dl_path = args.export if args.export and os.path.exists(args.export) else os.path.join(DEFAULT_DL_PATH, args.exchange)
|
||||||
PAIRS = list(set(json.load(file)))
|
if not os.path.isdir(dl_path):
|
||||||
|
sys.exit(f'Directory {dl_path} does not exist.')
|
||||||
|
|
||||||
dl_path = DEFAULT_DL_PATH
|
pairs_file = args.pairs_file if args.pairs_file else os.path.join(dl_path, 'pairs.json')
|
||||||
if args.export and os.path.exists(args.export):
|
if not os.path.isfile(pairs_file):
|
||||||
dl_path = args.export
|
sys.exit(f'No pairs file found with path {pairs_file}.')
|
||||||
|
|
||||||
|
with open(pairs_file) as file:
|
||||||
|
PAIRS = list(set(json.load(file)))
|
||||||
|
|
||||||
since_time = None
|
since_time = None
|
||||||
if args.days:
|
if args.days:
|
||||||
|
Loading…
Reference in New Issue
Block a user