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
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
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
Example Request
Response
Returns a single NormalizedVault object (same shape as items in the list endpoint).Errors
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
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
Error Handling
All Earn Data API endpoints return standard HTTP error responses:
Error responses include a message describing the issue:
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

