Cancel Order

View as Markdown
### Cancel a working order. **Available to:** All authenticated users **Environments:** Demo, Live **[Rate Limit](/api/authentication#request-rate-limits-and-time-penalties):** No endpoint-specific limit Requests cancellation of a working order, identified by its `orderId`. As with other order commands, success isn't guaranteed — the order may already have filled or been cancelled. When the request is rejected, the response carries a `failureReason` and `failureText`. **Common Failure Scenarios** - The order already filled or was cancelled (`TooLate`). - Another command for the order is still being processed (`AnotherCommandPending`). **Error Messages** | `failureReason` | Trigger | |-----------------|---------| | `TooLate` | The order already filled or was cancelled. | | `AnotherCommandPending` | A previous command for this order hasn't completed. | See the `failureReason` enum in the response schema for the complete list of values.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
orderIdlongRequired
clOrdIdstringOptional<=64 characters
activationTimedatetimeOptional
customTag50stringOptional<=64 characters
isAutomatedbooleanOptional

Response

CommandResult
failureReasonenum
AccountClosed, AdvancedTrailingStopUnsupported, AnotherCommandPending, BackMonthProhibited, ExecutionProviderNotConfigured, ExecutionProviderUnavailable, InvalidContract, InvalidPrice, KeyInformationDocumentRequired, LiquidationOnly, LiquidationOnlyBeforeExpiration, MaxOrderQtyIsNotSpecified, MaxOrderQtyLimitReached, MaxPosLimitMisconfigured, MaxPosLimitReached, MaxTotalPosLimitReached, MultipleAccountPlanRequired, NoQuote, NotEnoughLiquidity, OtherExecutionRelated, ParentRejected, RiskCheckTimeout, SSFNFAComplianceRequired, SSFNFAComplianceRequiredJointOnly, SSFRiskDisclosureAcknowledgmentRequired, SessionClosed, Success, TooLate, TradingLocked, TrailingStopNonOrderQtyModify, Unauthorized, UnknownReason, Unsupported
failureTextstring<=8192 characters
commandIdlong