feat: 全链路新增 type 字段支持 + exchange.ts 超时退出优化
- TS: exit 函数统一管理进程退出与 DB 连接关闭;10s 超时 + 异常路径 clearTimeout - Python: PairType(spot/um/cm) 贯穿 Kline 模型、策略配置、数据查询 - 回测脚本升级: 9策略 × 4币种 × 6时间级别 × 2交易类型 - 新增 generate_report.py 回测报告生成工具
This commit is contained in:
@@ -29,6 +29,7 @@ class StrategyConfig(BaseModel):
|
||||
name: str = ""
|
||||
symbol: str = ""
|
||||
exchange: str = "binance"
|
||||
type: str = "spot" # 交易对类型:spot / um / cm
|
||||
enabled: bool = True
|
||||
max_position_pct: float = 0.1 # 最大仓位占总资金比例
|
||||
stop_loss_pct: Optional[float] = None # 止损百分比
|
||||
|
||||
Reference in New Issue
Block a user