# DeFi TVL by Category (DefiLlama)

> DeFi TVL by Category (DefiLlama) is a paid API for AI agents from api.vextorium.com, paid per call via x402, $0.004/call, status unknown (last checked 2026-10-01).

Returns DeFi total value locked broken down by product category (Lending, DEXs, Liquid Staking, CDP, Yield, etc.) with TVL amount, market share percentage, and protocol count per category.

## Facts

- Endpoint: POST https://api.vextorium.com/defi-categorias-pago?utm_source=zero.xyz
- Price: $0.004/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-01
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/defi-tvl-by-category-defillama-9d1baaf2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_lFOd-mV-xXLJp2bo5ohTW

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-tvl-by-category-defillama-9d1baaf2 -d '<json body>'
```

Example prompt: Can you show me the current DeFi landscape broken down by category — like how much TVL is in Lending vs DEXs vs Liquid Staking — and include the top 15 categories?

## When to prefer this

Use this endpoint when you need a high-level DeFi market structure view grouped by protocol type/category rather than individual protocol TVL. Prefer this over per-protocol endpoints when the goal is sector allocation, market share analysis, or understanding which DeFi verticals dominate. Ideal for dashboards, newsletters, and investment research requiring a macro DeFi breakdown.

## Known failure modes

- DefiLlama upstream unavailable — returns error or stale data
- Invalid 'limite' value outside 1-50 range — validation error
- Network timeout if DefiLlama API is slow
- Missing or malformed request body — returns schema validation error

## How this service works

DeFi TVL grouped by category (Lending, Dexs, Liquid Staking, CDP, Yield...): value locked, share of the total and number of protocols per category. Shows where the money is by product type. Live from DefiLlama.

## Output

Returns an array of DeFi categories each with: category name (e.g. Lending, Dexs, Liquid Staking, CDP, Yield), total TVL in USD, percentage share of aggregate DeFi TVL, and number of protocols in that category. Also includes the overall total DeFi TVL and a metadata note. Data is sourced live from DefiLlama.

## 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",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "required": [],
     "properties": {
      "limite": {
       "type": "integer",
       "maximum": 50,
       "minimum": 1,
       "description": "Number of categories (1-50, default 20)"
      }
     }
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "POST"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": [
      "object",
      "null"
     ],
     "properties": {
      "nota": {
       "type": [
        "string",
        "null"
       ]
      },
      "categorias": {
       "type": [
        "array",
        "null"
       ],
       "items": {
        "type": [
         "null",
         "object"
        ],
        "properties": {
         "tvl_usd": {
          "type": [
           "null",
           "number"
          ]
         },
         "categoria": {
          "type": [
           "null",
           "string"
          ]
         },
         "cuota_pct": {
          "type": [
           "null",
           "number"
          ]
         },
         "protocolos": {
          "type": [
           "null",
           "number"
          ]
         }
        }
       }
      },
      "tvl_total_usd": {
       "type": [
        "number",
        "null"
       ]
      }
     }
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "nota": "TVL de DeFi por tipo de producto. Fuente: DefiLlama.",
  "categorias": [
   {
    "tvl_usd": 319681273052,
    "categoria": "CEX",
    "cuota_pct": 52.74,
    "protocolos": 79
   },
   {
    "tvl_usd": 61195977806,
    "categoria": "Liquid Staking",
    "cuota_pct": 10.1,
    "protocolos": 258
   },
   {
    "tvl_usd": 56714459245,
    "categoria": "Bridge",
    "cuota_pct": 9.36,
    "protocolos": 147
   },
   {
    "tvl_usd": 54187259262,
    "categoria": "Lending",
    "cuota_pct": 8.94,
    "protocolos": 574
   },
   {
    "tvl_usd": 15913818982,
    "categoria": "Staking Pool",
    "cuota_pct": 2.63,
    "protocolos": 31
   },
   {
    "tvl_usd": 14708465877,
    "categoria": "Dexs",
    "cuota_pct": 2.43,
    "protocolos": 1764
   },
   {
    "tvl_usd": 11399002944,
    "categoria": "Canonical Bridge",
    "cuota_pct": 1.88,
    "protocolos": 78
   },
   {
    "tvl_usd": 10756042080,
    "categoria": "Restaking",
    "cuota_pct": 1.77,
    "protocolos": 13
   },
   {
    "tvl_usd": 9467429900,
    "categoria": "Onchain Capital Allocator",
    "cuota_pct": 1.56,
    "protocolos": 75
   },
   {
    "tvl_usd": 9241683118,
    "categoria": "Risk Curators",
    "cuota_pct": 1.52,
    "protocolos": 87
   }
  ],
  "tvl_total_usd": 606155979950
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/defi-tvl-by-category-defillama-9d1baaf2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.vextorium.com](https://www.zero.xyz/host/api.vextorium.com/llms.txt)
