# DefiLlama DeFi TVL API

> DeFi total value locked by protocol and chain, protocol details and history, from DefiLlama

- Vendor: `defillamadefitvlapi` · version 1.0 · category Blockchain · tags defi api, tvl api, defillama api, crypto protocols api, blockchain tvl api, defi analytics api
- Datasource: custom HTTP routes
- Marketplace page: https://apiclay.com/api/defillamadefitvlapi
- This document: https://apiclay.com/docs/defillamadefitvlapi.md
- OpenAPI 3.1: https://apiclay.com/api/defillamadefitvlapi/openapi.json
- MCP: connect https://api.apiclay.com/v1/mcp (see https://apiclay.com/llms.txt), then `apiclay_describe_api` with vendor `defillamadefitvlapi`
- Updated: 2026-11-18

## About

## DefiLlama DeFi TVL API

DeFi data from DefiLlama: every protocol with its total value locked (TVL), chains, category and 1d/7d change; a protocol's full TVL history by chain; the current TVL of one protocol; and TVL per blockchain.

Data comes from **defillama.com** (https://defillama.com). Every route calls the source's own public API and returns it unchanged.

Typical flow: `/protocol?slug=aave` for history, `/tvl?slug=aave` for the current number, `/chains` for all chains.

### Routes

#### GET `/protocols` - All protocols
No parameters.

Returns: array of protocols with `name`, `slug`, `category`, `chains`, `tvl`, `change_1d`, `change_7d`, `mcap`.

#### GET `/protocol` - Protocol details
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| slug | path | string | yes | Protocol slug, e.g. `aave`, `uniswap`, `lido`. |

Returns: `name`, `description`, `chains`, `currentChainTvls`, `tvl[]` history (`date`, `totalLiquidityUSD`).

#### GET `/tvl` - Protocol TVL
| Param | In | Type | Required | Description |
|---|---|---|---|---|
| slug | path | string | yes | Protocol slug. |

Returns: a number: current TVL in USD.

#### GET `/chains` - Chains
No parameters.

Returns: array of chains with `name`, `tvl`, `tokenSymbol`, `chainId`.

### Caveats

- `/protocols` is several MB; it can pass the 2 MB response cap.
- Upstream responses can change over time. Verify fields before relying on them.
- Not affiliated with or endorsed by defillama.com.

## Pricing

- Pay as you go: 0.0012 credits/request
- Trial: 1 free requests per buyer
- Billing order: trial requests -> subscribed plan requests -> pay as you go. 1 credit's USD value is shown on the marketplace page.

## HTTP routes

Only the public, buyer-facing parts of each route are listed; vendor-side credentials stay on the gateway.

### GET /protocols — All protocols
- Gateway: `GET https://api.apiclay.com/v1/api/defillamadefitvlapi/protocols`
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /protocol — Protocol details
- Gateway: `GET https://api.apiclay.com/v1/api/defillamadefitvlapi/protocol`
- Public query params: `slug` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /tvl — Protocol TVL
- Gateway: `GET https://api.apiclay.com/v1/api/defillamadefitvlapi/tvl`
- Public query params: `slug` (string, required)
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

### GET /chains — Chains
- Gateway: `GET https://api.apiclay.com/v1/api/defillamadefitvlapi/chains`
- Upstream proxy: ApiClay proxy paid by the vendor (data cap 2 MB per call). Fetched through an ApiClay proxy paid by the vendor; a response larger than the route's data cap fails with 502 and is refunded in full.

## Call example

```bash
curl -X GET "https://api.apiclay.com/v1/api/defillamadefitvlapi/protocols" \
  -H "token: <YOUR_APICLAY_TOKEN>"
```

Index of every published API: https://apiclay.com/llms.txt
