{"uid":"cap_dpbBp0qV3z4AkcAWGisLE","slug":"defi-protocol-tvl-chain-analytics-x402-47c2eb76","name":"DeFi Protocol TVL & Chain Analytics (x402)","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/v1/crypto/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_QgLS22m8ZIXwX2jFxhzOU","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, chain rankings, protocol-level metrics, and directional signals for a given chain or protocol via x402 micropayment.","exampleAgentPrompt":"What's the current TVL for Base, its rank among all chains, and whether DeFi flows are bullish or neutral right now? Show me the top 15 chains too.","exampleUseCases":[{"title":"Pre-trade DeFi health check","prompt":"Before I deploy liquidity on Base, can you pull the current TVL, 7-day change, and DeFi signal for Base so I know if it's a good environment to enter?"},{"title":"Protocol TVL due diligence","prompt":"I'm evaluating Aave — can you get me the current TVL data and DeFi market signal for that protocol so I can assess its activity level?"},{"title":"Top chains TVL leaderboard","prompt":"Give me a ranked list of the top 15 chains by DeFi TVL with their share percentages and 7-day changes, so I can see where liquidity is concentrated right now."}],"resultDescription":"Returns a JSON object with: chain-level TVL in USD, rank, share of total DeFi, 1d/7d/30d percentage changes, flow direction (flat/up/down), an overall DeFi market summary (total TVL, counts, period changes), a directional signal (NEUTRAL/BULLISH/BEARISH), human-readable reasons, a top-chains leaderboard array, source attribution, timestamp, and suggested next endpoints.","failureModes":["Unknown chain name returns empty or error response","Invalid protocol slug returns no protocol data","x402 payment failure blocks the response (402 Not Authorized)","Data may lag by minutes to hours depending on DefiLlama refresh cadence","limit parameter out of range (must be 1–50) returns validation error"],"whenToPreferThis":"Choose this endpoint when your agent needs structured, signal-ready DeFi TVL data for on-chain decision-making — particularly for Base ecosystem analysis. Prefer it over raw DefiLlama API calls when you want a pre-digested directional signal, don't want to manage API keys, and are comfortable with x402 USDC micropayments. Best for trading agents, liquidity deployment logic, and protocol research workflows.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:42:23.402Z","isFirstParty":false,"canonicalSlug":"defi-protocol-tvl-chain-analytics-x402-47c2eb76"}