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

# Fetch the APY of a vault

> Returns the annual percentage yield (APY) for a given vault address over a specified lookback period.



## OpenAPI

````yaml /v0.1.0/api-reference/openapi.yml get /v1/vaults/apy
openapi: 3.0.0
info:
  title: Paxos Labs API
  version: 1.0.0
  description: API for managing and querying vault data for Paxos Labs.
servers:
  - url: https://api.paxoslabs.com
security: []
tags: []
paths:
  /v1/vaults/apy:
    get:
      tags:
        - Vaults
      summary: Fetch the APY of a vault
      description: >-
        Returns the annual percentage yield (APY) for a given vault address over
        a specified lookback period.
      parameters:
        - name: token_address
          in: query
          required: true
          description: The address of the vault.
          schema:
            type: string
            example: '0x19e099B7aEd41FA52718D780dDA74678113C0b32'
        - name: block_number
          in: query
          required: false
          description: >-
            Block number to calculate the APY at. Optional. Defaults to the
            latest block.
          schema:
            type: integer
        - name: lookback_days
          in: query
          required: false
          description: >-
            Number of days to look back for the APY calculation. Defaults to 7
            if not provided.
          schema:
            type: integer
            example: 7
      responses:
        '200':
          description: Successful response with APY details
          content:
            application/json:
              schema:
                type: object
                properties:
                  apy:
                    type: number
                    description: Calculated APY value.
                    example: 12.5
                  error:
                    type: string
                    nullable: true
                    description: Error message if any occurred.
                    example: null
        '400':
          description: Bad request. Invalid input provided.
          content:
            application/json:
              schema:
                type: object
                properties:
                  apy:
                    type: number
                    description: APY value is 0 if there is an error.
                    example: 0
                  error:
                    type: string
                    description: Error message explaining the reason for the bad request.
                    example: token_address is not a valid address
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  apy:
                    type: number
                    description: APY value is 0 if there is an error.
                    example: 0
                  error:
                    type: string
                    description: Error message indicating the internal server error.
                    example: >-
                      error while fetching exchange rates, review runtime logs
                      for more details

````