# DefiLlama API

> DefiLlama API on Apizie: 6 endpoints (Chain TVL, Stablecoins, Stablecoin Chains, Protocols, …) returned as clean JSON through one API key. 6 endpoints are live now. Call it over REST at https://www.apizie.tech/v1/finance:defillama/{endpoint} or from Claude, ChatGPT and Cursor through the Apizie MCP server. Free plan: 1,000 requests a month.

- Project key: `finance:defillama`
- Category: Finance
- Status: live
- Source: https://defillama.com
- Page: https://www.apizie.tech/api/finance/defillama
- OpenAPI: https://www.apizie.tech/api/finance/defillama/openapi.json

DeFi total value locked by chain and protocol, plus stablecoin supply data from DefiLlama.

## Endpoints

### Chain TVL
`GET https://www.apizie.tech/v1/finance:defillama/chains`

| Parameter | Type | Required | Description |
|---|---|---|---|
| length | integer | no |  |
| minTvl | number | no |  |

### Stablecoins
`GET https://www.apizie.tech/v1/finance:defillama/stablecoins`

| Parameter | Type | Required | Description |
|---|---|---|---|
| length | integer | no |  |
| peg | string | no | Peg type, e.g. peggedUSD, peggedEUR |

### Stablecoin Chains
`GET https://www.apizie.tech/v1/finance:defillama/stablecoin-chains`

| Parameter | Type | Required | Description |
|---|---|---|---|
| peg | string | no |  |
| limit | integer | no |  |
| minCirculating | number | no |  |

### Protocols
`GET https://www.apizie.tech/v1/finance:defillama/protocols`

| Parameter | Type | Required | Description |
|---|---|---|---|
| category | string | no |  |
| chain | string | no |  |
| query | string | no |  |
| minTvl | number | no |  |
| page | integer | no |  |
| limit | integer | no |  |

### Chain TVL History
`GET https://www.apizie.tech/v1/finance:defillama/chain-tvl-history`

| Parameter | Type | Required | Description |
|---|---|---|---|
| chain | string | no |  |
| from | string | no | Unix seconds or ISO date |
| to | string | no |  |
| limit | integer | no | Keep only the latest N points |

### Stablecoin History
`GET https://www.apizie.tech/v1/finance:defillama/stablecoin-history`

| Parameter | Type | Required | Description |
|---|---|---|---|
| peg | string | no | Only sum this peg type, e.g. peggedUSD |
| chain | string | no |  |
| from | string | no |  |
| to | string | no |  |
| limit | integer | no |  |

## Example
```
curl "https://www.apizie.tech/v1/finance:defillama/chains" \
  -H "x-api-key: $APIZIE_KEY"
```

## FAQ

### How do I call the DefiLlama API?
Create a free Apizie key, then send GET https://www.apizie.tech/v1/finance:defillama/chains with the header x-api-key. Every endpoint returns { project, data, timestamp }.

### Is the DefiLlama API free on Apizie?
Yes. The Free plan includes 1,000 requests a month at 100 requests a minute, no credit card.

### Can AI agents use the DefiLlama API?
Yes. Add the Apizie MCP server (https://www.apizie.tech/mcp) to Claude, ChatGPT, Cursor or VS Code, then ask in plain language. The agent calls run_scraper with project key finance:defillama.

### What is the status of the DefiLlama API?
Live: works with just an Apizie key
