Add ohlcv_store call to convert_ohlcv

This commit is contained in:
Matthias 2019-12-25 10:30:35 +01:00
parent d804372d74
commit abc6b9459a
2 changed files with 4 additions and 4 deletions

View File

@ -25,13 +25,13 @@ class JsonDataHandler(IDataHandler):
# Check if regex found something and only return these results
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
"""
raise NotImplementedError()
def ohlcv_append(self, timeframe: str, data: DataFrame):
def ohlcv_append(self, timeframe: str, data: DataFrame) -> None:
"""
Append data to existing files
"""

View File

@ -286,9 +286,9 @@ def convert_ohlcv_format(config: Dict[str, Any], convert_from: str, convert_to:
for pair in config['pairs']:
src = SrcClass(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}")
# trg.ohlcv_store(data)
trg.ohlcv_store(timeframe=timeframe, data=data)
def start_convert_data(args: Dict[str, Any], ohlcv: bool = True) -> None: