Skip to navigation

Modify Order Strategy

View as Markdown

Modify a running Order Strategy.

Available to: All authenticated users

Environments: Demo, Live

Rate Limit: 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; 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 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

failureReasonTrigger
TooLateThe strategy or its orders already completed or were cancelled.
AnotherCommandPendingA previous command for this strategy hasn’t completed.
UnauthorizedThe 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

Operator ID for the order. Send it only if NinjaTrader configured an allow-list of operator IDs for your user. In that case it’s required on every order and must exactly match one approved value. If no allow-list is configured, omit it: a supplied value is denied. Organizations using passthrough also omit it, and NinjaTrader fills it in. Up to 64 characters. See Operator ID (customTag50) and Passthrough.

Response

OrderStrategyStatusResponse
errorTextstringOptional<=8192 characters

Non-empty if the request failed

failureReasonenumOptional
AccountClosed, AdvancedTrailingStopUnsupported, AnotherCommandPending, BackMonthProhibited, ExecutionProviderNotConfigured, ExecutionProviderUnavailable, HomeStateRestricted, InvalidContract, InvalidPrice, KeyInformationDocumentRequired, LiquidationOnly, LiquidationOnlyBeforeExpiration, MaxOrderQtyIsNotSpecified, MaxOrderQtyLimitReached, MaxPosLimitMisconfigured, MaxPosLimitReached, MaxTotalPosLimitReached, MinTradeDurationNotElapsed, MultipleAccountPlanRequired, NoQuote, NotEnoughLiquidity, OtherExecutionRelated, ParentRejected, RiskCheckTimeout, SSFNFAComplianceRequired, SSFNFAComplianceRequiredJointOnly, SSFRiskDisclosureAcknowledgmentRequired, SessionClosed, Success, TooLate, TradingLocked, TrailingStopNonOrderQtyModify, Unauthorized, UnknownReason, Unsupported
orderStrategyobjectOptional