From 84cc4887cedd45b182c622c3e0a7bf3c39666381 Mon Sep 17 00:00:00 2001 From: Matthias Date: Tue, 25 Dec 2018 13:37:15 +0100 Subject: [PATCH] Add copy parameter --- freqtrade/data/dataprovider.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/freqtrade/data/dataprovider.py b/freqtrade/data/dataprovider.py index 142c12f2a..4d819a7d8 100644 --- a/freqtrade/data/dataprovider.py +++ b/freqtrade/data/dataprovider.py @@ -28,12 +28,15 @@ class DataProvider(object): """ self._exchange.refresh_tickers(pairlist, self._config['ticker_interval']) - def ohlcv(self, pair: str) -> List[str]: + def ohlcv(self, pair: str, copy: bool = True) -> List[str]: """ get ohlcv data for the given pair as DataFrame + :param pair: pair to get the data for + :param copy: copy dataframe before returning. + Use false only for RO operations (where the dataframe is not modified) """ # TODO: Should not be stored in exchange but in this class - return self._exchange.klines(pair) + return self._exchange.klines(pair, copy) def historic_ohlcv(self, pair: str, ticker_interval: str) -> DataFrame: """