{"uid":"cap_WPQrLhQV9SLSEAkeOdCd3","slug":"defillama-chain-rankings-via-x402-e28d5318","name":"DeFiLlama Chain Rankings via 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/defillama/chains?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":{"sort":{"enum":["momentum","tvl","volume"],"type":"string","description":"Ranking key (default momentum)"},"chain":{"type":"string","examples":["Base"],"maxLength":40,"description":"Optional chain to focus, e.g. Base, Solana, Hyperliquid"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"next":["/crypto/defi-tvl?chain=Base","/crypto/gas-compare"],"sort":"momentum","focus":{"rank":1,"chain":"Base","trend":"GROWING"},"chains":[{"rank":1,"chain":"Base","flags":[],"trend":"GROWING","tvl_usd":5780000000,"chain_id":8453,"tvl_flow":"flat","tvl_usd_rank":3,"tvl_share_pct":5.1,"momentum_score":11.1,"dex_volume_7d_usd":6848442299,"tvl_change_7d_pct":2.1,"dex_volume_24h_usd":1466645030,"dex_volume_30d_usd":29794587087,"tvl_change_30d_pct":4,"momentum_score_rank":1,"dex_volume_7d_usd_rank":4,"dex_change_7d_over_7d_pct":16.9,"dex_change_30d_over_30d_pct":10.17}],"source":"DefiLlama DEX volume + chain TVL (10 min cache)","summary":{"growing":["Base"],"shrinking":[],"biggest_by_tvl":"Ethereum","busiest_dex_7d":"Solana","fastest_growing":"Base"},"updated_at":"2026-10-30T07:30:00Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_7XQMSDtw7sVn21jgT1qzy","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns ranked DeFi chain momentum, TVL, and DEX volume data sourced from DefiLlama, payable per-call via x402 USDC micropayment on Base.","exampleAgentPrompt":"Which blockchain has the best DeFi momentum right now — show me TVL, DEX volume, and growth trend, sorted by momentum score and focused on Base.","exampleUseCases":[{"title":"Identify fastest-growing DeFi chain","prompt":"Which blockchain is growing the fastest in DeFi right now? Sort by momentum and tell me the TVL, 7-day DEX volume, and trend for the top chains."},{"title":"Compare chain activity for trading strategy","prompt":"I want to know how Base stacks up against other chains by TVL and DEX volume — can you pull the latest DeFiLlama chain rankings sorted by volume?"},{"title":"Monitor DeFi ecosystem shifts","prompt":"Give me a snapshot of which DeFi chains are growing and which are shrinking right now, including their TVL share and 30-day volume changes."}],"resultDescription":"A JSON object containing a ranked list of blockchain chains with fields including TVL in USD, DEX volume (24h, 7d, 30d), momentum score and rank, TVL rank, trend label (GROWING/SHRINKING/FLAT), TVL flow, TVL change percentages, and DEX volume change over time. Also includes a summary with the biggest chain by TVL, busiest DEX, and fastest growing chain, plus suggested next API calls. Data is sourced from DefiLlama with a 10-minute cache.","failureModes":["Payment not received or invalid x402 USDC payment on Base → 402 Payment Required response","Invalid sort enum value (not momentum/tvl/volume) → 400 Bad Request","Unknown or misspelled chain name in filter → empty or unfiltered result","DefiLlama upstream unavailable → 502 or stale cached data","Rate limit or worker overload → 503 Service Unavailable"],"whenToPreferThis":"Choose this endpoint when an AI agent needs up-to-date, ranked cross-chain DeFi metrics (TVL, DEX volume, momentum) without signing up for an API key — especially when operating in a pay-per-call x402 micropayment context on Base. Prefer over free alternatives when you need momentum scoring, trend labels, and next-step navigation hints bundled together. Best for trading agents, DeFi scouts, and portfolio monitors that need chain-level signals rather than token-level data.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:41:42.758Z","isFirstParty":false,"canonicalSlug":"defillama-chain-rankings-via-x402-e28d5318"}