Provide strategy timeframe via API

This commit is contained in:
Matthias
2023-12-17 15:00:57 +01:00
parent 546ea430c9
commit 67cdab6ee9
2 changed files with 2 additions and 0 deletions

View File

@@ -471,6 +471,7 @@ class FreqAIModelListResponse(BaseModel):
class StrategyResponse(BaseModel):
strategy: str
code: str
timeframe: Optional[str]
class AvailablePairs(BaseModel):

View File

@@ -350,6 +350,7 @@ def get_strategy(strategy: str, config=Depends(get_config)):
return {
'strategy': strategy_obj.get_strategy_name(),
'code': strategy_obj.__source__,
'timeframe': getattr(strategy_obj, 'timeframe', None),
}