Added candle type to ohlcv_get_available_data
This commit is contained in:
@@ -28,9 +28,13 @@ class HDF5DataHandler(IDataHandler):
|
||||
:param datadir: Directory to search for ohlcv files
|
||||
:return: List of Tuples of (pair, timeframe)
|
||||
"""
|
||||
_tmp = [re.search(r'^([a-zA-Z_]+)\-(\d+\S+)(?=.h5)', p.name)
|
||||
for p in datadir.glob("*.h5")]
|
||||
return [(match[1].replace('_', '/'), match[2]) for match in _tmp
|
||||
_tmp = [
|
||||
re.search(
|
||||
r'^([a-zA-Z_]+)\-(\d+\S)\-?([a-zA-Z_]*)?(?=.h5)',
|
||||
p.name
|
||||
) for p in datadir.glob("*.h5")
|
||||
]
|
||||
return [(match[1].replace('_', '/'), match[2], match[3]) for match in _tmp
|
||||
if match and len(match.groups()) > 1]
|
||||
|
||||
@classmethod
|
||||
|
@@ -29,9 +29,12 @@ class JsonDataHandler(IDataHandler):
|
||||
:param datadir: Directory to search for ohlcv files
|
||||
:return: List of Tuples of (pair, timeframe)
|
||||
"""
|
||||
_tmp = [re.search(r'^([a-zA-Z_]+)\-(\d+\S+)(?=.json)', p.name)
|
||||
for p in datadir.glob(f"*.{cls._get_file_extension()}")]
|
||||
return [(match[1].replace('_', '/'), match[2]) for match in _tmp
|
||||
_tmp = [
|
||||
re.search(
|
||||
r'^([a-zA-Z_]+)\-(\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
|
||||
if match and len(match.groups()) > 1]
|
||||
|
||||
@classmethod
|
||||
|
Reference in New Issue
Block a user