# ApiToll DeFi TVL Lookup

> ApiToll DeFi TVL Lookup is a paid API for AI agents from crypto.apitoll.cloud, paid per call via x402, $0.001/call, status unknown (last checked 2026-09-15).

Returns real-time Total Value Locked (TVL) data for a specific blockchain chain or DeFi protocol, sourced from DefiLlama, paid per call via x402.

## Facts

- Endpoint: GET https://crypto.apitoll.cloud/v1/crypto/tvl
- Price: $0.001/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/apitoll-defi-tvl-lookup-0e1eb69e
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_WPxuqp9b9NvVH6OZm_PX6

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 apitoll-defi-tvl-lookup-0e1eb69e
```

Example prompt: What's the current total value locked on Ethereum — pull the DefiLlama TVL data for that chain right now?

## When to prefer this

Use this endpoint when you need real-time TVL data for a specific blockchain chain or DeFi protocol without a subscription or API key, and you want to pay only per call via USDC on Base or Solana. Prefer this over direct DefiLlama API when you need micropayment-gated, agent-native access. Ideal for agents that need on-demand TVL snapshots rather than continuous streaming.

## Known failure modes

- Unknown or misspelled chain name returns no result or error
- Invalid protocol slug (not a valid DefiLlama slug) returns empty or error response
- Limit parameter outside 1–100 range rejected with validation error
- Payment failure via x402 results in 402 response with no data
- Chain and protocol both specified — protocol takes precedence, chain param is ignored
- DefiLlama upstream outage may cause stale or unavailable data

## How this service works

DeFi Total Value Locked (TVL) by blockchain or by protocol. Default returns the top chains ranked by TVL in USD; pass ?chain=Ethereum for one chain, or ?protocol=aave-v3 for a protocol's current TVL, 24h and 7d change, category, market cap, and the chains it spans. Track capital flows across DeFi. Sourced from DefiLlama.

## Output

A JSON object containing the mode ('chain' or 'protocol'), the chain details (name, TVL in USD, chain ID, token symbol), and the data source (DefiLlama). For protocol queries, returns protocol-level TVL. For chain ranking queries, returns top-N chains ordered by TVL.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "chain": "ethereum",
   "limit": 20
  }
 }
}
```

## 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"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "chain": {
       "type": "string",
       "description": "One chain by name (exact, case-insensitive). Omit for the top-chains ranking."
      },
      "limit": {
       "type": "integer",
       "maximum": 100,
       "minimum": 1,
       "description": "Top-N chains in the default ranking (1–100, default 20)."
      },
      "protocol": {
       "type": "string",
       "description": "A protocol by DefiLlama slug (aave-v3, lido, uniswap-v3). Takes precedence over chain. For a parent slug like \"uniswap\" use the /v1/crypto/protocol route."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "mode": {
       "type": "string"
      },
      "chain": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        },
        "tvlUsd": {
         "type": "number"
        },
        "chainId": {
         "type": "number"
        },
        "tokenSymbol": {
         "type": "string"
        }
       }
      },
      "source": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        }
       }
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "mode": "chain",
  "chain": {
   "name": "Ethereum",
   "tvlUsd": 38600000000,
   "chainId": 1,
   "tokenSymbol": "ETH"
  },
  "source": {
   "name": "DefiLlama"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/apitoll-defi-tvl-lookup-0e1eb69e/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from crypto.apitoll.cloud](https://www.zero.xyz/host/crypto.apitoll.cloud/llms.txt)
