chore: add user friendly warnings
This commit is contained in:
@@ -142,17 +142,21 @@ async def _fetch_ohlcv(
|
|||||||
# https://github.com/freqtrade/freqtrade/blob/acc53065e5fa7ab5197073276306dc9dc3adbfa3/tests/exchange_online/test_binance_compare_ohlcv.py#L7
|
# https://github.com/freqtrade/freqtrade/blob/acc53065e5fa7ab5197073276306dc9dc3adbfa3/tests/exchange_online/test_binance_compare_ohlcv.py#L7
|
||||||
if current_day == 1:
|
if current_day == 1:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
"Failed to use fast download, fall back to rest API download, this "
|
f"Fast download is unavailable due to missing data: "
|
||||||
"can take more time. If you're downloading BTC/USDT:USDT, "
|
f"{result.url}. Falling back to the slower REST API, "
|
||||||
"ETH/USDT:USDT, BCH/USDT:USDT, please first download "
|
"which may take more time."
|
||||||
"data before 2020 (using `--timerange yyyymmdd-20200101`), and "
|
|
||||||
"then download the full data you need."
|
|
||||||
)
|
)
|
||||||
|
if pair in ["BTC/USDT:USDT", "ETH/USDT:USDT", "BCH/USDT:USDT"]:
|
||||||
|
logger.warning(
|
||||||
|
f"To avoid the delay, you can first download {pair} using "
|
||||||
|
"`--timerange <start date>-20200101`, and then download the "
|
||||||
|
"remaining data with `--timerange 20200101-<end date>`."
|
||||||
|
)
|
||||||
else:
|
else:
|
||||||
logger.warning(
|
logger.warning(
|
||||||
f"Binance fast download for {pair} stopped at {result.date} due to"
|
f"Binance fast download for {pair} stopped at {result.date} due to "
|
||||||
f"data missing: {result.url}, fall back to rest API for the "
|
f"missing data: {result.url}, falling back to rest API for the "
|
||||||
"remaining data download, this can take more time."
|
"remaining data, this can take more time."
|
||||||
)
|
)
|
||||||
await cancel_uncompleted_tasks(tasks)
|
await cancel_uncompleted_tasks(tasks)
|
||||||
return concat(dfs)
|
return concat(dfs)
|
||||||
|
|||||||
Reference in New Issue
Block a user