Implement dual target-close paths and residual option expiry.

Document and enforce: A full dual-leg close, B perp-only when deep OTM with residual archive that does not block next open, and expiry settlement when target is missed.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-07-26 18:32:05 +08:00
parent 96e8e5cb70
commit 4994aaab16
14 changed files with 595 additions and 118 deletions
+15 -1
View File
@@ -134,7 +134,8 @@ export default function PlanPage() {
<p style={{ color: "var(--muted)", marginTop: -8 }}>
SIM · {" "}
{(snap?.exchange || "okx").toUpperCase()}
{snap?.perp_inst_id ? ` · ${snap.perp_inst_id}` : ""} ·
{snap?.perp_inst_id ? ` · ${snap.perp_inst_id}` : ""} ·
(/) ·
</p>
{err ? <div className="err">{err}</div> : null}
@@ -228,6 +229,19 @@ export default function PlanPage() {
<span></span>
<span className="mono">{pos?.group_id || "—"}</span>
</div>
<div className="kv">
<span>()</span>
<span className="mono">
{plan?.residuals && plan.residuals.length > 0
? plan.residuals
.map(
(r) =>
`${r.group_id}:${r.option_inst_id || "?"}@${r.expiry_ymd || "?"}`
)
.join(" · ")
: "无"}
</span>
</div>
<div className="kv">
<span></span>
<span className="mono">{biasTag}</span>