> ## Documentation Index
> Fetch the complete documentation index at: https://docs.limitless.exchange/llms.txt
> Use this file to discover all available pages before exploring further.

# Redeem Resolved Positions

> [!NOTE]
>
> As of SDK v1.0.6, all three SDKs (TypeScript, Python, Go) include helper methods for this endpoint.

Redeems winning conditional-token positions for a resolved market from a server-wallet sub-account.

* Route: `POST /portfolio/redeem`
* Auth: `apiToken`, Privy, or session auth
* Scope: `trading` when using `apiToken`

### Request body

| Field | Type | Required | Description |
| - | - | - | - |
| `conditionId` | `string` | Yes | CTF condition id (`bytes32` hex string). |
| `onBehalfOf` | `number` | No | Managed sub-account profile id (partner flow). Must be a child of the authenticated partner profile. |

### Example (HMAC)

```bash theme={null}
curl -X POST "https://api.limitless.exchange/portfolio/redeem" \
  -H "content-type: application/json" \
  -H "lmts-api-key: <tokenId>" \
  -H "lmts-signature: <base64_hmac_sha256_signature>" \
  -H "lmts-timestamp: <iso_8601_timestamp>" \
  -d '{
    "conditionId": "0xa0ba8fd0acc2b86585734c07eb3bef4133f584d5abde78a558a6b8bfc3bbdec0",
    "onBehalfOf": 12345
  }'
```

### Notes

* Market must be resolved and the position must have redeemable balance.
* One `conditionId` per request. There is no batch redeem endpoint, so call it once per resolved market. See the rate-limit guidance on the [API Introduction](https://docs.limitless.exchange/api-reference/introduction.md) when looping over many markets.
* API-level resolved status can appear before CTF settlement; on-chain payout must be posted before redemption succeeds.
* Legacy API keys are not supported on server-wallet operations.
* For markets that resolved to a payout **split** (`winningOutcomeIndex: null` with a non-null `payoutNumerators`), one call redeems both YES and NO holdings at the ratio defined by `payoutNumerators`. See the split-resolution note on [Get Market Details](https://docs.limitless.exchange/api-reference/markets/get-market.md).
* NegRisk markets (`negRiskRequestId` set) are redeemed through `NegRiskAdapter.redeemPositions` using the wallet's `yesPositionId` / `noPositionId` balances; standard markets through ConditionalTokens with the full partition.

### Response

```json theme={null}
{
  "hash": "0x...",
  "userOperationHash": "0x...",
  "transactionId": "...",
  "conditionId": "0x...",
  "walletAddress": "0x...",
  "marketId": 123
}
```

> [!NOTE]
>
> **Why this endpoint is server-wallet only.** Redeeming a CTF position 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), so it does not accept EOA-owned or user-managed smart-wallet profiles. There is no "auto redeem" performed by Limitless on behalf of EOA users — self-custodial by design.
>
> **EOA and user-owned smart-wallet users** redeem their own positions on-chain instead:
>
> * Through the Limitless UI **Portfolio → Positions → Redeem**, which prompts the connected wallet to sign the `redeemPositions` call.
> * Or directly on-chain by calling `redeemPositions(conditionId, indexSets)` on the Conditional Tokens Framework contract (or `NegRiskAdapter.redeemPositions(conditionId, amounts)` for NegRisk markets) from the wallet holding the shares. See [Smart Contracts](https://docs.limitless.exchange/user-guide/smart-contracts.md) for the deployed addresses.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.