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

# Claim Vault rewards

> Claim rewards from a target lending Vault. This will harvest from all available rewards schedules and close empty accounts to refund SOL to requesting wallet.



## OpenAPI

````yaml post /markets/lending_vaults/rewards/claim
openapi: 3.1.3
info:
  title: Loopscale API
  version: 1.0.0
servers:
  - url: https://tars.loopscale.com/v1
    description: Loopscale Production Server
security: []
paths:
  /markets/lending_vaults/rewards/claim:
    post:
      tags:
        - Markets
      summary: Claim Vault rewards
      description: >-
        Claim rewards from a target lending Vault. This will harvest from all
        available rewards schedules and close empty accounts to refund SOL to
        requesting wallet.
      operationId: rewardsClaim
      parameters:
        - name: user-wallet
          in: header
          required: true
          schema:
            type: string
          description: Wallet address of the claiming user
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/RewardClaimRequest'
      responses:
        '200':
          description: Serialized transactions to claim rewards
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RewardsTransactionResponse'
        '400':
          $ref: '#/components/responses/BadRequest'
        '500':
          $ref: '#/components/responses/GeneralError'
components:
  schemas:
    RewardClaimRequest:
      type: object
      required:
        - rewardMints
        - unclaimedStakeAccounts
        - vaultAddress
      properties:
        rewardMints:
          type: array
          description: Mints of the reward tokens to claim
          items:
            type: string
        unclaimedStakeAccounts:
          type: array
          description: >-
            Array of stake account addresses with unclaimed rewards, if empty
            will claim from all.
          items:
            type: string
        vaultAddress:
          type: string
          description: Lending Vault address
    RewardsTransactionResponse:
      type: array
      items:
        type: object
        properties:
          transaction:
            type: object
            required:
              - message
              - signatures
            properties:
              message:
                type: string
                description: Base64-encoded versioned transaction message
              signatures:
                type: array
                items:
                  type: object
                  required:
                    - publicKey
                    - signature
                  properties:
                    publicKey:
                      type: string
                    signature:
                      type: string
  responses:
    BadRequest:
      description: Bad Request
      content:
        text/plain:
          schema:
            type: string
            example: 'Something went wrong: You have an error in your SQL syntax.'
    GeneralError:
      description: General Server Error
      content:
        text/plain:
          schema:
            type: string
            example: >-
              Failed to deserialize the JSON body into the target type: missing
              field `mints` at line 1 column 1.

````