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,
|
||||
until_ms=until_ms if until_ms else None,
|
||||
)
|
||||
logger.info(f"Downloaded data for {pair} with length {len(new_dataframe)}.")
|
||||
if data.empty:
|
||||
data = new_dataframe
|
||||
else:
|
||||
|
||||
@@ -60,8 +60,8 @@ async def fetch_ohlcv(
|
||||
if start >= end:
|
||||
return DataFrame()
|
||||
df = await _fetch_ohlcv(asset_type, symbol, timeframe, start, end, stop_on_404)
|
||||
logger.info(
|
||||
f"Downloaded data for {pair} from https://data.binance.vision/ with length {len(df)}."
|
||||
logger.debug(
|
||||
f"Downloaded data for {pair} from https://data.binance.vision with length {len(df)}."
|
||||
)
|
||||
except Exception as e:
|
||||
logger.debug("An exception occurred", exc_info=e)
|
||||
|
||||
@@ -2246,7 +2246,7 @@ class Exchange:
|
||||
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)
|
||||
|
||||
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("exchange_name", EXCHANGES)
|
||||
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)
|
||||
pair = "ETH/BTC"
|
||||
calls = 0
|
||||
|
||||
Reference in New Issue
Block a user