# MCP Server: Onchain Yield Tools for Claude, Cursor, and Any MCP Client Source: https://docs.vaults.fyi/ai-agents/mcp-server Connect Claude Desktop, Claude Code, Cursor, and any streamable-HTTP MCP client to the full Vaults.fyi data and transaction surface — discovery, history, recommendations, position tracking, and onchain transaction building. The Vaults.fyi MCP server connects MCP-compatible clients to the full Vaults.fyi data and transaction surface. Discovery, history, recommendations, position tracking, and transaction building are all callable as tools — your client decides which to use and how to chain them. Hosted at `https://mcp.vaults.fyi/mcp` over streamable HTTP. 38 tools. Bearer-token auth. No server-side private keys: every transaction tool returns calldata for your client to sign. ## What people use it for A few prompts that exercise meaningful tool chains: > "Find me the best USDC yields right now with TVL over \$10M and no active warnings." > "What yields beat the USDC benchmark by more than 200 bps over the last 30 days?" > "Show me Steakhouse and Gauntlet curated Morpho vaults across all stablecoins." > "Which Aave v3 markets have the highest USDC supply APY across networks?" > "I'd consider sUSDe and sUSDS — find vaults with composite APY above 8% accounting for the underlying asset rate." > "Plot Fluid USD Vault APY against the USDC benchmark for the last 90 days." > "Audit positions for 0xabc… — total deposited, current value, unclaimed rewards, and any flagged exposure." > "Build a deposit of 10,000 USDC into the highest-rated Morpho vault on Base and return the calldata." ## Quickstart You'll need a Vaults.fyi API key. Request one at [portal.vaults.fyi](https://portal.vaults.fyi/). ### Recommended setup Configure Vaults.fyi across supported MCP clients with one command: ```bash theme={null} npx @vaultsfyi/scripts init-mcp --api-key YOUR_VAULTS_API_KEY ``` To configure one client: ```bash theme={null} npx @vaultsfyi/scripts init-mcp --api-key YOUR_VAULTS_API_KEY --client cursor ``` The installer creates or updates your local MCP config and adds the `vaults-fyi` server entry without removing existing servers. Supported clients: Claude Desktop, Cursor, Claude Code, Windsurf, VS Code, Zed, Amazon Q, and GitHub Copilot CLI. Restart your client after installation. The 38 Vaults.fyi tools should appear in the client's MCP tools list. Without `--api-key`, the installer prompts interactively. In CI and other non-interactive environments, pass `--api-key`. ### Manual setup Claude Desktop may require a local bridge for remote MCP servers. Add Vaults.fyi through [`mcp-remote`](https://www.npmjs.com/package/mcp-remote) in your Claude Desktop config (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS, `%APPDATA%\Claude\claude_desktop_config.json` on Windows): ```json claude_desktop_config.json theme={null} { "mcpServers": { "vaults-fyi": { "command": "npx", "args": [ "-y", "mcp-remote@latest", "https://mcp.vaults.fyi/mcp", "--header", "Authorization:${VAULTS_AUTH_HEADER}", "--transport", "http-only" ], "env": { "VAULTS_AUTH_HEADER": "Bearer YOUR_VAULTS_API_KEY" } } } } ``` Restart Claude Desktop. The 38 Vaults.fyi tools will appear in the tools menu. Add the server with one command: ```bash theme={null} claude mcp add --transport http vaults-fyi https://mcp.vaults.fyi/mcp \ --header "Authorization: Bearer YOUR_VAULTS_API_KEY" ``` Verify with `claude mcp list`. Any client that supports streamable-HTTP MCP works. Point it at `https://mcp.vaults.fyi/mcp` and pass `Authorization: Bearer YOUR_VAULTS_API_KEY` as a header. Health check: ```bash theme={null} curl -i https://mcp.vaults.fyi/health ``` ## What you can do Six capability surfaces, each backed by several tools: Search across networks, protocols, assets, curators, and tags. Filter by TVL, APY, score, and active warnings in a single structured query. Reputation Scores and inline flags (bad debt exposure, qualified-investor gates, depegs, recent incidents) ship with the data. No separate lookup. APY, TVL, share-price, and total-return time series for any vault. Asset-price history and benchmark APY for relative performance. Deposit, withdraw, claim rewards, and approve. Tools return decoded calldata and signing instructions; your client signs and submits. Aggregate positions and rewards across networks for any address. Drill into per-position cost basis and event history. Approve, transfer, wrap, and unwrap as primitives — useful when an agent is composing multi-step flows. ## Tool inventory 38 tools, grouped by purpose. Each returns structured JSON optimized for agent consumption. | Tool | Purpose | | - | - | | `vaults_search` | Filtered search across vaults (TVL, APY, score, curator, tags, warnings) | | `vaults_list` | Paginated full vault list | | `networks` | Supported chains | | `protocols` | Supported protocols | | `assets` | Supported assets | | `curators` | Named curators (79+) | | `tags` | Vault tags (e.g., `top-curator`, `lst`, `rwa`) | | Tool | Purpose | | - | - | | `vault_details` | Full vault metadata, including flags and Reputation Score | | `vault_apy` | Current APY (headline, base, rewards, composite) | | `vault_tvl` | Current TVL | | Tool | Purpose | | - | - | | `vault_apy_history` | APY time series | | `vault_tvl_history` | TVL time series | | `vault_share_price_history` | Share-price time series | | `vault_history` | Combined APY/TVL/share-price | | `vault_returns` | Realized total returns | | `asset_price_history` | Underlying asset price | | `benchmark_apy` | Asset-level benchmark APY | | `benchmark_apy_history` | Benchmark APY time series | | Tool | Purpose | | - | - | | `best_vault` | Single best-fit vault for a given asset/criteria | | `best_deposit_options` | Ranked deposit options | | Tool | Purpose | | - | - | | `positions` | All positions for an address | | `position_details` | Per-position cost basis, current value, P\&L | | `wallet_balances` | Token balances across networks | | `token_balance` | Single token balance | | `user_events` | Deposit/withdraw/claim history | | `rewards` | Outstanding reward entitlements | | Tool | Purpose | | - | - | | `transaction_context` | Pre-flight context (allowance, balances, gas) | | `build_vault_tx` | Deposit/withdraw calldata with decoded steps | | `build_claim_rewards` | Claim calldata for a single vault | | `claim_all_rewards` | Multi-vault claim calldata | | `withdraw_all_positions` | Multi-vault withdraw calldata | | `submit_tx_hash` | Register a submitted hash for status tracking | | `get_transaction_status` | Status of a tracked transaction | | Tool | Purpose | | - | - | | `approve_erc20` | ERC-20 approval calldata | | `transfer_erc20` | ERC-20 transfer calldata | | `transfer_native` | Native transfer calldata | | `wrap_native` | Wrap native to wrapped equivalent | | `unwrap_native` | Unwrap | ## Authentication Every request requires a bearer token: ``` Authorization: Bearer YOUR_VAULTS_API_KEY ``` The API key is forwarded only to Vaults.fyi API calls and is never placed in signing URLs or transaction payloads. Request a key at [portal.vaults.fyi](https://portal.vaults.fyi/). For keyless pay-per-request access via USDC on Base, see [x402](/ai-agents/x402). ## Signing model Transaction tools (`build_vault_tx`, `build_claim_rewards`, `approve_erc20`, etc.) return structured calldata, not signed transactions. The server holds no private keys. Each response includes: * `stepDecodings` — human-readable description of each call * `signingInstructions` — step-by-step guidance for the signer * `signingPaths` — supported signing surfaces (e.g., wallet, [OWS](https://docs.openwallet.sh/)) * `submitTool` — the tool to call after signing (`submit_tx_hash`) * `statusTool` — the tool to call for status (`get_transaction_status`) This keeps key custody with the client. Agents that integrate with [OpenWallet Standard](https://docs.openwallet.sh/) can sign and submit without leaving the conversation. ## Going further The full surface area for agents: MCP, x402, and the LLM-optimized API reference. Pay-per-request access on Base, no API key required. Full reference at `llms.txt` and `llms-full.txt`. Underlying REST API the MCP wraps. # AI Agents & LLMs: Onchain Yield with Vaults.fyi Source: https://docs.vaults.fyi/ai-agents/overview Use the Vaults.fyi API to build AI agents that discover, evaluate, execute, and manage DeFi yield strategies — no protocol-specific logic required. Vaults.fyi gives AI agents and LLMs a single, structured interface to the onchain yield market. Instead of writing protocol-specific integrations for each of the 80+ supported protocols, including Solana protocols available through the Beta SVM API, you call one API that handles discovery, evaluation, transaction preparation, and portfolio management — and returns data in a consistent format your agent can reason over directly. The full API reference optimized for LLM consumption is available at [llms.txt](https://api.vaults.fyi/llms.txt). This file contains endpoint specifications, SDK usage, and best practices for credit-efficient development. ## What your agent can do * **Discover yield opportunities** — Query vaults filtered by network, asset, protocol, APY range, or TVL. Every result includes standardized market data sourced hourly from onchain contracts. * **Evaluate risk** — Use the Reputation Score and benchmark rates to compare vaults against money-market baselines and assess protocol risk without custom logic. * **Execute transactions** — Receive ready-to-sign deposit, redeem, and reward-claim payloads. No intermediary contracts, fully non-custodial. * **Handle advanced protocols** — The API abstracts deferred deposits, delayed withdrawals, and multi-step flows so your agent doesn't need to model each protocol's behavior. * **Claim rewards** — Merkl reward claiming is supported via `/v2/transactions/rewards/claim/{userAddress}`. * **Manage portfolios** — Track user positions, detect idle assets, and surface personalized opportunities matched to wallet holdings via portfolio endpoints. ## Key advantages **Single API, no protocol-specific logic.** One integration covers 1,000+ vaults across 80+ protocols, including Solana/SVM vault coverage in Beta. You don't need to maintain separate adapters or ABIs per protocol. **Ready-to-sign transaction payloads.** Deposit and redeem endpoints return fully formed, signable transaction objects. Your agent submits them directly — no transaction construction required. **Reputation scores and benchmarks for risk assessment.** Every vault exposes a reputation score and is benchmarked against reference rates. Your agent can filter by risk tier without custom scoring logic. **Advanced protocol handling is abstracted.** Deferred deposits, delayed withdrawals, and queued redemptions are handled by the API layer. Your agent sees a consistent interface regardless of the underlying protocol's mechanics. **Reward claiming via Merkl.** The API integrates Merkl reward data and generates ready-to-submit claim transactions, so agents can manage the full yield lifecycle including harvesting. **Portfolio management endpoints.** Endpoints like `/v2/portfolio/positions/{userAddress}`, `/v2/portfolio/idle-assets/{userAddress}`, and `/v2/portfolio/best-vault/{userAddress}` give agents the full context they need to make allocation decisions for a given wallet. ## Integration options Choose the integration method that fits your workflow: Connect Claude Desktop, Claude Code, Cursor, or any streamable-HTTP MCP client to the full Vaults.fyi tool surface. 38 tools for discovery, history, recommendations, position tracking, and onchain transaction building. Access the API without an API key using the x402 payment protocol. Your agent pays per request in USDC on Base — ideal for autonomous systems with their own onchain wallets. # Keyless API Access with x402 Pay-Per-Request Source: https://docs.vaults.fyi/ai-agents/x402 Use the x402 protocol to access the Vaults.fyi API without an API key — pay per request in USDC on Base from your agent's onchain wallet. The Vaults.fyi API supports the [x402 payment protocol](https://www.x402.org/) for keyless, pay-per-request access using USDC on Base. Instead of managing API keys, your agent pays for each request directly from its onchain wallet. This makes x402 ideal for autonomous agents and systems that already hold assets onchain. ## How it works 1. Send a request with the `x-402-auth: true` header — no API key needed. 2. Receive a `402 Payment Required` response containing payment details, including the current `maxAmountRequired`. 3. Sign a USDC payment on Base using your agent's wallet. 4. Resend the original request with the `X-Payment` proof header attached. 5. Receive a `200` response with the requested data. The [`x402`](https://www.npmjs.com/package/x402) JavaScript and Python libraries handle this payment flow automatically, so you don't need to implement the handshake manually. ## Quick start Install the x402 client library and make your first request: ```javascript javascript theme={null} import { wrapAxios } from "x402/axios"; import axios from "axios"; import { createWalletClient, http } from "viem"; import { privateKeyToAccount } from "viem/accounts"; import { base } from "viem/chains"; const account = privateKeyToAccount(process.env.PRIVATE_KEY); const walletClient = createWalletClient({ account, chain: base, transport: http(), }); const client = wrapAxios(axios, walletClient); const response = await client.get("https://api.vaults.fyi/v2/vaults", { headers: { "x-402-auth": "true" }, }); ``` ```python python theme={null} from x402.client import Client client = Client(private_key=PRIVATE_KEY, chain="base") response = client.get( "https://api.vaults.fyi/v2/vaults", headers={"x-402-auth": "true"}, ) ``` For a complete working example, see the [Agentic DeFi repo](https://github.com/WallfacerLabs/agentic_defi). ## Pricing All prices are in USDC on Base, charged per request. Payment is in USDC raw units (6 decimals) — for example, `5000` = \$0.005 USDC. The `402` response always contains the current `maxAmountRequired`. Prices are subject to change. | Price | Endpoints | | - | - | | \$0.005 | `/v2/networks`, `/v2/vaults`, `/v2/tags`, `/v2/assets`, `/v2/curators` | | \$0.01 | `/v2/detailed-vaults/{network}/{vaultId}/apy`, `/v2/detailed-vaults/{network}/{vaultId}/tvl` | | \$0.02 | `/v2/detailed-vaults/{network}/{vaultId}`, `/v2/portfolio/positions/{userAddress}` | | \$0.025 | `/v2/portfolio/best-deposit-options/{userAddress}`, `/v2/portfolio/idle-assets/{userAddress}`, `/v2/portfolio/best-vault/{userAddress}` | | \$0.05 | `/v2/transactions/*`, `/v2/transactions/rewards/claim/{userAddress}` | | \$0.75 | `/v2/detailed-vaults` (paginated list of all vaults) | | Free | `/v2/health` | `/v2/historical/*` endpoints are not available via x402 and require an API key. [Sign up](https://portal.vaults.fyi/signup) to get a key and access historical data endpoints. # Get advanced vault analytics Source: https://docs.vaults.fyi/api-reference/advanced-analytics/get-advanced-vault-analytics https://api.vaults.fyi/beta/documentation/json post /beta/advanced-analytics/{network}/{vaultId} Returns advanced analytics for a single vault. Use the POST body `select` to opt into analytics sections — max drawdown, withdrawal pause ratio, composition, utilization rate and/or the full v2 `detailedVault` payload. # List advanced vault analytics Source: https://docs.vaults.fyi/api-reference/advanced-analytics/list-advanced-vault-analytics https://api.vaults.fyi/beta/documentation/json post /beta/advanced-analytics Returns a paginated list of vaults with advanced analytics. Filtering/pagination is passed via querystring (mirrors the v2 detailed-vaults list endpoint). Use the POST body `select` to opt into per-item analytics sections — max drawdown, withdrawal pause ratio, utilization rate and/or the full v2 `detailedVault` payload. Pricing has a 1 credit request base and scales per returned item: each item costs 2 if `maxDrawdown` is included + 3 if `detailedVault` is included + 2 if `withdrawalPauseRatio` is included + 3 if `composition` is included + 3 if `utilizationRate` is included. # Alpha Source: https://docs.vaults.fyi/api-reference/alpha Early access features. These endpoints may change without notice and are not covered by stability guarantees. Alpha endpoints are experimental and subject to breaking changes at any time. They are not included in the standard API changelog. Use them to explore upcoming features, not in production flows that require stability. Alpha features are accessible using your existing API key. The endpoints below cover upcoming product areas that are still in active development. Where an endpoint supports `allowedProtocols` or `disallowedProtocols`, each value may be either a broad protocol name or a full [protocol ID](/concepts/supported-protocols#protocol-names-and-ids) for one product and version. ## Cross-chain intents Quote, execute, and track intent-based cross-chain position changes. This is the higher-level cross-chain transaction flow for products that want to move users into vault positions without building every bridge and execution step themselves. | Capability | How to call | Required inputs | | - | - | - | | Create a transaction intent quote | `POST /alpha/transactions/intent/getQuote` | JSON body: `userAddress`, `inputPosition`, `outputPosition`, `feeToken`, `provider` | | Execute a transaction intent | `POST /alpha/transactions/intent/execute` | JSON body: `payloadSignature`, `provider`. Optional body: `originalQuote` | | Check transaction intent status | `GET /alpha/transactions/intent/status` | Query: `crosschainTransactionId`, `provider` | ## CCTP bridge Build USDC bridge flows with transaction context, calldata generation, in-transit tracking, and bridge status checks. | Capability | How to call | Required inputs | | - | - | - | | Check CCTP balances and bridge context | `GET /alpha/transactions/cctp/context/{userAddress}/{srcNetwork}/{dstNetwork}/{assetAddress}` | Path: `userAddress`, `srcNetwork`, `dstNetwork`, `assetAddress` | | Build a CCTP bridge transaction | `GET /alpha/transactions/cctp/transactions/{action}/{userAddress}/{srcNetwork}/{dstNetwork}` | Path: `action`, `userAddress`, `srcNetwork`, `dstNetwork`. Optional query includes `assetAddress`, `amount`, `recipientAddress`, `transferType`, `useForwarding`, `message`, and `attestation` depending on the bridge step | | List CCTP transfers in transit | `GET /alpha/transactions/cctp/money-in-transit/{userAddress}` | Path: `userAddress` | | Check CCTP transfer status | `GET /alpha/transactions/cctp/status` | Query: `burnTxHash`, `srcNetwork` | ## Historical flows Inspect daily vault inflows and outflows for flow analytics, dashboards, and monitoring. | Capability | How to call | Required inputs | | - | - | - | | Fetch historical daily vault inflows and outflows | `GET /alpha/historical/{network}/{vaultId}/daily-flows` | Path: `network`, `vaultId`. Query: `fromDate`, `toDate`. Optional query: `page`, `perPage` | ## Historical positions Fetch a wallet's historical vault positions for account history, retention analytics, and portfolio timeline views. | Capability | How to call | Required inputs | | - | - | - | | List historical positions for a wallet | `GET /alpha/historical-positions/{userAddress}` | Path: `userAddress`. Optional query: `fromTimestamp`, `toTimestamp` | ## Historical balances Reconstruct a wallet's vault balances at a specific point in time. This is useful for historical account snapshots, period reporting, retention analysis, and backtesting portfolio views against previous user exposure. | Capability | How to call | Required inputs | | - | - | - | | Fetch historical balances for a wallet | `GET /alpha/historical-balances/{userAddress}/{timestamp}` | Path: `userAddress`, `timestamp`. Optional query filters include `allowedNetworks`, `disallowedNetworks`, `allowedAssets`, `disallowedAssets`, `allowedProtocols`, `disallowedProtocols`, `minTvl`, `maxTvl`, `minApy`, `maxApy`, `minVaultScore`, `tags`, `curators`, `onlyTransactional`, `onlyAppFeatured`, `allowCorrupted`, `allowVaultsWithWarnings`, `minUsdAssetValueThreshold`, `apyInterval`, `sortBy`, and `sortOrder` | ## Holders Analyze vault holders and LP-token balances for concentration, ownership, and distribution views. | Capability | How to call | Required inputs | | - | - | - | | List vault holders and LP-token balances | `GET /alpha/{network}/{vaultId}/holders` | Path: `network`, `vaultId`. Optional query: `page`, `perPage` | If you're interested in any of these areas, [sign up](https://portal.vaults.fyi/signup) to get an API key and start using Alpha endpoints. Existing customers can reach the team via [Telegram](https://t.me/vaultsfyisupport) or [email](mailto:support@wallfacer.io) to share feedback. # Benchmarks Source: https://docs.vaults.fyi/api-reference/benchmarks DeFi benchmark APY rates for USD and ETH strategies, including historical time-series. Reference rates representing baseline DeFi yield for USD and ETH strategies. Use these to compare vault performance against the broader market. | Capability | How to call | Required inputs | | - | - | - | | Fetch the current benchmark rate for a network | [`GET /v2/benchmarks/{network}`](/api-reference/benchmarks/get-benchmark-rate) | Path: `network`. Query: `code` | | Fetch historical benchmark rates for a network | [`GET /v2/historical-benchmarks/{network}`](/api-reference/benchmarks/get-historical-benchmarks) | Path: `network`. Query: `code`. Optional query: `fromTimestamp`, `toTimestamp`, `page`, `perPage` | # Get benchmark rate Source: https://docs.vaults.fyi/api-reference/benchmarks/get-benchmark-rate https://api.vaults.fyi/v2/documentation/json get /v2/benchmarks/{network} Retrieves benchmark APY data for the specified network and benchmark code. # Get historical benchmarks Source: https://docs.vaults.fyi/api-reference/benchmarks/get-historical-benchmarks https://api.vaults.fyi/v2/documentation/json get /v2/historical-benchmarks/{network} Retrieves historical benchmark APY data for the specified network and benchmark code with pagination. # Beta Source: https://docs.vaults.fyi/api-reference/beta Features in testing. More stable than Alpha, but may still change before general availability. Beta endpoints are functional and tested but not yet part of the stable API. Interfaces may change before general availability. Not recommended for production use without monitoring. Beta features are accessible using your existing API key. The endpoints below cover product areas that are being validated before general availability. Where an endpoint supports `allowedProtocols` or `disallowedProtocols`, each value may be either a broad protocol name or a full [protocol ID](/concepts/supported-protocols#protocol-names-and-ids) for one product and version. ## Solana vaults Build Solana/SVM vault integrations alongside the EVM vault API surface. These endpoints cover Solana vault discovery, detailed vault data, wallet positions and events, idle assets, and ready-to-sign transaction construction. Detailed vault responses can include an optional `lpToken` object with `address` (the LP-token mint), `tokenCaip` (its CAIP-19 identifier), `name`, `symbol`, and `decimals`. The object is omitted when the required metadata is unavailable. Idle-asset responses include token `name` and `symbol`, plus `assetLogo` where available, alongside the address, decimals, and balance. For single-asset lookups, unavailable names and symbols can be empty strings. | Capability | How to call | Required inputs | | - | - | - | | List SVM vault identifiers | `GET /beta/svm/vaults` | None | | List SVM detailed vaults | `GET /beta/svm/detailed-vaults` | None. Optional query filters include `page`, `perPage`, `assetSymbol`, `allowedAssets`, `disallowedAssets`, `allowedProtocols`, `disallowedProtocols`, `allowedAssetMints`, `disallowedAssetMints`, `minTvl`, `maxTvl`, `minApy`, `maxApy`, `sortBy`, and `sortOrder` | | Fetch one SVM detailed vault | `GET /beta/svm/detailed-vaults/{vaultAddress}` | Path: `vaultAddress` | | List SVM positions for a wallet | `GET /beta/svm/portfolio/positions/{userAddress}` | Path: `userAddress`. Optional query: `apyInterval`, `minUsdAssetValueThreshold` | | List SVM portfolio events for a wallet | `GET /beta/svm/portfolio/events/{userAddress}` | Path: `userAddress` | | List SVM portfolio events for one vault | `GET /beta/svm/portfolio/events/{userAddress}/{vaultAddress}` | Path: `userAddress`, `vaultAddress` | | List idle SVM assets for a wallet | `GET /beta/svm/portfolio/idle-assets/{userAddress}` | Path: `userAddress`. Optional query: `allowedAssets`, `disallowedAssets` | | Fetch one idle SVM asset | `GET /beta/svm/portfolio/idle-assets/{userAddress}/{assetAddress}` | Path: `userAddress`, `assetAddress` | | Check balances and limits before building an SVM transaction | `GET /beta/svm/transactions/context/{userAddress}/{vaultAddress}` | Path: `userAddress`, `vaultAddress` | | Build a ready-to-sign SVM transaction | `GET /beta/svm/transactions/{action}/{userAddress}/{vaultAddress}` | Path: `action`, `userAddress`, `vaultAddress`. Query: `assetAddress`, plus `amount` when the action requires an amount. Optional query: `simulate` | ### Reading SVM position values `GET /beta/svm/portfolio/positions/{userAddress}` returns positions in `data`. Each position's `asset` object includes: | Field | Meaning | | - | - | | `balanceNative` | Current position value in underlying-asset base units, as an integer string | | `positionValueInAsset` | Optional explicit position-value field, currently equal to `balanceNative` | | `balanceUsd` | Current position value in USD, as a string | | `unclaimedNative` | Pending-redemption amount in underlying-asset base units, separate from the current position value | | `unclaimedUsd` | Pending-redemption value in USD, as a string | | `decimals` | Underlying-asset precision used to convert base units to display units | For example, a `positionValueInAsset` of `"1250000"` with `decimals: 6` represents 1.25 underlying tokens. Do not add `positionValueInAsset` to `balanceNative`: they describe the same balance. If the optional field is absent, use `balanceNative`. These are underlying-asset amounts, not LP-token share amounts. ### Building SVM transactions SVM transaction responses return one or more actions with a Solana transaction object at `actions[].tx.transaction`. The value is a base64-encoded serialized Solana transaction ready for wallet signing. Passing `simulate=true` can add a `simulation` object with status plus token amounts expected to be spent or received. ## Borrow markets Build borrow dashboards and account-health views against one borrow market model instead of wiring separate protocol-specific routes. Use these endpoints for market discovery, historical rates, user positions, user events, and ready-to-sign borrow transaction payloads. Supported Aave V4 Standard Spoke markets on Ethereum use this same normalized surface for market data, wallet positions, and supply, withdraw, borrow, and repay transaction payloads. | Capability | How to call | Required inputs | | - | - | - | | List all borrow markets | `GET /beta/borrow/markets/` | None. Optional query filters include `page`, `perPage`, `allowedNetworks`, `disallowedNetworks`, `allowedCollateralAssets`, `disallowedCollateralAssets`, `allowedBorrowAssets`, `disallowedBorrowAssets`, `allowedProtocols`, `disallowedProtocols`, `minTvl`, and `maxTvl` | | List borrow markets on one network | `GET /beta/borrow/markets/{network}` | Path: `network`. Optional query filters include `page`, `perPage`, `allowedCollateralAssets`, `disallowedCollateralAssets`, `allowedBorrowAssets`, `disallowedBorrowAssets`, `allowedProtocols`, `disallowedProtocols`, `minTvl`, and `maxTvl` | | Fetch one borrow market | `GET /beta/borrow/markets/{network}/{marketId}` | Path: `network`, `marketId` | | Fetch near-real-time borrow market asset data | `GET /beta/borrow/markets/nrt/{network}/{marketId}/{assetId}` | Path: `network`, `marketId`, `assetId` | | Fetch historical borrow market data | `GET /beta/borrow/markets/historical/{network}/{marketId}/{assetId}` | Path: `network`, `marketId`, `assetId` | | List borrow positions for a wallet | `GET /beta/borrow/portfolio/positions/{userAddress}` | Path: `userAddress`. Optional query: `allowedNetworks`, `disallowedNetworks`, `allowedAssets`, `disallowedAssets`, `minUsdAssetValueThreshold`, `sortBy`, `sortOrder` | | Fetch one borrow market position | `GET /beta/borrow/portfolio/positions/{userAddress}/{network}/{marketId}` | Path: `userAddress`, `network`, `marketId` | | Fetch one asset-level borrow market position | `GET /beta/borrow/portfolio/positions/{userAddress}/{network}/{marketId}/{assetId}` | Path: `userAddress`, `network`, `marketId`, `assetId` | | List borrow market events | `GET /beta/borrow/portfolio/events/{userAddress}/{network}/{marketId}/{assetId}` | Path: `userAddress`, `network`, `marketId`, `assetId` | | Check balances and limits before building a borrow transaction | `GET /beta/borrow/markets/transactions/context/{userAddress}/{network}/{marketId}/{assetId}` | Path: `userAddress`, `network`, `marketId`, `assetId` | | Build a ready-to-sign borrow market transaction | `GET /beta/borrow/markets/transactions/{action}/{userAddress}/{network}/{marketId}/{assetId}` | Path: `action`, `userAddress`, `network`, `marketId`, `assetId`. Query: `amount` or `all=true` when the action requires an amount | ### Reading borrow positions `GET /beta/borrow/portfolio/positions/{userAddress}` lists markets with outstanding debt, not every supply-only or collateral-only position. A market must retain an asset with nonzero `borrowedNative` after asset and USD-value filtering to appear in the list. Filtering out the debt asset can therefore remove the entire market, including its collateral. Use the single-market or asset-level position endpoints when inspecting a known position, including one without debt. When aggregating balances across markets, use `assets[].positionId` to avoid counting the same underlying position more than once. ### Building borrow transactions Fetch transaction context first and use the returned `supplySteps`, `withdrawSteps`, `borrowSteps`, or `repaySteps`. Their action lists depend on the protocol and collateral configuration, and may include `enableCollateral` or `enableController` alongside approval and supply/withdraw/borrow/repay actions. Do not hard-code a universal approval-and-supply sequence. Borrow market responses expose `assetsData[].marketAssetId`. Pass that value as `{assetId}` when chaining from market discovery into historical data, portfolio events, asset-level positions, or transaction endpoints. Risk-parameter objects can include `borrowRateMultiplier`, the collateral risk multiplier applied to the base borrow rate. The field is optional because it is only returned when the underlying protocol supplies this parameter. ## Advanced analytics Request heavier per-vault analytics only when your product needs them. Selectable analytics sections include max drawdown, withdrawal pause ratio, composition, utilization rate, and the full V2 detailed-vault payload where supported. | Capability | How to call | Required inputs | | - | - | - | | List advanced vault analytics using selected analytics sections | `POST /beta/advanced-analytics` | JSON body: `select`. Optional query filters include detailed-vault-style filters such as `allowedNetworks`, `disallowedNetworks`, `allowedAssets`, `disallowedAssets`, `allowedProtocols`, `disallowedProtocols`, `minTvl`, `maxTvl`, `minApy`, `maxApy`, `minVaultScore`, `tags`, `curators`, `onlyTransactional`, `onlyAppFeatured`, `allowCorrupted`, `allowVaultsWithWarnings`, `sortBy`, `sortOrder`, `page`, and `perPage` | | Fetch advanced analytics for one vault | `POST /beta/advanced-analytics/{network}/{vaultId}` | Path: `network`, `vaultId`. JSON body: `select` | Each request costs 1 base credit. The remaining cost scales with the number of items returned and the fields included for each item: | Selected field | Credits per returned item | | - | -: | | `maxDrawdown` | 2 | | `detailedVault` | 3 | | `withdrawalPauseRatio` | 2 | | `composition` | 3 | | `utilizationRate` | 3 | The per-item costs are cumulative. For example, a request that returns 10 items with `maxDrawdown` and `composition` costs `1 + (10 × (2 + 3)) = 51` credits. ## The Deep Build AMM-style vault integrations for Deep liquidity positions. These endpoints cover vault discovery, wallet positions, and ready-to-sign deposit or withdrawal transactions. | Capability | How to call | Required inputs | | - | - | - | | List Deep detailed vaults | `GET /beta/amm/deep/detailed-vaults` | None. Optional query: `page`, `perPage` | | Fetch one Deep position | `GET /beta/amm/deep/positions/{userAddress}/{network}/{vaultId}` | Path: `userAddress`, `network`, `vaultId` | | Build a Deep deposit transaction | `GET /beta/amm/deep/deposit/{userAddress}/{network}/{vaultId}` | Path: `userAddress`, `network`, `vaultId`. Query: `assetAddress0`, `amount0`. Optional query: `assetAddress1`, `amount1` | | Build a Deep withdrawal transaction | `GET /beta/amm/deep/withdraw/{userAddress}/{network}/{vaultId}` | Path: `userAddress`, `network`, `vaultId`. Query: `amount` or `all=true` | ## Fixed Term (Pendle) Add fixed-term yield market support for Pendle-backed opportunities. Use these endpoints to discover and compare active markets, retrieve detailed market data, preview transaction context, and generate swap-in or swap-out transactions. | Capability | How to call | Required inputs | | - | - | - | | List fixed-term markets | `GET /beta/fixed-term/` | None. Optional query filters include `page`, `perPage`, `allowedAssets`, `disallowedAssets`, `allowedProtocols`, `disallowedProtocols`, `allowedNetworks`, `disallowedNetworks`, `minTvl`, `search`, `sortBy`, and `sortOrder` | | Fetch fixed-term detailed vault data | `GET /beta/fixed-term/detailed/{network}/{vaultId}` | Path: `network`, `vaultId` | | Preview balances and limits before building a fixed-term transaction | `GET /beta/fixed-term/context/{userAddress}/{network}/{vaultId}` | Path: `userAddress`, `network`, `vaultId` | | Build a fixed-term transaction | `GET /beta/fixed-term/transactions/{action}/{userAddress}/{network}/{vaultId}` | Path: `action`, `userAddress`, `network`, `vaultId`. Query: `assetAddress`, `amount`. Optional query: `simulate` | Fixed-term market discovery costs 1 base credit plus 3 credits per returned market. For example, 10 returned markets cost 31 credits. ## Portfolio Measure user returns over a selected time window instead of only showing lifetime returns. This supports performance reporting, account history views, and user-specific analytics. | Capability | How to call | Required inputs | | - | - | - | | Measure user returns over a selected time window | `GET /beta/portfolio/partial-returns/{userAddress}/{network}/{vaultId}` | Path: `userAddress`, `network`, `vaultId`. Query: `fromTimestamp`. Optional query: `toTimestamp` | Beta endpoints require an API key. [Sign up](https://portal.vaults.fyi/signup) to get started, then watch the [changelog](/resources/changelog) for changes before general availability. # Create borrow market transaction Source: https://docs.vaults.fyi/api-reference/borrow-markets/create-borrow-market-transaction https://api.vaults.fyi/beta/documentation/json get /beta/borrow/markets/transactions/{action}/{userAddress}/{network}/{marketId}/{assetId} Generates payloads for borrow market supply, withdraw, borrow, or repay transactions. # Get borrow market Source: https://docs.vaults.fyi/api-reference/borrow-markets/get-borrow-market https://api.vaults.fyi/beta/documentation/json get /beta/borrow/markets/{network}/{marketId} Retrieves detailed discovery data for one borrow market on one network. # Get borrow market asset NRT data Source: https://docs.vaults.fyi/api-reference/borrow-markets/get-borrow-market-asset-nrt-data https://api.vaults.fyi/beta/documentation/json get /beta/borrow/markets/nrt/{network}/{marketId}/{assetId} Retrieves near-real-time data for one asset within one borrow market. # Get borrow market asset position Source: https://docs.vaults.fyi/api-reference/borrow-markets/get-borrow-market-asset-position https://api.vaults.fyi/beta/documentation/json get /beta/borrow/portfolio/positions/{userAddress}/{network}/{marketId}/{assetId} Provides the user position for one asset within one borrow market. # Get borrow market historical data Source: https://docs.vaults.fyi/api-reference/borrow-markets/get-borrow-market-historical-data https://api.vaults.fyi/beta/documentation/json get /beta/borrow/markets/historical/{network}/{marketId}/{assetId} Retrieves paginated historical data for one borrow market asset on one network. # Get borrow market position Source: https://docs.vaults.fyi/api-reference/borrow-markets/get-borrow-market-position https://api.vaults.fyi/beta/documentation/json get /beta/borrow/portfolio/positions/{userAddress}/{network}/{marketId} Provides the user position for one borrow market. # Get borrow market transaction context Source: https://docs.vaults.fyi/api-reference/borrow-markets/get-borrow-market-transaction-context https://api.vaults.fyi/beta/documentation/json get /beta/borrow/markets/transactions/context/{userAddress}/{network}/{marketId}/{assetId} Retrieves context for borrow market supply, withdraw, borrow, and repay transactions. # List borrow market events Source: https://docs.vaults.fyi/api-reference/borrow-markets/list-borrow-market-events https://api.vaults.fyi/beta/documentation/json get /beta/borrow/portfolio/events/{userAddress}/{network}/{marketId}/{assetId} Retrieves paginated borrow market events for one user, market, and asset on one network. # List borrow markets Source: https://docs.vaults.fyi/api-reference/borrow-markets/list-borrow-markets https://api.vaults.fyi/beta/documentation/json get /beta/borrow/markets/ Retrieves a paginated list of supported borrow markets across all supported networks. # List borrow markets by network Source: https://docs.vaults.fyi/api-reference/borrow-markets/list-borrow-markets-by-network https://api.vaults.fyi/beta/documentation/json get /beta/borrow/markets/{network} Retrieves a paginated list of supported borrow markets for one network using the canonical network slug. # List borrow positions Source: https://docs.vaults.fyi/api-reference/borrow-markets/list-borrow-positions https://api.vaults.fyi/beta/documentation/json get /beta/borrow/portfolio/positions/{userAddress} Provides all borrow market positions for the user, with optional filters. # Create CCTP transaction Source: https://docs.vaults.fyi/api-reference/cctp-bridge/create-cctp-transaction https://api.vaults.fyi/alpha/documentation/json get /alpha/transactions/cctp/transactions/{action}/{userAddress}/{srcNetwork}/{dstNetwork} Retrieves executable transaction payloads for CCTP bridge actions (bridge or claim) # Get CCTP transaction context Source: https://docs.vaults.fyi/api-reference/cctp-bridge/get-cctp-transaction-context https://api.vaults.fyi/alpha/documentation/json get /alpha/transactions/cctp/context/{userAddress}/{srcNetwork}/{dstNetwork}/{assetAddress} Retrieves context for a CCTP cross-chain bridge operation, including asset balance, allowance, and fees # Get CCTP transaction status Source: https://docs.vaults.fyi/api-reference/cctp-bridge/get-cctp-transaction-status https://api.vaults.fyi/alpha/documentation/json get /alpha/transactions/cctp/status Checks the status of a CCTP bridge transaction via Circle Iris API # List CCTP money in transit Source: https://docs.vaults.fyi/api-reference/cctp-bridge/list-cctp-money-in-transit https://api.vaults.fyi/alpha/documentation/json get /alpha/transactions/cctp/money-in-transit/{userAddress} Returns CCTP money-in-transit transfers for all supported source/destination chain pairs # Create transaction intent quote Source: https://docs.vaults.fyi/api-reference/cross-chain/create-transaction-intent-quote https://api.vaults.fyi/alpha/documentation/json post /alpha/transactions/intent/getQuote Get transaction intent quote for cross-chain or same-chain position changes. Returns EIP-712 payload for signing and fee breakdown. # Execute transaction intent Source: https://docs.vaults.fyi/api-reference/cross-chain/execute-transaction-intent https://api.vaults.fyi/alpha/documentation/json post /alpha/transactions/intent/execute Execute a transaction intent with a signed payload. Returns the supertransaction hash for tracking. # Get transaction intent status Source: https://docs.vaults.fyi/api-reference/cross-chain/get-transaction-intent-status https://api.vaults.fyi/alpha/documentation/json get /alpha/transactions/intent/status Get the status of a crosschain transaction intent. # Detailed Vaults Source: https://docs.vaults.fyi/api-reference/detailed-vaults Comprehensive vault data including APY, TVL, the Reputation Score, fees, holder data, and protocol details. Full vault objects with performance metrics, the Reputation Score, fee structures, holder data, and protocol info. Use these endpoints to build vault comparison views, detail pages, or yield aggregators. APY fields in detailed-vault responses are net of performance and management fees. Use the `fees` object to display the fee breakdown alongside yield; do not subtract it from APY again. See [How Vaults.fyi Calculates APY](/methodology/calculating-apy) for the full methodology. | Capability | How to call | Required inputs | | - | - | - | | List and filter vaults with full analytics | [`GET /v2/detailed-vaults`](/api-reference/detailed-vaults/list-detailed-vaults) | None. Optional query filters include `allowedNetworks`, `allowedAssets`, `allowedProtocols`, `minTvl`, `maxApy`, `onlyTransactional`, `onlyAppFeatured`, `page`, `perPage`, `sortBy`, and `sortOrder`. Protocol filters accept either a broad protocol name or a full [protocol ID](/concepts/supported-protocols#protocol-names-and-ids) | | Get one vault's full detail object | [`GET /v2/detailed-vaults/{network}/{vaultId}`](/api-reference/detailed-vaults/get-vault-details) | Path: `network`, `vaultId` | | Get one vault's APY breakdown | [`GET /v2/detailed-vaults/{network}/{vaultId}/apy`](/api-reference/detailed-vaults/get-vault-apy) | Path: `network`, `vaultId` | | Get one vault's TVL data | [`GET /v2/detailed-vaults/{network}/{vaultId}/tvl`](/api-reference/detailed-vaults/get-vault-tvl) | Path: `network`, `vaultId` | ## Related Alpha and Beta endpoints Use these endpoints when you need newer vault-like data surfaces that are still in Alpha or Beta. | Capability | How to call | Status | | - | - | - | | List Solana/SVM detailed vaults | [`GET /beta/svm/detailed-vaults`](/api-reference/beta#solana-vaults) | Beta | | Fetch one Solana/SVM detailed vault | [`GET /beta/svm/detailed-vaults/{vaultAddress}`](/api-reference/beta#solana-vaults) | Beta | | Fetch fixed-term detailed vault data | [`GET /beta/fixed-term/detailed/{network}/{vaultId}`](/api-reference/beta#fixed-term-pendle) | Beta | | List Deep detailed vaults | [`GET /beta/amm/deep/detailed-vaults`](/api-reference/beta#the-deep) | Beta | | List borrow markets and market metadata | [`GET /beta/borrow/markets/`](/api-reference/beta#borrow-markets) | Beta | | Fetch advanced analytics for one vault | [`POST /beta/advanced-analytics/{network}/{vaultId}`](/api-reference/beta#advanced-analytics) | Beta | | List vault holders and LP-token balances | [`GET /alpha/{network}/{vaultId}/holders`](/api-reference/alpha#holders) | Alpha | # Get vault APY Source: https://docs.vaults.fyi/api-reference/detailed-vaults/get-vault-apy https://api.vaults.fyi/v2/documentation/json get /v2/detailed-vaults/{network}/{vaultId}/apy Retrieves vault APY breakdown. # Get vault details Source: https://docs.vaults.fyi/api-reference/detailed-vaults/get-vault-details https://api.vaults.fyi/v2/documentation/json get /v2/detailed-vaults/{network}/{vaultId} Retrieves a detailed performance metrics of single vault including APY, TVL, rewards, risk scores, and protocol information based on specified filters. # Get vault TVL Source: https://docs.vaults.fyi/api-reference/detailed-vaults/get-vault-tvl https://api.vaults.fyi/v2/documentation/json get /v2/detailed-vaults/{network}/{vaultId}/tvl Retrieves vault Tvl breakdown. # List detailed vaults Source: https://docs.vaults.fyi/api-reference/detailed-vaults/list-detailed-vaults https://api.vaults.fyi/v2/documentation/json get /v2/detailed-vaults Retrieves a comprehensive list of vaults with detailed performance metrics including APY, TVL, rewards, risk scores, and protocol information based on specified filters. # Create fixed-term transaction Source: https://docs.vaults.fyi/api-reference/fixed-term-pendle/create-fixed-term-transaction https://api.vaults.fyi/beta/documentation/json get /beta/fixed-term/transactions/{action}/{userAddress}/{network}/{vaultId} Get Pendle fixed-term transaction data via Pendle API. Actions: swap-in (asset→PT), swap-out (PT→asset). API handles SY wrapping internally. # Get fixed-term market Source: https://docs.vaults.fyi/api-reference/fixed-term-pendle/get-fixed-term-market https://api.vaults.fyi/beta/documentation/json get /beta/fixed-term/detailed/{network}/{vaultId} Retrieves a Pendle fixed-term market including APY, TVL, and expiry # Get fixed-term transaction context Source: https://docs.vaults.fyi/api-reference/fixed-term-pendle/get-fixed-term-transaction-context https://api.vaults.fyi/beta/documentation/json get /beta/fixed-term/context/{userAddress}/{network}/{vaultId} Retrieves transaction context for a Pendle fixed-term market, including user balances for PT token and underlying asset # List fixed-term Pendle markets Source: https://docs.vaults.fyi/api-reference/fixed-term-pendle/list-fixed-term-pendle-markets https://api.vaults.fyi/beta/documentation/json get /beta/fixed-term/ Returns eligible active Pendle PT markets with current Fixed APY, expiry, TVL, and liquidity. # General Source: https://docs.vaults.fyi/api-reference/general Core endpoints for vault discovery, assets, networks, protocols, and curators. Core reference data endpoints — use these to browse available vaults, resolve asset and network metadata, and populate filter dropdowns. | Capability | How to call | Required inputs | | - | - | - | | List supported vault identifiers | [`GET /v2/vaults`](/api-reference/general/list-vaults) | None. Optional query filters include `network`, `assetSymbol`, `onlyTransactional`, `onlyAppFeatured`, `page`, and `perPage` | | List supported assets and tokens | [`GET /v2/assets`](/api-reference/general/list-assets) | None. Optional query filters include `network`, `page`, and `perPage` | | List supported networks | [`GET /v2/networks`](/api-reference/general/list-networks) | None | | List vault tags | [`GET /v2/tags`](/api-reference/general/list-tags) | None. See [Vault Tags](/concepts/vault-discovery#vault-tags) for taxonomy definitions | | List vault curators | [`GET /v2/curators`](/api-reference/general/list-curators) | None | | List supported protocols and their filterable protocol IDs | [`GET /v2/protocols`](/api-reference/general/list-protocols) | None. See [Protocol names and IDs](/concepts/supported-protocols#protocol-names-and-ids) for filtering examples | | Check API availability | [`GET /v2/health`](/api-reference/health/health-check) | None | `GET /v2/curators` returns each curator's canonical `name` and an optional `displayName`. Use `name` for filtering and stable matching; use `displayName` for presentation, falling back to `name` when it is absent. The same fields appear in the optional `curator` object returned by both detailed-vault endpoints. # List assets Source: https://docs.vaults.fyi/api-reference/general/list-assets https://api.vaults.fyi/v2/documentation/json get /v2/assets Retrieves a filtered list of supported assets with their metadata including address, symbol, name, decimals, and network information. # List curators Source: https://docs.vaults.fyi/api-reference/general/list-curators https://api.vaults.fyi/v2/documentation/json get /v2/curators Retrieves a complete list of available vault curators that can be used for filtering and organizing vault data # List networks Source: https://docs.vaults.fyi/api-reference/general/list-networks https://api.vaults.fyi/v2/documentation/json get /v2/networks Retrieves a complete list of supported blockchain networks with their identifiers including network name, chain ID, and CAIP format identifier. # List protocols Source: https://docs.vaults.fyi/api-reference/general/list-protocols https://api.vaults.fyi/v2/documentation/json get /v2/protocols Retrieves a complete list of available protocols that can be used for filtering and organizing vault data # List tags Source: https://docs.vaults.fyi/api-reference/general/list-tags https://api.vaults.fyi/v2/documentation/json get /v2/tags Retrieves a complete list of available vault categorization tags that can be used for filtering and organizing vault data # List vaults Source: https://docs.vaults.fyi/api-reference/general/list-vaults https://api.vaults.fyi/v2/documentation/json get /v2/vaults Retrieves a filtered list of vaults with their basic information including address, network, associated asset details, and transactional support status. # Health Source: https://docs.vaults.fyi/api-reference/health Service health endpoint for monitoring API availability. Use the health endpoint for uptime checks and lightweight service monitoring. | Capability | How to call | Required inputs | | - | - | - | | Check API availability | [`GET /v2/health`](/api-reference/health/health-check) | None | # Health check Source: https://docs.vaults.fyi/api-reference/health/health-check https://api.vaults.fyi/v2/documentation/json get /v2/health Checks the health status of the API and its dependencies including database connections and cache availability. # Historical Source: https://docs.vaults.fyi/api-reference/historical Time-series APY, TVL, share price, and asset price data for any vault. Time-series data for any vault over configurable date ranges and granularity. Use these endpoints to build performance charts, run backtests, or track share price over time. Historical APY values are net of performance and management fees, matching the current APY fields returned by detailed-vault responses. | Capability | How to call | Required inputs | | - | - | - | | Fetch combined APY, TVL, and share-price history | [`GET /v2/historical/{network}/{vaultId}`](/api-reference/historical/get-vault-historical-data) | Path: `network`, `vaultId`. Optional query: `fromTimestamp`, `toTimestamp`, `granularity`, `apyInterval`, `page`, `perPage` | | Fetch APY history only | [`GET /v2/historical/{network}/{vaultId}/apy`](/api-reference/historical/get-historical-apy) | Path: `network`, `vaultId`. Optional query: `fromTimestamp`, `toTimestamp`, `granularity`, `apyInterval`, `page`, `perPage` | | Fetch TVL history only | [`GET /v2/historical/{network}/{vaultId}/tvl`](/api-reference/historical/get-historical-tvl) | Path: `network`, `vaultId`. Optional query: `fromTimestamp`, `toTimestamp`, `granularity`, `page`, `perPage` | | Fetch share-price history only | [`GET /v2/historical/{network}/{vaultId}/sharePrice`](/api-reference/historical/get-historical-share-price) | Path: `network`, `vaultId`. Optional query: `fromTimestamp`, `toTimestamp`, `granularity`, `apyInterval`, `page`, `perPage` | | Fetch historical underlying asset prices | [`GET /v2/historical/asset-prices/{network}/{assetAddress}`](/api-reference/historical/get-historical-asset-prices) | Path: `network`, `assetAddress`. Optional query: `fromTimestamp`, `toTimestamp`, `granularity`, `page`, `perPage` | ## Related Alpha and Beta endpoints Use these endpoints for historical data that is still being validated outside the stable V2 surface. | Capability | How to call | Status | | - | - | - | | Fetch historical borrow market rates and liquidity | [`GET /beta/borrow/markets/historical/{network}/{marketId}/{assetId}`](/api-reference/beta#borrow-markets) | Beta | | Fetch historical daily vault inflows and outflows | [`GET /alpha/historical/{network}/{vaultId}/daily-flows`](/api-reference/alpha#historical-flows) | Alpha | | List historical positions for a wallet | [`GET /alpha/historical-positions/{userAddress}`](/api-reference/alpha#historical-positions) | Alpha | | Reconstruct wallet balances at a point in time | [`GET /alpha/historical-balances/{userAddress}/{timestamp}`](/api-reference/alpha#historical-balances) | Alpha | # List user historical balances Source: https://docs.vaults.fyi/api-reference/historical-positions/list-user-historical-balances https://api.vaults.fyi/alpha/documentation/json get /alpha/historical-balances/{userAddress}/{timestamp} Returns the user vault positions and balances at a specific historical timestamp. # List user historical positions Source: https://docs.vaults.fyi/api-reference/historical-positions/list-user-historical-positions https://api.vaults.fyi/alpha/documentation/json get /alpha/historical-positions/{userAddress} Returns vaults the user held a position in (had a non-zero balance at the start of the window or deposited during the window). Both timestamps are optional. # Get historical APY Source: https://docs.vaults.fyi/api-reference/historical/get-historical-apy https://api.vaults.fyi/v2/documentation/json get /v2/historical/{network}/{vaultId}/apy Retrieves time-series historical APY data for a specific vault, including base yield and rewards components over a customizable time range # Get historical asset prices Source: https://docs.vaults.fyi/api-reference/historical/get-historical-asset-prices https://api.vaults.fyi/v2/documentation/json get /v2/historical/asset-prices/{network}/{assetAddress} Retrieves historical USD prices for a specific asset on a given network. # Get historical daily vault flows Source: https://docs.vaults.fyi/api-reference/historical/get-historical-daily-vault-flows https://api.vaults.fyi/alpha/documentation/json get /alpha/historical/{network}/{vaultId}/daily-flows Retrieves daily UTC vault deposit and redemption totals for a specific vault over an exclusive date range. # Get historical share price Source: https://docs.vaults.fyi/api-reference/historical/get-historical-share-price https://api.vaults.fyi/v2/documentation/json get /v2/historical/{network}/{vaultId}/sharePrice Retrieves time-series historical TVL data for a specific vault, including base yield and rewards components over a customizable time range # Get historical TVL Source: https://docs.vaults.fyi/api-reference/historical/get-historical-tvl https://api.vaults.fyi/v2/documentation/json get /v2/historical/{network}/{vaultId}/tvl Retrieves time-series historical TVL data for a specific vault, including base yield and rewards components over a customizable time range # Get vault historical data Source: https://docs.vaults.fyi/api-reference/historical/get-vault-historical-data https://api.vaults.fyi/v2/documentation/json get /v2/historical/{network}/{vaultId} Retrieves historical APY and TVL for a specific vault, based on the provided query parameters. # List vault holders Source: https://docs.vaults.fyi/api-reference/holders/list-vault-holders https://api.vaults.fyi/alpha/documentation/json get /alpha/{network}/{vaultId}/holders Retrieves current holders for a specific vault with their balances (converted to LP token amounts for rebasing vaults) # Near Real-Time Source: https://docs.vaults.fyi/api-reference/nrt Sub-second vault metrics: share price, total assets, total supply, and underlying asset price. Near real-time vault metrics sourced directly from onchain state — updated far more frequently than the standard indexed data. Use these endpoints when your product needs the most current share price or TVL figures, such as deposit previews, live dashboards, or liquidation monitoring. | Capability | How to call | Required inputs | | - | - | - | | Fetch all current vault metrics in one response | [`GET /v2/nrt/vault/{network}/{vaultId}`](/api-reference/nrt/get-vault-nrt-data) | Path: `network`, `vaultId` | | Fetch the current share price | [`GET /v2/nrt/vault/{network}/{vaultId}/sharePrice`](/api-reference/nrt/get-vault-nrt-share-price) | Path: `network`, `vaultId` | | Fetch the current total supply | [`GET /v2/nrt/vault/{network}/{vaultId}/totalSupply`](/api-reference/nrt/get-vault-nrt-total-supply) | Path: `network`, `vaultId` | | Fetch the current total assets | [`GET /v2/nrt/vault/{network}/{vaultId}/totalAssets`](/api-reference/nrt/get-vault-nrt-total-assets) | Path: `network`, `vaultId` | | Fetch the current underlying asset price | [`GET /v2/nrt/vault/{network}/{vaultId}/underlyingAssetPrice`](/api-reference/nrt/get-vault-nrt-underlying-asset-price) | Path: `network`, `vaultId` | ## Related Beta endpoints Borrow market live data is currently exposed through the Beta borrow market surface. | Capability | How to call | Status | | - | - | - | | Fetch near-real-time borrow market asset data | [`GET /beta/borrow/markets/nrt/{network}/{marketId}/{assetId}`](/api-reference/beta#borrow-markets) | Beta | # Get vault NRT data Source: https://docs.vaults.fyi/api-reference/nrt/get-vault-nrt-data https://api.vaults.fyi/v2/documentation/json get /v2/nrt/vault/{network}/{vaultId} Retrieves nrt data for vault (underlyingAssetPrice, sharePrice, totalAssets, totalSupply) # Get vault NRT share price Source: https://docs.vaults.fyi/api-reference/nrt/get-vault-nrt-share-price https://api.vaults.fyi/v2/documentation/json get /v2/nrt/vault/{network}/{vaultId}/sharePrice Retrieves NRT share price for vault # Get vault NRT total assets Source: https://docs.vaults.fyi/api-reference/nrt/get-vault-nrt-total-assets https://api.vaults.fyi/v2/documentation/json get /v2/nrt/vault/{network}/{vaultId}/totalAssets Retrieves total assets for vault # Get vault NRT total supply Source: https://docs.vaults.fyi/api-reference/nrt/get-vault-nrt-total-supply https://api.vaults.fyi/v2/documentation/json get /v2/nrt/vault/{network}/{vaultId}/totalSupply Retrieves total supply for vault # Get vault NRT underlying asset price Source: https://docs.vaults.fyi/api-reference/nrt/get-vault-nrt-underlying-asset-price https://api.vaults.fyi/v2/documentation/json get /v2/nrt/vault/{network}/{vaultId}/underlyingAssetPrice Retrieves underlying asset price for vault # Vaults.fyi API Overview Source: https://docs.vaults.fyi/api-reference/overview The vaults.fyi V2 API — comprehensive DeFi vault data and transaction execution across 20+ EVM networks, with Solana/SVM endpoints in Beta. ## Base URL ``` https://api.vaults.fyi/v2 ``` ## Authentication Every request must include your API key as a header: ```bash theme={null} x-api-key: YOUR_API_KEY ``` All API keys have access to all endpoints. Rate limits depend on your plan — see [Plans & Pricing](/plans/overview), or contact support to increase your limit. ## Networks The V2 API tracks vaults across 20+ EVM-compatible networks. Networks can be identified by name or CAIP-2 identifier: | Name | Chain ID | CAIP-2 | | - | - | - | | `arbitrum` | 42161 | `eip155:42161` | | `avalanche` | 43114 | `eip155:43114` | | `base` | 8453 | `eip155:8453` | | `berachain` | 80094 | `eip155:80094` | | `bsc` | 56 | `eip155:56` | | `celo` | 42220 | `eip155:42220` | | `etherlink` | 42793 | `eip155:42793` | | `gnosis` | 100 | `eip155:100` | | `hyperliquid` | 999 | `eip155:999` | | `ink` | 57073 | `eip155:57073` | | `katana` | 747474 | `eip155:747474` | | `linea` | 59144 | `eip155:59144` | | `mainnet` | 1 | `eip155:1` | | `mega-eth` | 4326 | `eip155:4326` | | `monad` | 143 | `eip155:143` | | `optimism` | 10 | `eip155:10` | | `plasma` | 9745 | `eip155:9745` | | `polygon` | 137 | `eip155:137` | | `robinhood` | 4663 | `eip155:4663` | | `swellchain` | 1923 | `eip155:1923` | | `unichain` | 130 | `eip155:130` | | `worldchain` | 480 | `eip155:480` | Use `GET /v2/networks` for the complete current list of V2 EVM networks. Solana/SVM vault discovery, portfolio, idle-asset, and transaction endpoints are available separately in [Beta](/api-reference/beta#solana-vaults). ## APY values All APY fields are **raw decimals**. Multiply by 100 to display as a percentage: ```js theme={null} // API returns: 0.0543 // Display as: 5.43% const displayApy = (rawApy * 100).toFixed(2) + '%'; ``` APY values are net of performance and management fees. The detailed-vault `fees` object is for display and should not be subtracted from APY again. ## Pagination All list endpoints use offset pagination with `page` (zero-indexed) and `perPage`: ```bash theme={null} GET /v2/detailed-vaults?page=0&perPage=50 # first page GET /v2/detailed-vaults?page=1&perPage=50 # second page ``` The response includes `nextPage` — it is `null` when you are on the last page. ## Error responses | Status | Meaning | | - | - | | `400` | Invalid parameters | | `401` | Missing or invalid API key | | `403` | API key has exhausted available credits | | `404` | Resource not found | | `429` | Rate limit exceeded | | `500` | Internal server error | | `503` | Service temporarily unavailable | Error bodies follow this shape: ```json theme={null} { "statusCode": 400, "error": "Bad Request", "message": "Descriptive error message" } ``` Some authentication errors omit `statusCode`; always key your handling off the HTTP status code first. ## Quick start Fetch the top 5 USDC vaults by 7-day APY on Ethereum mainnet: ```bash theme={null} curl -H "x-api-key: YOUR_API_KEY" \ "https://api.vaults.fyi/v2/detailed-vaults\ ?allowedAssets=USDC\ &allowedNetworks=mainnet\ &minTvl=1000000\ &sortBy=apy7day\ &sortOrder=desc\ &perPage=5" ``` Check a user's idle assets and suggest vaults to deposit into: ```bash theme={null} # Step 1 — find idle assets curl -H "x-api-key: YOUR_API_KEY" \ "https://api.vaults.fyi/v2/portfolio/idle-assets/0xYourWallet" # Step 2 — get ranked deposit suggestions curl -H "x-api-key: YOUR_API_KEY" \ "https://api.vaults.fyi/v2/portfolio/best-deposit-options/0xYourWallet\ ?onlyTransactional=true&maxVaultsPerAsset=3" ```