Allow setting identifier via UI

This commit is contained in:
Matthias 2022-12-20 19:44:01 +01:00
parent 07606a9e23
commit 70531224e6
2 changed files with 7 additions and 0 deletions

View File

@ -38,6 +38,8 @@ async def api_start_backtest(bt_settings: BacktestRequest, background_tasks: Bac
btconfig = deepcopy(config)
settings = dict(bt_settings)
if 'freqai' in settings:
settings['freqai'] = dict(settings['freqai'])
# Pydantic models will contain all keys, but non-provided ones are None
btconfig = deep_merge_dicts(settings, btconfig, allow_null_overrides=False)

View File

@ -414,6 +414,10 @@ class PairHistory(BaseModel):
}
class BacktestFreqAIInputs(BaseModel):
identifier: str
class BacktestRequest(BaseModel):
strategy: str
timeframe: Optional[str]
@ -425,6 +429,7 @@ class BacktestRequest(BaseModel):
dry_run_wallet: Optional[float]
backtest_cache: Optional[str]
freqaimodel: Optional[str]
freqai: Optional[BacktestFreqAIInputs]
class BacktestResponse(BaseModel):