mirror of
https://github.com/freqtrade/freqtrade.git
synced 2025-11-29 08:33:07 +00:00
refactor: move download klines count message
This commit is contained in:
@@ -284,6 +284,7 @@ def _download_pair_history(
|
|||||||
candle_type=candle_type,
|
candle_type=candle_type,
|
||||||
until_ms=until_ms if until_ms else None,
|
until_ms=until_ms if until_ms else None,
|
||||||
)
|
)
|
||||||
|
logger.info(f"Downloaded data for {pair} with length {len(new_dataframe)}.")
|
||||||
if data.empty:
|
if data.empty:
|
||||||
data = new_dataframe
|
data = new_dataframe
|
||||||
else:
|
else:
|
||||||
|
|||||||
@@ -60,8 +60,8 @@ async def fetch_ohlcv(
|
|||||||
if start >= end:
|
if start >= end:
|
||||||
return DataFrame()
|
return DataFrame()
|
||||||
df = await _fetch_ohlcv(asset_type, symbol, timeframe, start, end, stop_on_404)
|
df = await _fetch_ohlcv(asset_type, symbol, timeframe, start, end, stop_on_404)
|
||||||
logger.info(
|
logger.debug(
|
||||||
f"Downloaded data for {pair} from https://data.binance.vision/ with length {len(df)}."
|
f"Downloaded data for {pair} from https://data.binance.vision with length {len(df)}."
|
||||||
)
|
)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
logger.debug("An exception occurred", exc_info=e)
|
logger.debug("An exception occurred", exc_info=e)
|
||||||
|
|||||||
@@ -2246,7 +2246,7 @@ class Exchange:
|
|||||||
candle_type=candle_type,
|
candle_type=candle_type,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
logger.info(f"Downloaded data for {pair} from ccxt with length {len(data)}.")
|
logger.debug(f"Downloaded data for {pair} from ccxt with length {len(data)}.")
|
||||||
return ohlcv_to_dataframe(data, timeframe, pair, fill_missing=False, drop_incomplete=True)
|
return ohlcv_to_dataframe(data, timeframe, pair, fill_missing=False, drop_incomplete=True)
|
||||||
|
|
||||||
async def _async_get_historic_ohlcv(
|
async def _async_get_historic_ohlcv(
|
||||||
|
|||||||
@@ -2092,6 +2092,7 @@ def test___now_is_time_to_refresh(default_conf, mocker, exchange_name, time_mach
|
|||||||
@pytest.mark.parametrize("candle_type", ["mark", ""])
|
@pytest.mark.parametrize("candle_type", ["mark", ""])
|
||||||
@pytest.mark.parametrize("exchange_name", EXCHANGES)
|
@pytest.mark.parametrize("exchange_name", EXCHANGES)
|
||||||
def test_get_historic_ohlcv(default_conf, mocker, caplog, exchange_name, candle_type):
|
def test_get_historic_ohlcv(default_conf, mocker, caplog, exchange_name, candle_type):
|
||||||
|
caplog.set_level(logging.DEBUG)
|
||||||
exchange = get_patched_exchange(mocker, default_conf, exchange=exchange_name)
|
exchange = get_patched_exchange(mocker, default_conf, exchange=exchange_name)
|
||||||
pair = "ETH/BTC"
|
pair = "ETH/BTC"
|
||||||
calls = 0
|
calls = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user