Place OCO
Place a Order Cancels Order order strategy.
OCO order strategies link 2 orders together such that if one order is filled, the other order is cancelled. You must provide an other parameter pertaining to the order linked to this one. The other must specify an action and an orderType which determines the other parameters that must be set. For example a Limit or Stop order must use the price parameter, but a Stop-Limit will require a price and a stopPrice. Below is an example of an OCO that either sells to take profit at 4200 points, or sells to stop loss at 4100 points.
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
action
Buy, Sell
Allowed values:
symbol
orderQty
orderType
Limit, LimitIfTouched, MIT, Market, MarketLimit, MarketStopWithProtection, MarketWithProtection, QTS, Stop, StopLimit, TrailingStop, TrailingStopLimit
other
accountSpec
accountId
clOrdId
price
stopPrice
limitIfTouchedPrice
maxShow
pegDifference
timeInForce
Day, FOK, GTC, GTD, IOC
Allowed values:
expireTime
text
activationTime
customTag50
isAutomated
Response
PlaceOcoResult
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
failureText
orderId
ocoId