Provide strategy timeframe via API
This commit is contained in:
@@ -471,6 +471,7 @@ class FreqAIModelListResponse(BaseModel):
|
|||||||
class StrategyResponse(BaseModel):
|
class StrategyResponse(BaseModel):
|
||||||
strategy: str
|
strategy: str
|
||||||
code: str
|
code: str
|
||||||
|
timeframe: Optional[str]
|
||||||
|
|
||||||
|
|
||||||
class AvailablePairs(BaseModel):
|
class AvailablePairs(BaseModel):
|
||||||
|
|||||||
@@ -350,6 +350,7 @@ def get_strategy(strategy: str, config=Depends(get_config)):
|
|||||||
return {
|
return {
|
||||||
'strategy': strategy_obj.get_strategy_name(),
|
'strategy': strategy_obj.get_strategy_name(),
|
||||||
'code': strategy_obj.__source__,
|
'code': strategy_obj.__source__,
|
||||||
|
'timeframe': getattr(strategy_obj, 'timeframe', None),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user