---
title: "Close Position Order"
method: POST
path: "/v1/order/close-position"
tags: ["Orders"]
---

# Close Position Order

`POST /v1/order/close-position`

Create an order to close an existing position in a market. This will sell all contracts held in the specified market.

## Request body

- ClosePositionOrderRequest — Request to create an order to close a position
  - `marketSlug` string, required — Market slug of the position to close
  - `manualOrderIndicator` 'MANUAL_ORDER_INDICATOR_MANUAL' | 'MANUAL_ORDER_INDICATOR_AUTOMATED' — ManualOrderIndicator designates the manual or automated nature of an order.
  - `synchronousExecution` boolean — If true, will block until the order is filled, rejected, canceled, or expired, up to maxBlockTime seconds
  - `maxBlockTime` string, int64 — Maximum block time in seconds if synchronous execution is requested
  - `slippageTolerance` SlippageTolerance — Slippage tolerance configuration for market orders
    - `currentPrice` Amount — Represents a monetary amount with its currency
      - `value` string, decimal, required — The amount as a decimal string
      - `currency` string, required — The currency code
    - `bips` integer, nullable — Slippage tolerance in basis points (1 bip = 0.01%)
    - `ticks` integer, nullable — Slippage tolerance in price ticks. Takes priority over bips if both are set.

## Response `200`

Position order closed successfully

- ClosePositionOrderResponse — Response containing closed position order ID
  - `id` string — Exchange-assigned order ID for the close position order
  - `executions` Execution[] — Executions if synchronous execution was requested
    - `id` string
    - `order` Order
      - `id` string
      - `type` 'ORDER_TYPE_MARKET_TO_LIMIT' | 'ORDER_TYPE_LIMIT' | 'ORDER_TYPE_STOP' | 'ORDER_TYPE_STOP_LIMIT' — OrderType indicates the type of an order.
      - `side` 'SIDE_BUY' | 'SIDE_SELL' — Side indicates the side of an Order.
      - `orderQty` string, int64
      - `symbol` string
      - `clordId` string
      - `timeInForce` 'TIME_IN_FORCE_DAY' | 'TIME_IN_FORCE_GOOD_TILL_CANCEL' | 'TIME_IN_FORCE_IMMEDIATE_OR_CANCEL' | 'TIME_IN_FORCE_GOOD_TILL_TIME' | 'TIME_IN_FORCE_FILL_OR_KILL' — TimeInForce specifies how long the order remains in effect.
      - `account` string
      - `cumQty` string, int64
      - `avgPx` string, int64
      - `leavesQty` string, int64
      - `state` 'ORDER_STATE_PARTIALLY_FILLED' | 'ORDER_STATE_FILLED' | 'ORDER_STATE_CANCELED' | 'ORDER_STATE_REPLACED' | 'ORDER_STATE_REJECTED' | 'ORDER_STATE_EXPIRED' | 'ORDER_STATE_PENDING_NEW' | 'ORDER_STATE_PENDING_REPLACE' | 'ORDER_STATE_PENDING_CANCEL' | 'ORDER_STATE_PENDING_RISK' — OrderState denotes the current order state.
      - `participant` string
      - `price` string, int64
      - `insertTime` string, date-time
      - `stopPrice` string, int64
      - `minQty` string, int64
      - `createTime` string, date-time
      - `allOrNone` boolean
      - `crossId` string
      - `hostCrossId` string
      - `submittingParticipant` string
      - `clientAccountId` string
      - `clientParticipantId` string
      - `parentOrderId` string
      - `commissionsBasisPoints` string
      - `participateDontInitiate` boolean
      - `cashOrderQty` string, int64
      - `strictLimit` boolean
      - `goodTillTime` string, date-time
      - `bestLimit` boolean
      - `immediatelyExecutableLimit` boolean
      - `lastTradeId` string
      - `commissionNotionalTotalCollected` string, int64
      - `selfMatchPreventionInstruction` 'SELF_MATCH_PREVENTION_INSTRUCTION_REJECT_AGGRESSOR' | 'SELF_MATCH_PREVENTION_INSTRUCTION_CANCEL_RESTING' | 'SELF_MATCH_PREVENTION_INSTRUCTION_REMOVE_BOTH' — SelfMatchPreventionInstruction is the methodology used to handle self match prevention.
      - `orderCapacity` 'ORDER_CAPACITY_AGENCY' | 'ORDER_CAPACITY_PRINCIPAL' | 'ORDER_CAPACITY_PROPRIETARY' | 'ORDER_CAPACITY_INDIVIDUAL' | 'ORDER_CAPACITY_RISKLESS_PRINCIPAL' | 'ORDER_CAPACITY_AGENT_FOR_OTHER_MEMBER' — OrderCapacity designates the capacity of the party placing an order.
      - `ignorePriceValidityChecks` boolean
      - `lastTransactTime` string, date-time
      - `makerCommissionsBasisPoints` string
      - `manualOrderIndicator` 'MANUAL_ORDER_INDICATOR_MANUAL' | 'MANUAL_ORDER_INDICATOR_AUTOMATED' — ManualOrderIndicator designates the manual or automated nature of an order.
      - `fractionalQuantityScale` string, int64
      - `priceToQuantityFilled` object
    - `lastShares` string, int64
    - `lastPx` string, int64
    - `type` 'EXECUTION_TYPE_PARTIAL_FILL' | 'EXECUTION_TYPE_FILL' | 'EXECUTION_TYPE_CANCELED' | 'EXECUTION_TYPE_REPLACE' | 'EXECUTION_TYPE_REJECTED' | 'EXECUTION_TYPE_EXPIRED' | 'EXECUTION_TYPE_DONE_FOR_DAY' — ExecutionType denotes the execution type.
    - `text` string
    - `orderRejectReason` 'ORD_REJECT_REASON_UNKNOWN_SYMBOL' | 'ORD_REJECT_REASON_EXCHANGE_CLOSED' | 'ORD_REJECT_REASON_INCORRECT_QUANTITY' | 'ORD_REJECT_REASON_INVALID_PRICE_INCREMENT' | 'ORD_REJECT_REASON_INCORRECT_ORDER_TYPE' | 'ORD_REJECT_REASON_PRICE_OUT_OF_BOUNDS' | 'ORD_REJECT_REASON_NO_LIQUIDITY' — OrdRejectReason is the code to identify reason for order rejection.
    - `transactTime` string, date-time
    - `legPrices` LegPrice[]
      - `symbol` string
      - `anchor` boolean
      - `px` string, int64
      - `qty` string, int64
      - `side` string
      - `referencePx` string, int64
    - `tradeId` string
    - `aggressor` boolean
    - `commissionNotionalCollected` string, int64
    - `unsolicitedCancelReason` 'UNSOLICITED_CXL_REASON_CONNECTION_LOSS' | 'UNSOLICITED_CXL_REASON_LOGOUT' | 'UNSOLICITED_CXL_REASON_EXCHANGE_OPTION' | 'UNSOLICITED_CXL_REASON_OTHER' — UnsolicitedCxlReason is a code to identify the reason for an unsolicited cancellation.
    - `traceId` string
    - `commissionSpreadPx` string, int64
    - `transactTradeDate` Date — Date represents a calendar date.
      - `year` integer
      - `month` integer
      - `day` integer

## Other responses

- `400` — Bad request - invalid close position order request
- `401` — Unauthorized - invalid or missing authentication token
- `500` — Internal server error

---

[API](https://skmtc.net/polymarket/apis/portfolio-api.md) · [All operations](https://skmtc.net/polymarket/apis/portfolio-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/polymarket/portfolio-api/versions/150874842db1/schema)
