fix bug
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user