# DeFi Protocol TVL & Metrics Lookup (DefiLlama)

> DeFi Protocol TVL & Metrics Lookup (DefiLlama) 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 current TVL, market cap, category, supported chains, per-chain TVL breakdown, and 30-day TVL history for any DeFi protocol by its DefiLlama slug.

## Facts

- Endpoint: GET https://crypto.apitoll.cloud/v1/crypto/protocol
- 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/defi-protocol-tvl-metrics-lookup-defillama-6176cf59
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oLZVzqxMLcJzt2ZCEX83q

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 defi-protocol-tvl-metrics-lookup-defillama-6176cf59
```

Example prompt: Can you pull up Lido's current TVL, market cap, which chains it runs on, the per-chain TVL breakdown, and its 30-day TVL history from DefiLlama?

## When to prefer this

Use this endpoint when you need a comprehensive, single-call snapshot of a specific DeFi protocol including TVL, market cap, multi-chain presence, and historical TVL trend. Prefer this over generic crypto price endpoints when the user wants DeFi-specific metrics like TVL or chain distribution. Ideal for protocol due diligence, DeFi research, or building dashboards that track on-chain liquidity depth.

## Known failure modes

- Invalid or unknown protocol slug returns an error or empty result — verify the exact DefiLlama slug (e.g. 'aave-v3' not 'aave')
- Protocol may have been delisted or renamed on DefiLlama, causing a 404 or empty response
- Missing 'protocol' query param defaults to aave-v3, which may not be the intended protocol
- TVL data may lag by minutes if DefiLlama's upstream indexers are delayed
- Network or payment authorization failure (x402) may prevent the call from completing

## How this service works

Deep dive on any DeFi protocol by its DefiLlama slug (aave-v3, lido, uniswap…): current Total Value Locked, market cap, category, the chains it spans, a per-chain TVL breakdown, and a 30-day TVL history. Everything you need to size up a protocol in one call. Sourced from DefiLlama.

## Output

A JSON object containing the protocol's name, symbol, category, current total TVL in USD, market cap in USD, an array of supported chain names, a per-chain TVL breakdown (array of {chain, tvlUsd} objects), and a 30-day TVL history (array of {date, tvlUsd} timestamped data points). Data is sourced from DefiLlama.

## Example request

```json
{
 "input": {
  "type": "http",
  "method": "GET",
  "queryParams": {
   "protocol": "aave-v3"
  }
 }
}
```

## 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": {
      "protocol": {
       "type": "string",
       "description": "DefiLlama protocol slug (aave-v3, lido, uniswap, …). Defaults to aave-v3."
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object",
     "properties": {
      "name": {
       "type": "string"
      },
      "slug": {
       "type": "string"
      },
      "chains": {
       "type": "array",
       "items": {
        "type": "string"
       }
      },
      "source": {
       "type": "object",
       "properties": {
        "name": {
         "type": "string"
        }
       }
      },
      "symbol": {
       "type": "string"
      },
      "mcapUsd": {
       "type": "number"
      },
      "category": {
       "type": "string"
      },
      "chainTvls": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "chain": {
          "type": "string"
         },
         "tvlUsd": {
          "type": "number"
         }
        }
       }
      },
      "tvlHistory": {
       "type": "array",
       "items": {
        "type": "object",
        "properties": {
         "date": {
          "type": "number"
         },
         "tvlUsd": {
          "type": "number"
         }
        }
       }
      },
      "currentTvlUsd": {
       "type": "number"
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "name": "Lido",
  "slug": "lido",
  "chains": [
   "Ethereum"
  ],
  "source": {
   "name": "DefiLlama"
  },
  "symbol": "LDO",
  "mcapUsd": 230000000,
  "category": "Liquid Staking",
  "chainTvls": [
   {
    "chain": "Ethereum",
    "tvlUsd": 25000000000
   }
  ],
  "tvlHistory": [
   {
    "date": 1781000000,
    "tvlUsd": 24800000000
   }
  ],
  "currentTvlUsd": 25000000000
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-protocol-tvl-metrics-lookup-defillama-6176cf59/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)
