This guide covers every endpoint in the Earn Data API with full parameter documentation and response examples. The Earn Data API handles vault discovery, analytics, and portfolio tracking. For executing deposits and withdrawals, see the Composer API Integration Guide.Documentation Index
Fetch the complete documentation index at: https://docs.li.fi/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
/v1/.
The Earn Data API and Composer use different base URLs. Earn Data API endpoints use
https://earn.li.fi, while Composer endpoints (e.g., GET /v1/quote) use https://li.quest. See the overview for details.API Overview
| Endpoint | Description |
|---|---|
GET /v1/vaults | List vaults with filtering and pagination |
GET /v1/vaults/:chainId/:address | Get a single vault’s full details |
GET /v1/chains | List chains with active vaults |
GET /v1/protocols | List protocols with active vaults |
GET /v1/portfolio/:userAddress/positions | Get a user’s DeFi positions |
Authentication
The Earn Data API uses the same authentication as the rest of the LI.FI API. Pass your API key via thex-lifi-api-key header:
Rate Limits
The default rate limit for Earn Data API endpoints is 50 requests per minute per API key. If you need higher limits, contact our team via the LI.FI Partner Portal. If you exceed the limit, you’ll receive a429 Too Many Requests response. See Rate Limits for details on rate limit headers and best practices.
List Vaults
Query Parameters
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
chainId | integer | No | — | Filter by EVM chain ID (e.g., 8453 for Base, 1 for Ethereum) |
asset | string | No | — | Filter by underlying token symbol (e.g., "USDC", "ETH") |
protocol | string | No | — | Filter by protocol name (e.g., "morpho-v1", "aave-v3") |
minTvlUsd | number | No | — | Minimum TVL in USD (e.g., 1000000 for $1M+) |
isTransactional | boolean | No | — | Pass "true" to return only vaults that support programmatic deposits and withdrawals via Composer |
isRedeemable | boolean | No | — | Pass "true" to return only vaults that currently support withdrawals |
isComposerSupported | boolean | No | — | Pass "true" to return only vaults fully supported by the LI.FI Composer for end-to-end cross-chain deposit flows |
sortBy | string | No | — | Sort order: "apy" (highest first) or "tvl" (highest first) |
limit | integer | No | 50 | Results per page (1–100) |
cursor | string | No | — | Pagination cursor from a previous response’s nextCursor |
Example Request
Response
Some fields may be
null in the response: description (absent for ~70% of vaults), apy.base, apy.reward, apy1d, apy7d, and caps. Always handle nullable fields in your integration.Pagination
The API uses cursor-based pagination. To fetch the next page, pass thenextCursor value from the response as the cursor query parameter:
TypeScript
Get Vault by Chain and Address
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
chainId | integer | Yes | EVM chain ID |
address | string | Yes | Vault contract address (0x-prefixed, 40 hex characters) |
Example Request
Response
Returns a single NormalizedVault object (same shape as items in the list endpoint).Errors
| Status | Description |
|---|---|
400 | Invalid chain ID or address format |
404 | Vault not found |
List Earn-Supported Chains
Scoped to LI.FI Earn. This endpoint only returns chains where Earn currently has indexed vaults — it is not a general list of all chains the LI.FI platform supports. If you are integrating Swaps or Bridges (via the LI.FI SDK or the main API), use
GET https://li.quest/v1/chains instead.Example Request
Response
List Supported Protocols
Example Request
Response
Get User Portfolio Positions
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
userAddress | string | Yes | User’s wallet address (0x-prefixed, 40 hex characters) |
Example Request
Response
The
address, protocolName, and balanceUsd fields on each position can be null. address is null when a contract address cannot be determined for the position. protocolName is null when the protocol cannot be identified. balanceUsd is null when a USD price is unavailable for the asset. Always handle these cases in your integration.Errors
| Status | Description |
|---|---|
400 | Invalid wallet address format |
Error Handling
All Earn Data API endpoints return standard HTTP error responses:| Status | Meaning |
|---|---|
200 | Success |
400 | Bad request. Invalid parameters (check the error message for details). |
404 | Resource not found (vault does not exist) |
500 | Internal server error |
Next Steps
Discover and Deposit Recipe
End-to-end recipe combining Earn discovery with Composer deposits
Composer API Guide
Execute deposits and withdrawals via the Composer API

