# X Data Gateway — DefiLlama TVL Lookup

> X Data Gateway — DefiLlama TVL Lookup is a paid API for AI agents from x-data-gateway.annushka1190.workers.dev, paid per call via x402, $0.003/call, status unknown (last checked 2026-09-14).

Fetches Total Value Locked (TVL) data for a DeFi protocol by its DefiLlama slug via the X Data Gateway.

## Facts

- Endpoint: GET https://x-data-gateway.annushka1190.workers.dev/v1/defi/tvl
- Price: $0.003/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/x-data-gateway-defillama-tvl-lookup-aac81196
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_bA6gpwsl1JJejAGOn-RZp

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 x-data-gateway-defillama-tvl-lookup-aac81196
```

Example prompt: What's the current total value locked for Aave? Look it up using the slug 'aave' from DefiLlama.

## When to prefer this

Choose this endpoint when you need real-time TVL data for a specific DeFi protocol by its DefiLlama slug, especially within an agent workflow that also uses X/Twitter data or Base chain intel from the same gateway. Ideal for pay-per-call usage without managing API keys, using USDC micropayments via x402.

## Known failure modes

- Invalid or unknown slug returns empty or error response
- DefiLlama upstream unavailability causes failed fetch
- Missing required 'slug' query parameter causes validation error
- Rate limiting or payment failure (x402) blocks the request

## How this service works

Current TVL for a protocol slug from DefiLlama free API. e.g. GET /v1/defi/tvl?slug=aave

## Output

Returns a JSON object containing TVL data for the specified DeFi protocol as sourced from DefiLlama, including aggregate and possibly chain-specific TVL figures.

## 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",
      "HEAD",
      "DELETE"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "required": [
      "slug"
     ],
     "properties": {
      "slug": {
       "type": "string",
       "description": "DefiLlama slug e.g. aave, uniswap"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {}
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/x-data-gateway-defillama-tvl-lookup-aac81196/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from x-data-gateway.annushka1190.workers.dev](https://www.zero.xyz/host/x-data-gateway.annushka1190.workers.dev/llms.txt)
