diff --git a/freqtrade/exchange/__init__.py b/freqtrade/exchange/__init__.py index 03acc2e61..243badfcb 100644 --- a/freqtrade/exchange/__init__.py +++ b/freqtrade/exchange/__init__.py @@ -525,7 +525,7 @@ class Exchange(object): for p, ticker in tickers: if p == pair: data.extend(ticker) - # Sort data again after extending the result - above calls return in "async order" order + # Sort data again after extending the result - above calls return in "async order" data = sorted(data, key=lambda x: x[0]) logger.info("downloaded %s with length %s.", pair, len(data)) return data @@ -535,7 +535,7 @@ class Exchange(object): """ Refresh in-memory ohlcv asyncronously and set `_klines` with the result """ - logger.debug("Refreshing klines for %d pairs", len(pair_list)) + logger.debug("Refreshing ohlcv data for %d pairs", len(pair_list)) # Calculating ticker interval in second interval_in_sec = constants.TICKER_INTERVAL_MINUTES[ticker_interval] * 60 @@ -547,7 +547,7 @@ class Exchange(object): arrow.utcnow().timestamp and pair in self._klines): input_coroutines.append(self._async_get_candle_history(pair, ticker_interval)) else: - logger.debug("Using cached klines data for %s ...", pair) + logger.debug("Using cached ohlcv data for %s ...", pair) tickers = asyncio.get_event_loop().run_until_complete( asyncio.gather(*input_coroutines, return_exceptions=True)) diff --git a/freqtrade/tests/exchange/test_exchange.py b/freqtrade/tests/exchange/test_exchange.py index e0be9a4bb..ee53f5cdd 100644 --- a/freqtrade/tests/exchange/test_exchange.py +++ b/freqtrade/tests/exchange/test_exchange.py @@ -807,7 +807,7 @@ def test_refresh_latest_ohlcv(mocker, default_conf, caplog) -> None: assert not exchange._klines exchange.refresh_latest_ohlcv(['IOTA/ETH', 'XRP/ETH'], '5m') - assert log_has(f'Refreshing klines for {len(pairs)} pairs', caplog.record_tuples) + assert log_has(f'Refreshing ohlcv data for {len(pairs)} pairs', caplog.record_tuples) assert exchange._klines assert exchange._api_async.fetch_ohlcv.call_count == 2 for pair in pairs: @@ -825,7 +825,7 @@ def test_refresh_latest_ohlcv(mocker, default_conf, caplog) -> None: exchange.refresh_latest_ohlcv(['IOTA/ETH', 'XRP/ETH'], '5m') assert exchange._api_async.fetch_ohlcv.call_count == 2 - assert log_has(f"Using cached klines data for {pairs[0]} ...", caplog.record_tuples) + assert log_has(f"Using cached ohlcv data for {pairs[0]} ...", caplog.record_tuples) @pytest.mark.asyncio @@ -854,7 +854,7 @@ async def test__async_get_candle_history(default_conf, mocker, caplog): assert res[0] == pair assert res[1] == tick assert exchange._api_async.fetch_ohlcv.call_count == 1 - assert not log_has(f"Using cached klines data for {pair} ...", caplog.record_tuples) + assert not log_has(f"Using cached ohlcv data for {pair} ...", caplog.record_tuples) # exchange = Exchange(default_conf) await async_ccxt_exception(mocker, default_conf, MagicMock(),