Earn API
Our Earn API endpoints make it seamless to integrate DeFi experiences into your product by enabling a unified interface across dozens of staking and lending protocols.
What is the Earn API?
At a high level, our Earn API provides the following capabilities:
Transaction execution: prepare transaction details and calldata for deposits, withdrawals, and rewards-related interactions on leading DeFi yield vaults. Additionally, our API simulates transactions and helps protect end users against malicious transactions.
Position monitoring: track an address’s positions on DeFi lending and staking protocols, providing key metrics on position current value, historical value, and returns.
Our Earn API remains entirely non-custodial, preserving your users' autonomy and security. The Earn API simply prepares transaction details and calldata, facilitating the staking/lending process without ever holding or controlling funds.
Key Benefits
Increase user engagement, with contextual insights
Find yield opportunities for a given address, based upon its balances and preferences (min. TVL, etc.): use /v1/portfolio/best-deposit-options/{userAddress} or /v1/portfolio/best-vault/{userAddress} to find opportunities available
Check supported vaults and assets: Use /v1/transactions/vaults to get list of supported vaults and /v1/transactions/assets to get list of supported assets
Make transactions a breeze
Supply/Deposit transactions: Use the /v1/transactions/vaults/deposit to prepare transaction details and calldata for deposit transactions. Optionally, this can also return simulations for transactions.
Redeem transactions: Use /v1/transactions/vaults/redeem to prepare transaction details and calldata for withdrawals from vaults.
for protocols with redemptions requests (e.g. Lido stETH):
Request redemption: Utilize the /v1/transactions/vaults/request-redeem endpoint to initiate a redeem request, ensuring you have access to your assets when needed.
Claim redemption: Once redemption is ready, use the /v1/transactions/vaults/claim-redeem endpoint to claim your assets seamlessly.
Claim rewards: use /v1/transactions/vaults/claim-rewards to prepare transaction details and calldata for claiming rewards accrued by a user for a specified vault.
Vault info: Use/v1/transactions/vaults/actions/details to get information about potential and necessary interactions for each lending/staking vault.
Track portfolio performance
Use /v1/portfolio/wallet-balances to get user balances of idle assets
Use /v1/portfolio/positions/{userAddress} to get user balances of active lending/staking LP positions
TL;DR
Enhance your platform's functionality with robust DeFi staking & lending capabilities
Integrate your choice of 200+ DeFi opportunities through our unified API
Simplify DeFi lending and staking experiences for users
Maintain the non-custodial nature of your service
Where can I see a demo?
For a brief overview, see our Product demo.
Go to the vaults.fyi app to see the full power of our APIs. Everything on our app is powered by our APIs.
How does it work?
For a simplified overview, view our Flow diagrams. Contact us for API access and to learn more.
Last updated