| | |
| | | accountID = data["accountID"] |
| | | orderSysID = data["orderSysID"] |
| | | sinfo = data["sinfo"] |
| | | async_log_util.info(logger_trade, f"API撤单: {data}") |
| | | if orderSysID: |
| | | result = huaxin_trade_api.cancel_order(direction, code, orderSysID, sinfo=sinfo, |
| | | blocking=True, request_id=request_id) |
| | |
| | | msg_list.append(f"无法撤买单") |
| | | else: |
| | | msg_list.append(f"已撤买单") |
| | | async_log_util.info(logger_trade, f"API撤单结果: {msg_list}") |
| | | self.send_response({"code": 0, "data": {"code": 0, "msg": ";".join(msg_list)}}, client_id, |
| | | request_id) |
| | | except Exception as e: |