fix: Set use_db for historic analysis

closes #12390
This commit is contained in:
Matthias
2025-10-15 18:27:20 +02:00
parent 4cf736911d
commit bdd60ecbbd

View File

@@ -1557,12 +1557,19 @@ class RPC:
selected_cols: list[str] | None,
live: bool,
) -> dict[str, Any]:
"""
Analyzed dataframe in Dict form, with full history loading and strategy analysis.
Loads the full history from disk or exchange, and runs the strategy analysis on it.
Should only be used in webserver mode, as it can interfere with a running bot.
"""
timerange_parsed = TimeRange.parse_timerange(config.get("timerange"))
from freqtrade.data.converter import trim_dataframe
from freqtrade.data.dataprovider import DataProvider
from freqtrade.persistence.usedb_context import FtNoDBContext
from freqtrade.resolvers.strategy_resolver import StrategyResolver
with FtNoDBContext():
strategy_name = ""
startup_candles = 0
if config.get("strategy"):