Add ohlcv_store call to convert_ohlcv
This commit is contained in:
parent
d804372d74
commit
abc6b9459a
@ -25,13 +25,13 @@ class JsonDataHandler(IDataHandler):
|
|||||||
# Check if regex found something and only return these results
|
# Check if regex found something and only return these results
|
||||||
return [match[0].replace('_', '/') for match in _tmp if match]
|
return [match[0].replace('_', '/') for match in _tmp if match]
|
||||||
|
|
||||||
def ohlcv_store(self, timeframe: str, data: DataFrame):
|
def ohlcv_store(self, timeframe: str, data: DataFrame) -> None:
|
||||||
"""
|
"""
|
||||||
Store data
|
Store data
|
||||||
"""
|
"""
|
||||||
raise NotImplementedError()
|
raise NotImplementedError()
|
||||||
|
|
||||||
def ohlcv_append(self, timeframe: str, data: DataFrame):
|
def ohlcv_append(self, timeframe: str, data: DataFrame) -> None:
|
||||||
"""
|
"""
|
||||||
Append data to existing files
|
Append data to existing files
|
||||||
"""
|
"""
|
||||||
|
@ -286,9 +286,9 @@ def convert_ohlcv_format(config: Dict[str, Any], convert_from: str, convert_to:
|
|||||||
for pair in config['pairs']:
|
for pair in config['pairs']:
|
||||||
src = SrcClass(Path(config['datadir']), pair)
|
src = SrcClass(Path(config['datadir']), pair)
|
||||||
trg = TrgClass(Path(config['datadir']), pair)
|
trg = TrgClass(Path(config['datadir']), pair)
|
||||||
data = src.ohlcv_load(timeframe)
|
data = src.ohlcv_load(timeframe=timeframe)
|
||||||
logger.info(f"Converting {len(data)} candles for {pair}")
|
logger.info(f"Converting {len(data)} candles for {pair}")
|
||||||
# trg.ohlcv_store(data)
|
trg.ohlcv_store(timeframe=timeframe, data=data)
|
||||||
|
|
||||||
|
|
||||||
def start_convert_data(args: Dict[str, Any], ohlcv: bool = True) -> None:
|
def start_convert_data(args: Dict[str, Any], ohlcv: bool = True) -> None:
|
||||||
|
Loading…
Reference in New Issue
Block a user