implementation of ohlcv optimized

This commit is contained in:
hroff-1902 2019-08-18 13:00:37 +03:00
parent 310e438706
commit 407a3bca62

View File

@ -52,11 +52,10 @@ class DataProvider():
Use False only for read-only operations (where the dataframe is not modified) Use False only for read-only operations (where the dataframe is not modified)
""" """
if self.runmode in (RunMode.DRY_RUN, RunMode.LIVE): if self.runmode in (RunMode.DRY_RUN, RunMode.LIVE):
pairtick = (pair, ticker_interval or self._config['ticker_interval']) return self._exchange.klines((pair, ticker_interval or self._config['ticker_interval']),
if pairtick in self.available_pairs: copy=copy)
return self._exchange.klines(pairtick, copy=copy) else:
return DataFrame()
return DataFrame()
def historic_ohlcv(self, pair: str, ticker_interval: str = None) -> DataFrame: def historic_ohlcv(self, pair: str, ticker_interval: str = None) -> DataFrame:
""" """