Skip to main content
POST
Sell Position

Authorizations

x-api-key
string
header
required

API key for authentication. Contact Swaps.xyz to obtain an API key.

Body

application/json
evmEoa
string
required

EVM address (wallet address)

Pattern: ^0x[a-fA-F0-9]{40}$
side
enum<string>
required

Order side - must be SELL

Available options:
SELL
tokenID
string
required

Polymarket CLOB token ID of the position to sell

orderType
enum<string>
required

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

Available options:
FOK,
FAK
tickSize
string
required

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

negRisk
boolean
required

Negative risk flag from the market details

amount
number
required

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

expiration
integer
required

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

signatureByEvmEoa
string
required

EIP-712 signature by the EOA over the SellPosition typed data. See the Polymarket Signing Guide.

Pattern: ^0x[a-fA-F0-9]*$
proxyWallet
string

Proxy wallet address (optional)

Pattern: ^0x[a-fA-F0-9]{40}$
slippage
number

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

dstToken
object

Optional destination token. When set, sale proceeds are swapped into this token (address + chainId) before delivery.

dstWalletAddress
string

Optional wallet that receives the proceeds instead of the caller's evmEoa.

Pattern: ^0x[a-fA-F0-9]{40}$

Response

Position sold successfully

txId
string

Transaction ID

orderResponse
object