Fix sim pending-orders wrapper to accept positional inst_id.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+3
-2
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user