Skip to content

Lending rates: Aave v3 and Compound v3

$0.005 per callUSDC via x402GET /api/lending-rates

Supply and borrow rates for the major assets (USDC, USDT, DAI, WETH, WBTC or cbBTC) on Aave v3 and Compound v3, read from the lending contracts on Ethereum, Base, Arbitrum, Optimism or Polygon at the latest block: supply APY and APR, variable borrow APY and APR, the borrow-to-supply spread, Compound's utilization, and per asset the protocol with the higher supply rate, the one with the lower borrow rate and the gap between the two. Send GET /api/lending-rates with no required fields (2 optional) and pay $0.005 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, network, chainId, blockNumber, fetchedAt and 5 more.

Base rates as the contracts report them, without token rewards. Pass `asset` for one asset. Two bounded contract reads per network, kept 30 seconds. Deterministic code over on-chain state, no market-data vendor.

Category: Crypto & onchain dataTags: crypto defi lending yield yields apy borrow-rate aaveAlso found as: lending-yields defi-lending-rates aave-rates compound-rates borrow-rates

Try in playground →

Parameters

NameTypeRequiredDescription
networkstringnoNetwork: ethereum, base, arbitrum, optimism, polygon (default ethereum).
assetstringnoOnly this asset (USDC, USDT, DAI, WETH, WBTC, cbBTC, USDC.e). Omit for every asset read on the network.

Example request

curl -i "https://agent402.tools/api/lending-rates?network=ethereum"

Without payment this returns HTTP 402 Payment Required with the exact price for lending-rates; any x402 v2 or MPP client pays it and retries.

Example response

{
  "source": "onchain",
  "network": "ethereum",
  "chainId": 1,
  "blockNumber": 26431342,
  "fetchedAt": "2026-11-16T12:00:00.000Z",
  "cached": false,
  "count": 2,
  "markets": [
    {
      "protocol": "aave-v3",
      "asset": "USDC",
      "supplyApyPct": 4.1231,
      "supplyAprPct": 4.0404,
      "borrowApyPct": 4.8832,
      "borrowAprPct": 4.7677,
      "spreadPct": 0.7601,
      "utilizationPct": null,
      "contract": "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2"
    },
    {
      "protocol": "compound-v3",
      "asset": "USDC",
      "supplyApyPct": 3.9105,
      "supplyAprPct": 3.836,
      "borrowApyPct": 4.9712,
      "borrowAprPct": 4.8516,
      "spreadPct": 1.0607,
      "utilizationPct": 90.1199,
      "contract": "0xc3d688B66703497DAA19211EEdff47f25384cdc3"
    }
  ],
  "byAsset": [
    {
      "asset": "USDC",
      "protocols": 2,
      "higherSupply": {
        "protocol": "aave-v3",
        "apyPct": 4.1231
      },
      "lowerBorrow": {
        "protocol": "aave-v3",
        "apyPct": 4.8832
      },
      "supplyGapPct": 0.2126,
      "borrowGapPct": 0.088
    }
  ],
  "method": "base rates from Aave v3 getReserveData and Compound v3 getSupplyRate/getBorrowRate at the latest block; APY compounds the annual rate every second; token rewards not included"
}
FieldTypeAlways presentIn the example
sourcestringyesonchain
networkstringyesethereum
chainIdnumberyes1
blockNumbernumberyes26431342
fetchedAtstringyes2026-11-16T12:00:00.000Z
cachedbooleanyesfalse
countnumberyes2
marketsarray of objectsyes2 items in the example
byAssetarray of objectsyes1 item in the example
methodstringyesbase rates from Aave v3 getReserveData and Compound v3 getSupplyRate/getBorro...

From an MCP client

catalog.call {
  "slug": "lending-rates",
  "params": {
    "network": "ethereum"
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for lending-rates; the stdio package pays it from a wallet or from an AGENT402_CREDITS_KEY issued earlier. Local install: npx -y agent402-mcp@0.13.32.

Errors and behavior

Paid call (JavaScript agent)

import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { registerExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client();
client.setSpendControls?.({ maxAmountPerPayment: "$0.005" }); // refuse any quote above this tool's price
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/lending-rates?network=ethereum");

Related tools

Crypto categories by market cap

$0.005GET /api/coin-categories

Coin categories (Layer 1, Meme, AI, DeFi, Stablecoins, RWA, ...) ranked by market cap, with 24h market cap change %, 24h.

Crypto news headlines

$0.002POST /api/crypto-news

Latest crypto headlines aggregated from the public RSS/Atom feeds of 8 major outlets (coindesk, cointelegraph, decrypt.

DeFi token screener

$0.005GET /api/defi-screener

Screen the DeFi category's 250 largest tokens with computed columns: share of the category's market cap, turnover (24h.

DEX pool health

$0.005GET /api/dex-pool-health

Measured health of one DEX pool by network and pool address: liquidity, 24h turnover (volume over liquidity), buy share.

DEX volume board by network

$0.005GET /api/dex-volume-board

A network's decentralized exchanges ranked by their share of 24h volume across the network's top pools (the 60 largest.

Global DeFi market

$0.005GET /api/global-defi

Global DeFi snapshot: DeFi market cap (USD), ETH market cap, DeFi-to-ETH ratio, 24h DeFi trading volume, DeFi dominance.