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
  • Plans
    • Credits
      • Credits (v1 endpoints)
  • Links
    • vaults.fyi
    • X
    • Farcaster
    • Wallfacer Labs
Powered by GitBook
On this page
  1. Endpoints

Portfolio

PreviousHistoricalNextTransactions

Last updated 3 days ago

get

Retrieves historical APY and TVL for a specific vault, based on the provided query parameters.

Authorizations
Path parameters
userAddressstringRequired

User address to be used for best vault calculation

Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
allowedAssetsstring[]Optional

Assets to be included by symbol(ticker).

disallowedAssetsstring[]Optional

Assets to be excluded by symbol(ticker). The parameter is ignored if "allowedAssets" is specified.

allowedProtocolsstring[]Optional

Protocols to be included by name.

disallowedProtocolsstring[]Optional

Protocols to be excluded by name. The parameter is ignored if "allowedProtocols" is specified.

minTvlintegerOptional

Minimum TVL in USD of the vaults to be included

onlyTransactionalbooleanOptional

Include only vaults that are supported in the transactional interface.

onlyAppFeaturedbooleanOptional

Include only vaults that are featured in app.vaults.fyi

apyIntervalstring · enumOptional

Interval for APY data. Possible values: 1day, 7day, 30day

Default: 7dayPossible values:
minApynumberOptional

Minimum APY of the vault to be included

minUsdAssetValueThresholdnumberOptional

Minimum USD value of the vault to be included

Default: 0.5
Responses
200
Default Response
application/json
400
Default Response
application/json
401
Default Response
application/json
403
Default Response
application/json
500
Default Response
application/json
get
GET //v2/portfolio/best-vault/{userAddress} HTTP/1.1
Host: api.vaults.fyi
x-api-key: YOUR_API_KEY
Accept: */*
{
  "requestedAddress": "text",
  "asset": {
    "address": "text",
    "assetCaip": "text",
    "name": "text",
    "symbol": "text",
    "decimals": 1,
    "assetLogo": "https://example.com",
    "assetPriceInUsd": "text",
    "balanceNative": "text",
    "balanceUsd": "text"
  },
  "vault": {
    "name": "text",
    "address": "text",
    "network": {
      "name": "mainnet",
      "chainId": 1,
      "networkCaip": "text"
    },
    "isTransactional": true,
    "isAppFeatured": true,
    "protocol": {
      "name": "text",
      "product": "text",
      "version": "text",
      "protocolUrl": "text",
      "description": "text",
      "protocolLogo": "text"
    },
    "tvl": {
      "usd": "text",
      "native": "text"
    },
    "tags": [
      "text"
    ],
    "apy": {
      "base": 1,
      "reward": 1,
      "total": 1
    },
    "projectedUsdAnnualEarnings": "text",
    "lendUrl": "text",
    "protocolVaultUrl": "text"
  },
  "errors": {
    "unsupportedNetworks": [
      "text"
    ],
    "unsupportedAssets": [
      "text"
    ],
    "unsupportedProtocols": [
      "text"
    ]
  }
}
get

Retrieves historical APY and TVL for a specific vault, based on the provided query parameters.

Authorizations
Path parameters
userAddressstringRequired

User address to be used for best vault calculation

Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
allowedAssetsstring[]Optional

Assets to be included by symbol(ticker).

disallowedAssetsstring[]Optional

Assets to be excluded by symbol(ticker). The parameter is ignored if "allowedAssets" is specified.

allowedProtocolsstring[]Optional

Protocols to be included by name.

disallowedProtocolsstring[]Optional

Protocols to be excluded by name. The parameter is ignored if "allowedProtocols" is specified.

minTvlintegerOptional

Minimum TVL in USD of the vaults to be included

onlyTransactionalbooleanOptional

Include only vaults that are supported in the transactional interface.

onlyAppFeaturedbooleanOptional

Include only vaults that are featured in app.vaults.fyi

maxTvlintegerOptional

Maximum TVL in USD of the vaults to be included

tagsstring[]Optional

Tags to be included.

apyIntervalstring · enumOptional

Interval for APY data. Possible values: 1day, 7day, 30day

Default: 7dayPossible values:
minUsdAssetValueThresholdnumberOptional

Minimum USD value of the vault to be included

Default: 0.5
Responses
200
Default Response
application/json
400
Default Response
application/json
401
Default Response
application/json
403
Default Response
application/json
500
Default Response
application/json
get
GET //v2/portfolio/positions/{userAddress} HTTP/1.1
Host: api.vaults.fyi
x-api-key: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "address": "text",
      "network": {
        "name": "mainnet",
        "chainId": 1,
        "networkCaip": "text"
      },
      "asset": {
        "address": "text",
        "assetCaip": "text",
        "name": "text",
        "symbol": "text",
        "decimals": 1,
        "assetLogo": "https://example.com",
        "assetPriceInUsd": "text",
        "balanceNative": "text",
        "balanceUsd": "text",
        "unclaimedNative": "text",
        "unclaimedUsd": "text",
        "positionValueInAsset": "text"
      },
      "isTransactional": true,
      "isAppFeatured": true,
      "name": "text",
      "protocol": {
        "name": "text",
        "product": "text",
        "version": "text",
        "protocolUrl": "text",
        "description": "text",
        "protocolLogo": "text"
      },
      "apy": {
        "base": 1,
        "reward": 1,
        "total": 1
      },
      "additionalAssets": [
        {
          "address": "text",
          "assetCaip": "text",
          "name": "text",
          "symbol": "text",
          "decimals": 1,
          "assetLogo": "https://example.com",
          "assetPriceInUsd": "text",
          "balanceNative": "text",
          "balanceUsd": "text",
          "unclaimedNative": "text",
          "unclaimedUsd": "text",
          "positionValueInAsset": "text"
        }
      ],
      "lpToken": {
        "address": "text",
        "tokenCaip": "text",
        "name": "text",
        "symbol": "text",
        "decimals": 1,
        "balanceNative": "text",
        "balanceUsd": "text",
        "unclaimedNative": "text",
        "unclaimedUsd": "text",
        "positionValueInAsset": "text",
        "assetPriceInUsd": "text"
      },
      "childrenVaults": [
        {
          "address": "text",
          "asset": {
            "address": "text",
            "assetCaip": "text",
            "name": "text",
            "symbol": "text",
            "decimals": 1,
            "assetLogo": "https://example.com",
            "assetPriceInUsd": "text",
            "balanceNative": "text",
            "balanceUsd": "text",
            "unclaimedNative": "text",
            "unclaimedUsd": "text",
            "positionValueInAsset": "text"
          },
          "lpToken": {
            "address": "text",
            "tokenCaip": "text",
            "name": "text",
            "symbol": "text",
            "decimals": 1,
            "balanceNative": "text",
            "balanceUsd": "text",
            "unclaimedNative": "text",
            "unclaimedUsd": "text",
            "positionValueInAsset": "text",
            "assetPriceInUsd": "text"
          },
          "additionalAssets": [
            {
              "address": "text",
              "assetCaip": "text",
              "name": "text",
              "symbol": "text",
              "decimals": 1,
              "assetLogo": "https://example.com",
              "assetPriceInUsd": "text",
              "balanceNative": "text",
              "balanceUsd": "text",
              "unclaimedNative": "text",
              "unclaimedUsd": "text",
              "positionValueInAsset": "text"
            }
          ]
        }
      ]
    }
  ],
  "errors": {
    "unsupportedNetworks": [
      "text"
    ],
    "unsupportedAssets": [
      "text"
    ],
    "unsupportedProtocols": [
      "text"
    ]
  }
}
get

Retrieves historical APY and TVL for a specific vault, based on the provided query parameters.

Authorizations
Path parameters
userAddressstringRequired

User address to be used for best vault calculation

Pattern: ^0x[a-fA-F0-9]{40}$
networkstring · enumRequired

Include only vaults with provided network(name or CAIP)

Possible values:
vaultAddressstringRequired

Address of the vault for which the data will be returned

Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
apyIntervalstring · enumOptional

Interval for APY data. Possible values: 1day, 7day, 30day

Default: 7dayPossible values:
Responses
200
Default Response
application/json
400
Default Response
application/json
401
Default Response
application/json
403
Default Response
application/json
500
Default Response
application/json
get
GET //v2/portfolio/positions/{userAddress}/{network}/{vaultAddress} HTTP/1.1
Host: api.vaults.fyi
x-api-key: YOUR_API_KEY
Accept: */*
{
  "address": "text",
  "network": {
    "name": "mainnet",
    "chainId": 1,
    "networkCaip": "text"
  },
  "asset": {
    "address": "text",
    "assetCaip": "text",
    "name": "text",
    "symbol": "text",
    "decimals": 1,
    "assetLogo": "https://example.com",
    "assetPriceInUsd": "text",
    "balanceNative": "text",
    "balanceUsd": "text",
    "unclaimedNative": "text",
    "unclaimedUsd": "text",
    "positionValueInAsset": "text"
  },
  "isTransactional": true,
  "isAppFeatured": true,
  "name": "text",
  "protocol": {
    "name": "text",
    "product": "text",
    "version": "text",
    "protocolUrl": "text",
    "description": "text",
    "protocolLogo": "text"
  },
  "apy": {
    "base": 1,
    "reward": 1,
    "total": 1
  },
  "additionalAssets": [
    {
      "address": "text",
      "assetCaip": "text",
      "name": "text",
      "symbol": "text",
      "decimals": 1,
      "assetLogo": "https://example.com",
      "assetPriceInUsd": "text",
      "balanceNative": "text",
      "balanceUsd": "text",
      "unclaimedNative": "text",
      "unclaimedUsd": "text",
      "positionValueInAsset": "text"
    }
  ],
  "lpToken": {
    "address": "text",
    "tokenCaip": "text",
    "name": "text",
    "symbol": "text",
    "decimals": 1,
    "balanceNative": "text",
    "balanceUsd": "text",
    "unclaimedNative": "text",
    "unclaimedUsd": "text",
    "positionValueInAsset": "text",
    "assetPriceInUsd": "text"
  },
  "childrenVaults": [
    {
      "address": "text",
      "asset": {
        "address": "text",
        "assetCaip": "text",
        "name": "text",
        "symbol": "text",
        "decimals": 1,
        "assetLogo": "https://example.com",
        "assetPriceInUsd": "text",
        "balanceNative": "text",
        "balanceUsd": "text",
        "unclaimedNative": "text",
        "unclaimedUsd": "text",
        "positionValueInAsset": "text"
      },
      "lpToken": {
        "address": "text",
        "tokenCaip": "text",
        "name": "text",
        "symbol": "text",
        "decimals": 1,
        "balanceNative": "text",
        "balanceUsd": "text",
        "unclaimedNative": "text",
        "unclaimedUsd": "text",
        "positionValueInAsset": "text",
        "assetPriceInUsd": "text"
      },
      "additionalAssets": [
        {
          "address": "text",
          "assetCaip": "text",
          "name": "text",
          "symbol": "text",
          "decimals": 1,
          "assetLogo": "https://example.com",
          "assetPriceInUsd": "text",
          "balanceNative": "text",
          "balanceUsd": "text",
          "unclaimedNative": "text",
          "unclaimedUsd": "text",
          "positionValueInAsset": "text"
        }
      ]
    }
  ]
}
get

Analyzes a user's existing wallet balances and recommends optimal vault deposit opportunities based on yield performance, risk parameters, and user-defined criteria.

Authorizations
Path parameters
userAddressstringRequired

User address to be used for best vault calculation

Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
allowedAssetsstring[]Optional

Assets to be included by symbol(ticker).

disallowedAssetsstring[]Optional

Assets to be excluded by symbol(ticker). The parameter is ignored if "allowedAssets" is specified.

allowedProtocolsstring[]Optional

Protocols to be included by name.

disallowedProtocolsstring[]Optional

Protocols to be excluded by name. The parameter is ignored if "allowedProtocols" is specified.

minTvlintegerOptional

Minimum TVL in USD of the vaults to be included

onlyTransactionalbooleanOptional

Include only vaults that are supported in the transactional interface.

onlyAppFeaturedbooleanOptional

Include only vaults that are featured in app.vaults.fyi

apyIntervalstring · enumOptional

Interval for APY data. Possible values: 1day, 7day, 30day

Default: 7dayPossible values:
minApynumberOptional

Minimum APY of the vault to be included

minUsdAssetValueThresholdnumberOptional

Minimum USD value of the vault to be included

Default: 0.5
alwaysReturnAssetsstring[]Optional

Assets to always be included in the response.

maxVaultsPerAssetintegerOptional

Maximum number of vaults to be included per asset.

Default: 3
Responses
200
Default Response
application/json
400
Default Response
application/json
401
Default Response
application/json
403
Default Response
application/json
500
Default Response
application/json
get
GET //v2/portfolio/best-deposit-options/{userAddress} HTTP/1.1
Host: api.vaults.fyi
x-api-key: YOUR_API_KEY
Accept: */*
{
  "requestedAddress": "text",
  "userBalances": [
    {
      "asset": {
        "address": "text",
        "assetCaip": "text",
        "name": "text",
        "symbol": "text",
        "decimals": 1,
        "assetLogo": "https://example.com",
        "assetPriceInUsd": "text",
        "balanceNative": "text",
        "balanceUsd": "text"
      },
      "depositOptions": [
        {
          "name": "text",
          "address": "text",
          "network": {
            "name": "mainnet",
            "chainId": 1,
            "networkCaip": "text"
          },
          "isTransactional": true,
          "isAppFeatured": true,
          "protocol": {
            "name": "text",
            "product": "text",
            "version": "text",
            "protocolUrl": "text",
            "description": "text",
            "protocolLogo": "text"
          },
          "tvl": {
            "usd": "text",
            "native": "text"
          },
          "tags": [
            "text"
          ],
          "apy": {
            "base": 1,
            "reward": 1,
            "total": 1
          },
          "projectedUsdAnnualEarnings": "text",
          "lendUrl": "text",
          "protocolVaultUrl": "text"
        }
      ]
    }
  ],
  "errors": {
    "unsupportedNetworks": [
      "text"
    ],
    "unsupportedAssets": [
      "text"
    ],
    "unsupportedProtocols": [
      "text"
    ]
  }
}
get

Retrieves the cumulative investment returns for a user's position in a specific vault, showing total yield earned in both native token amount and USD value.

Authorizations
Path parameters
userAddressstringRequired

User address to get returns for

Pattern: ^0x[a-fA-F0-9]{40}$
networkstring · enumRequired

Network to get returns for

Possible values:
vaultAddressstringRequired

Vault address to get returns for

Pattern: ^0x[a-fA-F0-9]{40}$
Responses
200
Default Response
application/json
400
Default Response
application/json
401
Default Response
application/json
403
Default Response
application/json
500
Default Response
application/json
get
GET //v2/portfolio/returns/{userAddress}/{network}/{vaultAddress} HTTP/1.1
Host: api.vaults.fyi
x-api-key: YOUR_API_KEY
Accept: */*
{
  "usd": "text",
  "native": "text"
}
get

Get balances of idle assets for a specific user address.

Authorizations
Path parameters
userAddressstringRequired

User address to be used for best vault calculation

Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
allowedAssetsstring[]Optional

Assets to be included by symbol(ticker).

disallowedAssetsstring[]Optional

Assets to be excluded by symbol(ticker). The parameter is ignored if "allowedAssets" is specified.

minUsdAssetValueThresholdnumberOptional

Minimum USD value of the asset to be included

Default: 0.5
Responses
200
Default Response
application/json
400
Default Response
application/json
401
Default Response
application/json
403
Default Response
application/json
500
Default Response
application/json
get
GET //v2/portfolio/idle-assets/{userAddress} HTTP/1.1
Host: api.vaults.fyi
x-api-key: YOUR_API_KEY
Accept: */*
{
  "data": [
    {
      "address": "text",
      "assetCaip": "text",
      "name": "text",
      "symbol": "text",
      "decimals": 1,
      "assetLogo": "https://example.com",
      "assetPriceInUsd": "text",
      "balanceNative": "text",
      "balanceUsd": "text",
      "network": {
        "name": "mainnet",
        "chainId": 1,
        "networkCaip": "text"
      }
    }
  ],
  "errors": {
    "unsupportedNetworks": [
      "text"
    ],
    "unsupportedAssets": [
      "text"
    ]
  }
}
get

Retrieves chronological event history for a user's interactions with a specific vault, including deposits, withdrawals, and transfers with timestamp and block number information.

Authorizations
Path parameters
userAddressstringRequired

User address to get returns for

Pattern: ^0x[a-fA-F0-9]{40}$
networkstring · enumRequired

Network to get returns for

Possible values:
vaultAddressstringRequired

Vault address to get returns for

Pattern: ^0x[a-fA-F0-9]{40}$
Query parameters
pageintegerOptional

Page number (starting from 0)

Default: 0
perPageinteger · max: 100Optional

Number of items per page

Default: 100
fromTimestampintegerOptional

Timestamp for the start of the time period for which data will be fetched

Default: 0
toTimestampintegerOptional

Timestamp for the end of the time period for which data will be fetched

Responses
200
Portfolio events for a user, paginated by timestamp
application/json
400
Default Response
application/json
401
Default Response
application/json
403
Default Response
application/json
500
Default Response
application/json
get
GET //v2/portfolio/events/{userAddress}/{network}/{vaultAddress} HTTP/1.1
Host: api.vaults.fyi
x-api-key: YOUR_API_KEY
Accept: */*
{
  "itemsOnPage": 1,
  "nextPage": 1,
  "data": [
    {
      "timestamp": 1,
      "blockNumber": "text",
      "eventType": "Deposit",
      "eventAssetAmount": {
        "usd": "text",
        "native": "text"
      },
      "resultingPosition": {
        "usd": "text",
        "native": "text"
      }
    }
  ]
}
  • GET/v2/portfolio/best-vault/{userAddress}
  • GET/v2/portfolio/positions/{userAddress}
  • GET/v2/portfolio/positions/{userAddress}/{network}/{vaultAddress}
  • GET/v2/portfolio/best-deposit-options/{userAddress}
  • GET/v2/portfolio/returns/{userAddress}/{network}/{vaultAddress}
  • GET/v2/portfolio/idle-assets/{userAddress}
  • GET/v2/portfolio/events/{userAddress}/{network}/{vaultAddress}