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
    • vaults.fyi API Overview
      • Insights API
      • Earn API
        • Product demo
        • Flow diagrams
      • Plans
        • Credits
    • Endpoints
      • 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
      • Contextual insights
        • Top vault options for address
        • Get single top option for address
        • [Etherscan cards] Get top USD, top ETH vault for address
      • Generate payloads (Earn API)
        • Prepare calldata
          • Supply/Deposit
          • Withdraw/Redeem
            • Request redeem
            • Claim redeem
          • Claim rewards
        • Get contract interaction details
        • Get supported assets
        • Get supported vaults
      • Position tracking (Portfolio API)
        • 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
  • Links
    • vaults.fyi
    • X
    • Farcaster
    • Wallfacer Labs
Powered by GitBook
On this page
  1. API
  2. Endpoints
  3. Contextual insights

Get single top option for address

PreviousTop vault options for addressNext[Etherscan cards] Get top USD, top ETH vault 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 single top vault 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

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

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

Default Response

{
  "requestedAddress": "text",
  "asset": {
    "name": "text",
    "assetAddress": "text",
    "assetCaip": "text",
    "symbol": "text",
    "decimals": 1,
    "networkName": "mainnet",
    "networkCaip": "text",
    "balanceNative": "text",
    "balanceUsd": 1
  },
  "vault": {
    "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"
    ]
  }
}