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