我要获得order.status然后来撤单,但是半天都收不到,请教一下是什么原因呢
async with api.register_update_notify([quote, order]) as update_chan:
async for _ in update_chan:
if order and order.status == “ALIVE” and (quote.bid_price1 > order.limit_price:
print(symbol, direction,order.status, quote.bid_price1 > order.limit_price, “价格改变,撤单重下”)
api.cancel_order(order)
if api.is_changing(order, “status”):
break
if api.is_changing(order, “status”):
break
别用这个判断,今天我也是用这个判断坑了我一天,至今也找不到毛病,用quote,last_price判断更新轮训吧