A cTrader order-cancel request is an instruction to cancel, not proof that the pending order has disappeared. Wait for the execution event, inspect the order status and check whether any deal was recorded before you send a replacement.
What confirms a cTrader cancellation?
The Open API separates the operation reported by an event from the order's status. Its execution-event values include ORDER_CANCELLED and ORDER_CANCEL_REJECTED; the order-status list separately defines ORDER_STATUS_CANCELLED. The labels are similar, but they answer different questions: did the cancellation happen, or was the request rejected? See cTrader's execution and order status enums.
A cancel request uses ProtoOACancelOrderReq with the trading-account ID and order ID. cTrader documents ProtoOAExecutionEvent as a response to that request; the event can include an order, a deal, or neither as optional fields. So do not treat an API call returning control to your code as the terminal order state. Read the cancel request and execution event definitions.
| Record you receive | What it tells you | What to check next |
|---|---|---|
ORDER_CANCELLED | The event reports a cancellation operation. | Read the order's status and inspect related deal records. |
ORDER_CANCEL_REJECTED | The cancel request was rejected; it does not mean the order was canceled. | Reconcile the order's current state before deciding what to do. |
ORDER_STATUS_CANCELLED | The order is reported as canceled. | Check executed volume and deals; canceled status alone may not mean zero fills. |
Why can a canceled order still have a fill?
A canceled order can have an executed portion. cTrader's status reference explicitly says ORDER_STATUS_CANCELLED may apply when a liquidity provider cancels an order that was partially filled. That is why the status is not a substitute for reading executed volume and the order's associated deals. cTrader's order-status documentation describes this case.
The distinction is familiar in other order protocols, but protocol details are not interchangeable. In the FIX standard, Pending Cancel means a cancellation request is being processed; it does not mean the order is canceled, and a fill can be reported while the request is pending. That standard is not evidence that cTrader implements FIX. It illustrates the general execution race that makes an unconfirmed cancel unsafe to treat as final. See the FIX Execution Report state definitions.
Imagine a pending order receives a partial execution just as your program sends a cancel. The order may end up canceled with a nonzero executed amount. If your code assumes “cancel sent” means “nothing filled” and resubmits the original size, it can create more exposure than intended. This is a hypothetical failure path, not a claim about how often it occurs.
A reconcile-before-retry checklist
For a manual workflow or cBot, use the same sequence:
- Record the account and order IDs tied to the cancellation request.
- Wait for the corresponding execution event; distinguish
ORDER_CANCELLEDfromORDER_CANCEL_REJECTED. - Read the order's current status and executed volume. Retrieve or inspect its related deals when needed.
- Reconcile the remaining quantity against the strategy's intended exposure.
- Only then decide whether a new order is still required, and size it from the verified remainder rather than the original request.
- Log the request, event, status and deals together so a later review can reconstruct the sequence.
This is a state-reconciliation rule, not a promise that every broker returns every optional field in one event. For another uncertain-response case, see how to recover from a cTrader Open API order timeout; for executions that leave an unfilled remainder, see how a cBot should handle partial fills.
What should a cBot do after a cancel rejection?
Treat a rejected cancellation as unresolved order state, not as permission to retry the trade. Refresh the order and deal records, preserve any executions already reported, and make the next action depend on the verified remaining quantity. cTrader's ORDER_CANCEL_REJECTED specifically describes a rejected cancel request; it is not the same event as ORDER_CANCELLED.
An order ID and a cancel response are not a position ledger. Reconcile them before the next instruction.