diff --git a/freqtrade/data/__init__.py b/freqtrade/data/__init__.py index f0d6a7bad..12e80d7a2 100644 --- a/freqtrade/data/__init__.py +++ b/freqtrade/data/__init__.py @@ -1,6 +1,7 @@ """ -Module to handle data operations for freqtrade bot +Module to handle data operations for freqtrade """ + # limit what's imported when using `from freqtrad.data import *`` __all__ = [ 'convert' diff --git a/freqtrade/data/history.py b/freqtrade/data/history.py index 79f45223d..f4ff46a1a 100644 --- a/freqtrade/data/history.py +++ b/freqtrade/data/history.py @@ -69,10 +69,10 @@ def trim_tickerlist(tickerlist: List[Dict], timerange: TimeRange) -> List[Dict]: def load_tickerdata_file( datadir: Optional[Path], pair: str, ticker_interval: str, - timerange: Optional[TimeRange] = None) -> Optional[List[Dict]]: + timerange: Optional[TimeRange] = None) -> Optional[list]: """ Load a pair from file, either .json.gz or .json - :return dict(:) or None if unsuccesful + :return tickerlist or None if unsuccesful """ path = make_testdata_path(datadir) pair_s = pair.replace('/', '_') @@ -105,6 +105,7 @@ def load_pair_history(pair: str, ) -> DataFrame: """ Loads cached ticker history for the given pair. + :return: DataFrame with ohlcv data """ pairdata = load_tickerdata_file(datadir, pair, ticker_interval, timerange=timerange) @@ -145,7 +146,7 @@ def load_data(datadir: Optional[Path], timerange: TimeRange = TimeRange(None, None, 0, 0)) -> Dict[str, DataFrame]: """ Loads ticker history data for a list of pairs the given parameters - :return: dict + :return: dict(:) """ result = {} @@ -185,9 +186,9 @@ def load_cached_data_for_updating(filename: Path, tick_interval: str, if filename.is_file(): with open(filename, "rt") as file: data = json_load(file) - # remove the last item, could be incomplete candle - if data: - data.pop() + # remove the last item, could be incomplete candle + if data: + data.pop() else: data = [] @@ -217,7 +218,7 @@ def download_pair_history(datadir: Optional[Path], :param pair: pair to download :param tick_interval: ticker interval :param timerange: range of time to download - :return: None + :return: bool with success state """ try: