Skip to main content
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.

Base URL

All endpoints are prefixed with /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 the x-lifi-api-key header:
API keys are created via the LI.FI Partner Portal. See Authentication for full details.

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 a 429 Too Many Requests response. See Rate Limits for details on rate limit headers and best practices.

List Vaults

Returns a paginated list of vaults with optional filtering and sorting.

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 the nextCursor value from the response as the cursor query parameter:
TypeScript

Get Vault by Chain and Address

Returns the full details for a single vault.

Path Parameters

Example Request

Response

Returns a single NormalizedVault object (same shape as items in the list endpoint).

Errors


List Earn-Supported Chains

Returns the list of chains that have at least one Earn vault available. Derived from current vault data.
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

Returns the list of protocols that have at least one vault available. Derived from current vault data.

Example Request

Response


Get User Portfolio Positions

Returns a user’s DeFi positions across all supported protocols.

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