diff --git a/freqtrade/optimize/__init__.py b/freqtrade/optimize/__init__.py index e806ff2b8..3188b9a5f 100644 --- a/freqtrade/optimize/__init__.py +++ b/freqtrade/optimize/__init__.py @@ -2,6 +2,7 @@ import gzip import json +import ujson import logging import os from typing import Optional, List, Dict, Tuple, Any @@ -67,7 +68,7 @@ def load_tickerdata_file( elif os.path.isfile(file): logger.debug('Loading ticker data from file %s', file) with open(file) as tickerdata: - pairdata = json.load(tickerdata) + pairdata = ujson.load(tickerdata) else: return None @@ -163,7 +164,7 @@ def load_cached_data_for_updating(filename: str, # read the cached file if os.path.isfile(filename): with open(filename, "rt") as file: - data = json.load(file) + data = ujson.load(file) # remove the last item, because we are not sure if it is correct # it could be fetched when the candle was incompleted if data: diff --git a/requirements.txt b/requirements.txt index 3fb91888c..d118f3be4 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,6 +17,7 @@ pytest-mock==1.10.0 pytest-cov==2.5.1 tabulate==0.8.2 coinmarketcap==5.0.3 +ujson==1.35 # Required for hyperopt scikit-optimize==0.5.2