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

# Polymarket Redeem Positions

Redeem (claim) winnings from resolved Polymarket prediction markets as pUSD. Accepts a conditionIds array to redeem MANY markets in ONE transaction — prefer it over looping single redeems (one relayer batch, no wallet-busy contention, aggregate amounts for bridging). Supports both standard and neg risk markets (elections, multi-candidate events). Only works after a market has been resolved. Returns redeemed pUSD amount and transaction hash. Ideal for: automated profit collection, portfolio cleanup, post-resolution workflows, winnings consolidation.

![Polymarket Redeem Positions logo](https://cdn.b3.fun/b3os-icons/polymarket-icon.png)
Catalog action EVM Onchain wallet Gas receive

Redeem (claim) winnings from resolved Polymarket prediction markets as pUSD. Accepts a conditionIds array to redeem MANY markets in ONE transaction — prefer it over looping single redeems (one relayer batch, no wallet-busy contention, aggregate amounts for bridging). Supports both standard and neg risk markets (elections, multi-candidate events). Only works after a market has been resolved. Returns redeemed pUSD amount and transaction hash. Ideal for: automated profit collection, portfolio cleanup, post-resolution workflows, winnings consolidation.

**Review wallet and value movement**

This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.

## At a Glance

| Field | Value |
| --- | --- |
| Action ID | `polymarket-redeem` |
| Category | EVM Onchain |
| Connector | `wallet` |
| Requires gas | Yes |
| Funds movement | `receive` |
| Tags | `polymarket`, `defi`, `withdraw`, `write` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `conditionId` | `string` | No | The condition ID \(bytes32\) of the resolved market. Provide this OR tokenId. |
| `tokenId` | `string` | No | The ERC-1155 token ID from your positions. The API will lookup the conditionId. Provide this OR conditionId. |
| `tokenIds` | `array` | No | Array of CLOB token IDs \(outcome positions\) for this condition. Required for neg-risk redemption when only conditionId is provided. If omitted, fetched from Gamma API. |
| `amounts` | `array` | No | Array of amounts to redeem for each token ID. Must match length of tokenIds. If not provided, will redeem all available. |
| `conditionIds` | `array` | No | Array of condition IDs \(bytes32\) for batch redemption. When provided, takes priority over conditionId. Deposit wallets use a single relay transaction; EOA wallets sign each redemption sequentially. |

## Result Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `status` | `string` | Yes | Status of the redemption operation |
| `transactionHash` | `string` | No | Transaction hash of the redemption |
| `redeemedAmount` | `number` | No | Total USDC amount redeemed as a human-readable number \(e.g. 12.5 USDC\) |
| `redeemedAmountRaw` | `string` | No | USDC amount redeemed in raw units \(6 decimals\) for piping into swap/transfer actions |
| `conditionId` | `string` | No | The condition ID that was redeemed |
| `marketTitle` | `string` | No | Title of the market \(if available\) |
| `negRisk` | `boolean` | No | Whether this was a neg risk market redemption |
| `redeemedCount` | `number` | No | Number of conditions successfully redeemed in batch mode |
| `skippedCount` | `number` | No | Number of conditions skipped in batch mode \(not resolved or zero balance\) |

## Examples

**Workflow node**

```json
{
  "type": "polymarket-redeem",
  "payload": {
    "conditionId": "example-conditionId",
    "tokenIds": [
      "1"
    ],
    "amounts": [
      "1000000"
    ]
  },
  "children": [],
  "connector": {
    "type": "wallet",
    "id": "conn_wallet"
  }
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/polymarket-redeem/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "conditionId": "example-conditionId",
    "tokenIds": [
      "1"
    ],
    "amounts": [
      "1000000"
    ]
  }
}'
```

**Use expressions for dynamic values**

Payload fields can use workflow expressions such as `{{$trigger.body.amount}}`, `{{$nodes.fetch.result.price}}`, and `{{$props.asset}}` when the value should come from a trigger, prior node, or reusable workflow prop.