vn.py官网
开源量化社区
Member
avatar
加入于:
帖子: 34
声望: 3

提交一个挂单,然后再撤单,收到的订单回报正确顺序应该为: 提交中,未成交,已撤单。
但是,发现在收到已撤单前一瞬间,会收到上一个未成交信息的重复推送,变成了:提交中,未成交,未成交,已撤单
请问是我改代码的原因,还是版本的原因? 2.1.1版本。
不知道部分成交撤单会不会出现类似情况

2021-06-25 10:12:48,083  INFO: 行情服务器连接成功
2021-06-25 10:12:48,083  INFO: 交易服务器连接成功
2021-06-25 10:12:48,349  INFO: 交易服务器授权验证成功
2021-06-25 10:12:48,349  INFO: 行情服务器登录成功
2021-06-25 10:12:48,364  INFO: 交易服务器登录成功
2021-06-25 10:12:49,833  INFO: 结算信息确认成功
2021-06-25 10:12:56,552  INFO: 合约信息查询成功
2021-06-25 10:13:01,521  INFO: CTA策略引擎初始化成功
2021-06-25 10:13:05,755  INFO: in_mark_long pp2109开始执行初始化
2021-06-25 10:13:05,755  INFO: in_mark_long pp2109: 策略初始化
2021-06-25 10:13:05,755  INFO: in_mark_long pp2109初始化完成
2021-06-25 10:13:06,224  INFO: in_mark_long pp2109: 策略启动
2021-06-25 10:13:23,786  INFO: cta_engine strategy.name:in_mark_long pp2109
2021-06-25 10:13:23,786  INFO: in_mark_long pp2109: on_order:OrderData(gateway_name='CTP', symbol='pp2109', exchange=<Exchange.DCE: 'DCE'>, orderid='21_331284613_000000001432', type=<OrderType.LIMIT: '限价'>, direction=<Direction.LONG: '多'>, offset=<Offset.OPEN: '开'>, price=8495.0, volume=1, traded=0, status=<Status.SUBMITTING: '提交中'>, datetime=datetime.datetime(2021, 6, 25, 10, 13, 23, tzinfo=<DstTzInfo 'Asia/Shanghai' CST+8:00:00 STD>), reference='')
2021-06-25 10:13:23,786  INFO: in_mark_long pp2109: local_pos:0, pos:0
2021-06-25 10:13:23,786  INFO: in_mark_long pp2109: buy_orderids:['CTP.21_331284613_000000001432'], sell_orderids:[],             short_orderids:[], cover_orderids:[]
2021-06-25 10:13:23,864  INFO: in_mark_long pp2109: on_order:OrderData(gateway_name='CTP', symbol='pp2109', exchange=<Exchange.DCE: 'DCE'>, orderid='21_331284613_000000001432', type=<OrderType.LIMIT: '限价'>, direction=<Direction.LONG: '多'>, offset=<Offset.OPEN: '开'>, price=8495.0, volume=1, traded=0, status=<Status.NOTTRADED: '未成交'>, datetime=datetime.datetime(2021, 6, 25, 10, 13, 22, tzinfo=<DstTzInfo 'Asia/Shanghai' CST+8:00:00 STD>), reference='')
2021-06-25 10:13:23,864  INFO: in_mark_long pp2109: local_pos:0, pos:0
2021-06-25 10:13:23,873  INFO: in_mark_long pp2109: buy_orderids:['CTP.21_331284613_000000001432'], sell_orderids:[],             short_orderids:[], cover_orderids:[]
2021-06-25 10:13:46,114  INFO: in_mark_long pp2109: on_order:OrderData(gateway_name='CTP', symbol='pp2109', exchange=<Exchange.DCE: 'DCE'>, orderid='21_331284613_000000001432', type=<OrderType.LIMIT: '限价'>, direction=<Direction.LONG: '多'>, offset=<Offset.OPEN: '开'>, price=8495.0, volume=1, traded=0, status=<Status.NOTTRADED: '未成交'>, datetime=datetime.datetime(2021, 6, 25, 10, 13, 22, tzinfo=<DstTzInfo 'Asia/Shanghai' CST+8:00:00 STD>), reference='')
2021-06-25 10:13:46,114  INFO: in_mark_long pp2109: local_pos:0, pos:0
2021-06-25 10:13:46,114  INFO: in_mark_long pp2109: buy_orderids:['CTP.21_331284613_000000001432'], sell_orderids:[],             short_orderids:[], cover_orderids:[]
2021-06-25 10:13:46,177  INFO: in_mark_long pp2109: on_order:OrderData(gateway_name='CTP', symbol='pp2109', exchange=<Exchange.DCE: 'DCE'>, orderid='21_331284613_000000001432', type=<OrderType.LIMIT: '限价'>, direction=<Direction.LONG: '多'>, offset=<Offset.OPEN: '开'>, price=8495.0, volume=1, traded=0, status=<Status.CANCELLED: '已撤销'>, datetime=datetime.datetime(2021, 6, 25, 10, 13, 22, tzinfo=<DstTzInfo 'Asia/Shanghai' CST+8:00:00 STD>), reference='')
2021-06-25 10:13:46,177  INFO: in_mark_long pp2109: local_pos:0, pos:0
2021-06-25 10:13:46,177  INFO: in_mark_long pp2109: ask_price:8508.0, bid_price:8507.0,             ask_volume:59, bid_volume:12
2021-06-25 10:13:46,177  INFO: in_mark_long pp2109: on_order算法补单
2021-06-25 10:13:46,177  INFO: in_mark_long pp2109: buy_orderids:[], sell_orderids:[],             short_orderids:[], cover_orderids:[]
Administrator
avatar
加入于:
帖子: 4887
声望: 284

有可能,部分接口的委托状态推送规则不是完全一致的

© 2015-2019 上海韦纳软件科技有限公司
备案服务号:沪ICP备18006526号-3

沪公网安备 31011502017034号