| | |
| | | return end_index |
| | | |
| | | @classmethod |
| | | def is_canceled(cls, code, index, total_datas, canceled_buyno_map, trade_index, deal_order_nos): |
| | | def is_canceled(cls, code, index, total_datas, canceled_buyno_map, dealing_buy_order_no, deal_order_nos): |
| | | """ |
| | | 是否已经撤单 |
| | | @param deal_order_nos: 成交大单集合 |
| | | @param trade_index: 成交进度位 |
| | | @param dealing_buy_order_no: 正在成交的买单号 |
| | | @param index: 索引 |
| | | @param code: 代码 |
| | | @param total_datas: |
| | |
| | | # 已经撤单 |
| | | return cancel_data |
| | | else: |
| | | if trade_index and trade_index > index: |
| | | # 正在成交的买单号大于挂的买单 |
| | | orderNo = total_datas[index]['val']['orderNo'] |
| | | if dealing_buy_order_no and orderNo < dealing_buy_order_no: |
| | | # 成交进度大于索引位置,且还没成交 |
| | | if total_datas[index]["val"]["orderNo"] not in deal_order_nos: |
| | | if orderNo not in deal_order_nos: |
| | | return total_datas[index] |
| | | return None |