{"uid":"cap__25I77geBT0lmSX8lL62A","slug":"defillama-historical-chain-tvl-c09589c2","name":"DefiLlama Historical Chain TVL","description":"Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.","url":"https://kr-x402-mvp.kgy5612.workers.dev/defillama/historical-chain-tvl?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{"chain":{"type":"string","examples":["Base","Ethereum"],"maxLength":40,"description":"Chain name, e.g. Base, Ethereum, Solana"},"limit":{"type":"integer","maximum":50,"minimum":1,"description":"Top chains to list (default 15)"},"protocol":{"type":"string","examples":["aave"],"maxLength":60,"description":"DefiLlama protocol slug, e.g. aave, lido, aerodrome"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"defi":{"base":{"rank":5,"tvl_usd":3900000000,"share_pct":3.1},"flow":"flat","change_1d_pct":0.3,"change_7d_pct":-2.1,"total_tvl_usd":125000000000,"chains_counted":300,"change_30d_pct":4},"next":["/crypto/global-market","/crypto/stablecoin-peg"],"chain":{"flow":"flat","name":"Base","rank":5,"as_of":"2026-10-30","tvl_usd":3900000000,"chain_id":8453,"change_1d_pct":0.4,"change_7d_pct":-1.2,"change_30d_pct":5.6,"share_of_defi_pct":3.1},"signal":"NEUTRAL","source":"https://defillama.com","reasons":["DeFi TVL $125.0B, 7d -2.1%","Base #5 $3.90B, 7d -1.2% (flat)"],"top_chains":[{"name":"Ethereum","rank":1,"token":"ETH","tvl_usd":70000000000,"share_pct":56}],"updated_at":"2026-10-30T02:30:00Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dpCxN4MBWNbZ3zQ_BM02u","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns historical and current Total Value Locked (TVL) data for a specific blockchain or DeFi protocol, with ranked comparisons across all chains.","exampleAgentPrompt":"What's the current TVL for Base chain, how does it rank among all chains, and has it been going up or down over the last 7 days? Show me the top 15 chains too.","exampleUseCases":[{"title":"Chain TVL rank before deploying capital","prompt":"Before I deploy liquidity, can you check how Base ranks by TVL right now and whether its TVL has been growing or shrinking over the last 7 and 30 days?"},{"title":"Protocol TVL health check","prompt":"Look up Aave's TVL data from DefiLlama and tell me if it's trending up or down over the past week — I want a signal on whether DeFi activity is healthy right now."},{"title":"Top chains TVL leaderboard","prompt":"Give me the top 15 blockchain chains ranked by TVL, with their share of total DeFi and recent momentum, so I can decide where to focus my trading strategy."}],"resultDescription":"Returns a JSON object with: the queried chain's TVL (USD), rank, 1d/7d/30d percentage changes, share of total DeFi TVL, flow direction (rising/flat/declining), a NEUTRAL/BULLISH/BEARISH signal, human-readable reasons, global DeFi TVL and chain count, a ranked top-chains list, and suggested next endpoints. Data is sourced from DefiLlama and timestamped.","failureModes":["Unknown chain name returns empty or error — use exact DefiLlama chain slugs like 'Base' or 'Ethereum'","Unknown protocol slug returns error — verify slug against DefiLlama's protocol list","Limit out of range (>50 or <1) returns validation error","Stale data if DefiLlama upstream is delayed — check updated_at timestamp","Payment failure (402) if USDC balance on Base is insufficient"],"whenToPreferThis":"Choose this endpoint when your agent needs on-chain TVL context for DeFi decision-making — particularly for Base chain ecosystem awareness, cross-chain TVL comparison, or protocol health checks. It's ideal for trading agents that need a quick, pre-parsed TVL signal (with directional momentum) without integrating directly with DefiLlama's raw API. Prefer over raw DefiLlama calls when you need normalized signals (NEUTRAL/BULLISH/BEARISH), human-readable reasons, and suggested follow-up data endpoints in a single pay-per-call micro-payment flow.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:41:57.566Z","isFirstParty":false,"canonicalSlug":"defillama-historical-chain-tvl-c09589c2"}