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

# Redeem Position

> Redeems position from a resolved Polymarket market. For positions with a current value > 0, this endpoint allows users to claim their winnings from a specific market condition. For losing positions with a current value = 0, this endpoint allows users to burn their position tokens to clean up their account. 
 Endpoint awaits successful execution of the redemption transaction before returning the transaction hash.

Every request must include `expiration` and an EIP-712 `signatureByEvmEoa` over the `RedeemPosition` typed data — see the [Polymarket Signing Guide](/prediction-market-reference/polymarket-signing).

Proceeds default to the caller's `evmEoa`. To deliver them to a different wallet or token, set `dstWalletAddress` and/or `dstToken`.



## OpenAPI

````yaml /prediction-market-reference/openapi.json post /api/workflows/polymarket/redeemPosition
openapi: 3.1.0
info:
  title: Prediction Market API
  description: >-
    API endpoints for trading on prediction markets and querying market data,
    user positions, and activity via workflows.
  version: 1.0.0
  contact:
    name: Swaps.xyz
    url: https://swaps.xyz
servers:
  - url: https://api-v2.swaps.xyz
    description: Production server
security:
  - ApiKeyAuth: []
paths:
  /api/workflows/polymarket/redeemPosition:
    post:
      summary: Redeem Position
      description: >-
        Redeems position from a resolved Polymarket market. For positions with a
        current value > 0, this endpoint allows users to claim their winnings
        from a specific market condition. For losing positions with a current
        value = 0, this endpoint allows users to burn their position tokens to
        clean up their account. 
         Endpoint awaits successful execution of the redemption transaction before returning the transaction hash.

        Every request must include `expiration` and an EIP-712
        `signatureByEvmEoa` over the `RedeemPosition` typed data — see the
        [Polymarket Signing
        Guide](/prediction-market-reference/polymarket-signing).


        Proceeds default to the caller's `evmEoa`. To deliver them to a
        different wallet or token, set `dstWalletAddress` and/or `dstToken`.
      operationId: redeemPosition
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - evmEoa
                - conditionId
                - assetId
                - expiration
                - signatureByEvmEoa
              properties:
                evmEoa:
                  $ref: '#/components/schemas/EvmAddress'
                  description: User's EVM wallet address
                conditionId:
                  type: string
                  description: Polymarket condition ID for the position to redeem
                  example: >-
                    0x52f13a5eaf375170189f326e58cc6d217515de1cf9e41bff17be7779ea9a295c
                assetId:
                  type: string
                  description: Polymarket asset ID for the asset to redeem
                  example: >-
                    25851216745091725550702226389795916287148711992808817855215289655518936398397
                dstToken:
                  $ref: '#/components/schemas/PolymarketDstToken'
                  description: >-
                    Optional destination token. When set, redeemed USDC.e is
                    swapped into this token (address + chainId) before delivery.
                dstWalletAddress:
                  $ref: '#/components/schemas/EvmAddress'
                  description: >-
                    Optional wallet that receives the proceeds instead of the
                    caller's `evmEoa`.
                expiration:
                  type: integer
                  description: >-
                    Unix timestamp (seconds) when `signatureByEvmEoa` expires.
                    Must be in the future and ≤ 300s ahead.
                signatureByEvmEoa:
                  $ref: '#/components/schemas/Hex'
                  description: >-
                    EIP-712 signature by the EOA over the `RedeemPosition` typed
                    data. See the [Polymarket Signing
                    Guide](/prediction-market-reference/polymarket-signing).
      responses:
        '200':
          description: Position redeemed successfully
          content:
            application/json:
              schema:
                type: object
                required:
                  - txId
                  - txHash
                  - status
                properties:
                  txId:
                    type: string
                    description: >-
                      Workflow transaction ID. Track execution with `GET
                      /workflows/getStatus`.
                  txHash:
                    $ref: '#/components/schemas/Hex'
                    description: Transaction hash of the redemption
                  status:
                    type: string
                    description: Status message of the redemption
        '400':
          description: Bad request due to missing or invalid parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowErrorResponse'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WorkflowErrorResponse'
components:
  schemas:
    EvmAddress:
      type: string
      pattern: ^0x[a-fA-F0-9]{40}$
      description: EVM address (0x prefix + 40 hex characters)
    PolymarketDstToken:
      type: object
      required:
        - address
        - chainId
      description: >-
        Destination token used by Polymarket workflow endpoints. When provided,
        proceeds are swapped into this token before delivery.
      properties:
        address:
          $ref: '#/components/schemas/EvmAddress'
          description: Destination token contract address
        chainId:
          type: number
          description: Destination chain ID. See the [chain list](/resources/chain-list).
    Hex:
      type: string
      pattern: ^0x[a-fA-F0-9]*$
      description: Hex string with 0x prefix
    WorkflowErrorResponse:
      type: object
      required:
        - success
        - error
      properties:
        success:
          type: boolean
          description: Always false for error responses
          enum:
            - false
          example: false
        error:
          type: object
          required:
            - code
            - name
            - message
            - title
            - statusCode
            - timestamp
          properties:
            code:
              type: string
              description: Error type code for programmatic handling
            name:
              type: string
              description: Error class name
            message:
              type: string
              description: Detailed error message
            title:
              type: string
              description: Short, user-friendly error title
            statusCode:
              type: integer
              description: HTTP status code
            details:
              type: object
              description: Additional error details
              additionalProperties: true
            timestamp:
              type: string
              description: ISO 8601 timestamp when the error occurred
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication. Contact Swaps.xyz to obtain an API key.

````