Interrupt Order Strategy

View as Markdown
### Stop a running Order Strategy. **Available to:** All authenticated users **Environments:** Demo, Live **[Rate Limit](/api/authentication#request-rate-limits-and-time-penalties):** 500 requests per hour, 2-second back-off, counts all requests Stops an Order Strategy that is already running, identified by its `orderStrategyId`, and cancels its remaining working orders. Order strategies are the multi-bracket constructs created with [`startOrderStrategy`](/api/rest-api-endpoints/orders/start-order-strategy). Use this endpoint to terminate the whole strategy; to change a strategy's parameters while keeping it running, use [`modifyOrderStrategy`](/api/rest-api-endpoints/orders/modify-order-strategy) instead. The request body requires only `orderStrategyId`. Interrupting a strategy stops the strategy logic and cancels its open orders, but it does not flatten any position the strategy has already opened — close that separately with [`liquidatePosition`](/api/rest-api-endpoints/orders/liquidate-position) if needed. As with other order commands, success is not guaranteed — the strategy may already have completed or its orders may already have filled. The endpoint returns an `OrderStrategyStatusResponse`. When the request is rejected, the response carries a `failureReason` and an `errorText` describing the problem; on success the response includes the updated `orderStrategy`. **Common Failure Scenarios** - The strategy already completed or was interrupted (`TooLate`). - Another command for the strategy is still being processed (`AnotherCommandPending`). - The user isn't permitted to trade this account (`Unauthorized`). **Error Messages** | `failureReason` | Trigger | |-----------------|---------| | `TooLate` | The strategy already completed or was interrupted. | | `AnotherCommandPending` | A previous command for this strategy hasn't completed. | | `Unauthorized` | The user isn't permitted to trade this account. | See the `failureReason` enum in the `OrderStrategyStatusResponse` 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.
orderStrategyIdlongRequired

Response

OrderStrategyStatusResponse
errorTextstring<=8192 characters

Non-empty if the request failed

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
orderStrategyobject