3.52K 浏览
0

我要获得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

chengxiaohui321 已回答的问题 2021年2月1日
0

if api.is_changing(order, “status”):
break

别用这个判断,今天我也是用这个判断坑了我一天,至今也找不到毛病,用quote,last_price判断更新轮训吧

chengxiaohui321 已回答的问题 2021年2月1日
您正在查看2个答案中的1个,单击此处查看所有答案。