From 392128013fcf91fab6f2dbe4103261da758fa1ee Mon Sep 17 00:00:00 2001 From: Sam Germain Date: Sat, 27 Nov 2021 03:11:44 -0600 Subject: [PATCH] Updated ohlcv_get_available_data to recognize swap and futures pairs --- freqtrade/data/history/hdf5datahandler.py | 2 +- freqtrade/data/history/jsondatahandler.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/freqtrade/data/history/hdf5datahandler.py b/freqtrade/data/history/hdf5datahandler.py index 6e3f68f2e..16b1e5030 100644 --- a/freqtrade/data/history/hdf5datahandler.py +++ b/freqtrade/data/history/hdf5datahandler.py @@ -30,7 +30,7 @@ class HDF5DataHandler(IDataHandler): """ _tmp = [ re.search( - r'^([a-zA-Z_]+)\-(\d+\S)\-?([a-zA-Z_]*)?(?=.h5)', + r'^([a-zA-Z_]+(\:[a-zA-Z]{2,}(\-[0-9]{2,})?)?)\-(\d+\S)\-?([a-zA-Z_]*)?(?=.h5)', p.name ) for p in datadir.glob("*.h5") ] diff --git a/freqtrade/data/history/jsondatahandler.py b/freqtrade/data/history/jsondatahandler.py index 235b5c130..e1c5f5232 100644 --- a/freqtrade/data/history/jsondatahandler.py +++ b/freqtrade/data/history/jsondatahandler.py @@ -31,7 +31,7 @@ class JsonDataHandler(IDataHandler): """ _tmp = [ re.search( - r'^([a-zA-Z_]+)\-(\d+\S)\-?([a-zA-Z_]*)?(?=.json)', + r'^([a-zA-Z_]+(\:[a-zA-Z]{2,}(\-[0-9]{2,})?)?)\-(\d+\S)\-?([a-zA-Z_]*)?(?=.json)', p.name ) for p in datadir.glob(f"*.{cls._get_file_extension()}")] return [(match[1].replace('_', '/'), match[2], match[3]) for match in _tmp