Skip to content

Commit

Permalink
Add ohlcv_store call to convert_ohlcv
Browse files Browse the repository at this point in the history
  • Loading branch information
xmatthias committed Dec 28, 2019
1 parent d804372 commit abc6b94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions freqtrade/data/datahandlers/jsondatahandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@ def ohlcv_get_pairs(cls, datadir: Path, timeframe: str) -> List[str]:
# 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
"""
Expand Down
4 changes: 2 additions & 2 deletions freqtrade/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit abc6b94

Please sign in to comment.