DefiLlama protocol API
One request, one key: POST /v1/crypto/defillama/protocol. The fields below are read from a real answer captured 19 November 2026, with the value each field had (long text cut, lists cut to three items); a call can return more or fewer fields depending on what the source holds. It is not invented.
Price
5 credits a call. One call is about $0.049 and 1,000 calls are about $49 at the smallest paid plan's rate.Formula A call that comes back empty is not charged.
Try it free
This call is listed in the free browser demo, which runs it with no key and no sign-up, a few runs a day per visitor: open the demo. Or get 100 free credits to call it from your code.
What it returns
You send:
{
"protocol": "aave"
}
| Field | Type | Value in the captured answer |
|---|---|---|
protocol | string | aave |
name | string | Aave |
description | string | Aave is an Open Source and Non-Custodial protocol to earn interest on deposits and borrow assets |
chain_count | number | 0 |
token | string | AAVE |
token_address | string | 0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9 |
gecko_id | string | aave |
website | string | https://aave.com |
twitter | string | aave |
current_tvl_usd | number | 37279618760 |
tvl_by_chain | object | {"Ethereum-staking":263852015,"Ethereum-pool2":416227,"Avalanche":361742729,"Avalanche-borrowed":229718046,... |
tvl_7d | list | [{"date":1794528000,"tvl":15993339921}] |
tvl_change_30d_pct | number | -19.09 |
raises | list | [{"date":1594771200,"name":"Aave","round":"Private token sale","amount":3,"chains":["Ethereum"],"sector":"A... |
Measured on that call: 894 ms.
Code
curl
curl -X POST https://api.foxapis.com/v1/crypto/defillama/protocol \
-H "Authorization: Bearer YOUR_KEY" \
-H "Content-Type: application/json" \
-d '{"protocol":"aave"}'Python
import requests
r = requests.post(
"https://api.foxapis.com/v1/crypto/defillama/protocol",
headers={"Authorization": "Bearer YOUR_KEY"},
json={"protocol":"aave"},
)
print(r.json())JavaScript
const r = await fetch("https://api.foxapis.com/v1/crypto/defillama/protocol", {
method: "POST",
headers: { "Authorization": "Bearer YOUR_KEY", "Content-Type": "application/json" },
body: JSON.stringify({"protocol":"aave"}),
});
console.log(await r.json());
n8n (HTTP Request node: paste it into a workflow)
{
"nodes": [
{
"name": "DefiLlama protocol",
"type": "n8n-nodes-base.httpRequest",
"typeVersion": 4,
"position": [
0,
0
],
"parameters": {
"method": "POST",
"url": "https://api.foxapis.com/v1/crypto/defillama/protocol",
"sendHeaders": true,
"headerParameters": {
"parameters": [
{
"name": "Authorization",
"value": "Bearer YOUR_KEY"
}
]
},
"sendBody": true,
"specifyBody": "json",
"jsonBody": "{\"protocol\":\"aave\"}"
}
}
],
"connections": {}
}
Assistants (Claude, ChatGPT, Cursor)
Connect the FoxAPIs server once; the tools it offers are listed on the MCP page.
claude mcp add --transport http foxapis https://foxapis.com/mcp \ --header "Authorization: Bearer YOUR_KEY"
Errors and limits
- 401: the key is missing or wrong.
- 402: out of credits; top up on the pricing page.
- 422: the input does not match; the answer names the field.
- 429: too many calls too fast; wait a moment and try again.
- 503: the source did not answer; nothing is charged. Live state: status.
Free to start: 100 credits, no card. Then from $10. Credits you buy never expire.
Get my free keyMore in this category: CoinGecko coin
Same category: Crypto · all APIs
How we calculate
- Price of one call and of 1,000 calls: The credits per call times the smallest paid plan's price per credit (its monthly price divided by its monthly credits), times 1,000 for the larger figure.
Data: scripts/data/endpoint-credits.json and plans.json, 2026-11-20. Every other figure on this page is copied from the record, not calculated by us.