This commit is contained in:
2026-09-10 20:38:00 +08:00
parent 2b6fe2ffbc
commit 1255ab21ba
3 changed files with 5 additions and 5 deletions

View File

@@ -80,7 +80,8 @@ def do_open(
run: Runtime, code: str, volume: int, signal_key: str, price: float
) -> None:
"""生成本地订单号并按最新价提交开仓委托。"""
order_id = run.orders.new_order_id("BUY")
prefix = signal_key[:4].upper()
order_id = run.orders.new_order_id(prefix,"BUY")
request = PlaceOrderRequest(
OP_BUY,
code,