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

# Claim from Earn Vault

> Creates list of contract calls to Claim a position from an earn vault,
converting vault shares back to the underlying asset.

<Info>
  The `chain` parameter uses **CAIP-2 format**: `eip155:<chainId>`. For example, `eip155:8453` for Base. See [Supported Chains](/sprinter-credit/overview#supported-chains) for the full list.
</Info>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url 'https://api.sprinter.tech/credit/earn/claim?owner=0xUSER&receiver=0xRECEIVER&asset=0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61&chain=eip155:8453&claimRequestId=0'
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.sprinter.tech/credit/earn/claim",
      params={
          "owner": "0xUSER",
          "receiver": "0xRECEIVER",
          "asset": "0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61",
          "chain": "eip155:8453",
          "claimRequestId": "0"
      }
  )
  print(response.json())
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.sprinter.tech/credit/earn/claim?owner=0xUSER&receiver=0xRECEIVER&asset=0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61&chain=eip155:8453&claimRequestId=0"
  );
  const data = await response.json();
  console.log(data);
  ```

  ```go Go theme={null}
  package main

  import (
  	"fmt"
  	"io"
  	"net/http"
  )

  func main() {
  	resp, _ := http.Get("https://api.sprinter.tech/credit/earn/claim?owner=0xUSER&receiver=0xRECEIVER&asset=0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61&chain=eip155:8453&claimRequestId=0")
  	defer resp.Body.Close()
  	body, _ := io.ReadAll(resp.Body)
  	fmt.Println(string(body))
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "calls": [
      {
        "chain": "8453",
        "to": "0x1234567890abcdef1234567890abcdef12345678",
        "data": "0xa9059cbb000000000000000000000000000000000000000000000000000000000005f5e100",
        "value": "0"
      }
    ]
  }
  ```
</ResponseExample>

<Tip>
  **Machine-readable API spec:** [OpenAPI JSON](https://api.sprinter.tech/swagger/doc.json) | [Swagger UI](https://api.sprinter.tech/swagger/index.html)
</Tip>


## OpenAPI

````yaml get /credit/earn/claim
openapi: 3.0.0
info:
  contact: {}
  title: ''
  version: 0.0.1
servers:
  - url: https://api.sprinter.tech
    description: Production server
security: []
paths:
  /credit/earn/claim:
    get:
      tags:
        - Credit
      summary: Claim position from earn vault
      description: |-
        Creates list of contract calls to Claim a position from an earn vault,
        converting vault shares back to the underlying asset.
      parameters:
        - example: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
          description: Owner address that holds the vault shares
          name: owner
          in: query
          required: true
          schema:
            type: string
        - example: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2'
          description: Address that will receive the Claimed underlying tokens
          name: receiver
          in: query
          required: true
          schema:
            type: string
        - example: '0xeE8F4eC5672F09119b96Ab6fB59C27E1b7e44b61'
          description: Vault shares token address
          name: asset
          in: query
          required: true
          schema:
            type: string
        - example: eip155:8453
          description: Chain ID in CAIP format
          name: chain
          in: query
          required: true
          schema:
            type: string
        - example: '0'
          description: claimRequestId
          name: claimRequestId
          in: query
          required: true
          schema:
            type: string
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/credit.ClaimResponse'
        '400':
          description: Invalid input parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/responses.ErrorResponse'
components:
  schemas:
    credit.ClaimResponse:
      type: object
      required:
        - calls
      properties:
        calls:
          description: List of contract calls to execute the Claim
          type: array
          items:
            $ref: '#/components/schemas/evm.ContractCall'
    responses.ErrorResponse:
      type: object
      required:
        - error
      properties:
        debug:
          type: string
        error:
          type: string
    evm.ContractCall:
      type: object
      required:
        - chain
        - data
        - to
        - value
      properties:
        chain:
          type: string
        data:
          type: array
          items:
            type: integer
        to:
          type: array
          items:
            type: integer
        value:
          $ref: '#/components/schemas/types.BigInt'
    types.BigInt:
      type: object

````