vaults.fyi
  • General
    • 🏦Overview
    • 💡Use Cases
      • For Wallets and Apps
      • For Analysts
      • For Protocols & Product Teams
    • 🔎Methodology
      • vaults.fyi USD benchmark rate
      • vaults.fyi ETH benchmark rate
    • ❓FAQ
      • Vault requirements for inclusion on vaults.fyi
    • 🤖AI
  • API
    • Introduction
      • Market data
      • Transactional support
      • Portfolio tracking
      • Personalized insights
  • Endpoints
    • General
    • Detailed Vaults
    • Historical
    • Portfolio
    • Transactions
    • Legacy (v1) endpoints
      • v1 Market data
        • Get historical data
          • Get historical APY and TVL data on single vault over timestamp range
          • Get historical APY on single vault over timestamp range
          • Get historical TVL on single vault at single timestamp
          • Get historical APY on single vault at single timestamp
        • Get data for multiple vaults
        • Get data on single vault
          • Get APY on single vault
        • Get benchmark rates
        • Get supported vaults, networks & tokens
          • /vaults
          • /networks
          • /tokens
          • /tags
      • v1 Contextual insights
        • Top vault options for address
        • Get single top option for address
        • [Etherscan cards] Get top USD, top ETH vault for address
      • v1 Generate payloads
        • Prepare calldata
          • Supply/Deposit
          • Withdraw/Redeem
            • Request redeem
            • Claim redeem
          • Claim rewards
        • Get contract interaction details
        • Get supported assets
        • Get supported vaults
      • v1 Position tracking
        • Get user balances
        • Get user positions
        • Get list of past vault txns by user address
        • Get estimated returns for user's vault position
  • Case Studies
    • Kraken Wallet
    • Etherscan Cards
    • Gauntlet
  • Plans
    • Credits
      • Credits (v1 endpoints)
  • Links
    • vaults.fyi
    • X
    • Farcaster
    • Wallfacer Labs
Powered by GitBook
On this page
  1. API
  2. Introduction
  3. Market data
  4. Insights (Basic)
  5. Vault Endpoints

Vault Historical APY

The Vault Historical APY (GET /v1/vaults/{network}/{vaultAddress}/historical-apy/{timestamp}) endpoint is aimed at delivering past Annual Percentage Yield (APY) data for a specified vault. This data, based on the closest available record to a given timestamp, is crucial for users looking to perform trend analysis or understand the earnings performance over time.

Parameters

  • interval (required): Defines the time frame of the APY data requested. The user can choose from 1day, 7day, or 30day intervals to match their analysis needs.

  • vaultAddress (required): The unique address of the vault for which historical APY information is being queried. This is a path parameter in the endpoint URL.

  • network (required): The blockchain network where the vault is located. Accepted values include mainnet, arbitrum, optimism, polygon, base, and gnosis.

  • timestamp (required): A numeric value representing the timestamp for which the historical APY data is sought. The API aims to return data corresponding to the closest block time to this timestamp.

Responses

  • 200 OK: On success, the endpoint responds with a JSON object detailing the APY for the vault at the nearest available time to the provided timestamp.

A typical response would be structured as:

{
  "timestamp": 0,
  "blockNumber": 0,
  "apy": {
    "base": 0,
    "rewards": 0,
    "total": 0
  }
}

This includes:

  • timestamp which is the exact timestamp of the data returned.

  • blockNumber indicating the blockchain block that corresponds to the returned data.

  • apy providing the APY percentage value generated by the vault during that time, broken down into base, rewards and total APY.

The Vault Historical APY endpoint is an invaluable resource for financial analysis. It offers insights into the historical profitability of vault investments and enables comparison across different time intervals. This data can help support strategic investment decisions in DeFi.

Last updated 6 months ago