This commit is contained in:
2026-09-05 14:30:16 +08:00
parent 2059f87fe5
commit ba1bd93afa
4 changed files with 7 additions and 20 deletions

View File

@@ -81,7 +81,6 @@ def do_open(run: Runtime, code: str, volume: int, signal_key: str, price: float)
"""生成本地订单号并按最新价提交开仓委托。"""
order_id = run.orders.new_order_id()
request = PlaceOrderRequest(
run.client,
OP_BUY,
code,
volume,
@@ -89,7 +88,7 @@ def do_open(run: Runtime, code: str, volume: int, signal_key: str, price: float)
signal_key,
kind="base",
)
if not run.orders.place(request):
if not run.orders.place(run.client,request):
raise RuntimeError("订单提交失败")
run.open_watch.forget(code)