{"uid":"cap_I_0KeklD5gSUjiTIJ1Z5j","slug":"defi-tvl-lookup-x402-pay-per-call-2ddb1159","name":"DeFi TVL Lookup (x402 Pay-per-Call)","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/defi-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_sxHoaot048aaNzCmuhchQ","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 Total Value Locked (TVL) data for a specific chain or protocol, including rankings, flow signals, and 1d/7d/30d changes, paid via x402 USDC on Base.","exampleAgentPrompt":"What's the current DeFi TVL on Base — how does it rank among other chains and what's the 7-day trend? Show me the top 15 chains too.","exampleUseCases":[{"title":"Monitor Base chain DeFi health","prompt":"How is Base doing in terms of DeFi TVL right now? I want its rank, the 7-day and 30-day change, and whether the trend is bullish or bearish."},{"title":"Protocol TVL due diligence","prompt":"What's the current TVL for Aave across all chains and how has it changed over the last week?"},{"title":"Cross-chain TVL competitive ranking","prompt":"Give me the top 10 DeFi chains by TVL and their share of the overall DeFi market so I can see who's winning onchain."}],"resultDescription":"Returns a JSON object with: total DeFi TVL in USD, 1d/7d/30d change percentages, chain-specific TVL with rank and flow signal, a NEUTRAL/BULLISH/BEARISH trading signal, human-readable reason strings, and a ranked list of top chains — all sourced from DefiLlama.","failureModes":["Unknown chain name returns an error or empty chain field","Protocol slug not found in DefiLlama returns null protocol data","Payment not sent or insufficient USDC balance causes 402 Payment Required","Limit parameter outside 1–50 range rejected with validation error","Data may be up to ~30 minutes stale depending on DefiLlama refresh cadence"],"whenToPreferThis":"Choose this endpoint when your agent needs fast, no-auth DeFi TVL data paid per-call in USDC — ideal for onchain trading agents, portfolio monitors, or DeFi research bots that need chain rankings, flow signals, and multi-timeframe TVL changes without managing API keys or subscriptions. Prefer over self-hosted DefiLlama scrapers when you want a structured, agent-ready response with signals pre-computed.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:41:51.975Z","isFirstParty":false,"canonicalSlug":"defi-tvl-lookup-x402-pay-per-call-2ddb1159"}