fix bug
This commit is contained in:
@@ -8,7 +8,6 @@ from libs import calc_buy_volume
|
||||
from sdk import OP_BUY
|
||||
from .runtime import Runtime
|
||||
from .order import PlaceOrderRequest
|
||||
from .state import STATUS_ING, StateItem
|
||||
import logging as log
|
||||
|
||||
|
||||
@@ -88,16 +87,11 @@ def do_open(run: Runtime, code: str, volume: int, signal_key: str, price: float)
|
||||
volume,
|
||||
order_id,
|
||||
signal_key,
|
||||
kind="base",
|
||||
)
|
||||
if not run.orders.place(request):
|
||||
raise RuntimeError("订单提交失败")
|
||||
|
||||
run.state.set(StateItem(
|
||||
code=code,
|
||||
base_order_id=order_id,
|
||||
base_status=STATUS_ING,
|
||||
))
|
||||
run.state.save()
|
||||
run.open_watch.forget(code)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user