| | |
| | | |
| | | __canceling_order_dict = {} |
| | | |
| | | __canceled_order_ids = set() |
| | | |
| | | |
| | | def cancel_order(direction, code, orderSysID, orderRef=None, blocking=False, sinfo=None, request_id=None, |
| | | recancel=False): |
| | |
| | | # 集合竞价不撤单 |
| | | return |
| | | |
| | | # 防止重复撤单 |
| | | if orderSysID: |
| | | if orderSysID in __canceled_order_ids: |
| | | return |
| | | __canceled_order_ids.add(orderSysID) |
| | | if not recancel: |
| | | CancelOrderManager().start_cancel(code, orderRef, orderSysID) |
| | | if not sinfo: |
| | |
| | | try: |
| | | return __read_response(request_id, blocking) |
| | | finally: |
| | | # huaxin_trade_data_update.add_delegate_list("撤单") |
| | | huaxin_trade_data_update.add_delegate_list("撤单", delay=0.1) |
| | | huaxin_trade_data_update.add_money_list() |
| | | |
| | | |