Skip to main content
POST /api/v1/polymarket/ctf/merge Merges equal amounts of YES and NO outcome tokens back into USDC collateral. The transaction is submitted gaslessly through Polymarket’s relayer — no POL needed for gas.
This endpoint is Polymarket-only and uses the platform’s Builder credentials to relay the on-chain CTF mergePositions call. The caller must be authenticated with a valid API key.

Parameters

Body

condition_id
string
required
The condition ID (bytes32 hex) identifying the market condition to merge. Example: "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
amount
string
required
USDC amount in smallest unit (6 decimals). For example, "1000000" = 1 USDC. You must hold at least this amount of both YES and NO tokens.

Response

transaction_hash
string | null
The on-chain transaction hash, if the relayer accepted the transaction.
status
string
Relayer status (e.g., "pending", "submitted").
curl -X POST \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "condition_id": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
    "amount": "1000000"
  }' \
  "https://api.parsecapi.com/api/v1/polymarket/ctf/merge"
{
  "transaction_hash": "0xabc123...",
  "status": "submitted"
}