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