v1

latestOpenAPI 3.1.02026-07-262771117.8 KB
Polymarket

Sell Position

Sells an existing position in a Polymarket market. This endpoint allows users to exit their positions by selling their outcome tokens using market orders (FOK/FAK).

Proceeds default to the caller's evmEoa. To deliver them to a different wallet or token, set dstWalletAddress and/or dstToken; when dstWalletAddress is present the request must be signed — see the Polymarket Signing Guide.

⚠️ Upcoming change: signatureByEvmEoa + expiration will soon be required on every sellPosition request, regardless of whether dstWalletAddress is set. The signature is currently optional when dstWalletAddress is omitted, but partners should plan to sign every call ahead of the cutover.

post/workflows/polymarket/sellPosition

Request body

evmEoastring required

EVM address (0x prefix + 40 hex characters)

proxyWalletstring

EVM address (0x prefix + 40 hex characters)

side'SELL' required

Order side - must be SELL

tokenIDstring required

Polymarket CLOB token ID of the position to sell

orderType'FOK' | 'FAK' required

Order type - Fill-Or-Kill (FOK) or Fill-And-Kill (FAK) for market orders

tickSizestring required

Tick size from the market details (e.g., '0.01')

negRiskboolean required

Negative risk flag from the market details

amountnumber required

Amount of tokens to sell (must be a positive number)

feeRateBpsnumber

Fee rate in basis points (optional, defaults to 0)

slippagenumber

Slippage tolerance in basis points (optional, defaults to 0)

dstWalletAddressstring

EVM address (0x prefix + 40 hex characters)

expirationinteger

Unix timestamp (seconds) when signatureByEvmEoa expires. Must be in the future and ≤ 300s ahead.

signatureByEvmEoastring

Hex string with 0x prefix

Example request

{
  "evmEoa": "0xB9519a08267d7B259eCA6DbD8F7286B1f176A41f",
  "side": "SELL",
  "tokenID": "90234889617199443673709150877675264662915727532354468551650133547723659310093",
  "orderType": "FAK",
  "tickSize": "0.01",
  "negRisk": true,
  "amount": 2,
  "feeRateBps": 0,
  "slippage": 100
}

Response

Position sold successfully

txIdstring

Transaction ID

Example response

{
  "txId": "0xa66c86a47f4f81caae5d767e2d8a5a7def1a191d24eba5bd49f8767297cfe2e5",
  "orderResponse": {
    "success": true,
    "errorMsg": "",
    "orderID": "0xb9826fe87ddf21261eceaf513977cb5ea1ae31ac173210857c879cef936dfa2b",
    "transactionsHashes": [
      "0x39ac6726cf2cfb7814bdb2e04aeeea1d3bde2d1ce7e357f79a404cacb6984f35"
    ],
    "status": "matched",
    "takingAmount": "1.376",
    "makingAmount": "2"
  }
}