Add end-plan action; never show unfilled option legs as open.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -201,7 +201,12 @@ def legs_contract_summary(legs: list[dict[str, Any]]) -> str:
|
||||
for leg in legs:
|
||||
role = str(leg.get("leg_role") or "")
|
||||
st = str(leg.get("status") or "").strip().lower()
|
||||
suffix = "(待补)" if st == "pending" else ""
|
||||
if st == "pending":
|
||||
suffix = "(待补)"
|
||||
elif st in ("cancelled", "canceled"):
|
||||
suffix = "(未成交)"
|
||||
else:
|
||||
suffix = ""
|
||||
if role == "perp":
|
||||
name = str(leg.get("symbol") or "永续")
|
||||
parts.append(f"永续 {name}{suffix}")
|
||||
|
||||
Reference in New Issue
Block a user