Updated ohlcv_get_available_data to recognize swap and futures pairs
This commit is contained in:
parent
8761649fd7
commit
392128013f
@ -30,7 +30,7 @@ class HDF5DataHandler(IDataHandler):
|
|||||||
"""
|
"""
|
||||||
_tmp = [
|
_tmp = [
|
||||||
re.search(
|
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
|
p.name
|
||||||
) for p in datadir.glob("*.h5")
|
) for p in datadir.glob("*.h5")
|
||||||
]
|
]
|
||||||
|
@ -31,7 +31,7 @@ class JsonDataHandler(IDataHandler):
|
|||||||
"""
|
"""
|
||||||
_tmp = [
|
_tmp = [
|
||||||
re.search(
|
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
|
p.name
|
||||||
) for p in datadir.glob(f"*.{cls._get_file_extension()}")]
|
) for p in datadir.glob(f"*.{cls._get_file_extension()}")]
|
||||||
return [(match[1].replace('_', '/'), match[2], match[3]) for match in _tmp
|
return [(match[1].replace('_', '/'), match[2], match[3]) for match in _tmp
|
||||||
|
Loading…
Reference in New Issue
Block a user