# agent402.tools L2 TVL Rankings

> agent402.tools L2 TVL Rankings is a paid API for AI agents from agent402.tools, paid per call via x402, $0.002/call, status unknown (last checked 2026-09-14).

Returns top Layer 2 blockchains ranked by Total Value Locked (TVL) in USD, including native token symbol and CoinGecko/CMC IDs, via DeFiLlama data

## Facts

- Endpoint: POST https://agent402.tools/api/l2-tvl
- Price: $0.002/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agent402-tools-l2-tvl-rankings-a3c54205
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_D7iWZ9N3LsMp6vNLd_1M-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability agent402-tools-l2-tvl-rankings-a3c54205 -d '<json body>'
```

Example prompt: Can you pull the top 25 Layer 2 blockchains ranked by TVL right now, including their native token symbols and CoinGecko IDs?

## When to prefer this

Use this endpoint when you need a quick ranked snapshot of Layer 2 blockchains by TVL, especially when you also need token metadata (CoinGecko/CMC IDs) for downstream price lookups or analysis. Prefer this over manually querying DeFiLlama when you need L2-specific filtering with classification already applied.

## Known failure modes

- Limit out of range (must be 1-50) returns validation error
- DeFiLlama upstream unavailable causes failed fetch
- Payment of $0.002 USDC not processed results in 402 Payment Required
- Unknown or newly launched L2s may not be classified correctly

## How this service works

Top L2s by Total Value Locked (TVL) via DeFiLlama. Returns each L2 with TVL in USD, native token symbol, and CoinGecko/CMC ids. Classification combines DeFiLlama's parent-chain hint with a curated list of well-known L2s (Arbitrum, Optimism, Base, zkSync Era, Linea, Scroll, Mantle, Polygon zkEVM, Starknet, Blast, Mode, Manta, Metis, Polygon, Taiko, Immutable zkEVM, World Chain).

## Output

A ranked list of up to 50 Layer 2 blockchains, each with TVL in USD, native token symbol, CoinGecko ID, and CoinMarketCap ID — sourced from DeFiLlama and classified using a curated list of known L2s (Arbitrum, Optimism, Base, zkSync Era, Linea, Scroll, etc.)

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "limit": {
   "type": "number",
   "description": "Number of L2s to return (1-50, default 15)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "note": "TVL is the cross-DeFi snapshot from DeFiLlama; L2 classification combines parent-chain hint + a curated list of well-known L2s.",
  "count": 2,
  "chains": [
   {
    "name": "Arbitrum",
    "cmcId": 11841,
    "gecko": "arbitrum",
    "tvlUsd": 3000000000,
    "tokenSymbol": "ARB"
   },
   {
    "name": "Base",
    "cmcId": null,
    "gecko": "base",
    "tvlUsd": 2500000000,
    "tokenSymbol": "ETH"
   }
  ],
  "source": "defillama",
  "totalTvlUsd": 5500000000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agent402-tools-l2-tvl-rankings-a3c54205/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agent402.tools](https://www.zero.xyz/host/agent402.tools/llms.txt)
