vaults.fyi
  • General
    • 🏦Overview
    • 💡Use Cases
      • For Wallets and Apps
      • For Analysts
      • For Protocols & Product Teams
    • 🔎Methodology
      • vaults.fyi USD benchmark rate
      • vaults.fyi ETH benchmark rate
    • ❓FAQ
      • Vault requirements for inclusion on vaults.fyi
    • 🤖AI
  • API
    • vaults.fyi API Overview
      • Insights API
      • Earn API
        • Product demo
        • Flow diagrams
      • Plans
        • Credits
    • Endpoints
      • Market data
        • Get historical data
          • Get historical APY and TVL data on single vault over timestamp range
          • Get historical APY on single vault over timestamp range
          • Get historical TVL on single vault at single timestamp
          • Get historical APY on single vault at single timestamp
        • Get data for multiple vaults
        • Get data on single vault
          • Get APY on single vault
        • Get benchmark rates
        • Get supported vaults, networks & tokens
          • /vaults
          • /networks
          • /tokens
          • /tags
      • Contextual insights
        • Top vault options for address
        • Get single top option for address
        • [Etherscan cards] Get top USD, top ETH vault for address
      • Generate payloads (Earn API)
        • Prepare calldata
          • Supply/Deposit
          • Withdraw/Redeem
            • Request redeem
            • Claim redeem
          • Claim rewards
        • Get contract interaction details
        • Get supported assets
        • Get supported vaults
      • Position tracking (Portfolio API)
        • Get user balances
        • Get user positions
        • Get list of past vault txns by user address
        • Get estimated returns for user's vault position
  • Case Studies
    • Kraken Wallet
    • Etherscan Cards
  • Links
    • vaults.fyi
    • X
    • Farcaster
    • Wallfacer Labs
Powered by GitBook
On this page
  • What is the Earn API?
  • Key Benefits
  • Increase user engagement, with contextual insights
  • Make protocol integrations a breeze
  • Track portfolio performance
  • TL;DR
  • Where can I see a demo?
  • How does it work?
  1. API
  2. vaults.fyi API Overview

Earn API

PreviousInsights APINextProduct demo

Last updated 9 days ago

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:

  • Generate payloads (Earn API): make protocol integrations a breeze by preparing payloads and calldata for supplying, withdrawing, and reward token claiming interactions. Additionally, our API simulates transactions and helps protect end users against malicious transactions.

  • Position tracking (Portfolio API): track an address’s positions on DeFi lending and staking protocols, providing key metrics on position current value, historical value, and returns.

The Earn API is entirely non-custodial, preserving users' autonomy and security.

How it works: The Earn API prepares payloads related to smart contract interactions with staking/lending protocols, without holding or controlling user funds.

Key Benefits

Increase user engagement, with contextual insights

  • for a given address, based upon its balances and preferences

  • Present user with easy to parse list of yield opportunities

Make protocol integrations a breeze

  • Use our endpoints to prepare necessary interactions with each vault. Our API can prepare payloads and calldata, as well as return simulations for each transaction.

  • Prepare payloads and calldata for supply/deposit function calls to smart contracts.

  • Prepare payloads and calldata for withdraw/redeem function calls to smart contracts.

  • Prepare payloads and calldata for claiming rewards accrued by a user for a specified vault.

Track portfolio performance

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?

How does it work?

For a simplified overview, view our Flow diagrams. Contact us for API access and to learn more.

, along with total returns estimates and average APYs for positions.

Go to the to see the full power of our APIs. Everything on our app is powered by our APIs.

Get user balances of idle assets
Get user position data for active lending/staking/LP positions
vaults.fyi app
Find yield opportunities
Supply interactions:
Withdrawal interactions:
Claim rewards:
Perpare vault interactions: