diff --git a/freqtrade/data/history/hdf5datahandler.py b/freqtrade/data/history/hdf5datahandler.py index 239b9a99d..73b8aedba 100644 --- a/freqtrade/data/history/hdf5datahandler.py +++ b/freqtrade/data/history/hdf5datahandler.py @@ -66,7 +66,7 @@ class HDF5DataHandler(IDataHandler): _tmp = [re.search(r'^(\S+)(?=\-' + timeframe + candle + '.h5)', p.name) for p in datadir.glob(f"*{timeframe}{candle}.h5")] # Check if regex found something and only return these results - return [match[0].replace('_', '/') for match in _tmp if match] + return [cls.rebuild_pair_from_filename(match[0]) for match in _tmp if match] def ohlcv_store( self, @@ -160,7 +160,7 @@ class HDF5DataHandler(IDataHandler): _tmp = [re.search(r'^(\S+)(?=\-trades.h5)', p.name) for p in datadir.glob("*trades.h5")] # Check if regex found something and only return these results to avoid exceptions. - return [match[0].replace('_', '/') for match in _tmp if match] + return [cls.rebuild_pair_from_filename(match[0]) for match in _tmp if match] def trades_store(self, pair: str, data: TradeList) -> None: """ diff --git a/freqtrade/data/history/jsondatahandler.py b/freqtrade/data/history/jsondatahandler.py index 2180b6799..f329d4879 100644 --- a/freqtrade/data/history/jsondatahandler.py +++ b/freqtrade/data/history/jsondatahandler.py @@ -67,7 +67,7 @@ class JsonDataHandler(IDataHandler): _tmp = [re.search(r'^(\S+)(?=\-' + timeframe + candle + '.json)', p.name) for p in datadir.glob(f"*{timeframe}{candle}.{cls._get_file_extension()}")] # Check if regex found something and only return these results - return [match[0].replace('_', '/') for match in _tmp if match] + return [cls.rebuild_pair_from_filename(match[0]) for match in _tmp if match] def ohlcv_store( self, @@ -156,7 +156,7 @@ class JsonDataHandler(IDataHandler): _tmp = [re.search(r'^(\S+)(?=\-trades.json)', p.name) for p in datadir.glob(f"*trades.{cls._get_file_extension()}")] # Check if regex found something and only return these results to avoid exceptions. - return [match[0].replace('_', '/') for match in _tmp if match] + return [cls.rebuild_pair_from_filename(match[0]) for match in _tmp if match] def trades_store(self, pair: str, data: TradeList) -> None: """