# 2s DeFi TVL Lookup

> 2s DeFi TVL Lookup is a paid API for AI agents from 2s.io, paid per call via x402, $0.0018/call, status unknown (last checked 2026-09-14).

Returns DeFi protocol TVL data, rankings, and chain-level breakdowns sourced from DefiLlama

## Facts

- Endpoint: GET https://2s.io/api/crypto/defi
- Price: $0.0018/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/2s-defi-tvl-lookup-f29c68b4
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_kkjSL6cdfuYFnHYY4R8VF

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 2s-defi-tvl-lookup-f29c68b4
```

Example prompt: What's the current TVL of Lido and how has it changed over the last 7 days? Also show me the top 10 DeFi protocols by TVL on Ethereum.

## When to prefer this

Use this endpoint when you need real-time, ground-truth DeFi TVL data for specific protocols or chains, or want ranked lists of top DeFi protocols by TVL — especially when you need no signup, no API key, and pay-per-call pricing via USDC.

## Known failure modes

- Invalid protocol slug returns empty items array or error
- Chain name not recognized returns empty results
- Limit out of range (>100 or <1) may return error or default
- Missing required queryParams may return error or default top-list
- Network or upstream DefiLlama outage causes failed response with ok:false

## How this service works

DeFi total-value-locked (TVL) metrics via DefiLlama. With no params, returns the top protocols by TVL (name, slug, category, TVL, 1-day and 7-day % change, chains) plus total DeFi TVL across all chains. Pass protocol=<slug> (e.g. lido, aave, uniswap) for a single protocol's TVL, category, momentum, and chains; or chain=<name> (e.g. ethereum, solana, arbitrum) for that chain's TVL. Distinct from crypto.markets/token-price (spot prices) — this is protocol- and chain-level capital locked in DeFi, which an agent can't know from training. Free, keyless.

## Output

Returns a JSON object with ok status, metadata (mode, totalTvl), an items array of matching protocols (each with tvl, name, slug, chains, category, 1d/7d change, tokenSymbol), total count, and source attribution (DefiLlama URL, license, provider).

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "limit": 10
  }
 }
}
```

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "queryParams"
   ],
   "properties": {
    "type": {
     "const": "http"
    },
    "method": {
     "const": "GET"
    },
    "queryParams": {
     "properties": {
      "chain": {
       "type": "string",
       "description": "Chain name (e.g. ethereum, solana) for chain TVL."
      },
      "limit": {
       "type": "integer",
       "description": "Top-list size (1–100, default 20)."
      },
      "protocol": {
       "type": "string",
       "description": "Protocol slug (e.g. lido, aave). Omit for the top list."
      }
     }
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/2s-defi-tvl-lookup-f29c68b4/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from 2s.io](https://www.zero.xyz/host/2s.io/llms.txt)
