Orders

Modify Order

Modify the parameters of a working order.

Available to: All authenticated users

Environments: Demo, Live

Rate Limit: 750 requests per hour, 1-second back-off, counts all requests

Requests changes to a working order — for example, the trigger price of a Stop or Limit order, or the orderQty. Identify the order by its orderId. A successful request isn't a guarantee that the change is applied: market, exchange, and logical rules still apply, and 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, so it can no longer be modified (TooLate).
  • Another command for the order is still being processed (AnotherCommandPending).
  • The new price is invalid for the order type (InvalidPrice).

Error Messages

failureReasonTrigger
TooLateThe order already filled or was cancelled.
AnotherCommandPendingA previous command for this order hasn't completed.
InvalidPriceThe requested price is invalid for the order type.

See the failureReason enum in the response schema for the complete list of values.

post/order/modifyorder

Request

  • Base URL: https://demo.tradovateapi.com/v1
  • URL: https://demo.tradovateapi.com/v1/order/modifyorder
  • Auth: HTTP bearer

Request body

orderIdinteger required
clOrdIdstring
orderQtyinteger required
orderType'Limit' | 'LimitIfTouched' | 'MIT' | 'Market' | 'MarketLimit' | 'MarketStopWithProtection' | 'MarketWithProtection' | 'QTS' | 'Stop' | 'StopLimit' | 'TrailingStop' | 'TrailingStopLimit' required

Limit, LimitIfTouched, MIT, Market, MarketLimit, MarketStopWithProtection, MarketWithProtection, QTS, Stop, StopLimit, TrailingStop, TrailingStopLimit

pricenumber double
stopPricenumber double
limitIfTouchedPricenumber double
maxShowinteger
pegDifferencenumber double
timeInForce'Day' | 'FOK' | 'GTC' | 'GTD' | 'IOC'

Day, FOK, GTC, GTD, IOC

expireTimestring date-time
textstring
activationTimestring date-time
customTag50string
isAutomatedboolean

Response

CommandResult

failureReason'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'

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

failureTextstring
commandIdinteger

Changes

No recorded changes to this operation across all 1 revision of this API.