DefiLlama: Get summary of protocol fees and revenue with historical data
Get summary of protocol fees and revenue with historical data
- Selected price
- $0 / callPublished pricing
- Sellers / APIs
- 1 / 1
- Requests · 30d
- —Loading...
- Success rate · 30d
- —Loading...
DefiLlama: Get summary of protocol fees and revenue with historical data
Prepare your request, then continue with your agent.
Selected price
$0 / call
- Provider
- API
- Pricing
On this page
Playground
Run sends a real API request. Charges follow the published API contract.
Response structure
addressstringaudit_linksnullauditsnullcategorynullchainsstring[]change_1dnumberchildProtocolsobject[]cmcIdstringdefillamaIdstringdescriptionstringdisablednulldisplayNamestringforkedFromnullgecko_idstringgithubstring[]governanceIDnullidstringlatestFetchIsOkbooleanlinkedProtocolsstring[]logostringmethodologynullmethodologyURLnullmodulenullnamestringparentProtocolnullpreviousNamesnullprotocolTypestringreferralUrlstringslugstringsymbolstringtotal24hintegertotal48hto24hintegertotal7dintegertotalAllTimeintegertotalDataChartinteger[][]totalDataChartBreakdown((integer | object)[])[]Hyperliquid L1objectHyperliquid Spot Orderbookinteger
treasurynulltwitterstringurlstringversionKeynull
// Inferred from response examples. Fields are optional and other fields may be returned.
export type ApiResponse = {
address?: string;
audit_links?: null;
audits?: null;
category?: null;
chains?: Array<string>;
change_1d?: number;
childProtocols?: Array<Record<string, unknown>>;
cmcId?: string;
defillamaId?: string;
description?: string;
disabled?: null;
displayName?: string;
forkedFrom?: null;
gecko_id?: string;
github?: Array<string>;
governanceID?: null;
id?: string;
latestFetchIsOk?: boolean;
linkedProtocols?: Array<string>;
logo?: string;
methodology?: null;
methodologyURL?: null;
module?: null;
name?: string;
parentProtocol?: null;
previousNames?: null;
protocolType?: string;
referralUrl?: string;
slug?: string;
symbol?: string;
total24h?: number;
total48hto24h?: number;
total7d?: number;
totalAllTime?: number;
totalDataChart?: Array<Array<number>>;
totalDataChartBreakdown?: Array<Array<number | {
"Hyperliquid L1"?: {
"Hyperliquid Spot Orderbook"?: number;
};
}>>;
treasury?: null;
twitter?: string;
url?: string;
versionKey?: null;
};Sellers
| Seller | Pricing | Requests · 30d | Performance | Access |
|---|---|---|---|---|
defillamaCurrent DefiLlama — Get summary of protocol fees and revenue with historical data · GET · View API reference | $0 / call | — | —successP50— |
- Unit price
- $0
Statistics use persisted gateway logs from the last 30 days up to now, including today.
Success rate = successful requests / all requests;
P50 = median latency of successful requests.
Prices reflect the published API contract. Contract revision: 2. Price update time: not supplied.
Total $0
API
- Method
- GET
- Endpoint
https://api.openany.si/v1/agent-apis/defillama/summary/fees/{protocol}- Content type
- application/json
- Authentication
Authorization: Bearer $OPENANY_API_KEY
curl \
'https://api.openany.si/v1/agent-apis/defillama/summary/fees/derive?dataType=dailyFees' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'Input parameters
Fields in this listing; additional options and input encoding can vary by provider.
| Parameter | Location | Type | Required | Description |
|---|---|---|---|---|
protocol | URL path parameterspath | string | Yes | protocol slug |
dataType | URL query parametersquery | string | No | Desired data type, dailyFees by default. enum: "dailyFees", "dailyRevenue", "dailyHoldersRevenue" |
Required markers inside a nested object or variant apply when that object or variant is used.
Sample response
Sample response · Documented HTTP 200 Example from the provider's documentation. Field values in your results will differ.
{
"address": "hyperliquid:0x0d01dc56dcaaca66ad901c959b4011ec",
"audit_links": null,
"audits": null,
"category": null,
"chains": [
"Hyperliquid L1"
],
"change_1d": 7.47,
"childProtocols": [
{}
],
"cmcId": "32196",
"defillamaId": "parent#hyperliquid",
"description": "Hyperliquid is a decentralized perpetual exchange with best-in-class speed, liquidity, and price",
"disabled": null,
"displayName": "Hyperliquid",
"forkedFrom": null,
"gecko_id": "hyperliquid",
"github": [
"hyperliquid-dex"
],
"governanceID": null,
"id": "parent#hyperliquid",
"latestFetchIsOk": true,
"linkedProtocols": [
"Hyperliquid",
"Hyperliquid Spot Orderbook"
],
"logo": "https://icons.llama.fi/hyperliquid.png",
"methodology": null,
"methodologyURL": null,
"module": null,
"name": "Hyperliquid",
"parentProtocol": null,
"previousNames": null,
"protocolType": "protocol",
"referralUrl": "https://app.hyperliquid.xyz/join/DEFILLAMAO",
"slug": "hyperliquid",
"symbol": "HYPE",
"total24h": 4890250,
"total48hto24h": 4550411,
"total7d": 26184696,
"totalAllTime": 499292857,
"totalDataChart": [
[
1734912000,
1472923
]
],
"totalDataChartBreakdown": [
[
1734912000,
{
"Hyperliquid L1": {
"Hyperliquid Spot Orderbook": 1472923
}
}
]
],
"treasury": null,
"twitter": "HyperliquidX",
"url": "https://hyperliquid.xyz",
"versionKey": null
}Agent integration
Copy the resource contract without sharing an API key.
View API Markdown
# DefiLlama: Get summary of protocol fees and revenue with historical data
Get summary of protocol fees and revenue with historical data
## Available implementations
defillama · DefiLlama — Get summary of protocol fees and revenue with historical data: https://openany.si/markets/apis/capabilities/defillama-get-summary-of-protocol-fees-and-revenue-with-historical-data?offering=757e1f94-2682-4e3f-8943-8a6b7c946d33 · $0 / call
## Selected API contract
Documentation: https://openany.si/markets/apis/capabilities/defillama-get-summary-of-protocol-fees-and-revenue-with-historical-data
Method: GET
Endpoint: https://api.openany.si/v1/agent-apis/defillama/summary/fees/{protocol}
Price: $0 / call
Provider: defillama
Contract revision: 2
Price source: OpenAny public API contract and documented provider unit rates. Price update time: not supplied.
Use OPENANY_API_KEY from the environment. API Key calls use your shared balance.
## Prepared request
```bash
curl \
'https://api.openany.si/v1/agent-apis/defillama/summary/fees/derive?dataType=dailyFees' \
-X GET \
-H "Authorization: Bearer $OPENANY_API_KEY" \
-H 'Content-Type: application/json'
```
## API contract
```json
{
"resource_type": "api",
"name": "DefiLlama — Get summary of protocol fees and revenue with historical data",
"endpoint": "https://api.openany.si/v1/agent-apis/defillama/summary/fees/{protocol}",
"method": "GET",
"content_type": "none",
"execution_mode": "sync",
"authentication": {
"type": "bearer",
"environment_variable": "OPENANY_API_KEY"
},
"inputs": [
{
"description": "protocol slug",
"location": "path",
"name": "protocol",
"nullable": false,
"required": true,
"type": "string"
},
{
"description": "Desired data type, dailyFees by default.",
"enum_values": [
"dailyFees",
"dailyRevenue",
"dailyHoldersRevenue"
],
"location": "query",
"name": "dataType",
"nullable": false,
"required": false,
"type": "string"
}
],
"billing": {
"currency": "USD",
"mode": "fixed",
"priceMicroUsd": "0",
"rounding": null,
"unit": "call",
"unitQuantity": null
},
"examples": [
{
"http_status": 200,
"name": "Official example",
"request": {
"body": null,
"headers": {},
"path": {
"protocol": "derive"
},
"query": {
"dataType": "dailyFees"
}
},
"response_body": {
"address": "hyperliquid:0x0d01dc56dcaaca66ad901c959b4011ec",
"audit_links": null,
"audits": null,
"category": null,
"chains": [
"Hyperliquid L1"
],
"change_1d": 7.47,
"childProtocols": [
{}
],
"cmcId": "32196",
"defillamaId": "parent#hyperliquid",
"description": "Hyperliquid is a decentralized perpetual exchange with best-in-class speed, liquidity, and price",
"disabled": null,
"displayName": "Hyperliquid",
"forkedFrom": null,
"gecko_id": "hyperliquid",
"github": [
"hyperliquid-dex"
],
"governanceID": null,
"id": "parent#hyperliquid",
"latestFetchIsOk": true,
"linkedProtocols": [
"Hyperliquid",
"Hyperliquid Spot Orderbook"
],
"logo": "https://icons.llama.fi/hyperliquid.png",
"methodology": null,
"methodologyURL": null,
"module": null,
"name": "Hyperliquid",
"parentProtocol": null,
"previousNames": null,
"protocolType": "protocol",
"referralUrl": "https://app.hyperliquid.xyz/join/DEFILLAMAO",
"slug": "hyperliquid",
"symbol": "HYPE",
"total24h": 4890250,
"total48hto24h": 4550411,
"total7d": 26184696,
"totalAllTime": 499292857,
"totalDataChart": [
[
1734912000,
1472923
]
],
"totalDataChartBreakdown": [
[
1734912000,
{
"Hyperliquid L1": {
"Hyperliquid Spot Orderbook": 1472923
}
}
]
],
"treasury": null,
"twitter": "HyperliquidX",
"url": "https://hyperliquid.xyz",
"versionKey": null
}
}
]
}
```Error handling
| Status | Next step |
|---|---|
400 | Check the offering and request fields. |
401 / 403 | Verify your credentials and access permissions. |
402 | Inspect the selected access mode and returned payment requirements. |
429 | Respect the returned rate limit and retry guidance. |
5xx | Inspect the error and usage record before retrying a paid operation. |
Examples
Official example
Example from the provider's documentation. Field values in your results will differ.
Prepare your environment
Use a terminal with cURL installed.
Use an OpenAny API key with shared-balance access. Confirm availability and price before running; a call may charge your balance.
Set the key in your terminal using the hidden prompt below. Keep its value out of source files and logs.
Terminal · macOS / Linuxprintf 'OpenAny API key: ' read -r -s OPENANY_API_KEY export OPENANY_API_KEY printf '\n'Run the request
Paste the complete command below into your terminal.
Values to replace before running 2
Review these request fields before running. Keep the published provider and request method unchanged.
protocol- protocol slug
dataType- Desired data type, dailyFees by default.
Terminal · cURLcurl \ 'https://api.openany.si/v1/agent-apis/defillama/summary/fees/derive?dataType=dailyFees' \ -X GET \ -H "Authorization: Bearer $OPENANY_API_KEY" \ -H 'Content-Type: application/json'Check the response
Sample response · Documented HTTP 200
Sample response{ "address": "hyperliquid:0x0d01dc56dcaaca66ad901c959b4011ec", "audit_links": null, "audits": null, "category": null, "chains": [ "Hyperliquid L1" ], "change_1d": 7.47, "childProtocols": [ {} ], "cmcId": "32196", "defillamaId": "parent#hyperliquid", "description": "Hyperliquid is a decentralized perpetual exchange with best-in-class speed, liquidity, and price", "disabled": null, "displayName": "Hyperliquid", "forkedFrom": null, "gecko_id": "hyperliquid", "github": [ "hyperliquid-dex" ], "governanceID": null, "id": "parent#hyperliquid", "latestFetchIsOk": true, "linkedProtocols": [ "Hyperliquid", "Hyperliquid Spot Orderbook" ], "logo": "https://icons.llama.fi/hyperliquid.png", "methodology": null, "methodologyURL": null, "module": null, "name": "Hyperliquid", "parentProtocol": null, "previousNames": null, "protocolType": "protocol", "referralUrl": "https://app.hyperliquid.xyz/join/DEFILLAMAO", "slug": "hyperliquid", "symbol": "HYPE", "total24h": 4890250, "total48hto24h": 4550411, "total7d": 26184696, "totalAllTime": 499292857, "totalDataChart": [ [ 1734912000, 1472923 ] ], "totalDataChartBreakdown": [ [ 1734912000, { "Hyperliquid L1": { "Hyperliquid Spot Orderbook": 1472923 } } ] ], "treasury": null, "twitter": "HyperliquidX", "url": "https://hyperliquid.xyz", "versionKey": null }