LogoLogo
AddressesAuditsGitHub
  • 📥Introduction
  • 🌀Products
    • Introduction
    • Best Yield
      • Overview
      • Guides
        • Deposit funds on BY
        • Redeem funds on BY
      • FAQs
    • Yield Tranches
      • Overview
      • Adaptive Yield Split
      • Security
        • Covered risks
      • Guides
        • Deposit funds on YTs
        • Redeem funds on YTs
        • Live YTs guides
          • Lido stETH
      • FAQs
    • Fee structure
    • Get involved
      • Integrators program
      • Institutions program
  • 💻Developers
    • Introduction
    • Networks and codebase
      • Ethereum mainnet
      • Polygon
      • Kovan testnet
      • ERC-4626 standard
    • Best Yield
      • Architecture
      • Deployed contracts
        • Ethereum
        • Optimism
      • Interface
      • Methods
        • mintIdleToken
        • redeemIdleToken
        • redeemInterestBearingTokens
        • rebalance
        • tokenPrice
        • tokenPriceWithFee
        • getAPRs
        • getAvgApr
        • userAvgPrices
        • getGovTokensAmounts
        • getAllocations
        • getGovTokens
        • getAllAvailableTokens
        • getProtocolTokenToGov
      • Edge cases
      • Security management policy
      • Get integrated as yield source
      • Get user earnings
    • Yield Tranches
      • Architecture
      • Deployed contracts
        • Ethereum
        • Polygon zkEVM
        • Optimism
      • Interface
      • Methods
        • AAStaking
        • BBStaking
        • AATranche
        • BBTranche
        • depositAA
        • depositAARef
        • depositBB
        • depositBBRef
        • fee
        • getApr
        • getContractValue
        • getCurrentAARatio
        • getIncentiveTokens
        • lastNAVAA
        • lastNAVBB
        • strategy
        • strategyToken
        • token
        • trancheAPRSplitRatio
        • tranchePrice
        • virtualPrice
        • withdrawAA
        • withdrawBB
      • Integration example
      • Edge cases
      • Security management policy
      • Subgraph
    • API
    • Security
      • Hats Finance vault
      • Hypernative monitoring
      • Immunefi bug bounty
      • Integration Standard Requirements
      • Risk Framework
      • Smart contract audits
  • 🏛️Governance
    • Introduction
    • Idle DAO
      • Governance process
        • Governance forum
        • Governance dashboard
        • Snapshot IDLE
        • Snapshot stkIDLE
      • Idle Leagues
        • Communication League
        • Development League
        • Treasury League
        • Leagues contributors
      • Treasury
        • Reports
      • Governance guides
        • How to monitor off-chain voting pools
        • How to propose an IIP
        • How to create an on-chain proposal
        • How to delegate votes
        • How to vote for an IIP
      • FAQs
    • IDLE token
      • Distribution
      • Use cases
        • Lending, borrowing & collateral
        • DEXs liquidity provision
      • Buybacks
      • Delegates
      • CoinGecko
    • IDLE staking
      • Prime staking
        • Examples
      • Staking integration
      • Guides
        • How to stake your IDLE
        • How to vote in Gauges
        • How to boost your $IDLE rewards
        • How to give VEV
  • 🗂️Other
    • Brand assets
    • Guides
      • How to see IDLE in your wallet
      • Deposit funds through Idle
      • Deposit funds through smart contracts
      • Redeem funds through Idle
      • Redeem funds through smart contracts
    • FAQs
    • Glossary
    • Resources
    • Archive
      • 👇Get in touch
        • 🏛️Governance Forum
        • 🏆Idle Grants Program
        • 👾Discord
        • 🐦Twitter
      • Gauges
        • Architecture
        • Deployed contracts
        • Gauges repository
        • stkIDLE repository
      • Gauges
        • Gauges integration
        • FAQs
      • Boost
      • DEXs liquidity provison
      • Risk Adjusted (deprecated)
      • Deployed contracts
      • Idle Smart Treasury (deprecated)
      • Ethereum LP staking (deprecated)
      • Polygon LP staking (deprecated)
      • Flash Loans (deprecated)
      • QuickSwap cxETH-WETH
      • Integrate PYTs
      • Idle Grants program
      • Idle on Polygon
        • Add Polygon network to MetaMask
        • Bridge $IDLE to Polygon
        • Deposit funds on Polygon
        • Add liquidity to $IDLE pools
        • Stake IDLE LP tokens on Polygon
Powered by GitBook

Ecosystem

  • Website
  • App
  • Governance
  • Brand assets

Developers

  • Feedback
  • GitHub
  • Bug bounty
  • Audits

Community

  • Blog
  • Twitter
  • Telegram
  • Discord

Analytics

  • Stats
  • Dune
  • DeFiLlama
  • CoinGecko
On this page
  • Authentication
  • Network endpoints
  • Endpoints
  • pools
  • tvls
  • rates
  • Request examples

Was this helpful?

  1. Developers

API

Developers > API

Last updated 12 months ago

Was this helpful?

Authentication

For authentication, users need to use the Bearer authentication scheme by adding the following header to their request: Authorization -> Bearer <token>.

To request full access to the APIs please fill out .

Network endpoints

Idle's smart contracts are deployed on multiple networks, hence users should use the appropriate endpoint to retrieve the information needed

  • Ethereum https://api.idle.finance

  • Polygon zkEVM https://api-zkevm.idle.finance

  • Optimism https://api-optimism.idle.finance

Endpoints

pools

GET api.idle.financereturn all the network pools for both Best Yield and Yield Tranches vaults.

Headers

Name
Type
Description

<token>*

Authentication using Bearer token

tvls

GET api.idle.financereturn the total value locked (TVL) per underlying token.

Headers

Name
Type
Description

<token>*

String

Authentication using Bearer token

rates

GET api.idle.financereturn historical daily data for Best Yield vaults in a given calendar range.

Path parameters

Name
Type
Description

<address>*

String

Underlying token address

Query parameters

Name
Type
Description

<params>

String

frequency

86400

Seconds in one day

Headers

Name
Type
Description

<token>*

String

Authentication using Bearer token

The query string params are:

  • start: filter results from a specific timestamp

  • end: filter results to a specific timestamp

  • isRisk (true/false): if true returns only results for risk-adjusted strategy (deprecated), if false returns only results for Best Yield vaults

  • frequency: seconds between two records

  • order (asc/desc): order results by timestamp

  • limit: limit results

Represents the underlying token address:

  • DAI: 0x6b175474e89094c44da98b954eedeac495271d0f

  • USDC: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

  • USDT: 0xdac17f958d2ee523a2206206994597c13d831ec7

  • WETH: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2

Request examples

  • Return historical daily data for the Best Yield DAI vault from 22 July 2020 to 24 July 2020 in descending order.

https://api.idle.finance/rates/0x6b175474e89094c44da98b954eedeac495271d0f?start=1595412616&end=1595581466&isRisk=false&frequency=86400&order=desc
  • Return the latest data for Best Yield DAI vault.

https://api.idle.finance/rates/0x6b175474e89094c44da98b954eedeac495271d0f?isRisk=false&order=desc&limit=1
  • Return the available Yield Tranches on Polygon zkEVM

cURL
curl -H "Authorization: Bearer YOUR_TOKEN" "https://api-zkevm.idle.finance/pools"
Axios
const data = await axios
  .get("https://api-zkevm.idle.finance/pools", {
    headers:{ Authorization: `Bearer YOUR_TOKEN` }
  })
  .catch(err => {
    // Handle request error
  });
Request
const request = require('request');

const apiUrl = 'https://api-zkevm.idle.finance/pools';
const accessToken = 'YOUR_TOKEN';

const options = {
  url: apiUrl,
  method: 'GET',
  headers: {
    'Authorization': `Bearer ${accessToken}`
  },
};

request(options, (error, response, body) => {
  if (error) {
    console.error(error);
  } else {
    console.log(response.statusCode);
    console.log(body);
  }
});

to filter data

💻
this form
Params