Modify Order Strategy

View as Markdown
### Modify 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 Sends a `command` to an Order Strategy that is already running, identified by its `orderStrategyId`. Order strategies are the multi-bracket constructs created with [`startOrderStrategy`](/api/rest-api-endpoints/orders/start-order-strategy); this endpoint adjusts one of those strategies after it is live without tearing it down and rebuilding it. To stop a strategy entirely, use [`interruptOrderStrategy`](/api/rest-api-endpoints/orders/interrupt-order-strategy) instead. The request body requires `orderStrategyId` and a `command` string (up to 1024 characters) describing the change to apply. The optional `customTag50` carries a registered tag; if your account requires tag50 registration, an unregistered tag is rejected before the command runs. As with other order commands, success is not guaranteed — the underlying orders may already have filled, the strategy may have completed, or the exchange may reject the change. 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 or its orders already completed or were cancelled (`TooLate`). - Another command for the strategy is still being processed (`AnotherCommandPending`). - The user isn't permitted to trade this account (`Unauthorized`). - A required `customTag50` is missing or unregistered. **Error Messages** | `failureReason` | Trigger | |-----------------|---------| | `TooLate` | The strategy or its orders already completed or were cancelled. | | `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
commandstringRequired<=1024 characters
customTag50stringOptional<=64 characters

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