Add 永期半自动: human arm, machine open/close, then stop.

Settings toggle, Plan panel, Fleet monitor, exit locks and armed TOCTOU gates; docs and dual audits.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-08-08 11:20:11 +08:00
parent bf3441537e
commit 4585dba3c3
22 changed files with 1147 additions and 44 deletions
+8
View File
@@ -95,6 +95,14 @@ class Settings(BaseSettings):
# 固定方向:关=现有 ATM/比价规则;开=指定永续多/空,期权 Put/Call 且须实值或平值
fixed_direction_enabled: bool = False
fixed_perp_side: str = "long" # long|shortlong→买Putshort→买Call
# 半自动:系统设置开关;首页授权后盯开盯平,平完停
semi_auto_enabled: bool = False
semi_armed: bool = False # 是否已授权本单(平完清零)
semi_view_side: str = "long" # long=买Call+永续空;short=买Put+永续多
semi_option_move_points: float = 50.0 # 顺方向:标的波动点数
semi_perp_exit_unit: float = 5.0 # 净利出场基数(×k
semi_min_option_hours: float = 30.0
semi_min_option_leverage: float = 100.0
close_bid_mark_max_pct: float = 30.0 # 平仓:买一相对标记最大偏差%
# 残留期权中途平:当前买一权利金 ≥ 初始权利金 × 该% 才尝试卖出
residual_min_premium_pct: float = 20.0