Updated ohlcv_get_available_data to recognize swap and futures pairs

This commit is contained in:
Sam Germain 2021-11-27 03:11:44 -06:00
parent 8761649fd7
commit 392128013f
2 changed files with 2 additions and 2 deletions

View File

@ -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")
]

View File

@ -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