Overview
The Order Cancel Reject message (MsgType ="9") is sent by the gateway when a cancellation request cannot be processed. This typically occurs when an order is already filled, expired, or in a non-cancellable state.
Field Layout
| Tag | Field | Description | Required | Type | Values |
|---|---|---|---|---|---|
| 11 | ClOrdID | Identifier of the cancel request | Y | String | |
| 17 | ExecId | Execution ID assigned by the gateway | Y | String | |
| 37 | OrderId | OrderId assigned by the gateway | Y | String | |
| 39 | OrdStatus | Current order status | Y | Char | 8=Rejected |
| 41 | OrigClOrdID | ClOrdID of the order that could not be cancelled | Y | String | |
| 58 | Text | Reason for rejection (free text) | N | String | |
| 434 | CxlRejResponseTo | Type of request being rejected | Y | Int | 1=Order Cancel Request |
Example Message
Handling Cancel Rejects
- Review Tag 58 (Text) for the human-readable rejection reason
- The original order maintains its current state — use Order Status Request to verify if needed
- Common rejection causes: order already filled, order already cancelled, order expired, or invalid OrderId
REST Equivalent
The REST cancel endpoint (POST /api/external/cancel) provides similar functionality, returning error details when cancellation fails.