81trust / 100
L2 Tvl
by L2 TVL ranking in Onchain & crypto
x402 APIPassing, checked 24 min ago
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).
POST https://agent402.tools/api/l2-tvl
Last 30 days
All checks passedSome failedAll failedNot checked
- Uptime
- 100%
- Response time
- 184 ms typical, 186 ms slowest 5%
- Last check
- 24 min ago
- Next check
- in 5 min
How to call it
# See the payment challenge (nothing is charged)
curl -i -X POST "https://agent402.tools/api/l2-tvl" \
-H "content-type: application/json" \
-d '{"limit":10}'import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";
const client = new x402Client().register(
"eip155:8453",
new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);
// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Fagent402.tools%2Fapi%2Fl2-tvl
const res = await pay("https://agent402.tools/api/l2-tvl", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({"limit":10}),
});
console.log(await res.json());Example input
{
"limit": 10
}Example output
{
"chains": [
{
"cmcId": 11841,
"gecko": "arbitrum",
"name": "Arbitrum",
"tokenSymbol": "ARB",
"tvlUsd": 3000000000
},
{
"cmcId": null,
"gecko": "base",
"name": "Base",
"tokenSymbol": "ETH",
"tvlUsd": 2500000000
}
],
"count": 2,
"note": "TVL is the cross-DeFi snapshot from DeFiLlama; L2 classification combines parent-chain hint + a curated list of well-known L2s.",
"source": "defillama",
"totalTvlUsd": 5500000000
}Security scan
- No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.
Recent checks
| When | Result | HTTP | Time | Price |
|---|---|---|---|---|
| 24 min ago | Passed | 402 | 190 ms | $0.002 |
| 4 h ago | Passed | 402 | 184 ms | $0.002 |
| 7 h ago | Passed | 402 | 183 ms | $0.002 |
| 12 h ago | Passed | 402 | 186 ms | $0.002 |