feat: API+UI近5年区间切换(补)
This commit is contained in:
@@ -535,10 +535,11 @@ def get_tracking():
|
||||
|
||||
@app.route("/api/research/strategies")
|
||||
def api_research_strategies():
|
||||
"""策略版本列表(含回测结果摘要)"""
|
||||
"""策略版本列表(含回测结果摘要,支持 period_tag 区间过滤)"""
|
||||
try:
|
||||
from strategy_lab import list_strategies
|
||||
return jsonify({'strategies': list_strategies()})
|
||||
pt = request.args.get('period_tag')
|
||||
return jsonify({'strategies': list_strategies(period_tag=pt)})
|
||||
except Exception as e:
|
||||
return jsonify({'error': str(e)}), 500
|
||||
|
||||
|
||||
Reference in New Issue
Block a user