Preflight options position limit for dual-leg OO hedges.

Reject OO start when max active is under 2 free slots so limit=1 cannot open a half straddle.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-30 08:17:17 +08:00
parent 94c65cbd6e
commit f9c2a63cbc
5 changed files with 94 additions and 10 deletions
+1 -1
View File
@@ -133,7 +133,7 @@ _OPTIONS_SECTION: dict[str, Any] = {
(
"OKX_OPTIONS_MAX_ACTIVE_POSITIONS",
"期权持仓上限(笔)",
"默认 0=不限制;按交易所当前期权合约笔数计数,达上限禁止新开买(同合约加仓仍允许)",
"默认 0=不限制;按交易所期权合约笔数计数.期期对冲一次需 2 笔,上限设 1 时无法开期期(须≥2 或 0).同合约加仓不占新笔数.",
),
("OKX_OPTIONS_DEFAULT_UNDERLY", "默认标的", "如 ETH"),
(