First version of hdf5handler - no proper support for trades yet

This commit is contained in:
Matthias
2020-07-12 20:17:21 +02:00
parent 0614e59966
commit 55591e287c
2 changed files with 188 additions and 3 deletions

View File

@@ -50,9 +50,7 @@ class IDataHandler(ABC):
@abstractmethod
def ohlcv_store(self, pair: str, timeframe: str, data: DataFrame) -> None:
"""
Store data in json format "values".
format looks as follows:
[[<date>,<open>,<high>,<low>,<close>]]
Store ohlcv data.
:param pair: Pair - used to generate filename
:timeframe: Timeframe - used to generate filename
:data: Dataframe containing OHLCV data
@@ -239,6 +237,9 @@ def get_datahandlerclass(datatype: str) -> Type[IDataHandler]:
elif datatype == 'jsongz':
from .jsondatahandler import JsonGzDataHandler
return JsonGzDataHandler
elif datatype == 'hdf5':
from .hdf5datahandler import HDF5Handler
return HDF5Handler
else:
raise ValueError(f"No datahandler for datatype {datatype} available.")