This quickstart walks you through the core Earn flows: discovering vaults via the Earn Data API, checking a user’s positions, and then executing a deposit via Composer.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.
Prerequisites
- curl or Node.js 18+ (for
fetch) - An API key from the LI.FI Partner Portal, passed via the
x-lifi-api-keyheader - No wallet is needed for data calls (steps 1 to 4). A wallet is only required for deposits (step 5).
1. List Available Vaults
Fetch vaults sorted by APY, filtered to a specific chain:2. Get a Single Vault
Fetch full details for a specific vault by chain ID and contract address:3. Check a User’s Positions
Look up a user’s DeFi positions across all supported protocols:4. Deposit via Composer
Once you’ve found a vault, use its contract address as thetoToken with Composer to execute a deposit. Composer handles the swap, bridge (if cross-chain), and deposit in a single transaction.
The deposit step uses Composer (
li.quest), not the Earn Data API. See the Composer API Integration Guide for full details on executing transactions.Next Steps
API Integration Guide
Full endpoint reference with all parameters and response examples
Discover and Deposit Recipe
End-to-end recipe: find the best vault for a token, then deposit

