修复期权到期结算漏推企业微信:页面同步与模拟盘结算一并通知。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
dekun
2026-10-06 16:08:49 +08:00
parent d743185f05
commit 95e713e9e6
4 changed files with 101 additions and 1 deletions
+12 -1
View File
@@ -63,6 +63,12 @@ def install_options_trading(app: Flask, repo_root: str, app_module: Any) -> None
patch_options_cfg(cfg)
except Exception:
pass
try:
from lib.options.options_notify_lib import bind_options_notify_cfg
bind_options_notify_cfg(cfg)
except Exception:
pass
app.extensions["options_cfg"] = cfg
register_options_routes(app, cfg)
_register_options_hub_bridge(app, cfg)
@@ -438,7 +444,12 @@ def _sync_options_trades(
try:
init_options_tables(conn)
reconcile_live_open_trades(conn, live_inst_ids=live_ids)
sync_open_options_trades(conn, live_inst_ids=live_ids, fetch_history_fn=_hist)
sync_open_options_trades(
conn,
live_inst_ids=live_ids,
fetch_history_fn=_hist,
notify_cfg=cfg,
)
try:
hist_all = fetch_all_option_positions_history(ex, limit=200)
backfill_closed_options_realized_pnl_from_history(conn, hist_all)