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
  2. Legacy (v1) endpoints
  3. v1 Contextual insights

Top vault options for address

Previousv1 Contextual insightsNextGet single top option for address

Last updated 2 months ago

Given a user address and specific preferences (e.g. networks and protocols to include/exclude, min. vault TVL, etc.), return a list of vault options for the user address.

post
Authorizations
Path parameters
userAddressstringRequiredPattern: ^0x[a-fA-F0-9]{40}$
Body
apyIntervalstring · enumOptional

Resolution of the APY data

Default: 7dayPossible values:
allowedAssetsstring[]Optional

Assets to be included (by symbol/ticker)

disallowedAssetsstring[]Optional

Assets to be excluded (by symbol/ticker)

allowedProtocolsstring[]Optional

Protocols to be included (by name)

disallowedProtocolsstring[]Optional

Protocols to be excluded (by name)

minimumBalanceThresholdnumberOptional

Minimum balance in USD of the assets to be included

Default: 1
minimumVaultTvlnumberOptional

Minimum TVL in USD of the vaults to be included

Default: 100000
transactionalOnlybooleanOptional

Boolean indicating if only transactional vaults should be included

transactionalFeaturedOnlybooleanOptional

Boolean indicating if only transactional vaults featured in app.vaults.fyi should be included

maxVaultsPerAssetinteger · min: 1 · max: 5Optional

Maximum number of vaults per asset

Default: 3
minApyintegerOptional

Minimum APY(in BPS) of the vaults to be included

alwaysReturnAssetsstring[]Optional

Symbols/tickers of assets to always return, regardless of balance

Default: []
distinctProtocolsbooleanOptional

Return only one vault per protocol for each asset

Responses
200
Default Response
application/json
post
POST //v1/portfolio/best-deposit-options/{userAddress} HTTP/1.1
Host: api.vaults.fyi
x-api-key: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 391

{
  "apyInterval": "1day",
  "allowedNetworks": [
    "mainnet"
  ],
  "disallowedNetworks": [
    "mainnet"
  ],
  "allowedAssets": [
    "text"
  ],
  "disallowedAssets": [
    "text"
  ],
  "allowedProtocols": [
    "text"
  ],
  "disallowedProtocols": [
    "text"
  ],
  "minimumBalanceThreshold": 1,
  "minimumVaultTvl": 1,
  "transactionalOnly": true,
  "transactionalFeaturedOnly": true,
  "maxVaultsPerAsset": 1,
  "minApy": 1,
  "alwaysReturnAssets": [
    "text"
  ],
  "distinctProtocols": true
}
200

Default Response

{
  "requestedAddress": "text",
  "userBalances": [
    {
      "asset": {
        "name": "text",
        "assetAddress": "text",
        "assetCaip": "text",
        "symbol": "text",
        "decimals": 1,
        "networkName": "mainnet",
        "networkCaip": "text",
        "balanceNative": "text",
        "balanceUsd": 1
      },
      "depositOptions": [
        {
          "name": "text",
          "protocol": {
            "name": "text",
            "product": "text",
            "version": "text",
            "protocolLogo": "https://example.com",
            "protocolUrl": "https://example.com",
            "description": "text"
          },
          "vaultAddress": "text",
          "vaultUrl": "https://example.com",
          "networkName": "mainnet",
          "networkCaip": "text",
          "tvlInUsd": 1,
          "apy": {
            "base": 1,
            "rewards": 1,
            "total": 1
          },
          "projectedAnnualEarnings": 1,
          "tags": [
            "text"
          ],
          "isTransactional": true
        }
      ]
    }
  ],
  "errors": {
    "unsupportedNetworks": [
      "text"
    ],
    "unsupportedAssets": [
      "text"
    ],
    "unsupportedProtocols": [
      "text"
    ]
  }
}