Liquidate Position

### Send a request to cancel orders for a specific contract and close that position for the given account. This request initiates the cancellation process of open orders for an existing position held by this account. > Note: This is a request to cancel orders and close a position, not a guarantee. Any operation could fail for a number of reasons, ranging from Exchange rejection to incorrect parameterization.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
accountIdlongRequired
contractIdlongRequired
adminbooleanRequired
customTag50stringOptional<=64 characters

Response

PlaceOrderResult
failureReasonenum or null
AccountClosed, AdvancedTrailingStopUnsupported, AnotherCommandPending, BackMonthProhibited, ExecutionProviderNotConfigured, ExecutionProviderUnavailable, InvalidContract, InvalidPrice, LiquidationOnly, LiquidationOnlyBeforeExpiration, MaxOrderQtyIsNotSpecified, MaxOrderQtyLimitReached, MaxPosLimitMisconfigured, MaxPosLimitReached, MaxTotalPosLimitReached, MultipleAccountPlanRequired, NoQuote, NotEnoughLiquidity, OtherExecutionRelated, ParentRejected, RiskCheckTimeout, SessionClosed, Success, TooLate, TradingLocked, TrailingStopNonOrderQtyModify, Unauthorized, UnknownReason, Unsupported
failureTextstring or null<=8192 characters
orderIdlong or null