feat中控市价单:实例按第一档实值与杠杆立即全仓开仓。

EOF

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-11-03 18:50:46 +08:00
parent 4e14c92385
commit 8a29f2d51b
6 changed files with 947 additions and 1 deletions
+7
View File
@@ -1546,6 +1546,7 @@ def _start_monitor_thread(app: Flask, cfg: dict[str, Any]) -> None:
def _cond_order_tick(_conn=None) -> None:
from lib.options.options_cond_order_lib import run_cond_orders_tick
from lib.options.options_market_order_lib import run_market_orders_tick
# 传 get_db:条件单开仓前会释放连接,避免嵌套锁库
run_cond_orders_tick(
@@ -1554,6 +1555,12 @@ def _start_monitor_thread(app: Flask, cfg: dict[str, Any]) -> None:
send_wechat=cfg.get("send_wechat"),
account_label=str(cfg.get("account_label") or ""),
)
run_market_orders_tick(
cfg["get_db"],
cfg,
send_wechat=cfg.get("send_wechat"),
account_label=str(cfg.get("account_label") or ""),
)
t = threading.Thread(
target=options_monitor_loop,