Skip to main content
Submits an on-chain mergePositions transaction that converts a full set of outcome tokens (1 Yes share + 1 No share → 1 USDC) back into collateral from a server-wallet sub-account.
  • Route: POST /portfolio/merge
  • Auth: apiToken, Privy, or session auth
  • Scope: trading when using apiToken
For what merging is and when to use it, see Merging & Splitting Shares.

Request body

Example (HMAC)

Response

Returns the submitted transaction: conditionId, operation (MERGE), route (clob or negrisk), walletAddress, and, when available, transactionId and userOperationHash. Sponsored 4337 user operations return no synchronous transaction hash, so track the operation via userOperationHash and transactionId.

Errors

Notes

  • The execute path is a single on-chain transaction. Limitless provisions the NegRiskAdapter ERC-1155 approval on the server wallet ahead of time, so no approval transaction is submitted here.
  • Merging burns the wallet’s own outcome tokens, so simple/CLOB merges need no allowance at all.
  • Validation is minimal by design: on-chain failures pass through to the caller, who retries if needed.
  • Legacy API keys are not supported on server-wallet operations.
Why this endpoint is server-wallet only. Merging outcome tokens is an on-chain transaction that must be signed by the wallet holding the shares. This endpoint can only sign for wallets Limitless manages (Privy-backed server-wallet sub-accounts). EOA and user-owned smart-wallet users merge through the Merge/Split option on the market page in the Limitless UI, or by calling mergePositions on the Conditional Tokens Framework contract directly. See Smart Contracts for the deployed addresses.