{"uid":"cap_d01NTZhdVgzgI9kJbkhy4","slug":"defi-tvl-protocol-chain-lookup-83d43986","name":"DeFi TVL Protocol & Chain Lookup","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/api/tvl-protocol?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_ta5AnvrDV6X-UnW5wpk9U","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 DeFi TVL data for a specific protocol or chain, including rank, TVL in USD, flow direction, and 1d/7d/30d percentage changes sourced from DefiLlama.","exampleAgentPrompt":"What's the current DeFi TVL for the Aave protocol on Ethereum, and how has it changed over the last 7 days?","exampleUseCases":[{"title":"Protocol TVL health check","prompt":"Pull the TVL for the Aerodrome protocol on Base and tell me if it's been growing or shrinking over the past week."},{"title":"Chain DeFi share ranking","prompt":"Where does Base rank among all DeFi chains by TVL, and what percentage of total DeFi does it represent right now?"},{"title":"Top chains TVL overview","prompt":"Give me a list of the top 10 DeFi chains by TVL with their 7-day change percentages so I can see where capital is flowing."}],"resultDescription":"Returns a JSON object with total DeFi TVL, per-chain TVL rank and share, protocol-level TVL if a slug is specified, 1d/7d/30d percentage changes, flow direction (flat/up/down), a NEUTRAL/BULLISH/BEARISH signal, human-readable reasons, a list of top chains, the data source URL, and an updated_at timestamp.","failureModes":["Unknown protocol slug returns empty or error response","Chain name misspelled returns no chain data","Rate limiting or payment failure if x402 USDC payment not processed","Stale data if DefiLlama upstream is delayed","limit parameter out of range (must be 1–50) returns validation error"],"whenToPreferThis":"Choose this endpoint when an AI agent needs DeFi TVL data in a single pay-per-call call with no API key setup, especially when querying Base or Ethereum chain metrics or specific protocol TVL. It bundles total DeFi TVL and per-chain breakdown in one response, unlike competitors that charge separately for each. Ideal for trading agents, onchain analysts, or DeFi dashboards that need fresh TVL signals without managing subscriptions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:42:10.935Z","isFirstParty":false,"canonicalSlug":"defi-tvl-protocol-chain-lookup-83d43986"}