DeFi chain TVL history

$0.002 per call · USDC via x402 · POST /api/defi-chain-tvl-history

Daily TVL history for one chain (Ethereum, Base, Solana, Arbitrum...) or for all of DeFi (chain "all") from DefiLlama's free historical chain TVL endpoint: most recent `days` points (default 90, max 3650) as date + TVL in USD, with a summary (latest, first, min, max, mean, change over the window). Send POST /api/defi-chain-tvl-history with no required fields (2 optional) and pay $0.002 per call over x402 or MPP (there is no free tier). It returns a JSON object with source, fetchedAt, chain, totalPoints, count and 2 more.

Unknown chains answer 422. Keyless public data.

Category: Crypto & onchain data · Tags: crypto defi tvl history chain defillama timeseries

TRY IN PLAYGROUND →

Parameters

NameTypeRequiredDescription
chainstringnoChain name as DefiLlama spells it (Ethereum, Base, Solana, Arbitrum, Optimism, BSC...) or "all" for total DeFi TVL. Default "all".
daysnumbernoMost recent days to return (default 90, max 3650).

Example request

curl -i -X POST https://agent402.tools/api/defi-chain-tvl-history \
  -H "Content-Type: application/json" \
  -d '{"chain":"Base","days":7}'

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

Example response

{
  "source": "defillama-chain-tvl",
  "fetchedAt": "2026-08-22T12:00:00.000Z",
  "chain": "Base",
  "totalPoints": 1165,
  "count": 2,
  "summary": {
    "latest": 5432285625,
    "first": 5242607753,
    "min": 5242607753,
    "max": 5432285625,
    "mean": 5337446689,
    "changePct": 3.6
  },
  "points": [
    {
      "date": "2026-08-21",
      "tvlUsd": 5242607753
    },
    {
      "date": "2026-08-22",
      "tvlUsd": 5432285625
    }
  ]
}
FieldTypeAlways presentIn the example
sourcestringyesdefillama-chain-tvl
fetchedAtstringyes2026-08-22T12:00:00.000Z
chainstringyesBase
totalPointsnumberyes1165
countnumberyes2
summaryobjectyes6 fields: latest, first, min, max, mean, changePct
pointsarray of objectsyes2 items in the example

From an MCP client

catalog.call {
  "slug": "defi-chain-tvl-history",
  "params": {
    "chain": "Base",
    "days": 7
  }
}

The hosted connector at https://agent402.tools/mcp needs a payment for defi-chain-tvl-history; the stdio package pays it from a wallet or from AGENT402_CREDITS_KEY. Local install: npx -y agent402-mcp.

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?.(false); // keep your own spending ceiling in code
registerExactEvmScheme(client, { signer: privateKeyToAccount(KEY) });
const payFetch = wrapFetchWithPayment(fetch, client);

const res = await payFetch("https://agent402.tools/api/defi-chain-tvl-history", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "chain": "Base",
    "days": 7
  }),
});

Related tools

DeFi yield pool history

$0.002 · POST /api/defi-yield-history

Daily APY and TVL history for one DeFi yield pool (DefiLlama pool id from defi-yields): per-day total/base/reward APY an…

DeFi TVL by chain

$0.002 · POST /api/defi-chains

Blockchains ranked by DeFi TVL from DefiLlama's free chain list: name, TVL in USD, share of total DeFi TVL, native token…

DeFi protocol profile

$0.002 · POST /api/defi-protocol

Profile of one DeFi protocol by DefiLlama slug (aave-v3, uniswap-v3, lido, morpho-v1...): TVL rank among all protocols, …

DeFi protocols ranked by TVL

$0.002 · POST /api/defi-protocols

DeFi protocols ranked by current TVL from DefiLlama's free protocol list: filter by category (Lending, Dexs, Liquid Stak…

DeFi protocol TVL

$0.001 · POST /api/defi-tvl

Look up the current Total Value Locked (TVL) for a DeFi protocol via DeFiLlama's public API. Identify the protocol by it…

DeFi yield screener

$0.002 · POST /api/defi-yields

Screen DeFi yield pools (lending, LP, staking, vaults) across every chain from DefiLlama's free Yields dataset: filter b…