From fed51035de31000628f60fc301a9fcf0acf39eb9 Mon Sep 17 00:00:00 2001 From: dekun Date: Fri, 14 Aug 2026 19:23:33 +0800 Subject: [PATCH] Fix sim pending-orders wrapper to accept positional inst_id. Co-authored-by: Cursor --- lib/sim/hooks.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/sim/hooks.py b/lib/sim/hooks.py index df999e5..f677093 100644 --- a/lib/sim/hooks.py +++ b/lib/sim/hooks.py @@ -431,11 +431,12 @@ def patch_options_cfg(cfg: dict[str, Any]) -> dict[str, Any]: live_pending = cfg.get("fetch_option_pending_orders") - def fetch_option_pending_orders(ex, **kwargs): + def fetch_option_pending_orders(ex, inst_id=None, **kwargs): + # 调用方多为 (ex, inst_id) 位置参数, 不可只收 **kwargs if is_sim_mode(get_db): return [] if callable(live_pending): - return live_pending(ex, **kwargs) + return live_pending(ex, inst_id) return [] if "fetch_option_pending_orders" in cfg: