实例期权页增加中控条件单卡片,接单后显示状态与触发参数。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-04 18:39:47 +08:00
parent 8b584a0870
commit e11651d729
6 changed files with 164 additions and 12 deletions
+3
View File
@@ -1505,6 +1505,7 @@ def register_options_routes(app: Flask, cfg: dict[str, Any]) -> None:
spot_sell_hint = None
cond_locked = False
cond_msg = ""
cond_order = None
try:
from lib.options.options_cond_order_lib import has_active_cond_order, list_cond_orders
@@ -1515,6 +1516,7 @@ def register_options_routes(app: Flask, cfg: dict[str, Any]) -> None:
if cond_locked:
act = list_cond_orders(conn_c, active_only=True)
if act:
cond_order = act[0]
cond_msg = str(act[0].get("message") or act[0].get("status") or "")
finally:
conn_c.close()
@@ -1527,6 +1529,7 @@ def register_options_routes(app: Flask, cfg: dict[str, Any]) -> None:
"spot_sell": spot_sell_hint,
"cond_order_locked": cond_locked,
"cond_order_msg": cond_msg,
"cond_order": cond_order,
}
)