From 2f456fdcb1fa603e71083ffdf0a24310d88885da Mon Sep 17 00:00:00 2001
From: treeoflife2
Date: Tue, 24 Nov 2026 16:41:50 +0530
Subject: [PATCH 01/12] docs(llms): send key holders to pro-api for every
request
Code written from llms-free.txt called the free hosts even when the user
said they had an API key, so paying users hit the free rate limit.
- Add a "Have an API key?" section at the top of llms.txt, llms-free.txt
and llms-pro.txt: every request goes to pro-api.llama.fi, free hosts never
read a key, a 429 there means the wrong host, and the $49 Pro plan has no key.
- List the keyed pro-api URL under every free endpoint in llms-free.txt.
- Say the same on the static homepage and in the free spec description.
- Note that header and query keys get "API Key is wrong" from pro-api.
- Rename the docs page key box to "API Key (API plan)".
- Map free yields paths to /yields/v1/ so they keep a pro twin.
---
defillama-openapi-free.json | 2 +-
examples/web/index.html | 12 ++++-
examples/web/src/components/ApiKeyInput.vue | 8 +++-
llms-free.txt | 51 +++++++++++++++++++--
llms-pro.txt | 12 ++++-
llms.txt | 12 ++++-
scripts/generate-llms.ts | 49 +++++++++++++++++---
7 files changed, 128 insertions(+), 18 deletions(-)
diff --git a/defillama-openapi-free.json b/defillama-openapi-free.json
index 24907dc94cd..caeb7f55046 100644
--- a/defillama-openapi-free.json
+++ b/defillama-openapi-free.json
@@ -1,7 +1,7 @@
{
"openapi": "3.0.0",
"info": {
- "description": "> [!WARNING]\n> The free yield endpoints `/pools` and `/chart/{pool}` are deprecated and will shut down soon. The same data remains available on the [API plan](https://defillama.com/subscription) at `/yields/v1/pools` and `/yields/v1/chart/{pool}`.\n\n## Using AI?\n\nDefiLlama offers two ways to use our data with AI:\n\n| Resource | For | Description |\n|---|---|---|\n| llms.txt | AI assistants (ChatGPT, Claude, Cursor, etc.) | Paste this link into your AI assistant for LLM-optimized docs |\n| MCP Server | AI agents | Connect your agent directly to DefiLlama data — 23 tools, requires an API plan |\n\n**Quick start (MCP)** — paste this into your AI agent:\n```\nRead https://raw.githubusercontent.com/DefiLlama/defillama-skills/refs/heads/master/defillama-setup/SKILL.md and follow the instructions to connect to DefiLlama MCP\n```\n\n---\n\n## Authentication\n\nThe free API needs no key. If you have an API plan, use `https://pro-api.llama.fi/{YOUR_API_KEY}/...` with the key between the base URL and the endpoint. Do NOT send the key as a query parameter (`?apikey=`) or header.\n\nA 200 from `/protocols` or `/overview/fees` here does not validate your API key. Those endpoints require no authentication. A 402 here does not prove your subscription expired. It means the endpoint needs an API plan. There are only two tiers: free (no key) and the API plan. One API plan key unlocks every Pro endpoint. There are no add-ons or separate keys for volumes, derivatives, or other data.\n\nTo check that your key works, call `https://pro-api.llama.fi/usage/{YOUR_API_KEY}` (key at the end, for this endpoint only). It returns your remaining credits, like `{\"creditsLeft\": 1000000}`.\n\nNeed higher rate limits or priority support? We offer a premium plan for 300$/mo. To get it, go to https://defillama.com/subscription\n\n## SDK\n\n**JavaScript** — `npm install @defillama/api` — [GitHub](https://github.com/DefiLlama/api-sdk)\n\n**Python** — `pip install defillama-sdk` — [GitHub](https://github.com/DefiLlama/python-sdk)\n\nQuick start (JavaScript):\n```ts\nimport { DefiLlama } from '@defillama/api'\n\nconst client = new DefiLlama()\nconst protocols = await client.tvl.getProtocols()\n```\n\nQuick start (Python):\n```py\nfrom defillama_sdk import DefiLlama\n\nclient = DefiLlama()\nprotocols = client.tvl.getProtocols()\n```",
+ "description": "> [!WARNING]\n> The free yield endpoints `/pools` and `/chart/{pool}` are deprecated and will shut down soon. The same data remains available on the [API plan](https://defillama.com/subscription) at `/yields/v1/pools` and `/yields/v1/chart/{pool}`.\n\n## Using AI?\n\nDefiLlama offers two ways to use our data with AI:\n\n| Resource | For | Description |\n|---|---|---|\n| llms.txt | AI assistants (ChatGPT, Claude, Cursor, etc.) | Paste this link into your AI assistant for LLM-optimized docs |\n| MCP Server | AI agents | Connect your agent directly to DefiLlama data — 23 tools, requires an API plan |\n\n**Quick start (MCP)** — paste this into your AI agent:\n```\nRead https://raw.githubusercontent.com/DefiLlama/defillama-skills/refs/heads/master/defillama-setup/SKILL.md and follow the instructions to connect to DefiLlama MCP\n```\n\n---\n\n## Authentication\n\nThe free API needs no key. **Have an API key? Send every request to `https://pro-api.llama.fi/{YOUR_API_KEY}/...`, including the endpoints on this page.** The free hosts (api.llama.fi, coins.llama.fi, stablecoins.llama.fi, yields.llama.fi) never read a key, so requests there are free tier and rate limited, even for paying users. Put the key between the base URL and the endpoint, and add the pro path prefix (`/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`). Do NOT send the key as a query parameter (`?apikey=`) or header.\n\nA 200 from `/protocols` or `/overview/fees` here does not validate your API key. Those endpoints require no authentication. A 402 here does not prove your subscription expired. It means the endpoint needs an API plan. There are only two tiers: free (no key) and the API plan. One API plan key unlocks every Pro endpoint. There are no add-ons or separate keys for volumes, derivatives, or other data.\n\nTo check that your key works, call `https://pro-api.llama.fi/usage/{YOUR_API_KEY}` (key at the end, for this endpoint only). It returns your remaining credits, like `{\"creditsLeft\": 1000000}`.\n\nNeed higher rate limits or priority support? We offer a premium plan for 300$/mo. To get it, go to https://defillama.com/subscription\n\n## SDK\n\n**JavaScript** — `npm install @defillama/api` — [GitHub](https://github.com/DefiLlama/api-sdk)\n\n**Python** — `pip install defillama-sdk` — [GitHub](https://github.com/DefiLlama/python-sdk)\n\nQuick start (JavaScript):\n```ts\nimport { DefiLlama } from '@defillama/api'\n\nconst client = new DefiLlama()\nconst protocols = await client.tvl.getProtocols()\n```\n\nQuick start (Python):\n```py\nfrom defillama_sdk import DefiLlama\n\nclient = DefiLlama()\nprotocols = client.tvl.getProtocols()\n```",
"version": "1.0.0-oas3",
"title": "DefiLlama API",
"x-scalar-sdk-installation": [
diff --git a/examples/web/index.html b/examples/web/index.html
index b9441ed33af..a5712a751ee 100644
--- a/examples/web/index.html
+++ b/examples/web/index.html
@@ -66,8 +66,16 @@
DefiLlama API documentation
Explore free and Pro API endpoints for DeFi data.
- Free API endpoints ·
- Pro API endpoints
+ Have an API key? Send every request to
+ https://pro-api.llama.fi/YOUR_API_KEY/…, including
+ prices, TVL, stablecoins and yields. The free hosts (api.llama.fi,
+ coins.llama.fi, stablecoins.llama.fi, yields.llama.fi) never read a
+ key and are rate limited.
+
diff --git a/llms-free.txt b/llms-free.txt
index 44561350e32..542528b7695 100644
--- a/llms-free.txt
+++ b/llms-free.txt
@@ -1,6 +1,16 @@
-# DefiLlama Free API
+# DefiLlama Free API (no API key)
-> Free API — no authentication required. Endpoints are served from several hosts, use the base URL listed on each endpoint.
+> Free API, for users with no API key. Endpoints are served from several hosts, use the base URL listed on each endpoint. Users with a key use the "With an API key" URL on each endpoint instead, or [llms-pro.txt](/llms-pro.txt).
+
+## Have an API key? Use pro-api.llama.fi for every request
+
+If you or your user has a DefiLlama API key, send every request to `https://pro-api.llama.fi/{YOUR_API_KEY}/...`. That includes TVL, token prices, stablecoins, yields, volumes and fees, which also have free hosts.
+
+- The free hosts (`api.llama.fi`, `coins.llama.fi`, `stablecoins.llama.fi`, `yields.llama.fi`) never read a key. Requests there are free tier and rate limited, even for paying users. A 429 from a free host means the request belongs on pro-api.llama.fi.
+- The key goes in the URL path, right after the host. Headers and `?apikey=` are not read.
+- Paths on pro-api.llama.fi have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/pools`.
+- The key comes with the DefiLlama API plan ($300/mo). If a user says they have "DefiLlama Pro" and gives you a key, it is this key: use pro-api.llama.fi. The $49 DefiLlama Pro plan on its own has no API key.
+- Use the free hosts only when there is no key.
**Base URL for endpoints below:** `https://api.llama.fi` (unless an endpoint lists its own)
@@ -8,11 +18,13 @@
### GET /protocols
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/protocols`
List all protocols on defillama along with their tvl
Returns: array of {id, name, symbol, category, chains, tvl, chainTvls, change_1d, change_7d}
### GET /protocol/{protocol}
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/protocol/{protocol}`
Get historical TVL of a protocol and breakdowns by token and chain
**Parameters:**
@@ -21,11 +33,13 @@ Returns: {id, name, symbol, category, chains, currentChainTvls, chainTvls}
### GET /v2/historicalChainTvl
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/historicalChainTvl`
Get historical TVL (excludes liquid staking and double counted tvl) of DeFi on all chains
Returns: array of {date, tvl}
### GET /v2/historicalChainTvl/{chain}
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/historicalChainTvl/{chain}`
Get historical TVL (excludes liquid staking and double counted tvl) of a chain
**Parameters:**
@@ -34,6 +48,7 @@ Returns: array of {date, tvl}
### GET /tvl/{protocol}
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/tvl/{protocol}`
Simplified endpoint to get current TVL of a protocol
**Parameters:**
@@ -42,6 +57,7 @@ Returns: number
### GET /v2/chains
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/chains`
Get current TVL of all chains
Returns: array of {gecko_id, tvl, tokenSymbol, cmcId, name, chainId}
@@ -51,6 +67,7 @@ Returns: array of {gecko_id, tvl, tokenSymbol, cmcId, name, chainId}
### GET /prices/current/{coins}
**Base URL:** `https://coins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/coins/prices/current/{coins}`
Get current prices of tokens by contract address
**Parameters:**
@@ -59,6 +76,7 @@ Returns: {coins}
### GET /prices/historical/{timestamp}/{coins}
**Base URL:** `https://coins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/coins/prices/historical/{timestamp}/{coins}`
Get historical prices of tokens by contract address
**Parameters:**
@@ -68,6 +86,7 @@ Returns: {coins}
### GET /batchHistorical
**Base URL:** `https://coins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/coins/batchHistorical`
Get historical prices for multiple tokens at multiple different timestamps
**Parameters:**
@@ -77,6 +96,7 @@ Returns: {coins}
### GET /chart/{coins}
**Base URL:** `https://coins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/coins/chart/{coins}`
Get token prices at regular time intervals
**Parameters:**
@@ -89,6 +109,7 @@ Returns: {coins}
### GET /percentage/{coins}
**Base URL:** `https://coins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/coins/percentage/{coins}`
Get percentage change in price over time
**Parameters:**
@@ -100,6 +121,7 @@ Returns: {coins}
### GET /prices/first/{coins}
**Base URL:** `https://coins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/coins/prices/first/{coins}`
Get earliest timestamp price record for coins
**Parameters:**
@@ -108,6 +130,7 @@ Returns: {coins}
### GET /block/{chain}/{timestamp}
**Base URL:** `https://coins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/coins/block/{chain}/{timestamp}`
Get the closest block to a timestamp
**Parameters:**
@@ -121,6 +144,7 @@ Returns: {height, timestamp}
### GET /stablecoins
**Base URL:** `https://stablecoins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoins`
List all stablecoins along with their circulating amounts
**Parameters:**
@@ -129,6 +153,7 @@ Returns: {peggedAssets}
### GET /stablecoincharts/all
**Base URL:** `https://stablecoins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoincharts/all`
Get historical mcap sum of all stablecoins
**Parameters:**
@@ -137,6 +162,7 @@ Returns: array of {date, totalCirculating}
### GET /stablecoincharts/{chain}
**Base URL:** `https://stablecoins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoincharts/{chain}`
Get historical mcap sum of all stablecoins in a chain
**Parameters:**
@@ -146,6 +172,7 @@ Returns: array of {date, totalCirculating}
### GET /stablecoin/{asset}
**Base URL:** `https://stablecoins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoin/{asset}`
Get historical mcap and historical chain distribution of a stablecoin
**Parameters:**
@@ -154,11 +181,13 @@ Returns: {id, name, symbol, totalCirculating, chainCirculating}
### GET /stablecoinchains
**Base URL:** `https://stablecoins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoinchains`
Get current mcap sum of all stablecoins on each chain
-Returns: array of {name, totalCirculating}
+Returns: array of {name, totalCirculatingUSD}
### GET /stablecoinprices
**Base URL:** `https://stablecoins.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoinprices`
Get historical prices of all stablecoins
Returns: array of {date, prices}
@@ -168,11 +197,13 @@ Returns: array of {date, prices}
### GET /pools
**Base URL:** `https://yields.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/yields/v1/pools`
Retrieve the latest data for all pools, including enriched information such as predictions
Returns: {status, data}
### GET /chart/{pool}
**Base URL:** `https://yields.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/yields/v1/chart/{pool}`
Get historical APY and TVL of a pool
**Parameters:**
@@ -185,6 +216,7 @@ Returns: {status, data}
### GET /overview/dexs
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/overview/dexs`
List all dexs along with summaries of their volumes and dataType history data
**Parameters:**
@@ -194,6 +226,7 @@ Returns: {protocols, totalDataChart, allChains}
### GET /overview/dexs/{chain}
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/overview/dexs/{chain}`
List all dexs along with summaries of their volumes and dataType history data filtering by chain
**Parameters:**
@@ -204,6 +237,7 @@ Returns: {protocols, totalDataChart}
### GET /summary/dexs/{protocol}
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/summary/dexs/{protocol}`
Get summary of dex volume with historical data
**Parameters:**
@@ -214,6 +248,7 @@ Returns: {name, total24h, totalAllTime, totalDataChart, totalDataChartBreakdown,
### GET /overview/options
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/overview/options`
List all options dexs along with summaries of their volumes and dataType history data
**Parameters:**
@@ -224,6 +259,7 @@ Returns: {protocols, totalDataChart}
### GET /overview/options/{chain}
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/overview/options/{chain}`
List all options dexs along with summaries of their volumes and dataType history data filtering by chain
**Parameters:**
@@ -231,14 +267,17 @@ List all options dexs along with summaries of their volumes and dataType history
- `excludeTotalDataChart` (query, boolean, required) — true to exclude aggregated chart from response Example: `true`
- `excludeTotalDataChartBreakdown` (query, boolean, required) — true to exclude broken down chart from response Example: `true`
- `dataType` (query, string, optional) — Desired data type, dailyNotionalVolume by default. (one of: dailyPremiumVolume, dailyNotionalVolume) Example: `dailyPremiumVolume`
+Returns: {totalDataChart, totalDataChartBreakdown, breakdown24h, breakdown30d, chain, allChains, total24h, total48hto24h, total7d, total14dto7d, total60dto30d, total30d, total1y, change_1d, change_7d, change_1m, change_7dover7d, change_30dover30d, total7DaysAgo, total30DaysAgo, totalAllTime, protocols}
### GET /summary/options/{protocol}
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/summary/options/{protocol}`
Get summary of options dex volume with historical data
**Parameters:**
- `protocol` (path, string, required) — protocol slug Example: `derive`
- `dataType` (query, string, optional) — Desired data type, dailyNotionalVolume by default. (one of: dailyPremiumVolume, dailyNotionalVolume) Example: `dailyPremiumVolume`
+Returns: {id, name, url, description, logo, gecko_id, cmcId, chains, twitter, governanceID, github, treasury, symbol, address, childProtocols, linkedProtocols, defillamaId, disabled, displayName, module, category, methodologyURL, methodology, forkedFrom, audits, audit_links, versionKey, parentProtocol, previousNames, slug, protocolType, total24h, total48hto24h, total7d, totalAllTime, totalDataChart, totalDataChartBreakdown, change_1d}
---
@@ -246,6 +285,7 @@ Get summary of options dex volume with historical data
### GET /overview/open-interest
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/overview/open-interest`
List all open interest dex exchanges along with summaries of their open interest
**Parameters:**
@@ -259,6 +299,7 @@ Returns: {protocols, totalDataChart, allChains}
### GET /overview/fees
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/overview/fees`
List all protocols along with summaries of their fees and revenue and dataType history data
**Parameters:**
@@ -269,6 +310,7 @@ Returns: {protocols, totalDataChart, totalDataChartBreakdown}
### GET /overview/fees/{chain}
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/overview/fees/{chain}`
List all protocols along with summaries of their fees and revenue and dataType history data by chain
**Parameters:**
@@ -280,9 +322,10 @@ Returns: {protocols, totalDataChart, totalDataChartBreakdown}
### GET /summary/fees/{protocol}
**Base URL:** `https://api.llama.fi`
+**With an API key:** `https://pro-api.llama.fi/{YOUR_API_KEY}/api/summary/fees/{protocol}`
Get summary of protocol fees and revenue with historical data
**Parameters:**
- `protocol` (path, string, required) — protocol slug Example: `derive`
- `dataType` (query, string, optional) — Desired data type, dailyFees by default. (one of: dailyFees, dailyRevenue, dailyHoldersRevenue) Example: `dailyFees`
-Returns: {id, name, url, referralUrl, description, logo, gecko_id, cmcId, chains, twitter, github, symbol, address, childProtocols, linkedProtocols, defillamaId, disabled, displayName, module, category, methodologyURL, methodology, forkedFrom, audits, audit_links, versionKey, governanceID, treasury, parentProtocol, previousNames, latestFetchIsOk, slug, protocolType, total24h, total48hto24h, total7d, totalAllTime, change_1d, totalDataChart, totalDataChartBreakdown}
+Returns: {id, name, url, referralUrl, description, logo, gecko_id, cmcId, chains, twitter, github, symbol, address, childProtocols, linkedProtocols, defillamaId, disabled, displayName, module, category, methodologyURL, methodology, forkedFrom, audits, audit_links, versionKey, governanceID, treasury, parentProtocol, previousNames, slug, protocolType, total24h, total48hto24h, total7d, totalAllTime, change_1d, totalDataChart, totalDataChartBreakdown}
diff --git a/llms-pro.txt b/llms-pro.txt
index 11e2886ea56..cebcbfff56d 100644
--- a/llms-pro.txt
+++ b/llms-pro.txt
@@ -2,9 +2,19 @@
> Pro API — requires a paid API key ($300/mo). The pro-only endpoints below are NOT available on the free API.
+## Have an API key? Use pro-api.llama.fi for every request
+
+If you or your user has a DefiLlama API key, send every request to `https://pro-api.llama.fi/{YOUR_API_KEY}/...`. That includes TVL, token prices, stablecoins, yields, volumes and fees, which also have free hosts.
+
+- The free hosts (`api.llama.fi`, `coins.llama.fi`, `stablecoins.llama.fi`, `yields.llama.fi`) never read a key. Requests there are free tier and rate limited, even for paying users. A 429 from a free host means the request belongs on pro-api.llama.fi.
+- The key goes in the URL path, right after the host. Headers and `?apikey=` are not read.
+- Paths on pro-api.llama.fi have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/pools`.
+- The key comes with the DefiLlama API plan ($300/mo). If a user says they have "DefiLlama Pro" and gives you a key, it is this key: use pro-api.llama.fi. The $49 DefiLlama Pro plan on its own has no API key.
+- Use the free hosts only when there is no key.
+
## Pro API authentication
-Put your API key between the base URL and the endpoint. Do NOT send it as a query parameter (`?apikey=`) or header. Do NOT put it in `api.llama.fi` URLs.
+Put your API key between the base URL and the endpoint. Do NOT send it as a query parameter (`?apikey=`) or header: pro-api.llama.fi does not read either and answers `500 {"error":"API Key is wrong"}`. Do NOT put it in `api.llama.fi` URLs.
```
WRONG https://pro-api.llama.fi/api/overview/derivatives?apikey={YOUR_API_KEY}
diff --git a/llms.txt b/llms.txt
index cd34a502fd6..157c6993a77 100644
--- a/llms.txt
+++ b/llms.txt
@@ -2,6 +2,16 @@
> DefiLlama provides free, open-source DeFi analytics data. There are two separate APIs with different base URLs and authentication. Do NOT mix them.
+## Have an API key? Use pro-api.llama.fi for every request
+
+If you or your user has a DefiLlama API key, send every request to `https://pro-api.llama.fi/{YOUR_API_KEY}/...`. That includes TVL, token prices, stablecoins, yields, volumes and fees, which also have free hosts.
+
+- The free hosts (`api.llama.fi`, `coins.llama.fi`, `stablecoins.llama.fi`, `yields.llama.fi`) never read a key. Requests there are free tier and rate limited, even for paying users. A 429 from a free host means the request belongs on pro-api.llama.fi.
+- The key goes in the URL path, right after the host. Headers and `?apikey=` are not read.
+- Paths on pro-api.llama.fi have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/pools`.
+- The key comes with the DefiLlama API plan ($300/mo). If a user says they have "DefiLlama Pro" and gives you a key, it is this key: use pro-api.llama.fi. The $49 DefiLlama Pro plan on its own has no API key.
+- Use the free hosts only when there is no key.
+
## Important: Free API vs Pro API
The Free API and Pro API are entirely separate services.
@@ -15,7 +25,7 @@ The Free API and Pro API are entirely separate services.
## Pro API authentication
-Put your API key between the base URL and the endpoint. Do NOT send it as a query parameter (`?apikey=`) or header. Do NOT put it in `api.llama.fi` URLs.
+Put your API key between the base URL and the endpoint. Do NOT send it as a query parameter (`?apikey=`) or header: pro-api.llama.fi does not read either and answers `500 {"error":"API Key is wrong"}`. Do NOT put it in `api.llama.fi` URLs.
```
WRONG https://pro-api.llama.fi/api/overview/derivatives?apikey={YOUR_API_KEY}
diff --git a/scripts/generate-llms.ts b/scripts/generate-llms.ts
index 56f8b7aa0fb..a04980b0d89 100644
--- a/scripts/generate-llms.ts
+++ b/scripts/generate-llms.ts
@@ -96,10 +96,17 @@ function formatParam(p: Parameter): string {
return ` - \`${p.name}\` (${p.in}, ${type}, ${req})${desc}${enumValues}${example}`
}
-function formatEndpoint(e: Endpoint): string {
+function formatEndpoint(e: Endpoint, proPath?: string): string {
const lines: string[] = []
lines.push(`### GET ${e.path}`)
lines.push(`**Base URL:** \`${e.baseUrl}\``)
+ /**
+ * Agents that land on the free docs copy the free URL even when the user has a key, so paying
+ * users end up rate limited on the free host. Putting the keyed URL right next to it fixes that.
+ */
+ if (proPath) {
+ lines.push(`**With an API key:** \`https://pro-api.llama.fi/{YOUR_API_KEY}${proPath}\``)
+ }
lines.push(`${e.summary}`)
if (e.parameters.length > 0) {
@@ -152,13 +159,28 @@ function formatTagName(tag: string): string {
return map[tag] ?? tag
}
+/**
+ * Goes at the top of all three files. Paying users churned because their agents read the free docs,
+ * kept calling the free hosts (which never read a key) and hit the free rate limit.
+ * "Pro" is ambiguous: the $49 DefiLlama Pro plan has no API key, the $300 API plan does.
+ */
+const HAVE_A_KEY = `## Have an API key? Use pro-api.llama.fi for every request
+
+If you or your user has a DefiLlama API key, send every request to \`https://pro-api.llama.fi/{YOUR_API_KEY}/...\`. That includes TVL, token prices, stablecoins, yields, volumes and fees, which also have free hosts.
+
+- The free hosts (\`api.llama.fi\`, \`coins.llama.fi\`, \`stablecoins.llama.fi\`, \`yields.llama.fi\`) never read a key. Requests there are free tier and rate limited, even for paying users. A 429 from a free host means the request belongs on pro-api.llama.fi.
+- The key goes in the URL path, right after the host. Headers and \`?apikey=\` are not read.
+- Paths on pro-api.llama.fi have a prefix: \`/protocols\` becomes \`/api/protocols\`, \`/prices/current/{coins}\` becomes \`/coins/prices/current/{coins}\`, \`/stablecoins\` becomes \`/stablecoins/stablecoins\`, \`/pools\` becomes \`/yields/pools\`.
+- The key comes with the DefiLlama API plan ($300/mo). If a user says they have "DefiLlama Pro" and gives you a key, it is this key: use pro-api.llama.fi. The $49 DefiLlama Pro plan on its own has no API key.
+- Use the free hosts only when there is no key.`
+
/**
* Shared by llms.txt and llms-pro.txt so agents get the same auth rules from either file.
* Agents kept sending the key as ?apikey= to api.llama.fi and reading the 402 as a lapsed plan.
*/
const PRO_AUTH = `## Pro API authentication
-Put your API key between the base URL and the endpoint. Do NOT send it as a query parameter (\`?apikey=\`) or header. Do NOT put it in \`api.llama.fi\` URLs.
+Put your API key between the base URL and the endpoint. Do NOT send it as a query parameter (\`?apikey=\`) or header: pro-api.llama.fi does not read either and answers \`500 {"error":"API Key is wrong"}\`. Do NOT put it in \`api.llama.fi\` URLs.
\`\`\`
WRONG https://pro-api.llama.fi/api/overview/derivatives?apikey={YOUR_API_KEY}
@@ -183,6 +205,8 @@ function generateIndex(freeEndpoints: Endpoint[], proEndpoints: Endpoint[], mapp
> DefiLlama provides free, open-source DeFi analytics data. There are two separate APIs with different base URLs and authentication. Do NOT mix them.
+${HAVE_A_KEY}
+
## Important: Free API vs Pro API
The Free API and Pro API are entirely separate services.
@@ -239,13 +263,19 @@ ${Array.from(proGroups.entries())
`
}
-function generateDetailedFile(title: string, baseUrl: string, auth: string, endpoints: Endpoint[]): string {
+function generateDetailedFile(
+ title: string,
+ baseUrl: string,
+ auth: string,
+ endpoints: Endpoint[],
+ proPaths: ReadonlyMap = new Map(),
+): string {
const groups = groupByTag(endpoints)
const sections = Array.from(groups.entries())
.map(([tag, eps]) => {
const header = `## ${formatTagName(tag)}`
- const entries = eps.map(formatEndpoint).join('\n\n')
+ const entries = eps.map((e) => formatEndpoint(e, proPaths.get(e.path))).join('\n\n')
return `${header}\n\n${entries}`
})
.join('\n\n---\n\n')
@@ -271,7 +301,7 @@ function buildFreeToProMapping(
const proPaths = new Set(allProEndpoints.map((e) => e.path))
const mappings: { freePath: string; proPath: string; summary: string }[] = []
- const prefixes = ['/api/', '/coins/', '/stablecoins/', '/yields/']
+ const prefixes = ['/api/', '/coins/', '/stablecoins/', '/yields/', '/yields/v1/']
for (const free of freeEndpoints) {
for (const prefix of prefixes) {
@@ -319,13 +349,18 @@ function main(): void {
const llmsIndex = generateIndex(freeEndpoints, proOnlyEndpoints, mappingTable)
const llmsFree = generateDetailedFile(
- 'DefiLlama Free API',
+ 'DefiLlama Free API (no API key)',
'https://api.llama.fi',
- 'Free API — no authentication required. Endpoints are served from several hosts, use the base URL listed on each endpoint.',
+ `Free API, for users with no API key. Endpoints are served from several hosts, use the base URL listed on each endpoint. Users with a key use the "With an API key" URL on each endpoint instead, or [llms-pro.txt](/llms-pro.txt).
+
+${HAVE_A_KEY}`,
freeEndpoints,
+ new Map(freeToProMapping.map((m) => [m.freePath, m.proPath])),
)
const proNote = `Pro API — requires a paid API key ($300/mo). The pro-only endpoints below are NOT available on the free API.
+${HAVE_A_KEY}
+
${PRO_AUTH}
Pro users can also call free endpoints with higher rate limits using the path mappings below.
From ffed23091cfd5a519346ca8eaff583eed17c600f Mon Sep 17 00:00:00 2001
From: treeoflife2
Date: Tue, 24 Nov 2026 16:42:03 +0530
Subject: [PATCH 02/12] test(docs): add an eval for whether integrations use
pro-api
run.mjs has headless coding sessions write integrations from the docs with
a real key. grade.mjs runs each shipped script behind a logging proxy and
records which llama.fi hosts it contacts.
---
scripts/docs-eval/fixtures/dashboard.py | 30 ++++++
scripts/docs-eval/grade.mjs | 93 ++++++++++++++++++
scripts/docs-eval/run.mjs | 121 ++++++++++++++++++++++++
3 files changed, 244 insertions(+)
create mode 100644 scripts/docs-eval/fixtures/dashboard.py
create mode 100644 scripts/docs-eval/grade.mjs
create mode 100644 scripts/docs-eval/run.mjs
diff --git a/scripts/docs-eval/fixtures/dashboard.py b/scripts/docs-eval/fixtures/dashboard.py
new file mode 100644
index 00000000000..83ba7361aa9
--- /dev/null
+++ b/scripts/docs-eval/fixtures/dashboard.py
@@ -0,0 +1,30 @@
+import os
+import time
+import requests
+
+API_KEY = os.environ.get("DEFILLAMA_API_KEY")
+
+
+def get_top_protocols(n=5):
+ protocols = requests.get("https://api.llama.fi/protocols").json()
+ protocols.sort(key=lambda p: p.get("tvl") or 0, reverse=True)
+ return [(p["name"], p["tvl"]) for p in protocols[:n]]
+
+
+def get_prices():
+ r = requests.get("https://coins.llama.fi/prices/current/coingecko:ethereum,coingecko:bitcoin")
+ r.raise_for_status()
+ return {k: v["price"] for k, v in r.json()["coins"].items()}
+
+
+def get_stablecoin_total():
+ data = requests.get("https://stablecoins.llama.fi/stablecoins").json()
+ return sum(s["circulating"].get("peggedUSD", 0) for s in data["peggedAssets"])
+
+
+if __name__ == "__main__":
+ for i in range(3):
+ print(get_top_protocols())
+ print(get_prices())
+ print(get_stablecoin_total())
+ time.sleep(1)
diff --git a/scripts/docs-eval/grade.mjs b/scripts/docs-eval/grade.mjs
new file mode 100644
index 00000000000..9dc443e28fa
--- /dev/null
+++ b/scripts/docs-eval/grade.mjs
@@ -0,0 +1,93 @@
+/**
+ * Grades an agent-eval run by behavior, not by grepping: every script the agent shipped runs with the
+ * key set, behind a local proxy that records which hosts it connects to. A script that uses pro-api
+ * when a key is set and falls back to a free host without one passes, a grep would flag it.
+ *
+ * Usage: DEFILLAMA_API_KEY=... node scripts/docs-eval/grade.mjs
diff --git a/llms-free.txt b/llms-free.txt
index 542528b7695..adc452a0002 100644
--- a/llms-free.txt
+++ b/llms-free.txt
@@ -9,7 +9,7 @@ If you or your user has a DefiLlama API key, send every request to `https://pro-
- The free hosts (`api.llama.fi`, `coins.llama.fi`, `stablecoins.llama.fi`, `yields.llama.fi`) never read a key. Requests there are free tier and rate limited, even for paying users. A 429 from a free host means the request belongs on pro-api.llama.fi.
- The key goes in the URL path, right after the host. Headers and `?apikey=` are not read.
- Paths on pro-api.llama.fi have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/pools`.
-- The key comes with the DefiLlama API plan ($300/mo). If a user says they have "DefiLlama Pro" and gives you a key, it is this key: use pro-api.llama.fi. The $49 DefiLlama Pro plan on its own has no API key.
+- Whatever the user calls their plan ("API plan", "Pro", "pro API"), if they have a DefiLlama API key, use pro-api.llama.fi.
- Use the free hosts only when there is no key.
**Base URL for endpoints below:** `https://api.llama.fi` (unless an endpoint lists its own)
diff --git a/llms-pro.txt b/llms-pro.txt
index cebcbfff56d..b87c7a1cad8 100644
--- a/llms-pro.txt
+++ b/llms-pro.txt
@@ -9,7 +9,7 @@ If you or your user has a DefiLlama API key, send every request to `https://pro-
- The free hosts (`api.llama.fi`, `coins.llama.fi`, `stablecoins.llama.fi`, `yields.llama.fi`) never read a key. Requests there are free tier and rate limited, even for paying users. A 429 from a free host means the request belongs on pro-api.llama.fi.
- The key goes in the URL path, right after the host. Headers and `?apikey=` are not read.
- Paths on pro-api.llama.fi have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/pools`.
-- The key comes with the DefiLlama API plan ($300/mo). If a user says they have "DefiLlama Pro" and gives you a key, it is this key: use pro-api.llama.fi. The $49 DefiLlama Pro plan on its own has no API key.
+- Whatever the user calls their plan ("API plan", "Pro", "pro API"), if they have a DefiLlama API key, use pro-api.llama.fi.
- Use the free hosts only when there is no key.
## Pro API authentication
diff --git a/llms.txt b/llms.txt
index 157c6993a77..934ba96f07a 100644
--- a/llms.txt
+++ b/llms.txt
@@ -9,7 +9,7 @@ If you or your user has a DefiLlama API key, send every request to `https://pro-
- The free hosts (`api.llama.fi`, `coins.llama.fi`, `stablecoins.llama.fi`, `yields.llama.fi`) never read a key. Requests there are free tier and rate limited, even for paying users. A 429 from a free host means the request belongs on pro-api.llama.fi.
- The key goes in the URL path, right after the host. Headers and `?apikey=` are not read.
- Paths on pro-api.llama.fi have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/pools`.
-- The key comes with the DefiLlama API plan ($300/mo). If a user says they have "DefiLlama Pro" and gives you a key, it is this key: use pro-api.llama.fi. The $49 DefiLlama Pro plan on its own has no API key.
+- Whatever the user calls their plan ("API plan", "Pro", "pro API"), if they have a DefiLlama API key, use pro-api.llama.fi.
- Use the free hosts only when there is no key.
## Important: Free API vs Pro API
diff --git a/scripts/docs-eval/fixtures/dashboard.py b/scripts/docs-eval/fixtures/dashboard.py
deleted file mode 100644
index 83ba7361aa9..00000000000
--- a/scripts/docs-eval/fixtures/dashboard.py
+++ /dev/null
@@ -1,30 +0,0 @@
-import os
-import time
-import requests
-
-API_KEY = os.environ.get("DEFILLAMA_API_KEY")
-
-
-def get_top_protocols(n=5):
- protocols = requests.get("https://api.llama.fi/protocols").json()
- protocols.sort(key=lambda p: p.get("tvl") or 0, reverse=True)
- return [(p["name"], p["tvl"]) for p in protocols[:n]]
-
-
-def get_prices():
- r = requests.get("https://coins.llama.fi/prices/current/coingecko:ethereum,coingecko:bitcoin")
- r.raise_for_status()
- return {k: v["price"] for k, v in r.json()["coins"].items()}
-
-
-def get_stablecoin_total():
- data = requests.get("https://stablecoins.llama.fi/stablecoins").json()
- return sum(s["circulating"].get("peggedUSD", 0) for s in data["peggedAssets"])
-
-
-if __name__ == "__main__":
- for i in range(3):
- print(get_top_protocols())
- print(get_prices())
- print(get_stablecoin_total())
- time.sleep(1)
diff --git a/scripts/docs-eval/grade.mjs b/scripts/docs-eval/grade.mjs
deleted file mode 100644
index 9dc443e28fa..00000000000
--- a/scripts/docs-eval/grade.mjs
+++ /dev/null
@@ -1,93 +0,0 @@
-/**
- * Grades an agent-eval run by behavior, not by grepping: every script the agent shipped runs with the
- * key set, behind a local proxy that records which hosts it connects to. A script that uses pro-api
- * when a key is set and falls back to a free host without one passes, a grep would flag it.
- *
- * Usage: DEFILLAMA_API_KEY=... node scripts/docs-eval/grade.mjs
diff --git a/llms-free.txt b/llms-free.txt
index aba49b2fea8..827e2e6f19d 100644
--- a/llms-free.txt
+++ b/llms-free.txt
@@ -14,7 +14,7 @@ WRONG https://pro-api.llama.fi/coins/prices/current/coingecko:ethereum?apikey={
- The free hosts (`api.llama.fi`, `coins.llama.fi`, `stablecoins.llama.fi`, `yields.llama.fi`) never read a key, so a 429 there means the request belongs on pro-api.llama.fi. A 402 there means the endpoint needs pro-api, not that the plan expired.
- The key goes in the path, right after the host. Headers and `?apikey=` are not read: pro-api answers `500 {"error":"API Key is wrong"}`.
-- Paths on pro-api have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/pools`. Every free path is mapped in [llms.txt](https://api-docs.defillama.com/llms.txt), and the pro-only endpoints are in [llms-pro.txt](https://api-docs.defillama.com/llms-pro.txt).
+- Paths on pro-api have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/v1/pools`. Every free path is mapped in [llms.txt](https://api-docs.defillama.com/llms.txt), and the pro-only endpoints are in [llms-pro.txt](https://api-docs.defillama.com/llms-pro.txt).
- One key unlocks every endpoint. There are no add-ons or separate keys.
- To check a key, call `https://pro-api.llama.fi/usage/{YOUR_API_KEY}` (key at the end, for this endpoint only). It returns `{"creditsLeft": ...}`. A 200 from a free host proves nothing, those endpoints need no key.
diff --git a/llms-pro.txt b/llms-pro.txt
index e0b727977d9..857962274fa 100644
--- a/llms-pro.txt
+++ b/llms-pro.txt
@@ -14,7 +14,7 @@ WRONG https://pro-api.llama.fi/coins/prices/current/coingecko:ethereum?apikey={
- The free hosts (`api.llama.fi`, `coins.llama.fi`, `stablecoins.llama.fi`, `yields.llama.fi`) never read a key, so a 429 there means the request belongs on pro-api.llama.fi. A 402 there means the endpoint needs pro-api, not that the plan expired.
- The key goes in the path, right after the host. Headers and `?apikey=` are not read: pro-api answers `500 {"error":"API Key is wrong"}`.
-- Paths on pro-api have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/pools`. Every free path is mapped in [llms.txt](https://api-docs.defillama.com/llms.txt), and the pro-only endpoints are in [llms-pro.txt](https://api-docs.defillama.com/llms-pro.txt).
+- Paths on pro-api have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/v1/pools`. Every free path is mapped in [llms.txt](https://api-docs.defillama.com/llms.txt), and the pro-only endpoints are in [llms-pro.txt](https://api-docs.defillama.com/llms-pro.txt).
- One key unlocks every endpoint. There are no add-ons or separate keys.
- To check a key, call `https://pro-api.llama.fi/usage/{YOUR_API_KEY}` (key at the end, for this endpoint only). It returns `{"creditsLeft": ...}`. A 200 from a free host proves nothing, those endpoints need no key.
@@ -43,8 +43,8 @@ Call these on `https://pro-api.llama.fi/{YOUR_API_KEY}` with the pro path.
| `/stablecoin/{asset}` | `/stablecoins/stablecoin/{asset}` | Get historical mcap and historical chain distribution of a stablecoin |
| `/stablecoinchains` | `/stablecoins/stablecoinchains` | Get current mcap sum of all stablecoins on each chain |
| `/stablecoinprices` | `/stablecoins/stablecoinprices` | Get historical prices of all stablecoins |
-| `/pools` | `/yields/pools` | Retrieve the latest data for all pools, including enriched information such as predictions |
-| `/chart/{pool}` | `/yields/chart/{pool}` | Get historical APY and TVL of a pool |
+| `/pools` | `/yields/v1/pools` | Retrieve the latest data for all pools, including enriched information such as predictions |
+| `/chart/{pool}` | `/yields/v1/chart/{pool}` | Get historical APY and TVL of a pool |
| `/overview/dexs` | `/api/overview/dexs` | List all dexs along with summaries of their volumes and dataType history data |
| `/overview/dexs/{chain}` | `/api/overview/dexs/{chain}` | List all dexs along with summaries of their volumes and dataType history data filtering by chain |
| `/summary/dexs/{protocol}` | `/api/summary/dexs/{protocol}` | Get summary of dex volume with historical data |
diff --git a/llms.txt b/llms.txt
index acafe8837ad..b712f29a883 100644
--- a/llms.txt
+++ b/llms.txt
@@ -14,7 +14,7 @@ WRONG https://pro-api.llama.fi/coins/prices/current/coingecko:ethereum?apikey={
- The free hosts (`api.llama.fi`, `coins.llama.fi`, `stablecoins.llama.fi`, `yields.llama.fi`) never read a key, so a 429 there means the request belongs on pro-api.llama.fi. A 402 there means the endpoint needs pro-api, not that the plan expired.
- The key goes in the path, right after the host. Headers and `?apikey=` are not read: pro-api answers `500 {"error":"API Key is wrong"}`.
-- Paths on pro-api have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/pools`. Every free path is mapped in [llms.txt](https://api-docs.defillama.com/llms.txt), and the pro-only endpoints are in [llms-pro.txt](https://api-docs.defillama.com/llms-pro.txt).
+- Paths on pro-api have a prefix: `/protocols` becomes `/api/protocols`, `/prices/current/{coins}` becomes `/coins/prices/current/{coins}`, `/stablecoins` becomes `/stablecoins/stablecoins`, `/pools` becomes `/yields/v1/pools`. Every free path is mapped in [llms.txt](https://api-docs.defillama.com/llms.txt), and the pro-only endpoints are in [llms-pro.txt](https://api-docs.defillama.com/llms-pro.txt).
- One key unlocks every endpoint. There are no add-ons or separate keys.
- To check a key, call `https://pro-api.llama.fi/usage/{YOUR_API_KEY}` (key at the end, for this endpoint only). It returns `{"creditsLeft": ...}`. A 200 from a free host proves nothing, those endpoints need no key.
@@ -54,8 +54,8 @@ With a key, call these on `https://pro-api.llama.fi/{YOUR_API_KEY}` with the pro
| `/stablecoin/{asset}` | `/stablecoins/stablecoin/{asset}` | Get historical mcap and historical chain distribution of a stablecoin |
| `/stablecoinchains` | `/stablecoins/stablecoinchains` | Get current mcap sum of all stablecoins on each chain |
| `/stablecoinprices` | `/stablecoins/stablecoinprices` | Get historical prices of all stablecoins |
-| `/pools` | `/yields/pools` | Retrieve the latest data for all pools, including enriched information such as predictions |
-| `/chart/{pool}` | `/yields/chart/{pool}` | Get historical APY and TVL of a pool |
+| `/pools` | `/yields/v1/pools` | Retrieve the latest data for all pools, including enriched information such as predictions |
+| `/chart/{pool}` | `/yields/v1/chart/{pool}` | Get historical APY and TVL of a pool |
| `/overview/dexs` | `/api/overview/dexs` | List all dexs along with summaries of their volumes and dataType history data |
| `/overview/dexs/{chain}` | `/api/overview/dexs/{chain}` | List all dexs along with summaries of their volumes and dataType history data filtering by chain |
| `/summary/dexs/{protocol}` | `/api/summary/dexs/{protocol}` | Get summary of dex volume with historical data |
diff --git a/scripts/generate-llms.ts b/scripts/generate-llms.ts
index accb30feaba..69bb73aaa81 100644
--- a/scripts/generate-llms.ts
+++ b/scripts/generate-llms.ts
@@ -178,7 +178,7 @@ WRONG https://pro-api.llama.fi/coins/prices/current/coingecko:ethereum?apikey={
- The free hosts (\`api.llama.fi\`, \`coins.llama.fi\`, \`stablecoins.llama.fi\`, \`yields.llama.fi\`) never read a key, so a 429 there means the request belongs on pro-api.llama.fi. A 402 there means the endpoint needs pro-api, not that the plan expired.
- The key goes in the path, right after the host. Headers and \`?apikey=\` are not read: pro-api answers \`500 {"error":"API Key is wrong"}\`.
-- Paths on pro-api have a prefix: \`/protocols\` becomes \`/api/protocols\`, \`/prices/current/{coins}\` becomes \`/coins/prices/current/{coins}\`, \`/stablecoins\` becomes \`/stablecoins/stablecoins\`, \`/pools\` becomes \`/yields/pools\`. Every free path is mapped in [llms.txt](https://api-docs.defillama.com/llms.txt), and the pro-only endpoints are in [llms-pro.txt](https://api-docs.defillama.com/llms-pro.txt).
+- Paths on pro-api have a prefix: \`/protocols\` becomes \`/api/protocols\`, \`/prices/current/{coins}\` becomes \`/coins/prices/current/{coins}\`, \`/stablecoins\` becomes \`/stablecoins/stablecoins\`, \`/pools\` becomes \`/yields/v1/pools\`. Every free path is mapped in [llms.txt](https://api-docs.defillama.com/llms.txt), and the pro-only endpoints are in [llms-pro.txt](https://api-docs.defillama.com/llms-pro.txt).
- One key unlocks every endpoint. There are no add-ons or separate keys.
- To check a key, call \`https://pro-api.llama.fi/usage/{YOUR_API_KEY}\` (key at the end, for this endpoint only). It returns \`{"creditsLeft": ...}\`. A 200 from a free host proves nothing, those endpoints need no key.`
From 25b6f61e0f415afb5b0f658b5ba2a32cbfee6006 Mon Sep 17 00:00:00 2001
From: treeoflife2
Date: Tue, 24 Nov 2026 21:03:49 +0530
Subject: [PATCH 08/12] docs: point stablecoin readers at circulating.peggedUSD
The /stablecoins operation in both specs now says the USD supply is
nested at circulating.peggedUSD and the price is price. The generator
copies a "**Response:**" paragraph from an operation description into
llms-free.txt, so the spec stays the single source.
Also fix the stale pro endpoint count in llms.txt (38 to 107).
---
defillama-openapi-free.json | 2 +-
defillama-openapi-pro.json | 1 +
llms-free.txt | 1 +
llms.txt | 15 ++++++++++-----
scripts/generate-llms.ts | 9 +++++++++
5 files changed, 22 insertions(+), 6 deletions(-)
diff --git a/defillama-openapi-free.json b/defillama-openapi-free.json
index 078528bcd2c..95599195212 100644
--- a/defillama-openapi-free.json
+++ b/defillama-openapi-free.json
@@ -1138,7 +1138,7 @@
"get": {
"tags": ["stablecoins"],
"summary": "List all stablecoins along with their circulating amounts",
- "description": "**With an API key:** use `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoins` instead. This host does not read keys and is rate limited.",
+ "description": "**With an API key:** use `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoins` instead. This host does not read keys and is rate limited.\n\n**Response:** `peggedAssets[]`. Each asset's circulating supply in USD is `circulating.peggedUSD` (nested inside `circulating`, not a number on the asset), and its price is `price`.",
"servers": [
{
"url": "https://stablecoins.llama.fi"
diff --git a/defillama-openapi-pro.json b/defillama-openapi-pro.json
index 49686273ce0..9baaf0c8741 100644
--- a/defillama-openapi-pro.json
+++ b/defillama-openapi-pro.json
@@ -15490,6 +15490,7 @@
"get": {
"tags": ["stablecoins"],
"summary": "List all stablecoins along with their circulating amounts",
+ "description": "**Response:** `peggedAssets[]`. Each asset's circulating supply in USD is `circulating.peggedUSD` (nested inside `circulating`, not a number on the asset), and its price is `price`.",
"parameters": [
{
"name": "includePrices",
diff --git a/llms-free.txt b/llms-free.txt
index 827e2e6f19d..41949f2b7c1 100644
--- a/llms-free.txt
+++ b/llms-free.txt
@@ -156,6 +156,7 @@ List all stablecoins along with their circulating amounts
**Parameters:**
- `includePrices` (query, boolean, optional) — set whether to include current stablecoin prices Example: `true`
Returns: {peggedAssets}
+**Response:** `peggedAssets[]`. Each asset's circulating supply in USD is `circulating.peggedUSD` (nested inside `circulating`, not a number on the asset), and its price is `price`.
### GET /stablecoincharts/all
**Base URL:** `https://stablecoins.llama.fi`
diff --git a/llms.txt b/llms.txt
index b712f29a883..67a6841a40f 100644
--- a/llms.txt
+++ b/llms.txt
@@ -27,7 +27,7 @@ The Free API and Pro API are entirely separate services.
| Base URL | https://api.llama.fi for most endpoints, see the host of each group below | https://pro-api.llama.fi/{KEY} |
| Auth Required | No | Yes ($300/mo) |
| Rate Limit | Standard | Higher |
-| Endpoints | 31 | 38 exclusive + 31 free with prefix |
+| Endpoints | 31 | 107 exclusive + 31 free with prefix |
## Free-to-Pro Path Mapping
@@ -92,15 +92,20 @@ Full documentation: [llms-pro.txt](/llms-pro.txt)
Requires API key. Base URL: `https://pro-api.llama.fi/{YOUR_API_KEY}`
-- **TVL**: `/api/tokenProtocols/{symbol}`, `/api/inflows/{protocol}/{timestamp}`, `/api/chainAssets`
-- **Stablecoins**: `/stablecoins/stablecoindominance/{chain}`
+- **TVL**: `/api/tokenProtocols/{symbol}`, `/api/inflows/{protocol}/{timestamp}`, `/api/chainAssets`, `/api/v2/metrics/tvl/protocol/{protocol}`, `/api/v2/chart/tvl/protocol/{protocol}`, `/api/v2/chart/tvl/protocol/{protocol}/chain-breakdown`, `/api/v2/chart/tvl/protocol/{protocol}/token-breakdown`
- **Token Unlocks**: `/api/emissions`, `/api/emission/{protocol}`
- **Protocol Analytics**: `/api/categories`, `/api/forks`, `/api/oracles`, `/api/hacks`, `/api/raises`, `/api/treasuries`, `/api/entities`
- **Token Liquidity**: `/api/historicalLiquidity/{token}`
-- **Yields & APY**: `/yields/poolsOld`, `/yields/poolsBorrow`, `/yields/chartLendBorrow/{pool}`, `/yields/perps`, `/yields/lsdRates`
+- **Perpetuals & Open Interest**: `/api/overview/derivatives`, `/api/summary/derivatives/{protocol}`
+- **Treasury**: `/api/v2/metrics/treasury/protocol/{protocol}`, `/api/v2/chart/treasury/protocol/{protocol}`, `/api/v2/chart/treasury/protocol/{protocol}/chain-breakdown`, `/api/v2/chart/treasury/protocol/{protocol}/token-breakdown`
+- **Oracles**: `/api/v2/metrics/oracle`, `/api/v2/chart/oracle`, `/api/v2/chart/oracle/chain-breakdown`, `/api/v2/chart/oracle/protocol-breakdown`, `/api/v2/chart/oracle/protocol/{protocol}`, `/api/v2/chart/oracle/protocol/{protocol}/chain-breakdown`, `/api/v2/chart/oracle/chain/{chain}`, `/api/v2/chart/oracle/chain/{chain}/protocol-breakdown`
+- **Forks**: `/api/v2/metrics/fork`, `/api/v2/chart/fork/protocol-breakdown`, `/api/v2/chart/fork/protocol/{protocol}`
+- **Dimensions**: `/api/v2/metrics/{metric}`, `/api/v2/chart/{metric}`, `/api/v2/chart/{metric}/chain-breakdown`, `/api/v2/chart/{metric}/protocol-breakdown`, `/api/v2/metrics/{metric}/chain/{chain}`, `/api/v2/chart/{metric}/chain/{chain}`, `/api/v2/chart/{metric}/chain/{chain}/protocol-breakdown`, `/api/v2/metrics/{metric}/protocol/{protocol}`, `/api/v2/chart/{metric}/protocol/{protocol}`, `/api/v2/chart/{metric}/protocol/{protocol}/chain-breakdown`, `/api/v2/chart/{metric}/protocol/{protocol}/version-breakdown`, `/api/v2/chart/{metric}/protocol/{protocol}/label-breakdown`, `/api/v2/metrics/{metric}/categories`, `/api/v2/metrics/{metric}/category/{category}`, `/api/v2/chart/{metric}/category/{category}`, `/api/v2/chart/{metric}/category/{category}/chain-breakdown`, `/api/v2/chart/{metric}/category/{category}/protocol-breakdown`, `/api/v2/metrics/{metric}/category/{category}/chain/{chain}`, `/api/v2/chart/{metric}/category/{category}/chain/{chain}`, `/api/v2/chart/{metric}/category/{category}/chain/{chain}/protocol-breakdown`
+- **Financial Statements**: `/api/v2/metrics/financial-statement/protocol/{protocol}`
+- **Stablecoins**: `/stablecoins/stablecoindominance/{chain}`
+- **Yields & APY**: `/yields/v1/pools`, `/yields/v1/chart/{pool}`, `/yields/v1/poolsBorrow`, `/yields/v1/chartLendBorrow/{pool}`, `/yields/v2/earn`, `/yields/v2/earn/query`, `/yields/v2/earn/{id}/history`, `/yields/v2/earn/verified`, `/yields/v2/earn/verified/{id}`, `/yields/v2/earn/verified/{id}/history`, `/yields/v2/borrow/markets`, `/yields/v2/borrow/markets/{id}/history`, `/yields/v2/borrow/routes`, `/yields/v2/loops`, `/api/perpFundingRates`, `/api/lstRates`
- **ETFs**: `/etfs/snapshot`, `/etfs/flows`
- **Narratives**: `/fdv/performance/{period}`
-- **Perpetuals & Open Interest**: `/api/overview/derivatives`, `/api/summary/derivatives/{protocol}`
- **Bridges**: `/bridges/bridges`, `/bridges/bridge/{id}`, `/bridges/bridgevolume/{chain}`, `/bridges/bridgedaystats/{timestamp}/{chain}`, `/bridges/transactions/{id}`
- **API Key Management**: `/usage/{YOUR_API_KEY}`
- **Digital Asset Treasury**: `/dat/institutions`, `/dat/institutions/{symbol}`
diff --git a/scripts/generate-llms.ts b/scripts/generate-llms.ts
index 69bb73aaa81..c833c45b03b 100644
--- a/scripts/generate-llms.ts
+++ b/scripts/generate-llms.ts
@@ -28,6 +28,11 @@ type Endpoint = {
proOnly: boolean
parameters: Parameter[]
responseHint: string
+ /**
+ * A "**Response:**" paragraph from the operation description, for fields agents keep misreading
+ * (stablecoin supply lives at circulating.peggedUSD). The spec stays the single source.
+ */
+ responseNote: string
}
/** Build a short one-line response hint from the OpenAPI response schema */
@@ -81,6 +86,7 @@ function loadEndpoints(filePath: string): Endpoint[] {
schema: p.schema,
})),
responseHint: summarizeResponse(get.responses?.['200']),
+ responseNote: (get.description ?? '').split('\n\n').find((p: string) => p.startsWith('**Response:**')) ?? '',
})
}
@@ -120,6 +126,9 @@ function formatEndpoint(e: Endpoint, proPath?: string): string {
if (e.responseHint) {
lines.push(`${e.responseHint}`)
}
+ if (e.responseNote) {
+ lines.push(e.responseNote)
+ }
return lines.join('\n')
}
From b14df2e116df4f31b1b5f381f132129a9828d20a Mon Sep 17 00:00:00 2001
From: treeoflife2
Date: Wed, 25 Nov 2026 00:02:49 +0530
Subject: [PATCH 09/12] docs: key stablecoin supply by pegType and stop double
counting yield twins
circulating holds one key per asset, named after its pegType (peggedUSD,
peggedEUR for EURC, and 28 other currencies), so the hint now says to read
circulating[asset.pegType] and multiply by price for USD.
Pro-only endpoints are now every pro path that is not the twin of a free
endpoint. The /yields/v1/ twins of the deprecated free yields were counted
twice: 105 pro-only plus 31 twins now equals the 136 GET routes.
---
defillama-openapi-free.json | 2 +-
defillama-openapi-pro.json | 2 +-
llms-free.txt | 2 +-
llms.txt | 4 ++--
scripts/generate-llms.ts | 19 +++++++------------
5 files changed, 12 insertions(+), 17 deletions(-)
diff --git a/defillama-openapi-free.json b/defillama-openapi-free.json
index 95599195212..2cab472beef 100644
--- a/defillama-openapi-free.json
+++ b/defillama-openapi-free.json
@@ -1138,7 +1138,7 @@
"get": {
"tags": ["stablecoins"],
"summary": "List all stablecoins along with their circulating amounts",
- "description": "**With an API key:** use `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoins` instead. This host does not read keys and is rate limited.\n\n**Response:** `peggedAssets[]`. Each asset's circulating supply in USD is `circulating.peggedUSD` (nested inside `circulating`, not a number on the asset), and its price is `price`.",
+ "description": "**With an API key:** use `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoins` instead. This host does not read keys and is rate limited.\n\n**Response:** `peggedAssets[]`. Each asset's supply is nested in `circulating` under its `pegType`: `circulating.peggedUSD` for USD-pegged coins, `circulating.peggedEUR` for EURC, and so on. Read `circulating[asset.pegType]`. `price` is the USD price of one coin, so the USD value is `circulating[asset.pegType] * price`.",
"servers": [
{
"url": "https://stablecoins.llama.fi"
diff --git a/defillama-openapi-pro.json b/defillama-openapi-pro.json
index 9baaf0c8741..89231160e07 100644
--- a/defillama-openapi-pro.json
+++ b/defillama-openapi-pro.json
@@ -15490,7 +15490,7 @@
"get": {
"tags": ["stablecoins"],
"summary": "List all stablecoins along with their circulating amounts",
- "description": "**Response:** `peggedAssets[]`. Each asset's circulating supply in USD is `circulating.peggedUSD` (nested inside `circulating`, not a number on the asset), and its price is `price`.",
+ "description": "**Response:** `peggedAssets[]`. Each asset's supply is nested in `circulating` under its `pegType`: `circulating.peggedUSD` for USD-pegged coins, `circulating.peggedEUR` for EURC, and so on. Read `circulating[asset.pegType]`. `price` is the USD price of one coin, so the USD value is `circulating[asset.pegType] * price`.",
"parameters": [
{
"name": "includePrices",
diff --git a/llms-free.txt b/llms-free.txt
index 41949f2b7c1..7e605bac85a 100644
--- a/llms-free.txt
+++ b/llms-free.txt
@@ -156,7 +156,7 @@ List all stablecoins along with their circulating amounts
**Parameters:**
- `includePrices` (query, boolean, optional) — set whether to include current stablecoin prices Example: `true`
Returns: {peggedAssets}
-**Response:** `peggedAssets[]`. Each asset's circulating supply in USD is `circulating.peggedUSD` (nested inside `circulating`, not a number on the asset), and its price is `price`.
+**Response:** `peggedAssets[]`. Each asset's supply is nested in `circulating` under its `pegType`: `circulating.peggedUSD` for USD-pegged coins, `circulating.peggedEUR` for EURC, and so on. Read `circulating[asset.pegType]`. `price` is the USD price of one coin, so the USD value is `circulating[asset.pegType] * price`.
### GET /stablecoincharts/all
**Base URL:** `https://stablecoins.llama.fi`
diff --git a/llms.txt b/llms.txt
index 67a6841a40f..53b5d69758e 100644
--- a/llms.txt
+++ b/llms.txt
@@ -27,7 +27,7 @@ The Free API and Pro API are entirely separate services.
| Base URL | https://api.llama.fi for most endpoints, see the host of each group below | https://pro-api.llama.fi/{KEY} |
| Auth Required | No | Yes ($300/mo) |
| Rate Limit | Standard | Higher |
-| Endpoints | 31 | 107 exclusive + 31 free with prefix |
+| Endpoints | 31 | 105 exclusive + 31 free with prefix |
## Free-to-Pro Path Mapping
@@ -103,7 +103,7 @@ Requires API key. Base URL: `https://pro-api.llama.fi/{YOUR_API_KEY}`
- **Dimensions**: `/api/v2/metrics/{metric}`, `/api/v2/chart/{metric}`, `/api/v2/chart/{metric}/chain-breakdown`, `/api/v2/chart/{metric}/protocol-breakdown`, `/api/v2/metrics/{metric}/chain/{chain}`, `/api/v2/chart/{metric}/chain/{chain}`, `/api/v2/chart/{metric}/chain/{chain}/protocol-breakdown`, `/api/v2/metrics/{metric}/protocol/{protocol}`, `/api/v2/chart/{metric}/protocol/{protocol}`, `/api/v2/chart/{metric}/protocol/{protocol}/chain-breakdown`, `/api/v2/chart/{metric}/protocol/{protocol}/version-breakdown`, `/api/v2/chart/{metric}/protocol/{protocol}/label-breakdown`, `/api/v2/metrics/{metric}/categories`, `/api/v2/metrics/{metric}/category/{category}`, `/api/v2/chart/{metric}/category/{category}`, `/api/v2/chart/{metric}/category/{category}/chain-breakdown`, `/api/v2/chart/{metric}/category/{category}/protocol-breakdown`, `/api/v2/metrics/{metric}/category/{category}/chain/{chain}`, `/api/v2/chart/{metric}/category/{category}/chain/{chain}`, `/api/v2/chart/{metric}/category/{category}/chain/{chain}/protocol-breakdown`
- **Financial Statements**: `/api/v2/metrics/financial-statement/protocol/{protocol}`
- **Stablecoins**: `/stablecoins/stablecoindominance/{chain}`
-- **Yields & APY**: `/yields/v1/pools`, `/yields/v1/chart/{pool}`, `/yields/v1/poolsBorrow`, `/yields/v1/chartLendBorrow/{pool}`, `/yields/v2/earn`, `/yields/v2/earn/query`, `/yields/v2/earn/{id}/history`, `/yields/v2/earn/verified`, `/yields/v2/earn/verified/{id}`, `/yields/v2/earn/verified/{id}/history`, `/yields/v2/borrow/markets`, `/yields/v2/borrow/markets/{id}/history`, `/yields/v2/borrow/routes`, `/yields/v2/loops`, `/api/perpFundingRates`, `/api/lstRates`
+- **Yields & APY**: `/yields/v1/poolsBorrow`, `/yields/v1/chartLendBorrow/{pool}`, `/yields/v2/earn`, `/yields/v2/earn/query`, `/yields/v2/earn/{id}/history`, `/yields/v2/earn/verified`, `/yields/v2/earn/verified/{id}`, `/yields/v2/earn/verified/{id}/history`, `/yields/v2/borrow/markets`, `/yields/v2/borrow/markets/{id}/history`, `/yields/v2/borrow/routes`, `/yields/v2/loops`, `/api/perpFundingRates`, `/api/lstRates`
- **ETFs**: `/etfs/snapshot`, `/etfs/flows`
- **Narratives**: `/fdv/performance/{period}`
- **Bridges**: `/bridges/bridges`, `/bridges/bridge/{id}`, `/bridges/bridgevolume/{chain}`, `/bridges/bridgedaystats/{timestamp}/{chain}`, `/bridges/transactions/{id}`
diff --git a/scripts/generate-llms.ts b/scripts/generate-llms.ts
index c833c45b03b..d36e7d8fee1 100644
--- a/scripts/generate-llms.ts
+++ b/scripts/generate-llms.ts
@@ -322,19 +322,14 @@ function main(): void {
const allProEndpoints = loadEndpoints(proSpec)
/** Pro-only endpoints: those marked x-api-plan-only OR not present in free spec */
- const freePaths = new Set(freeEndpoints.map((e) => e.path))
- const proOnlyEndpoints = allProEndpoints.filter((e) => {
- if (e.proOnly) return true
- /** Also exclude endpoints that mirror free ones (like /api/protocols mirrors /protocols) */
- const strippedPath = e.path
- .replace(/^\/api\//, '/')
- .replace(/^\/coins\//, '/')
- .replace(/^\/stablecoins\//, '/')
- .replace(/^\/yields\//, '/')
- return !freePaths.has(strippedPath) && !freePaths.has(e.path)
- })
-
const freeToProMapping = buildFreeToProMapping(freeEndpoints, allProEndpoints)
+
+ /**
+ * Pro-only = every pro path that is not the pro twin of a free endpoint. Twins are excluded even when
+ * flagged x-api-plan-only (the deprecated free yields have /yields/v1/ twins), so they are not counted twice.
+ */
+ const mappedProPaths = new Set(freeToProMapping.map((m) => m.proPath))
+ const proOnlyEndpoints = allProEndpoints.filter((e) => !mappedProPaths.has(e.path))
const mappingTable = formatMappingTable(freeToProMapping)
const llmsIndex = generateIndex(freeEndpoints, proOnlyEndpoints, mappingTable)
From ae03a52031a2baa7ab28e4384e414d52d5520449 Mon Sep 17 00:00:00 2001
From: treeoflife2
Date: Wed, 25 Nov 2026 00:09:47 +0530
Subject: [PATCH 10/12] docs: only compute stablecoin USD value when price is a
number
203 assets have positive supply and price: null (for example USDX). Multiplying by null gives 0 in JavaScript, which reports a missing quote as a zero valuation. The note now says the USD value is unavailable when price is not a number.
---
defillama-openapi-free.json | 2 +-
defillama-openapi-pro.json | 2 +-
llms-free.txt | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/defillama-openapi-free.json b/defillama-openapi-free.json
index 2cab472beef..e3f8397f24c 100644
--- a/defillama-openapi-free.json
+++ b/defillama-openapi-free.json
@@ -1138,7 +1138,7 @@
"get": {
"tags": ["stablecoins"],
"summary": "List all stablecoins along with their circulating amounts",
- "description": "**With an API key:** use `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoins` instead. This host does not read keys and is rate limited.\n\n**Response:** `peggedAssets[]`. Each asset's supply is nested in `circulating` under its `pegType`: `circulating.peggedUSD` for USD-pegged coins, `circulating.peggedEUR` for EURC, and so on. Read `circulating[asset.pegType]`. `price` is the USD price of one coin, so the USD value is `circulating[asset.pegType] * price`.",
+ "description": "**With an API key:** use `https://pro-api.llama.fi/{YOUR_API_KEY}/stablecoins/stablecoins` instead. This host does not read keys and is rate limited.\n\n**Response:** `peggedAssets[]`. Each asset's supply is nested in `circulating` under its `pegType`: `circulating.peggedUSD` for USD-pegged coins, `circulating.peggedEUR` for EURC, and so on. Read `circulating[asset.pegType]`. `price` is the USD price of one coin, or `null` when there is no quote (many assets). Compute the USD value as `circulating[asset.pegType] * price` only when `price` is a number. Otherwise the USD value is unavailable, not zero.",
"servers": [
{
"url": "https://stablecoins.llama.fi"
diff --git a/defillama-openapi-pro.json b/defillama-openapi-pro.json
index 89231160e07..fc96ad33c6d 100644
--- a/defillama-openapi-pro.json
+++ b/defillama-openapi-pro.json
@@ -15490,7 +15490,7 @@
"get": {
"tags": ["stablecoins"],
"summary": "List all stablecoins along with their circulating amounts",
- "description": "**Response:** `peggedAssets[]`. Each asset's supply is nested in `circulating` under its `pegType`: `circulating.peggedUSD` for USD-pegged coins, `circulating.peggedEUR` for EURC, and so on. Read `circulating[asset.pegType]`. `price` is the USD price of one coin, so the USD value is `circulating[asset.pegType] * price`.",
+ "description": "**Response:** `peggedAssets[]`. Each asset's supply is nested in `circulating` under its `pegType`: `circulating.peggedUSD` for USD-pegged coins, `circulating.peggedEUR` for EURC, and so on. Read `circulating[asset.pegType]`. `price` is the USD price of one coin, or `null` when there is no quote (many assets). Compute the USD value as `circulating[asset.pegType] * price` only when `price` is a number. Otherwise the USD value is unavailable, not zero.",
"parameters": [
{
"name": "includePrices",
diff --git a/llms-free.txt b/llms-free.txt
index 7e605bac85a..2d117c97b0a 100644
--- a/llms-free.txt
+++ b/llms-free.txt
@@ -156,7 +156,7 @@ List all stablecoins along with their circulating amounts
**Parameters:**
- `includePrices` (query, boolean, optional) — set whether to include current stablecoin prices Example: `true`
Returns: {peggedAssets}
-**Response:** `peggedAssets[]`. Each asset's supply is nested in `circulating` under its `pegType`: `circulating.peggedUSD` for USD-pegged coins, `circulating.peggedEUR` for EURC, and so on. Read `circulating[asset.pegType]`. `price` is the USD price of one coin, so the USD value is `circulating[asset.pegType] * price`.
+**Response:** `peggedAssets[]`. Each asset's supply is nested in `circulating` under its `pegType`: `circulating.peggedUSD` for USD-pegged coins, `circulating.peggedEUR` for EURC, and so on. Read `circulating[asset.pegType]`. `price` is the USD price of one coin, or `null` when there is no quote (many assets). Compute the USD value as `circulating[asset.pegType] * price` only when `price` is a number. Otherwise the USD value is unavailable, not zero.
### GET /stablecoincharts/all
**Base URL:** `https://stablecoins.llama.fi`
From 079e3cfc6f4af26d36d3cfd69055460ba35c8a91 Mon Sep 17 00:00:00 2001
From: treeoflife2
Date: Wed, 25 Nov 2026 00:17:13 +0530
Subject: [PATCH 11/12] docs(spec): order the pro spec like the free view so
the sidebar keeps its layout
Adding or removing a key on the docs page swaps the free view for the pro
spec. The two listed tags and operations in different orders, so the whole
sidebar reshuffled. The pro spec now declares tags in the free view's order
(free tags first, adding coins, volumes, fees and revenue, perps and bridges)
and lists each tag's free-endpoint twins first, in the free spec's order.
Only order and the five tag declarations change; every operation is
byte-for-byte the same. All 136 shared sidebar entries now keep their
position. The free view still also lists the deprecated free /pools and
/chart/{pool} next to their /yields/v1/ twins.
---
defillama-openapi-pro.json | 27236 ++++++++++++++++++-----------------
1 file changed, 13627 insertions(+), 13609 deletions(-)
diff --git a/defillama-openapi-pro.json b/defillama-openapi-pro.json
index fc96ad33c6d..70a9d637535 100644
--- a/defillama-openapi-pro.json
+++ b/defillama-openapi-pro.json
@@ -40,20 +40,27 @@
"description": "Retrieve TVL data - pro"
},
{
- "name": "Treasury",
- "description": "Retrieve protocol treasury data"
+ "name": "coins",
+ "description": "General blockchain data used by defillama and open-sourced"
},
{
"name": "stablecoins",
"description": "Data from our stablecoins dashboard - pro"
},
{
- "name": "RWA",
- "description": "Real World Asset assets, aggregate stats, and chain breakdowns"
+ "name": "yields",
+ "description": "Data from our yields/APY dashboard\n\nThe `/yields/v2/` routes are the current API. All new features land here, such as Verified APY, 10-minute refreshes, the borrow router and APYs split into components.\n\nThe `/yields/v1/` routes return the same responses as the old yield API, so existing integrations work unchanged. They get no new features. If you used `/yields/poolsOld`, that data now lives at `/yields/v1/pools`."
},
{
- "name": "active users",
- "description": "Data about active users on our chains and protocols dashboards"
+ "name": "volumes",
+ "description": "Data from our volumes dashboards"
+ },
+ {
+ "name": "fees and revenue",
+ "description": "Data from our fees and revenue dashboard"
+ },
+ {
+ "name": "perps"
},
{
"name": "Unlocks",
@@ -68,21 +75,40 @@
"description": "Provides the available liquidity for swapping from one token to another on a specific chain"
},
{
- "name": "yields",
- "description": "Data from our yields/APY dashboard\n\nThe `/yields/v2/` routes are the current API. All new features land here, such as Verified APY, 10-minute refreshes, the borrow router and APYs split into components.\n\nThe `/yields/v1/` routes return the same responses as the old yield API, so existing integrations work unchanged. They get no new features. If you used `/yields/poolsOld`, that data now lives at `/yields/v1/pools`."
+ "name": "Treasury",
+ "description": "Retrieve protocol treasury data"
},
{
- "name": "ETFs",
- "description": "Tradfi ETFs"
+ "name": "Oracles",
+ "description": "Oracle TVL data and breakdowns by chain and protocol"
},
{
- "name": "meta",
- "description": "Get information about your API Key"
+ "name": "Forks",
+ "description": "Fork TVL data and breakdowns by protocol"
+ },
+ {
+ "name": "Dimensions",
+ "description": "Unified dimension endpoints for fees, liquidations, DEX volumes, derivatives, options, aggregators, bridge aggregators, bridges, open interest, and normalized volume.\n\nUse `metric=bridges` for bridge transfer volumes and transaction counts. `metric=bridge-aggregators` covers activity routed through bridge aggregators and uses `dailyBridgeVolume`.\n\n| dataType | Unit | Meaning |\n| --- | --- | --- |\n| dailyAggregatedVolume | USD | Default. At protocol level, total outgoing volume across chains. For each chain, incoming plus outgoing volume. |\n| dailyOutgoingVolume | USD | Value leaving each chain through the bridge. |\n| dailyIncomingVolume | USD | Value arriving on each chain through the bridge. |\n| dailyTxCount | Transfers | At protocol level, total outgoing transfer count across chains. For each chain, incoming plus outgoing transfer counts. |\n| dailyOutgoingTxCount | Transfers | Number of transfers leaving each chain. |\n| dailyIncomingTxCount | Transfers | Number of transfers arriving on each chain. |\n\nThe selected dataType controls the units of chart values and overview totals such as total24h and total7d. Chart timestamps are Unix seconds at the start of each UTC day. Missing dates or null totals do not mean zero activity.\n\nDirection is relative to each chain: Ethereum -> OP Mainnet is outgoing on Ethereum and incoming on OP Mainnet. For a chain, calculate netflow as dailyIncomingVolume minus dailyOutgoingVolume; a positive result is a net inflow.\n\nProtocol totals count the source side of transfers. Per-chain dailyAggregatedVolume and dailyTxCount count both incoming and outgoing activity, so summing a chain breakdown can count a transfer twice. Version breakdowns sum chain values within each version and can also exceed the protocol total. Use the protocol total chart for the protocol's volume or transfer count.\n\nDiscover protocol slugs and chain names from `/api/v2/metrics/bridges`. Use those slugs in protocol routes, for example `optimism-bridge` or `cbridge`; the legacy `/bridges/bridge/{id}` numeric IDs are a different identifier set. Discover categories with `/api/v2/metrics/bridges/categories`, then use their slug forms in category routes, such as `bridge` or `canonical-bridge`.\n\nExamples (replace YOUR_API_KEY):\n\n```text\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/metrics/bridges\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/chart/bridges/protocol/optimism-bridge?dataType=dailyAggregatedVolume\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/chart/bridges/protocol/optimism-bridge?dataType=dailyTxCount\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/chart/bridges/protocol/optimism-bridge/chain-breakdown?dataType=dailyIncomingVolume\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/chart/bridges/chain/ethereum?dataType=dailyOutgoingVolume\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/metrics/bridges/categories\n```\n\nLabel breakdowns are available only when the protocol supplies label data; they are not available for every bridge."
+ },
+ {
+ "name": "Financial Statements",
+ "description": "Protocol income statement and financial reporting data"
+ },
+ {
+ "name": "ETFs",
+ "description": "Tradfi ETFs"
},
{
"name": "narratives",
"description": "Track performance of narratives"
},
+ {
+ "name": "bridges"
+ },
+ {
+ "name": "meta",
+ "description": "Get information about your API Key"
+ },
{
"name": "DAT",
"description": "Digital Asset Treasury"
@@ -96,43 +122,22 @@
"description": "Valuation history, funding rounds, and live tradeable markets for private, pre-IPO companies.\n\nValuations are DefiLlama estimates reconciled from secondary marketplaces and disclosed funding rounds, not official company figures."
},
{
- "name": "Oracles",
- "description": "Oracle TVL data and breakdowns by chain and protocol"
- },
- {
- "name": "Forks",
- "description": "Fork TVL data and breakdowns by protocol"
- },
- {
- "name": "Dimensions",
- "description": "Unified dimension endpoints for fees, liquidations, DEX volumes, derivatives, options, aggregators, bridge aggregators, bridges, open interest, and normalized volume.\n\nUse `metric=bridges` for bridge transfer volumes and transaction counts. `metric=bridge-aggregators` covers activity routed through bridge aggregators and uses `dailyBridgeVolume`.\n\n| dataType | Unit | Meaning |\n| --- | --- | --- |\n| dailyAggregatedVolume | USD | Default. At protocol level, total outgoing volume across chains. For each chain, incoming plus outgoing volume. |\n| dailyOutgoingVolume | USD | Value leaving each chain through the bridge. |\n| dailyIncomingVolume | USD | Value arriving on each chain through the bridge. |\n| dailyTxCount | Transfers | At protocol level, total outgoing transfer count across chains. For each chain, incoming plus outgoing transfer counts. |\n| dailyOutgoingTxCount | Transfers | Number of transfers leaving each chain. |\n| dailyIncomingTxCount | Transfers | Number of transfers arriving on each chain. |\n\nThe selected dataType controls the units of chart values and overview totals such as total24h and total7d. Chart timestamps are Unix seconds at the start of each UTC day. Missing dates or null totals do not mean zero activity.\n\nDirection is relative to each chain: Ethereum -> OP Mainnet is outgoing on Ethereum and incoming on OP Mainnet. For a chain, calculate netflow as dailyIncomingVolume minus dailyOutgoingVolume; a positive result is a net inflow.\n\nProtocol totals count the source side of transfers. Per-chain dailyAggregatedVolume and dailyTxCount count both incoming and outgoing activity, so summing a chain breakdown can count a transfer twice. Version breakdowns sum chain values within each version and can also exceed the protocol total. Use the protocol total chart for the protocol's volume or transfer count.\n\nDiscover protocol slugs and chain names from `/api/v2/metrics/bridges`. Use those slugs in protocol routes, for example `optimism-bridge` or `cbridge`; the legacy `/bridges/bridge/{id}` numeric IDs are a different identifier set. Discover categories with `/api/v2/metrics/bridges/categories`, then use their slug forms in category routes, such as `bridge` or `canonical-bridge`.\n\nExamples (replace YOUR_API_KEY):\n\n```text\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/metrics/bridges\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/chart/bridges/protocol/optimism-bridge?dataType=dailyAggregatedVolume\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/chart/bridges/protocol/optimism-bridge?dataType=dailyTxCount\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/chart/bridges/protocol/optimism-bridge/chain-breakdown?dataType=dailyIncomingVolume\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/chart/bridges/chain/ethereum?dataType=dailyOutgoingVolume\nhttps://pro-api.llama.fi/{YOUR_API_KEY}/api/v2/metrics/bridges/categories\n```\n\nLabel breakdowns are available only when the protocol supplies label data; they are not available for every bridge."
+ "name": "RWA",
+ "description": "Real World Asset assets, aggregate stats, and chain breakdowns"
},
{
- "name": "Financial Statements",
- "description": "Protocol income statement and financial reporting data"
+ "name": "active users",
+ "description": "Data about active users on our chains and protocols dashboards"
}
],
"paths": {
- "/api/tokenProtocols/{symbol}": {
+ "/api/protocols": {
"get": {
"tags": ["TVL"],
- "x-api-plan-only": true,
- "summary": "Lists the amount of a certain token within all protocols. Data for the Token Usage page",
- "parameters": [
- {
- "name": "symbol",
- "in": "path",
- "description": "token slug",
- "required": true,
- "schema": {
- "type": "string",
- "example": "usdt"
- }
- }
- ],
+ "summary": "List all protocols on defillama along with their tvl",
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Array of all protocols with their TVL data",
"content": {
"application/json": {
"schema": {
@@ -140,24 +145,53 @@
"items": {
"type": "object",
"properties": {
+ "id": {
+ "type": "string",
+ "example": "2269"
+ },
"name": {
"type": "string",
- "example": "Portal"
+ "example": "Aave"
+ },
+ "symbol": {
+ "type": "string",
+ "example": "AAVE"
},
"category": {
"type": "string",
- "example": "Bridge"
+ "example": "Lending"
},
- "amountUsd": {
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Polygon"]
+ },
+ "tvl": {
+ "type": "number",
+ "nullable": true,
+ "example": 5200000000
+ },
+ "chainTvls": {
"type": "object",
"additionalProperties": {
"type": "number"
},
"example": {
- "coingecko:tether-avalanche-bridged-usdt-e": 6485.2310529788765,
- "coingecko:xcusdt": 45.514624238131,
- "coingecko:layerzero-bridged-usdt-aptos": 7312.740629193999
+ "Ethereum": 3200000000,
+ "Polygon": 2000000000
}
+ },
+ "change_1d": {
+ "type": "number",
+ "nullable": true,
+ "example": 2.1
+ },
+ "change_7d": {
+ "type": "number",
+ "nullable": true,
+ "example": -5.3
}
}
}
@@ -170,21 +204,20 @@
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await proClient.tvl.getTokenProtocols('')"
+ "source": "const result = await client.tvl.getProtocols()"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = pro_client.tvl.getTokenProtocols('')"
+ "source": "result = client.tvl.getProtocols()"
}
]
}
},
- "/api/inflows/{protocol}/{timestamp}": {
+ "/api/protocol/{protocol}": {
"get": {
"tags": ["TVL"],
- "x-api-plan-only": true,
- "summary": "Lists the amount of inflows and outflows for a protocol at a given date",
+ "summary": "Get historical TVL of a protocol and breakdowns by token and chain",
"parameters": [
{
"name": "protocol",
@@ -193,123 +226,94 @@
"required": true,
"schema": {
"type": "string",
- "example": "compound-v3"
- }
- },
- {
- "name": "timestamp",
- "in": "path",
- "description": "unix timestamp",
- "required": true,
- "schema": {
- "type": "integer",
- "example": 1767139200
+ "example": "aave"
}
}
],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Protocol details with historical TVL data and chain breakdowns",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "outflows": {
- "type": "number",
- "example": -160563462.23474675
+ "id": {
+ "type": "string",
+ "example": "parent#aave"
},
- "oldTokens": {
+ "name": {
+ "type": "string",
+ "example": "AAVE"
+ },
+ "symbol": {
+ "type": "string",
+ "example": "AAVE"
+ },
+ "category": {
+ "type": "string",
+ "example": "Lending"
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Polygon", "Avalanche"]
+ },
+ "currentChainTvls": {
"type": "object",
- "properties": {
- "date": {
- "type": "number",
- "example": 1700005031
- },
- "tvl": {
- "type": "object",
- "additionalProperties": {
- "type": "number"
- },
- "example": {
- "POLYGONUSDC": 2800590.050521,
- "STMATIC": 5910852.971103674,
- "USDC.E": 213182.234023,
- "WETH": 138751.92261049704,
- "WSTETH": 21205.858768287606,
- "COMP": 899912.2484411557,
- "ARB": 5191395.55706979,
- "UNI": 3276947.8126982865,
- "WBTC": 15237.12702489,
- "WMATIC": 4316699.376111328,
- "USDBC": 1567657.999816,
- "GMX": 44027.42587184711,
- "CBETH": 10011.824096757742,
- "LINK": 2915041.329272804,
- "USDC": 27302168.767972,
- "MATICX": 5999572.681088426
- }
- }
+ "additionalProperties": {
+ "type": "number"
+ },
+ "example": {
+ "Ethereum": 3200000000,
+ "Polygon": 1500000000
}
},
- "currentTokens": {
+ "chainTvls": {
"type": "object",
- "properties": {
- "date": {
- "type": "number",
- "example": 1752771743
- },
- "tvl": {
- "type": "object",
- "additionalProperties": {
- "type": "number"
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "tvl": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "number",
+ "example": 1609459200
+ },
+ "totalLiquidityUSD": {
+ "type": "number",
+ "example": 1000000
+ }
+ }
+ }
},
- "example": {
- "SKY": 1839111.3665808514,
- "WSUPEROETHB": 610.1258731272615,
- "RETH": 335.9162918778323,
- "WEETH": 21264.320107593303,
- "STMATIC": 43248.612454883136,
- "TETH": 7537.467077317422,
- "USDT": 23936602.852221,
- "USDC.E": 457484.93217,
- "USDS": 986286.7461886762,
- "FBTC": 7.88084468,
- "WUSDM": 9912.583708525639,
- "COMP": 199962.19982196926,
- "UNI": 748399.6623864435,
- "WRON": 48676.91287257022,
- "WBTC": 8346.44481716,
- "EZETH": 9378.908917279387,
- "SDEUSD": 4476349.521512799,
- "OSETH": 1751.011747340086,
- "USDT0": 4807642.14842,
- "LINK": 629790.4518594383,
- "DEUSD": 14779291.40757071,
- "MATICX": 239292.60540364735,
- "ETHX": 7.643953648e-9,
- "POLYGONUSDC": 1130561.097829,
- "OP": 474055.27558234957,
- "RSWETH": 0.7588296185577288,
- "SFRAX": 32550977.989188965,
- "METH": 1256.0286269578846,
- "WETH": 106772.79955793211,
- "WSTETH": 127030.77547884149,
- "ARB": 8082828.497277849,
- "RSETH": 13198.88264941232,
- "WMATIC": 1192273.6401273129,
- "GMX": 6408.6736121308695,
- "USDBC": 200217.562935,
- "CBETH": 2094.7317932368333,
- "USDE": 1660443.2086449957,
- "ETH": 657.5898609775202,
- "SUSDS": 2360827.122683512,
- "USDC": 67152880.13345899,
- "TBTC": 297.109236856541,
- "AXS": 156.95240126041227,
- "CBBTC": 722.70428829,
- "WRSETH": 208.78735872239974,
- "AERO": 3582072.5610455093
+ "tokens": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "number",
+ "example": 1609459200
+ },
+ "tokens": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "number"
+ },
+ "example": {
+ "USDC": 1000000,
+ "USDT": 800000
+ }
+ }
+ }
+ }
}
}
}
@@ -318,130 +322,49 @@
}
}
}
+ },
+ "404": {
+ "description": "Protocol not found"
}
},
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await proClient.tvl.getInflows('', 1704067200, 1704153600)"
+ "source": "const result = await client.tvl.getProtocol('')"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = pro_client.tvl.getInflows('', 1704067200, 1704153600)"
+ "source": "result = client.tvl.getProtocol('')"
}
]
}
},
- "/api/chainAssets": {
+ "/api/v2/historicalChainTvl": {
"get": {
"tags": ["TVL"],
- "summary": "Get assets of all chains",
+ "summary": "Get historical TVL (excludes liquid staking and double counted tvl) of DeFi on all chains",
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Historical TVL data for all chains combined",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "chain": {
- "type": "object",
- "properties": {
- "canonical": {
- "type": "object",
- "properties": {
- "total": {
- "type": "string",
- "example": "4482065428.82707789718257509123"
- },
- "breakdown": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- },
- "example": {
- "AGLD": "8.25709",
- "STPT": "263726.9847408758",
- "APU": "43899.14483171882",
- "CTX": "595333.6768847435",
- "APW": "37727.892544515686"
- }
- }
- }
- },
- "native": {
- "type": "object",
- "properties": {
- "total": {
- "type": "string",
- "example": "10848868127.0093572327157505031494340578574406321858"
- },
- "breakdown": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- },
- "example": {
- "BENI": "1322294.3731837485",
- "ANIME": "10.7583162713828217314035397949084",
- "SACA": "114132.47631920826",
- "HOKK": "4966.3804669563400723148947324498025",
- "TOSHI": "91927630.6839119443580116994151258714"
- }
- }
- }
- },
- "thirdParty": {
- "type": "object",
- "properties": {
- "total": {
- "type": "string",
- "example": "3182802062.49398527398560408906"
- },
- "breakdown": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- },
- "example": {
- "BRZ": "1810685.01887618296911",
- "BOBA": "0",
- "BURN": "0",
- "GGTK": "0.6545695",
- "GYFI": "2618437.7978"
- }
- }
- }
- },
- "total": {
- "type": "object",
- "properties": {
- "total": {
- "type": "string",
- "example": "18513735618.330420403"
- },
- "breakdown": {
- "type": "object",
- "additionalProperties": {
- "type": "string"
- },
- "example": {
- "AGLD": "8.25709",
- "STPT": "263726.9847408758",
- "APU": "43899.14483171882",
- "CTX": "595333.6768847435",
- "APW": "37727.892544515686"
- }
- }
- }
- }
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "number",
+ "description": "Unix timestamp",
+ "example": 1609459200
+ },
+ "tvl": {
+ "type": "number",
+ "description": "Total Value Locked in USD across all chains",
+ "example": 15000000000
}
- },
- "timestamp": {
- "type": "number",
- "example": 1752843956
}
}
}
@@ -449,28 +372,39 @@
}
}
},
- "x-api-plan-only": true,
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await proClient.tvl.getChainAssets()"
+ "source": "const result = await client.tvl.getHistoricalChainTvl()"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = pro_client.tvl.getChainAssets()"
+ "source": "result = client.tvl.getHistoricalChainTvl()"
}
]
}
},
- "/api/emissions": {
+ "/api/v2/historicalChainTvl/{chain}": {
"get": {
- "tags": ["Unlocks"],
- "summary": "List of all tokens along with basic info for each",
+ "tags": ["TVL"],
+ "summary": "Get historical TVL (excludes liquid staking and double counted tvl) of a chain",
+ "parameters": [
+ {
+ "name": "chain",
+ "in": "path",
+ "required": true,
+ "description": "chain slug, you can get these from /chains or the chains property on /protocols",
+ "schema": {
+ "type": "string",
+ "example": "Ethereum"
+ }
+ }
+ ],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Historical TVL data for the specified chain",
"content": {
"application/json": {
"schema": {
@@ -478,96 +412,135 @@
"items": {
"type": "object",
"properties": {
- "token": {
- "type": "string",
- "example": "coingecko:whitebit"
- },
- "sources": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["https://cdn.whitebit.com/wbt/whitepaper-en.pdf"]
- },
- "protocolId": {
- "type": "string",
- "example": "6143"
- },
- "name": {
- "type": "string",
- "example": "WhiteBIT"
- },
- "circSupply": {
- "type": "number",
- "example": 293500000
- },
- "circSupply30d": {
- "type": "number",
- "example": 293500000
- },
- "totalLocked": {
+ "date": {
"type": "number",
- "example": 81500000
+ "description": "Unix timestamp",
+ "example": 1609459200
},
- "maxSupply": {
+ "tvl": {
"type": "number",
- "example": 375000000
- },
- "gecko_id": {
- "type": "string",
- "example": "whitebit"
- },
- "events": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "description": {
- "type": "string",
- "example": "A cliff of {tokens[0]} tokens was unlocked from Funds 1 on {timestamp}"
- },
- "timestamp": {
- "type": "number",
- "example": 1659657600
- },
- "noOfTokens": {
- "type": "array",
- "items": {
- "type": "number"
- },
- "example": [120000000]
- },
- "category": {
- "type": "string",
- "example": "noncirculating"
- },
- "unlockType": {
- "type": "string",
- "example": "cliff"
- }
- }
- }
- },
- "nextEvent": {
- "type": "object",
- "properties": {
- "date": {
- "type": "number",
- "example": 1773360001
- },
- "toUnlock": {
- "type": "number",
- "example": 81500000
- }
- }
+ "description": "Total Value Locked in USD for this chain",
+ "example": 45000000000
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Chain not found"
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.tvl.getHistoricalChainTvl('')"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.tvl.getHistoricalChainTvl()"
+ }
+ ]
+ }
+ },
+ "/api/tvl/{protocol}": {
+ "get": {
+ "tags": ["TVL"],
+ "summary": "Simplified endpoint to get current TVL of a protocol",
+ "description": "Simplified endpoint that only returns a number, the current TVL of a protocol",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "uniswap"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Current TVL of the protocol in USD",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "number",
+ "description": "Total Value Locked in USD",
+ "example": 4962012809.795062
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Protocol not found"
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.tvl.getTvl('')"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.tvl.getTvl('')"
+ }
+ ]
+ }
+ },
+ "/api/v2/chains": {
+ "get": {
+ "tags": ["TVL"],
+ "summary": "Get current TVL of all chains",
+ "responses": {
+ "200": {
+ "description": "Array of all chains with their TVL data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "gecko_id": {
+ "type": "string",
+ "nullable": true,
+ "description": "CoinGecko ID for the chain's native token",
+ "example": "ethereum"
},
- "unlocksPerDay": {
+ "tvl": {
"type": "number",
- "example": 0
+ "description": "Total Value Locked in USD",
+ "example": 65998652431.40251
},
- "mcap": {
+ "tokenSymbol": {
+ "type": "string",
+ "nullable": true,
+ "description": "Native token symbol",
+ "example": "ETH"
+ },
+ "cmcId": {
+ "type": "string",
+ "nullable": true,
+ "description": "CoinMarketCap ID",
+ "example": "1027"
+ },
+ "name": {
+ "type": "string",
+ "description": "Chain name",
+ "example": "Ethereum"
+ },
+ "chainId": {
"type": "number",
- "example": 6577845629.249915
+ "nullable": true,
+ "description": "Chain ID number",
+ "example": 1
}
}
}
@@ -576,25 +549,92 @@
}
}
},
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.tvl.getChains()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.tvl.getChains()"
+ }
+ ]
+ }
+ },
+ "/api/tokenProtocols/{symbol}": {
+ "get": {
+ "tags": ["TVL"],
"x-api-plan-only": true,
+ "summary": "Lists the amount of a certain token within all protocols. Data for the Token Usage page",
+ "parameters": [
+ {
+ "name": "symbol",
+ "in": "path",
+ "description": "token slug",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "usdt"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "Portal"
+ },
+ "category": {
+ "type": "string",
+ "example": "Bridge"
+ },
+ "amountUsd": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "number"
+ },
+ "example": {
+ "coingecko:tether-avalanche-bridged-usdt-e": 6485.2310529788765,
+ "coingecko:xcusdt": 45.514624238131,
+ "coingecko:layerzero-bridged-usdt-aptos": 7312.740629193999
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await proClient.emissions.getAll()"
+ "source": "const result = await proClient.tvl.getTokenProtocols('')"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = pro_client.emissions.getAll()"
+ "source": "result = pro_client.tvl.getTokenProtocols('')"
}
]
}
},
- "/api/emission/{protocol}": {
+ "/api/inflows/{protocol}/{timestamp}": {
"get": {
- "tags": ["Unlocks"],
- "summary": "Unlocks data for a given token/protocol. You can find a list of available slugs to query by querying /emissions and then extracting the key `gecko_id`",
+ "tags": ["TVL"],
+ "x-api-plan-only": true,
+ "summary": "Lists the amount of inflows and outflows for a protocol at a given date",
"parameters": [
{
"name": "protocol",
@@ -603,7 +643,17 @@
"required": true,
"schema": {
"type": "string",
- "example": "hyperliquid"
+ "example": "compound-v3"
+ }
+ },
+ {
+ "name": "timestamp",
+ "in": "path",
+ "description": "unix timestamp",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "example": 1767139200
}
}
],
@@ -615,245 +665,233 @@
"schema": {
"type": "object",
"properties": {
- "body": {
+ "outflows": {
+ "type": "number",
+ "example": -160563462.23474675
+ },
+ "oldTokens": {
"type": "object",
"properties": {
- "documentedData": {
+ "date": {
+ "type": "number",
+ "example": 1700005031
+ },
+ "tvl": {
"type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "label": {
- "type": "string",
- "example": "Hyper Foundation Budget"
- },
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number",
- "example": 1732838400
- },
- "unlocked": {
- "type": "number",
- "example": 60000000
- },
- "rawEmission": {
- "type": "number",
- "example": 60000000
- },
- "burned": {
- "type": "number",
- "example": 0
- }
- }
- }
- }
- }
- }
+ "additionalProperties": {
+ "type": "number"
+ },
+ "example": {
+ "POLYGONUSDC": 2800590.050521,
+ "STMATIC": 5910852.971103674,
+ "USDC.E": 213182.234023,
+ "WETH": 138751.92261049704,
+ "WSTETH": 21205.858768287606,
+ "COMP": 899912.2484411557,
+ "ARB": 5191395.55706979,
+ "UNI": 3276947.8126982865,
+ "WBTC": 15237.12702489,
+ "WMATIC": 4316699.376111328,
+ "USDBC": 1567657.999816,
+ "GMX": 44027.42587184711,
+ "CBETH": 10011.824096757742,
+ "LINK": 2915041.329272804,
+ "USDC": 27302168.767972,
+ "MATICX": 5999572.681088426
+ }
+ }
+ }
+ },
+ "currentTokens": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "number",
+ "example": 1752771743
+ },
+ "tvl": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "number"
+ },
+ "example": {
+ "SKY": 1839111.3665808514,
+ "WSUPEROETHB": 610.1258731272615,
+ "RETH": 335.9162918778323,
+ "WEETH": 21264.320107593303,
+ "STMATIC": 43248.612454883136,
+ "TETH": 7537.467077317422,
+ "USDT": 23936602.852221,
+ "USDC.E": 457484.93217,
+ "USDS": 986286.7461886762,
+ "FBTC": 7.88084468,
+ "WUSDM": 9912.583708525639,
+ "COMP": 199962.19982196926,
+ "UNI": 748399.6623864435,
+ "WRON": 48676.91287257022,
+ "WBTC": 8346.44481716,
+ "EZETH": 9378.908917279387,
+ "SDEUSD": 4476349.521512799,
+ "OSETH": 1751.011747340086,
+ "USDT0": 4807642.14842,
+ "LINK": 629790.4518594383,
+ "DEUSD": 14779291.40757071,
+ "MATICX": 239292.60540364735,
+ "ETHX": 7.643953648e-9,
+ "POLYGONUSDC": 1130561.097829,
+ "OP": 474055.27558234957,
+ "RSWETH": 0.7588296185577288,
+ "SFRAX": 32550977.989188965,
+ "METH": 1256.0286269578846,
+ "WETH": 106772.79955793211,
+ "WSTETH": 127030.77547884149,
+ "ARB": 8082828.497277849,
+ "RSETH": 13198.88264941232,
+ "WMATIC": 1192273.6401273129,
+ "GMX": 6408.6736121308695,
+ "USDBC": 200217.562935,
+ "CBETH": 2094.7317932368333,
+ "USDE": 1660443.2086449957,
+ "ETH": 657.5898609775202,
+ "SUSDS": 2360827.122683512,
+ "USDC": 67152880.13345899,
+ "TBTC": 297.109236856541,
+ "AXS": 156.95240126041227,
+ "CBBTC": 722.70428829,
+ "WRSETH": 208.78735872239974,
+ "AERO": 3582072.5610455093
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.tvl.getInflows('', 1704067200, 1704153600)"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.tvl.getInflows('', 1704067200, 1704153600)"
+ }
+ ]
+ }
+ },
+ "/api/chainAssets": {
+ "get": {
+ "tags": ["TVL"],
+ "summary": "Get assets of all chains",
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "chain": {
+ "type": "object",
+ "properties": {
+ "canonical": {
+ "type": "object",
+ "properties": {
+ "total": {
+ "type": "string",
+ "example": "4482065428.82707789718257509123"
},
- "tokenAllocation": {
+ "breakdown": {
"type": "object",
- "properties": {
- "current": {
- "type": "object",
- "properties": {
- "insiders": {
- "type": "number",
- "example": 16
- },
- "noncirculating": {
- "type": "number",
- "example": 0.8
- },
- "publicSale": {
- "type": "number",
- "example": 0
- },
- "airdrop": {
- "type": "number",
- "example": 82.5
- },
- "farming": {
- "type": "number",
- "example": 0.7
- }
- }
- },
- "final": {
- "type": "object",
- "properties": {
- "insiders": {
- "type": "number",
- "example": 45.8
- },
- "noncirculating": {
- "type": "number",
- "example": 0.5
- },
- "publicSale": {
- "type": "number",
- "example": 0
- },
- "airdrop": {
- "type": "number",
- "example": 47.7
- },
- "farming": {
- "type": "number",
- "example": 6
- }
- }
- },
- "progress": {
- "type": "object",
- "properties": {
- "insiders": {
- "type": "number",
- "example": 20.1
- },
- "noncirculating": {
- "type": "number",
- "example": 100
- },
- "publicSale": {
- "type": "number",
- "example": 100
- },
- "airdrop": {
- "type": "number",
- "example": 100
- },
- "farming": {
- "type": "number",
- "example": 6.5
- }
- }
- }
+ "additionalProperties": {
+ "type": "string"
+ },
+ "example": {
+ "AGLD": "8.25709",
+ "STPT": "263726.9847408758",
+ "APU": "43899.14483171882",
+ "CTX": "595333.6768847435",
+ "APW": "37727.892544515686"
}
}
}
},
- "metadata": {
+ "native": {
"type": "object",
"properties": {
- "notes": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": [
- "The Community Rewards schedule has been linearly extrapolated using the rate of unlocks as of 4 March 2025.",
- "The remaining allocation, not shown on the chart, belongs to Community Rewards. It has been excluded here to avoid obscuring the remaining data.",
- "Most vesting schedules will complete between 2027–2028; some will continue after 2028. Here we have used an end date of end of 2027.",
- "Although the full allocations for Hyper Foundation Budget and Community Grants were unlocked at TGE it is unclear what their spend rate is."
- ]
- },
- "token": {
+ "total": {
"type": "string",
- "example": "coingecko:hyperliquid"
+ "example": "10848868127.0093572327157505031494340578574406321858"
},
- "sources": {
- "type": "array",
- "items": {
+ "breakdown": {
+ "type": "object",
+ "additionalProperties": {
"type": "string"
},
- "example": ["https://hyperfnd.medium.com/hype-genesis-1830a4dc2e3f"]
+ "example": {
+ "BENI": "1322294.3731837485",
+ "ANIME": "10.7583162713828217314035397949084",
+ "SACA": "114132.47631920826",
+ "HOKK": "4966.3804669563400723148947324498025",
+ "TOSHI": "91927630.6839119443580116994151258714"
+ }
+ }
+ }
+ },
+ "thirdParty": {
+ "type": "object",
+ "properties": {
+ "total": {
+ "type": "string",
+ "example": "3182802062.49398527398560408906"
},
- "protocolIds": {
- "type": "array",
- "items": {
+ "breakdown": {
+ "type": "object",
+ "additionalProperties": {
"type": "string"
},
- "example": ["4481", "5448", "5507", "5761"]
- },
+ "example": {
+ "BRZ": "1810685.01887618296911",
+ "BOBA": "0",
+ "BURN": "0",
+ "GGTK": "0.6545695",
+ "GYFI": "2618437.7978"
+ }
+ }
+ }
+ },
+ "total": {
+ "type": "object",
+ "properties": {
"total": {
- "type": "number",
- "example": 1000000000
- },
- "chain": {
- "type": "string",
- "example": "hyperliquid"
- },
- "name": {
- "type": "string",
- "example": "Hyperliquid"
- },
- "gecko_id": {
"type": "string",
- "example": "hyperliquid"
+ "example": "18513735618.330420403"
},
- "defillamaIds": {
- "type": "array",
- "items": {
+ "breakdown": {
+ "type": "object",
+ "additionalProperties": {
"type": "string"
},
- "example": ["4481"]
- },
- "categories": {
- "type": "object",
- "properties": {
- "insiders": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Core Contributors", "Hyper Foundation Budget"]
- },
- "noncirculating": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Community Grants"]
- },
- "publicSale": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["HIP-2"]
- },
- "airdrop": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Genesis Distribution"]
- },
- "farming": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Community Rewards"]
- }
+ "example": {
+ "AGLD": "8.25709",
+ "STPT": "263726.9847408758",
+ "APU": "43899.14483171882",
+ "CTX": "595333.6768847435",
+ "APW": "37727.892544515686"
}
- },
- "protocolCategory": {
- "type": "string",
- "example": "Bridge"
- },
- "chainName": {
- "type": "string",
- "example": "Hyperliquid L1"
- },
- "pId": {
- "type": "string",
- "example": "4481"
}
}
}
}
},
- "lastModified": {
- "type": "string",
- "example": "2025-07-18T13:30:56.000Z"
+ "timestamp": {
+ "type": "number",
+ "example": 1752843956
}
}
}
@@ -866,93 +904,145 @@
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await proClient.emissions.getByProtocol('')"
+ "source": "const result = await proClient.tvl.getChainAssets()"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = pro_client.emissions.getByProtocol('')"
+ "source": "result = pro_client.tvl.getChainAssets()"
}
]
}
},
- "/api/categories": {
+ "/api/v2/metrics/tvl/protocol/{protocol}": {
"get": {
- "tags": ["main page"],
- "summary": "Overview of all categories accross all protocols",
+ "tags": ["TVL"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get aggregate TVL metrics for a protocol",
+ "description": "Returns protocol metadata along with current TVL figures, chain breakdowns, and other aggregate metrics.",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "aave"
+ }
+ }
+ ],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Protocol TVL metrics",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "chart": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "tvl": {
- "type": "number",
- "example": 45997965191.323425
- },
- "staking": {
- "type": "number",
- "example": 117946591.34734812
- },
- "pool2": {
- "type": "number",
- "example": 4467.975298299099
- },
- "doublecounted": {
- "type": "number",
- "example": 1259137973.0377812
- },
- "borrowed": {
- "type": "number",
- "example": 714082.8186222482
- },
- "offers": {
- "type": "number",
- "example": 0
- },
- "vesting": {
- "type": "number",
- "example": 0.0009596433739281769
- },
- "treasury": {
- "type": "number",
- "example": 11142.746348986766
- },
- "liquidstaking": {
- "type": "number",
- "example": 20838772668.74201
- },
- "dcAndLsOverlap": {
- "type": "number",
- "example": 24954437702.556156
- }
- }
- }
- },
- "example": {
- "1747440000": {
- "Bridge": {
- "tvl": 45997965191.323425,
- "staking": 117946591.34734812,
- "pool2": 4467.975298299099,
- "doublecounted": 1259137973.0377812,
- "borrowed": 714082.8186222482,
- "offers": 0,
- "vesting": 0.0009596433739281769
- }
- }
- }
- },
- "categories": {
+ "id": {
+ "type": "string",
+ "example": "parent#aave"
+ },
+ "name": {
+ "type": "string",
+ "example": "Aave"
+ },
+ "address": {
+ "type": "string",
+ "nullable": true,
+ "example": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
+ },
+ "symbol": {
+ "type": "string",
+ "nullable": true,
+ "example": "AAVE"
+ },
+ "url": {
+ "type": "string",
+ "example": "https://aave.com"
+ },
+ "referralUrl": {
+ "type": "string",
+ "nullable": true
+ },
+ "description": {
+ "type": "string",
+ "example": "Aave is an Open Source and Non-Custodial protocol to earn interest on deposits & borrow assets"
+ },
+ "chain": {
+ "type": "string",
+ "example": "Multi-Chain"
+ },
+ "logo": {
+ "type": "string",
+ "example": "https://icons.llama.fi/aave.png"
+ },
+ "audits": {
+ "type": "string",
+ "nullable": true
+ },
+ "audit_note": {
+ "type": "string",
+ "nullable": true
+ },
+ "gecko_id": {
+ "type": "string",
+ "nullable": true,
+ "example": "aave"
+ },
+ "cmcId": {
+ "type": "string",
+ "nullable": true,
+ "example": "7278"
+ },
+ "category": {
+ "type": "string",
+ "example": "Lending"
+ },
+ "tags": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Polygon", "Avalanche"]
+ },
+ "module": {
+ "type": "string",
+ "nullable": true
+ },
+ "treasury": {
+ "type": "string",
+ "nullable": true
+ },
+ "twitter": {
+ "type": "string",
+ "example": "AaveAave"
+ },
+ "audit_links": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "openSource": {
+ "type": "boolean"
+ },
+ "forkedFrom": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "oraclesByChain": {
"type": "object",
"additionalProperties": {
"type": "array",
@@ -961,853 +1051,548 @@
}
},
"example": {
- "Bridge": [
- "WBTC",
- "RenVM",
- "The Tokenized Bitcoin",
- "hBTC",
- "Rhino.fi",
- "Strudel Finance",
- "Connext",
- "Injective Bridge",
- "pNetwork",
- "Allbridge Classic",
- "Multichain"
- ],
- "Risk Curators": [
- "9Summits",
- "Alphaping",
- "Apostro",
- "B.Protocol Curator",
- "Block Analitica",
- "Clearstar",
- "Euler DAO",
- "Fence Finance",
- "Gauntlet",
- "Hakutora",
- "Hyperithm",
- "K3 Capital",
- "LlamaRisk",
- "M11 Credit",
- "MEV Capital",
- "Ouroboros Capital",
- "Re7 Labs",
- "Relend Network",
- "Steakhouse Financial",
- "Tulipa Capital",
- "Alterscope",
- "Yearn Curating",
- "CIAN Curating",
- "Vault Bridge"
- ],
- "DAO Service Provider": ["CreateDAO"]
+ "Ethereum": ["Chainlink"],
+ "Polygon": ["Chainlink"]
}
- }
- }
- }
- }
- }
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.ecosystem.getCategories()"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.ecosystem.getCategories()"
- }
- ]
- }
- },
- "/api/forks": {
- "get": {
- "tags": ["main page"],
- "x-api-plan-only": true,
- "summary": "Overview of all forks accross all protocols",
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "chart": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "staking": {
- "type": "number",
- "example": 712008453.6943725
- },
- "tvl": {
- "type": "number",
- "example": 2580053162.908216
- },
- "pool2": {
- "type": "number",
- "example": 146782.46894897142
- },
- "doublecounted": {
- "type": "number",
- "example": 3013724.782369083
- },
- "borrowed": {
- "type": "number",
- "example": 925950.5791909688
- },
- "vesting": {
- "type": "number",
- "example": 0.0033932788318303733
- },
- "liquidstaking": {
- "type": "number",
- "example": 1184348.1365500058
- },
- "dcAndLsOverlap": {
- "type": "number",
- "example": 1184348.1365500058
- }
- }
- }
- },
- "example": {
- "1752624000": {
- "Uniswap V2": {
- "staking": 712008453.6943725,
- "tvl": 2580053162.908216,
- "pool2": 146782.46894897142,
- "doublecounted": 3013724.782369083,
- "borrowed": 925950.5791909688,
- "vesting": 0.0033932788318303733
- }
- }
+ },
+ "parentProtocol": {
+ "type": "string"
+ },
+ "governanceID": {
+ "type": "array",
+ "items": {
+ "type": "string"
}
},
- "forks": {
+ "github": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "currentChainTvls": {
"type": "object",
"additionalProperties": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "type": "number"
},
"example": {
- "Uniswap V2": [
- "SushiSwap",
- "Varen",
- "PancakeSwap AMM",
- "Defi Swap",
- "Energiswap",
- "Pangolin",
- "Cometh",
- "Honeyswap",
- "0.exchange",
- "YetiSwap",
- "Swapr V2",
- "Lydia",
- "Levinswap",
- "SpookySwap V2",
- "Quickswap Dex",
- "SpiritSwap AMM",
- "ViperSwap",
- "HyperJump",
- "Dfyn Network",
- "Unicly"
- ]
- }
- }
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.ecosystem.getForks()"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.ecosystem.getForks()"
- }
- ]
- }
- },
- "/api/oracles": {
- "get": {
- "tags": ["main page"],
- "summary": "Overview of all oracles accross all protocols",
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "chart": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "tvl": {
- "type": "number",
- "example": 48896114862.57202
- },
- "staking": {
- "type": "number",
- "example": 1564643922.8114228
- },
- "pool2": {
- "type": "number",
- "example": 107245076.47312777
- },
- "borrowed": {
- "type": "number",
- "example": 25132031822.258495
- },
- "treasury": {
- "type": "number",
- "example": 52.078623852211784
- },
- "vesting": {
- "type": "number",
- "example": 3347.9893057455306
- }
- }
- }
- },
- "example": {
- "1752624000": {
- "Chainlink": {
- "tvl": 48896114862.57202,
- "staking": 1564643922.8114228,
- "pool2": 107245076.47312777,
- "borrowed": 25132031822.258495,
- "treasury": 52.078623852211784,
- "vesting": 3347.9893057455306
- }
- }
+ "Ethereum": 3200000000,
+ "Polygon": 1500000000
}
},
- "oracles": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "example": {
- "Chainlink": ["AAVE V2", "Compound V2", "Synthetix v1+v2", "CREAM Lending"]
- }
+ "isParentProtocol": {
+ "type": "boolean"
+ },
+ "mcap": {
+ "type": "number",
+ "nullable": true,
+ "example": 2400000000
+ },
+ "methodology": {
+ "type": "string",
+ "nullable": true
},
- "chainsByOracle": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "example": {
- "Chainlink": [
- "Ethereum",
- "Arbitrum",
- "BSC",
- "Avalanche",
- "Base",
- "Solana",
- "Polygon",
- "OP Mainnet",
- "Linea"
- ]
- }
- }
- }
- }
- }
- }
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.ecosystem.getOracles()"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.ecosystem.getOracles()"
- }
- ]
- }
- },
- "/api/hacks": {
- "get": {
- "tags": ["main page"],
- "summary": "Overview of all hacks on our Hacks dashboard",
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "date": {
- "type": "number",
- "example": 1711065600
- },
- "name": {
- "type": "string",
- "example": "Super Sushi Samurai"
- },
- "classification": {
- "type": "string",
- "example": "Protocol Logic"
- },
- "technique": {
- "type": "string",
- "example": "Infinite Mint and Dump"
- },
- "amount": {
- "type": "number",
- "example": 4800000
- },
- "chain": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Blast"]
- },
- "bridgeHack": {
- "type": "boolean",
- "example": false
- },
- "targetType": {
- "type": "string",
- "example": "Gaming"
- },
- "source": {
- "type": "string",
- "example": "https://rekt.news/sss-rekt/"
- },
- "returnedFunds": {
- "type": ["number", "null"],
- "example": null
- },
- "defillamaId": {
- "type": ["number", "null"],
- "example": null
- },
- "language": {
- "type": ["string", "null"],
- "example": "Solidity"
- }
- }
- }
- }
- }
- }
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.ecosystem.getHacks()"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.ecosystem.getHacks()"
- }
- ]
- }
- },
- "/api/raises": {
- "get": {
- "tags": ["main page"],
- "summary": "Overview of all raises on our Raises dashboard",
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
"raises": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "date": {
- "type": "number",
- "example": 1740528000
- },
- "name": {
- "type": "string",
- "example": "Ethena Labs"
- },
"round": {
"type": "string",
- "example": "Strategic"
+ "example": "Series A"
},
"amount": {
"type": "number",
- "example": 16
+ "example": 25000000
},
- "chains": {
+ "valuation": {
+ "type": "string"
+ },
+ "source": {
+ "type": "string"
+ },
+ "date": {
+ "type": "number",
+ "example": 1601510400
+ },
+ "defillamaId": {
+ "type": "string"
+ },
+ "leadInvestors": {
"type": "array",
"items": {
"type": "string"
- },
- "example": ["Ethereum"]
+ }
},
- "sector": {
- "type": "string",
- "example": "Ethena is a synthetic dollar protocol built on Ethereum"
- },
- "category": {
- "type": "string",
- "example": "DeFi"
- },
- "categoryGroup": {
- "type": "string",
- "example": "DeFi & CeFi"
- },
- "source": {
- "type": "string",
- "example": "https://www.benzinga.com/pressreleases/25/02/g43966782/mexc-invests-20-million-in-usde-to-drive-stablecoin-adoption-launches-1-000-000-reward-event"
- },
- "leadInvestors": {
+ "otherInvestors": {
"type": "array",
"items": {
"type": "string"
- },
- "example": ["MEXC Ventures"]
+ }
},
- "otherInvestors": {
+ "investors": {
"type": "array",
"items": {
"type": "string"
- },
- "example": []
- },
- "valuation": {
- "type": ["number", "null"],
- "example": null
- },
- "defillamaId": {
- "type": "string",
- "example": "parent#ethena"
+ }
}
}
}
- }
- }
- }
- }
- }
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.ecosystem.getRaises()"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.ecosystem.getRaises()"
- }
- ]
- }
- },
- "/api/treasuries": {
- "get": {
- "tags": ["main page"],
- "summary": "List all protocols on our Treasuries dashboard",
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "example": "6355-treasury"
- },
- "name": {
- "type": "string",
- "example": "SharpLink Gaming (treasury)"
- },
- "address": {
- "type": ["string", "null"],
- "example": null
- },
- "symbol": {
- "type": "string",
- "example": "-"
- },
- "url": {
- "type": "string",
- "example": "https://www.sharplink.com/"
- },
- "description": {
- "type": "string",
- "example": "SharpLink is one of the first Nasdaq-listed companies to develop a treasury strategy centered on ETH"
- },
- "chain": {
- "type": "string",
- "example": "Ethereum"
- },
- "logo": {
- "type": "string",
- "example": "https://icons.llama.fi/sharplink-gaming.jpg"
- },
- "audits": {
- "type": "string",
- "example": "0"
- },
- "audit_note": {
- "type": ["string", "null"],
- "example": null
- },
- "gecko_id": {
- "type": ["string", "null"],
- "example": null
- },
- "cmcId": {
- "type": ["string", "null"],
- "example": null
- },
- "category": {
- "type": "string",
- "example": "Treasury Manager"
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Ethereum"]
- },
- "module": {
- "type": "string",
- "example": "treasury/sharplink-gaming.js"
- },
- "treasury": {
- "type": "string",
- "example": "sharplink-gaming.js"
- },
- "forkedFromIds": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": []
- },
- "twitter": {
- "type": "string",
- "example": "SharpLinkGaming"
- },
- "slug": {
- "type": "string",
- "example": "sharplink-gaming-(treasury)"
- },
- "tvl": {
- "type": "number",
- "example": 976150507.157045
- },
- "chainTvls": {
- "type": "object",
- "additionalProperties": {
- "type": "number"
- },
- "example": {
- "Ethereum": 976150507.157045
- }
- },
- "change_1h": {
- "type": "number",
- "example": -1.1231970563777622
- },
- "change_1d": {
- "type": "number",
- "example": 15.845546813803097
- },
- "change_7d": {
- "type": "number",
- "example": 75.57040101595928
- },
- "tokenBreakdowns": {
+ },
+ "otherProtocols": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "hallmarks": {
+ "type": "array",
+ "description": "Notable events in the protocol's history as [timestamp, description] pairs",
+ "items": {
+ "type": "array"
+ }
+ },
+ "stablecoins": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "misrepresentedTokens": {
+ "type": "boolean"
+ },
+ "deprecated": {
+ "type": "boolean"
+ },
+ "rugged": {
+ "type": "boolean"
+ },
+ "deadUrl": {
+ "type": "boolean"
+ },
+ "warningBanners": {
+ "type": "array",
+ "items": {
"type": "object",
"properties": {
- "ownTokens": {
- "type": "number",
- "example": 0
- },
- "stablecoins": {
- "type": "number",
- "example": 0.003
+ "message": {
+ "type": "string"
},
- "majors": {
- "type": "number",
- "example": 67481592.5634468
+ "until": {
+ "type": "string",
+ "nullable": true
},
- "others": {
- "type": "number",
- "example": 908668914.5905982
+ "level": {
+ "type": "string",
+ "enum": ["low", "alert", "rug"]
}
}
- },
- "mcap": {
- "type": ["number", "null"],
- "example": null
}
+ },
+ "tokenRights": {
+ "type": "object",
+ "description": "Token governance and value accrual rights"
+ },
+ "wrongLiquidity": {
+ "type": "boolean"
+ },
+ "tvlCodePath": {
+ "type": "string",
+ "description": "Path to the TVL adapter source code"
}
- }
- }
- }
- }
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.ecosystem.getTreasuries()"
+ },
+ "example": {
+ "id": "parent#aave",
+ "name": "Aave",
+ "url": "https://aave.com",
+ "description": "Aave is an Open Source and Non-Custodial protocol to earn interest on deposits and borrow assets",
+ "logo": "https://icons.llama.fi/aave.png",
+ "chains": [],
+ "gecko_id": "aave",
+ "cmcId": "7278",
+ "treasury": "aave.js",
+ "twitter": "aave",
+ "governanceID": ["snapshot:aave.eth", "eip155:1:0xEC568fffba86c094cf06b22134B23074DFE2252c"],
+ "wrongLiquidity": true,
+ "github": ["aave", "bgd-labs"],
+ "stablecoins": ["gho"],
+ "tokenRights": {
+ "rights": [
+ {
+ "label": "Governance",
+ "hasRight": true,
+ "details": "AAVE"
+ },
+ {
+ "label": "Treasury",
+ "hasRight": true,
+ "details": "AAVE"
+ },
+ {
+ "label": "Revenue",
+ "hasRight": true,
+ "details": "AAVE"
+ }
+ ],
+ "governanceData": {
+ "rights": "LIMITED",
+ "details": "Governance includes protocol parameters, treasury management, upgrades & onchain revenue",
+ "feeSwitchStatus": "ON",
+ "feeSwitchDetails": "$50m annual budget for token buybacks"
+ },
+ "holdersRevenueAndValueAccrual": {
+ "buybacks": "ACTIVE",
+ "dividends": "NONE",
+ "burns": "NONE",
+ "primaryValueAccrual": "Buybacks - $50M yearly budget for buybacks"
+ },
+ "tokenAlignment": {
+ "fundraising": "TOKEN",
+ "raiseDetailsLink": {
+ "label": "Strategic Round (Decrypt)",
+ "url": "https://decrypt.co/44653/aave-raises-25-million-to-bring-defi-to-institutions"
+ },
+ "associatedEntities": ["DAO", "Labs", "Parent / Holdings Co"],
+ "equityRevenueCapture": "PARTIAL",
+ "equityStatement": "Labs owns the interface and offchain revenue"
+ }
+ },
+ "symbol": "AAVE",
+ "address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
+ "currentChainTvls": {
+ "Ethereum-staking": 300390294,
+ "Ethereum-pool2": 1001784,
+ "Avalanche-borrowed": 230805193,
+ "Ethereum": 21541108640,
+ "Ethereum-borrowed": 13105470847,
+ "Polygon": 164069009,
+ "Avalanche": 425186004,
+ "Polygon-borrowed": 71777370,
+ "staking": 300390294,
+ "pool2": 1001784,
+ "borrowed": 16477546481,
+ "Base": 720897079,
+ "Base-borrowed": 539408955,
+ "Arbitrum": 710909114,
+ "Arbitrum-borrowed": 493502165,
+ "OP Mainnet": 53112825,
+ "OP Mainnet-borrowed": 30898499,
+ "Gnosis": 67454440,
+ "Gnosis-borrowed": 28683972,
+ "Mantle": 285136854,
+ "Mantle-borrowed": 186143806,
+ "Plasma": 1958242285,
+ "Plasma-borrowed": 1655750534,
+ "BSC": 174954075,
+ "BSC-borrowed": 70470380,
+ "Linea": 49717184,
+ "Linea-borrowed": 38569924,
+ "Sonic": 12939987,
+ "Sonic-borrowed": 5315322,
+ "Scroll": 6971724,
+ "Scroll-borrowed": 5290161,
+ "ZKsync Era": 2782917,
+ "ZKsync Era-borrowed": 1245328,
+ "Soneium": 2038301,
+ "Soneium-borrowed": 292179,
+ "Metis": 959354,
+ "Metis-borrowed": 159370,
+ "Celo": 13373563,
+ "Celo-borrowed": 4923675,
+ "MegaETH": 19380664,
+ "MegaETH-borrowed": 34443,
+ "Aptos": 18649107,
+ "Aptos-borrowed": 8493938,
+ "Fantom": 4575,
+ "Fantom-borrowed": 1034,
+ "Harmony": 0,
+ "Harmony-borrowed": 309375
+ },
+ "isParentProtocol": true,
+ "raises": [
+ {
+ "date": 1594771200,
+ "name": "Aave",
+ "round": "Private token sale",
+ "amount": 3,
+ "source": "https://www.dcforecasts.com/altcoin-news/aave-raises-3m-from-three-arrows-capital-and-framework-ventures/",
+ "leadInvestors": ["Framework Ventures", "3AC"],
+ "otherInvestors": [],
+ "valuation": null,
+ "defillamaId": "111"
+ },
+ {
+ "date": 1602460800,
+ "name": "Aave",
+ "round": "Strategic ",
+ "amount": 25,
+ "source": "https://decrypt.co/44653/aave-raises-25-million-to-bring-defi-to-institutions",
+ "leadInvestors": ["Blockchain Capital", "Blockchain.com Ventures", "Standard Crypto"],
+ "otherInvestors": [],
+ "valuation": null,
+ "defillamaId": "111"
+ },
+ {
+ "date": 1594166400,
+ "name": "Aave",
+ "round": "Private token sale",
+ "amount": 4.5,
+ "source": "https://decrypt.co/34991/parafi-invests-defi-lending-protocol",
+ "leadInvestors": ["ParaFi Capital"],
+ "otherInvestors": [],
+ "valuation": null,
+ "defillamaId": "111"
+ },
+ {
+ "date": 1512000000,
+ "name": "Aave",
+ "round": "ICO",
+ "amount": 16.2,
+ "source": "https://twitter.com/aaveaave/status/936247348816175104",
+ "leadInvestors": [],
+ "otherInvestors": [],
+ "valuation": null,
+ "defillamaId": "1838"
+ }
+ ],
+ "mcap": 1775192426.0010407,
+ "otherProtocols": [
+ "Aave",
+ "Aave V3",
+ "Aave Horizon RWA",
+ "Aave V2",
+ "Aave Aptos",
+ "Aave V1",
+ "Aave Arc"
+ ],
+ "hallmarks": [
+ [1619395200, "Start Ethereum V2 Rewards"],
+ [1633305600, "Start AVAX V2 Rewards"],
+ [1635292800, "Potential xSUSHI attack found"],
+ [1650412800, "Start AVAX Rewards"],
+ [1651881600, "UST depeg"],
+ [1654819200, "stETH depeg"],
+ [1659571200, "Start OP Rewards"]
+ ]
+ }
+ }
+ }
+ }
},
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.ecosystem.getTreasuries()"
+ "404": {
+ "description": "Protocol not found"
}
- ]
+ }
}
},
- "/api/entities": {
+ "/api/v2/chart/tvl/protocol/{protocol}": {
"get": {
- "tags": ["main page"],
- "summary": "List all entities",
+ "tags": ["TVL"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get historical TVL chart for a protocol",
+ "description": "Returns an array of [timestamp, value] pairs representing the protocol's TVL over time. By default returns the base TVL metric. Use the `key` parameter to select a different metric or aggregate all metrics.",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "uniswap"
+ }
+ },
+ {
+ "name": "key",
+ "in": "query",
+ "required": false,
+ "description": "Metric to return. Omit for default TVL. Use \"all\" for the sum of tvl+borrowed+staking+pool2+vesting, or a specific metric like \"staking\", \"borrowed\", \"vesting\", \"pool2\".",
+ "schema": {
+ "type": "string",
+ "enum": ["all", "staking", "borrowed", "vesting", "pool2"],
+ "example": "all"
+ }
+ }
+ ],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Array of [timestamp, value] pairs",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "example": "entity-8"
- },
- "name": {
- "type": "string",
- "example": "Blockchain Capital"
- },
- "url": {
- "type": "string",
- "example": "https://blockchain.capital"
- },
- "description": {
- "type": "string",
- "example": "Blockchain Capital is a leading venture firm in the blockchain industry. In the last 9 years we have made over 160 investments in companies and protocols in the sector, across different stages, geographies and asset types."
- },
- "logo": {
- "type": "string",
- "example": "https://icons.llama.fi/blockchain-capital.jpg"
- },
- "category": {
- "type": "string",
- "example": "VC"
- },
- "module": {
- "type": "string",
- "example": "entities/blockchain-capital.js"
- },
- "twitter": {
- "type": "string",
- "example": "blockchaincap"
- },
- "symbol": {
- "type": "string",
- "example": ""
- },
- "chain": {
- "type": "string",
- "example": "Ethereum"
- },
- "gecko_id": {
- "type": ["string", "null"],
- "example": null
- },
- "cmcId": {
- "type": ["string", "null"],
- "example": null
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Ethereum"]
- },
- "slug": {
- "type": "string",
- "example": "blockchain-capital"
- },
- "tvl": {
- "type": "number",
- "example": 131402986.1539898
- },
- "chainTvls": {
- "type": "object",
- "additionalProperties": {
- "type": "number"
- },
- "example": {
- "Ethereum": 131402986.1539898
- }
- },
- "change_1h": {
- "type": "number",
- "example": 0.5368786705972184
- },
- "change_1d": {
- "type": "number",
- "example": 5.632604890674784
- },
- "change_7d": {
- "type": "number",
- "example": 11.27548502629729
- },
- "tokenBreakdowns": {
- "type": "object",
- "properties": {
- "ownTokens": {
- "type": "number",
- "example": 0
- },
- "stablecoins": {
- "type": "number",
- "example": 0.06493662312
- },
- "majors": {
- "type": "number",
- "example": 29628575.4114822
- },
- "others": {
- "type": "number",
- "example": 101774410.67757098
- }
- }
- },
- "mcap": {
- "type": ["number", "null"],
- "example": null
- }
- }
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2,
+ "example": [1609459200, 5200000000]
}
}
}
}
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.ecosystem.getEntities()"
},
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.ecosystem.getEntities()"
+ "404": {
+ "description": "Protocol not found"
}
- ]
+ }
}
},
- "/api/historicalLiquidity/{token}": {
+ "/api/v2/chart/tvl/protocol/{protocol}/chain-breakdown": {
"get": {
- "tags": ["token liquidity"],
- "summary": "Provides the name of contracts on a determined chain",
+ "tags": ["TVL"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get historical TVL chart for a protocol broken down by chain",
+ "description": "Returns an array of [timestamp, { chain: value }] pairs showing the selected metric per chain over time.",
"parameters": [
{
- "name": "token",
+ "name": "protocol",
"in": "path",
- "description": "token slug",
"required": true,
+ "description": "protocol slug",
"schema": {
"type": "string",
- "example": "usdt"
+ "example": "euler"
+ }
+ },
+ {
+ "name": "key",
+ "in": "query",
+ "required": false,
+ "description": "Metric to return. Omit for default TVL. Use \"all\" for the sum of tvl+borrowed+staking+pool2+vesting, or a specific metric like \"staking\", \"borrowed\", \"vesting\", \"pool2\".",
+ "schema": {
+ "type": "string",
+ "enum": ["all", "staking", "borrowed", "vesting", "pool2"],
+ "example": "borrowed"
}
}
],
"responses": {
"200": {
- "description": "successful operation"
+ "description": "Array of [timestamp, chainBreakdown] pairs. Each entry is a two-element array: first element is a unix timestamp, second is an object mapping chain names to values.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "example": [
+ [
+ 1609459200,
+ {
+ "Ethereum": 3200000000,
+ "Polygon": 1500000000
+ }
+ ],
+ [
+ 1609545600,
+ {
+ "Ethereum": 3250000000,
+ "Polygon": 1520000000
+ }
+ ]
+ ]
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Protocol not found"
}
- },
- "x-api-plan-only": true
+ }
}
},
- "/api/overview/derivatives": {
+ "/api/v2/chart/tvl/protocol/{protocol}/token-breakdown": {
"get": {
- "tags": ["perps"],
- "summary": "Lists all derivatives along summaries of their volumes filtering by chain",
+ "tags": ["TVL"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get historical TVL chart for a protocol broken down by token",
+ "description": "Returns an array of [timestamp, { token: value }] pairs showing TVL per token over time. Values are in USD by default, set currency=tokens for raw token amounts.",
"parameters": [
{
- "name": "excludeTotalDataChart",
- "in": "query",
+ "name": "protocol",
+ "in": "path",
"required": true,
- "description": "true to exclude aggregated chart from response",
+ "description": "protocol slug",
"schema": {
- "type": "boolean",
- "example": true
+ "type": "string",
+ "example": "aave"
}
},
{
- "name": "excludeTotalDataChartBreakdown",
+ "name": "key",
+ "in": "query",
+ "required": false,
+ "description": "Metric to return. Omit for default TVL. Use \"all\" for the sum of tvl+borrowed+staking+pool2+vesting, or a specific metric like \"staking\", \"borrowed\", \"vesting\", \"pool2\".",
+ "schema": {
+ "type": "string",
+ "enum": ["all", "staking", "borrowed", "vesting", "pool2"]
+ }
+ },
+ {
+ "name": "currency",
"in": "query",
+ "required": false,
+ "description": "Set to \"tokens\" to return values denominated in raw token amounts instead of USD",
+ "schema": {
+ "type": "string",
+ "enum": ["usd", "token", "raw"],
+ "example": "usd"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, tokenBreakdown] pairs. Each entry is a two-element array: first element is a unix timestamp, second is an object mapping token names to values (USD by default, raw token amounts if currency=tokens).",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "example": [
+ [
+ 1609459200,
+ {
+ "USDC": 1000000000,
+ "USDT": 800000000,
+ "WETH": 500000000
+ }
+ ],
+ [
+ 1609545600,
+ {
+ "USDC": 1010000000,
+ "USDT": 810000000,
+ "WETH": 510000000
+ }
+ ]
+ ]
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Protocol not found"
+ }
+ }
+ }
+ },
+ "/coins/prices/current/{coins}": {
+ "get": {
+ "tags": ["coins"],
+ "summary": "Get current prices of tokens by contract address",
+ "description": "The goal of this API is to price as many tokens as possible, including exotic ones that never get traded, which makes them impossible to price by looking at markets.\n\nThe base of our data are prices pulled from coingecko, which is then extended through multiple means:\n- We price all bridged tokens by using the price of the token in it's original chain, so we fetch all bridged versions of USDC on arbitrum, fantom, avax... and price all them using the price for the token on Ethereum, which we know. Right now we support 10 different bridging protocols.\n- We have multiple adapters to price specialized sets of tokens by running custom code:\n - We price yearn's yToken LPs by checking how much underlying token can be withdrawn for each LP\n - Aave, compound and euler LP tokens are also priced based on their relationship against underlying tokens\n - Uniswap, curve, balancer and stargate LPs are priced using the underlying tokens in each pair\n - GMX's GLP token is priced based on the value of tokens given on withdrawal (which includes calculations based on trader's PnL)\n \n - Synthetix tokens are priced using forex prices of the coin they are pegged to\n- For tokens that we haven't been able to price in any other way, we find the pool with most liquidity for each on uniswap, curve and serum and then use the prices provided on those exchanges.\n \n Unlike all the other tokens, we can't confirm that these prices are correct, so we only ingest the ones that have sufficient liquidity and, even in that case, we attach a `confidence` value to them that is related to the depth of liquidity and which represents our confidence in the quality of each price. API consumers can choose to filter out prices with low confidence values.\n \n Our API server is fully open source and we are constantly adding more pricing adapters, extending the amount of tokens we support.\n \nTokens are queried using {chain}:{address}, where chain is an identifier such as ethereum, bsc, polygon, avax... You can also get tokens by coingecko id by setting `coingecko` as the chain, eg: coingecko:ethereum, coingecko:bitcoin. Examples:\n - ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1\n - bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878\n - coingecko:ethereum\n - arbitrum:0x4277f8f2c384827b5273592ff7cebd9f2c1ac258\n",
+ "parameters": [
+ {
+ "name": "coins",
+ "in": "path",
"required": true,
- "description": "true to exclude broken down chart from response",
+ "description": "set of comma-separated tokens defined as {chain}:{address}",
"schema": {
- "type": "boolean",
- "example": true
+ "type": "string",
+ "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
}
}
],
@@ -1819,410 +1604,463 @@
"schema": {
"type": "object",
"properties": {
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "items": [
- {
- "type": "integer",
- "description": "Timestamp"
- },
- {
- "type": "number",
- "description": "Volume value"
- }
- ]
- },
- "description": "Total data chart with timestamps and volumes"
- },
- "totalDataChartBreakdown": {
- "type": "array",
- "items": {
- "type": "array",
- "items": [
- {
- "type": "integer",
- "description": "Timestamp"
- },
- {
- "type": "object",
- "description": "Protocol breakdown"
+ "coins": {
+ "type": "object",
+ "properties": {
+ "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
+ "type": "object",
+ "required": ["price", "symbol", "timestamp"],
+ "properties": {
+ "decimals": {
+ "type": "number",
+ "description": "Token decimals. Omitted for coingecko-native assets (e.g. coingecko:ethereum).",
+ "example": 8
+ },
+ "price": {
+ "type": "number",
+ "example": 0.022053735051098835
+ },
+ "symbol": {
+ "type": "string",
+ "example": "cDAI"
+ },
+ "timestamp": {
+ "type": "number",
+ "example": 0.99
+ },
+ "confidence": {
+ "type": "number",
+ "description": "Confidence score between 0 and 1 indicating the reliability of the price.",
+ "example": 0.99
+ }
}
- ]
- },
- "description": "Total data chart breakdown by protocol"
- },
- "breakdown24h": {
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "502": {
+ "description": "Internal error"
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.prices.getCurrentPrices([''])"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.prices.getCurrentPrices([''])"
+ }
+ ]
+ }
+ },
+ "/coins/prices/historical/{timestamp}/{coins}": {
+ "get": {
+ "tags": ["coins"],
+ "summary": "Get historical prices of tokens by contract address",
+ "description": "See /prices/current for explanation on how prices are sourced.",
+ "parameters": [
+ {
+ "name": "coins",
+ "in": "path",
+ "required": true,
+ "description": "set of comma-separated tokens defined as {chain}:{address}",
+ "schema": {
+ "type": "string",
+ "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
+ }
+ },
+ {
+ "name": "timestamp",
+ "in": "path",
+ "required": true,
+ "description": "UNIX timestamp of time when you want historical prices",
+ "schema": {
+ "type": "number",
+ "example": 1648680149
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "coins": {
"type": "object",
- "nullable": true,
- "description": "24 hour breakdown"
- },
- "breakdown30d": {
+ "properties": {
+ "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
+ "type": "object",
+ "required": ["price", "symbol", "timestamp"],
+ "properties": {
+ "decimals": {
+ "type": "number",
+ "description": "Token decimals. Omitted for coingecko-native assets (e.g. coingecko:ethereum).",
+ "example": 8
+ },
+ "price": {
+ "type": "number",
+ "example": 0.022053735051098835
+ },
+ "symbol": {
+ "type": "string",
+ "example": "cDAI"
+ },
+ "timestamp": {
+ "type": "number",
+ "example": 1648680149
+ },
+ "confidence": {
+ "type": "number",
+ "description": "Confidence score between 0 and 1 indicating the reliability of the price.",
+ "example": 0.99
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "502": {
+ "description": "Internal error"
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.prices.getHistoricalPrices(1704067200, [''])"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.prices.getHistoricalPrices(1704067200, [''])"
+ }
+ ]
+ }
+ },
+ "/coins/batchHistorical": {
+ "get": {
+ "tags": ["coins"],
+ "summary": "Get historical prices for multiple tokens at multiple different timestamps",
+ "parameters": [
+ {
+ "name": "coins",
+ "in": "query",
+ "required": true,
+ "description": "object where keys are coins in the form {chain}:{address}, and values are arrays of requested timestamps",
+ "schema": {
+ "type": "string",
+ "example": "{\"avax:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e\": [1666876743, 1666862343], \"coingecko:ethereum\": [1666869543, 1666862343]}\n"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "coins": {
"type": "object",
- "nullable": true,
- "description": "30 day breakdown"
- },
- "chain": {
- "type": "string",
- "nullable": true,
- "description": "Chain filter"
- },
- "allChains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "All available chains"
- },
- "total24h": {
- "type": "number",
- "description": "Total 24 hour volume"
- },
- "total48hto24h": {
- "type": "number",
- "description": "Total 48h to 24h volume"
- },
- "total7d": {
- "type": "number",
- "description": "Total 7 day volume"
- },
- "total14dto7d": {
- "type": "number",
- "description": "Total 14d to 7d volume"
- },
- "total60dto30d": {
- "type": "number",
- "description": "Total 60d to 30d volume"
- },
- "total30d": {
- "type": "number",
- "description": "Total 30 day volume"
- },
- "total1y": {
- "type": "number",
- "description": "Total 1 year volume"
- },
- "change_1d": {
- "type": "number",
- "description": "1 day change percentage"
- },
- "change_7d": {
- "type": "number",
- "description": "7 day change percentage"
- },
- "change_1m": {
- "type": "number",
- "description": "1 month change percentage"
- },
- "change_7dover7d": {
- "type": "number",
- "description": "7d over 7d change percentage"
- },
- "change_30dover30d": {
- "type": "number",
- "description": "30d over 30d change percentage"
- },
- "total7DaysAgo": {
- "type": "number",
- "description": "Total volume 7 days ago"
- },
- "total30DaysAgo": {
- "type": "number",
- "description": "Total volume 30 days ago"
- },
- "totalAllTime": {
- "type": "number",
- "description": "Total all time volume"
- },
- "protocols": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "total24h": {
- "type": "number",
- "description": "Protocol 24 hour volume"
- },
- "total48hto24h": {
- "type": "number",
- "description": "Protocol 48h to 24h volume"
- },
- "total7d": {
- "type": "number",
- "description": "Protocol 7 day volume"
- },
- "total14dto7d": {
- "type": "number",
- "description": "Protocol 14d to 7d volume"
- },
- "total60dto30d": {
- "type": "number",
- "description": "Protocol 60d to 30d volume"
- },
- "total30d": {
- "type": "number",
- "description": "Protocol 30 day volume"
- },
- "total1y": {
- "type": "number",
- "description": "Protocol 1 year volume"
- },
- "totalAllTime": {
- "type": "number",
- "description": "Protocol all time volume"
- },
- "average1y": {
- "type": "number",
- "description": "Protocol average 1 year volume"
- },
- "change_1d": {
- "type": "number",
- "description": "Protocol 1 day change percentage"
- },
- "change_7d": {
- "type": "number",
- "description": "Protocol 7 day change percentage"
- },
- "change_1m": {
- "type": "number",
- "description": "Protocol 1 month change percentage"
- },
- "change_7dover7d": {
- "type": "number",
- "description": "Protocol 7d over 7d change percentage"
- },
- "change_30dover30d": {
- "type": "number",
- "description": "Protocol 30d over 30d change percentage"
- },
- "breakdown24h": {
- "type": "object",
- "description": "Protocol 24 hour breakdown"
- },
- "breakdown30d": {
- "type": "object",
- "description": "Protocol 30 day breakdown"
- },
- "total7DaysAgo": {
- "type": "number",
- "description": "Protocol volume 7 days ago"
- },
- "total30DaysAgo": {
- "type": "number",
- "description": "Protocol volume 30 days ago"
- },
- "defillamaId": {
- "type": "string",
- "description": "DefiLlama protocol ID"
- },
- "name": {
- "type": "string",
- "description": "Protocol name"
- },
- "displayName": {
- "type": "string",
- "description": "Protocol display name"
- },
- "module": {
- "type": "string",
- "description": "Protocol module"
- },
- "category": {
- "type": "string",
- "description": "Protocol category"
- },
- "logo": {
- "type": "string",
- "description": "Protocol logo URL"
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "Protocol chains"
- },
- "protocolType": {
- "type": "string",
- "description": "Protocol type"
- },
- "methodologyURL": {
- "type": "string",
- "description": "Methodology URL"
- },
- "methodology": {
- "type": "object",
- "description": "Methodology details"
- },
- "latestFetchIsOk": {
- "type": "boolean",
- "description": "Latest fetch status"
- },
- "parentProtocol": {
- "type": "string",
- "description": "Parent protocol"
- },
- "slug": {
- "type": "string",
- "description": "Protocol slug"
- },
- "linkedProtocols": {
- "type": "array",
- "items": {
- "type": "string"
+ "properties": {
+ "avax:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e": {
+ "type": "object",
+ "properties": {
+ "symbol": {
+ "type": "string",
+ "example": "USDC"
},
- "description": "Linked protocols"
- },
- "id": {
- "type": "string",
- "description": "Protocol ID"
+ "prices": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number",
+ "example": 1666876674
+ },
+ "price": {
+ "type": "number",
+ "example": 0.999436
+ },
+ "confidence": {
+ "type": "number",
+ "example": 0.99
+ }
+ }
+ }
+ }
}
}
- },
- "description": "List of protocols"
+ }
}
}
- },
- "example": {
- "totalDataChart": [[1614211200, 24949], [1614297600, 103833], [1614384000, 49317]],
- "totalDataChartBreakdown": [
- [
- 1614211200,
- {
- "dYdX V3": 24949
- }
- ],
- [
- 1614297600,
- {
- "dYdX V3": 103833
- }
- ]
- ],
- "breakdown24h": null,
- "breakdown30d": null,
- "chain": null,
- "allChains": ["Hyperliquid L1", "Solana", "Ethereum", "Arbitrum"],
- "total24h": 23537303133,
- "total48hto24h": 20741840211,
- "total7d": 125290755214,
- "total14dto7d": 71055642206,
- "total60dto30d": 397917690387,
- "total30d": 383278222548,
- "total1y": 3515064792266,
- "change_1d": 13.48,
- "change_7d": 40.49,
- "change_1m": 35.06,
- "change_7dover7d": 76.33,
- "change_30dover30d": -3.68,
- "total7DaysAgo": 16753244737,
- "total30DaysAgo": 17427351125,
- "totalAllTime": 6567303144819,
- "protocols": [
- {
- "total24h": 8479946,
- "total48hto24h": 3440780,
- "total7d": 78424631,
- "total14dto7d": 60033358,
- "total60dto30d": 92505218,
- "total30d": 166435382,
- "total1y": 9698297388,
- "totalAllTime": 55654843707,
- "average1y": 26865089.717451524,
- "change_1d": 146.45,
- "change_7d": -55.7,
- "change_1m": 1226.98,
- "change_7dover7d": 30.64,
- "change_30dover30d": 79.92,
- "breakdown24h": {
- "optimism": {
- "Synthetix v1+v2": 3547540
- }
- },
- "breakdown30d": {
- "optimism": {
- "Synthetix v1+v2": 166435382
- }
- },
- "total7DaysAgo": 19143749,
- "total30DaysAgo": 639043,
- "defillamaId": "115",
- "name": "Synthetix v1+v2",
- "displayName": "Synthetix v1+v2",
- "module": "synthetix",
- "category": "Synthetics",
- "logo": "https://icons.llamao.fi/icons/protocols/synthetix.png",
- "chains": ["OP Mainnet"],
- "protocolType": "protocol",
- "methodologyURL": "https://github.com/DefiLlama/dimension-adapters/blob/master/dexs/synthetix",
- "methodology": {
- "UserFees": "Fees paid by users",
- "Fees": "Fees paid by users",
- "Revenue": "Fees paid by users",
- "ProtocolRevenue": "Percentage of fees going to treasury",
- "SupplySideRevenue": "LPs revenue"
- },
- "latestFetchIsOk": true,
- "parentProtocol": "parent#synthetix",
- "slug": "synthetix-v1+v2",
- "linkedProtocols": ["Synthetix", "Synthetix v1+v2", "Synthetix V3"],
- "id": "115"
- }
- ]
}
}
}
+ },
+ "502": {
+ "description": "Internal error"
}
},
- "x-api-plan-only": true,
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await proClient.volumes.getDerivativesOverview()"
+ "source": "const result = await client.prices.getBatchHistoricalPrices({ '': [1704067200] })"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = pro_client.volumes.getDerivativesOverview()"
+ "source": "result = client.prices.getBatchHistoricalPrices([''], '')"
}
]
}
},
- "/api/summary/derivatives/{protocol}": {
+ "/coins/chart/{coins}": {
"get": {
- "tags": ["perps"],
- "summary": "Volume Details about a specific perp protocol",
+ "tags": ["coins"],
+ "summary": "Get token prices at regular time intervals",
+ "description": "Strings accepted by period:\nCan use regular chart candle notion like '4h' etc where:\nW = week, D = day, H = hour, M = minute (not case sensitive)\n",
"parameters": [
{
- "name": "protocol",
+ "name": "coins",
"in": "path",
"required": true,
- "description": "protocol slug",
+ "description": "set of comma-separated tokens defined as {chain}:{address}",
"schema": {
"type": "string",
- "example": "hyperliquid"
+ "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
}
},
{
- "name": "excludeTotalDataChart",
+ "name": "start",
+ "in": "query",
+ "required": false,
+ "description": "unix timestamp of earliest data point requested",
+ "schema": {
+ "type": "number",
+ "example": 1664364537
+ }
+ },
+ {
+ "name": "end",
+ "in": "query",
+ "required": false,
+ "description": "unix timestamp of latest data point requested",
+ "schema": {
+ "type": "number",
+ "example": null
+ }
+ },
+ {
+ "name": "span",
+ "in": "query",
+ "required": false,
+ "description": "number of data points returned, defaults to 0",
+ "schema": {
+ "type": "number",
+ "example": 10
+ }
+ },
+ {
+ "name": "period",
"in": "query",
+ "required": false,
+ "description": "duration between data points, defaults to 24 hours",
+ "schema": {
+ "type": "string",
+ "example": "2d"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "coins": {
+ "type": "object",
+ "properties": {
+ "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
+ "type": "object",
+ "required": ["confidence", "prices", "symbol"],
+ "properties": {
+ "decimals": {
+ "type": "number",
+ "description": "Token decimals. Omitted for coingecko-native assets (e.g. coingecko:ethereum).",
+ "example": 8
+ },
+ "confidence": {
+ "type": "number",
+ "description": "Confidence score between 0 and 1 indicating the reliability of the price.",
+ "example": 0.99
+ },
+ "prices": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number",
+ "example": 1666790570
+ },
+ "price": {
+ "type": "number",
+ "example": 0.984519
+ }
+ }
+ }
+ },
+ "symbol": {
+ "type": "string",
+ "example": "HUSD"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "502": {
+ "description": "Internal error"
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.prices.getChart([''])"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.prices.getChart([''])"
+ }
+ ]
+ }
+ },
+ "/coins/percentage/{coins}": {
+ "get": {
+ "tags": ["coins"],
+ "summary": "Get percentage change in price over time",
+ "description": "Strings accepted by period:\nCan use regular chart candle notion like '4h' etc where:\nW = week, D = day, H = hour, M = minute (not case sensitive)\n",
+ "parameters": [
+ {
+ "name": "coins",
+ "in": "path",
"required": true,
- "description": "true to exclude aggregated chart from response",
+ "description": "set of comma-separated tokens defined as {chain}:{address}",
+ "schema": {
+ "type": "string",
+ "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
+ }
+ },
+ {
+ "name": "timestamp",
+ "in": "query",
+ "required": false,
+ "description": "timestamp of data point requested, defaults to time now",
+ "schema": {
+ "type": "number",
+ "example": 1664364537
+ }
+ },
+ {
+ "name": "lookForward",
+ "in": "query",
+ "required": false,
+ "description": "whether you want the duration after your given timestamp or not, defaults to false (looking back)",
"schema": {
"type": "boolean",
- "example": true
+ "example": false
}
},
{
- "name": "excludeTotalDataChartBreakdown",
+ "name": "period",
"in": "query",
+ "required": false,
+ "description": "duration between data points, defaults to 24 hours",
+ "schema": {
+ "type": "string",
+ "example": "3w"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "coins": {
+ "type": "object",
+ "properties": {
+ "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
+ "type": "number",
+ "example": -2.3009954568977147
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "502": {
+ "description": "Internal error"
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.prices.getPercentageChange([''])"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.prices.getPercentageChange([''])"
+ }
+ ]
+ }
+ },
+ "/coins/prices/first/{coins}": {
+ "get": {
+ "tags": ["coins"],
+ "summary": "Get earliest timestamp price record for coins",
+ "parameters": [
+ {
+ "name": "coins",
+ "in": "path",
"required": true,
- "description": "true to exclude broken down chart from response",
+ "description": "set of comma-separated tokens defined as {chain}:{address}",
"schema": {
- "type": "boolean",
- "example": true
+ "type": "string",
+ "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
}
}
],
@@ -2234,480 +2072,206 @@
"schema": {
"type": "object",
"properties": {
- "id": {
- "type": "string",
- "description": "Protocol ID"
- },
- "name": {
- "type": "string",
- "description": "Protocol name"
- },
- "url": {
- "type": "string",
- "description": "Protocol URL"
- },
- "referralUrl": {
- "type": "string",
- "description": "Referral URL"
- },
- "description": {
- "type": "string",
- "description": "Protocol description"
- },
- "logo": {
- "type": "string",
- "description": "Protocol logo URL"
- },
- "gecko_id": {
- "type": "string",
- "description": "CoinGecko ID"
- },
- "cmcId": {
- "type": "string",
- "description": "CoinMarketCap ID"
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "Supported chains"
- },
- "twitter": {
- "type": "string",
- "description": "Twitter handle"
- },
- "github": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "GitHub repositories"
- },
- "symbol": {
- "type": "string",
- "description": "Token symbol"
- },
- "address": {
- "type": "string",
- "description": "Protocol address"
- },
- "childProtocols": {
- "type": "array",
- "items": {
- "type": "object"
- },
- "description": "Child protocols"
- },
- "linkedProtocols": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "Linked protocols"
- },
- "defillamaId": {
- "type": "string",
- "description": "DefiLlama protocol ID"
- },
- "disabled": {
- "type": "boolean",
- "nullable": true,
- "description": "Whether protocol is disabled"
- },
- "displayName": {
- "type": "string",
- "description": "Display name"
- },
- "module": {
- "type": "string",
- "nullable": true,
- "description": "Module name"
- },
- "category": {
- "type": "string",
- "nullable": true,
- "description": "Protocol category"
- },
- "methodologyURL": {
- "type": "string",
- "nullable": true,
- "description": "Methodology URL"
- },
- "methodology": {
+ "coins": {
"type": "object",
- "nullable": true,
- "description": "Methodology details"
- },
- "forkedFrom": {
- "type": "string",
- "nullable": true,
- "description": "Forked from protocol"
- },
- "audits": {
- "type": "array",
- "nullable": true,
- "description": "Audit information"
- },
- "audit_links": {
- "type": "array",
- "nullable": true,
- "description": "Audit links"
- },
- "versionKey": {
- "type": "string",
- "nullable": true,
- "description": "Version key"
- },
- "governanceID": {
- "type": "string",
- "nullable": true,
- "description": "Governance ID"
- },
- "treasury": {
- "type": "string",
- "nullable": true,
- "description": "Treasury address"
- },
- "parentProtocol": {
- "type": "string",
- "nullable": true,
- "description": "Parent protocol"
- },
- "previousNames": {
- "type": "array",
- "nullable": true,
- "description": "Previous names"
- },
- "latestFetchIsOk": {
- "type": "boolean",
- "description": "Latest fetch status"
- },
- "slug": {
- "type": "string",
- "description": "Protocol slug"
- },
- "protocolType": {
- "type": "string",
- "description": "Protocol type"
- },
- "total24h": {
- "type": "number",
- "description": "24 hour volume"
- },
- "total48hto24h": {
- "type": "number",
- "description": "48h to 24h volume"
- },
- "total7d": {
- "type": "number",
- "description": "7 day volume"
- },
- "totalAllTime": {
- "type": "number",
- "description": "All time volume"
- },
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "items": [
- {
- "type": "integer",
- "description": "Timestamp"
- },
- {
- "type": "number",
- "description": "Volume value"
- }
- ]
- },
- "description": "Total data chart with timestamps and volumes"
- },
- "totalDataChartBreakdown": {
- "type": "array",
- "items": {
- "type": "array",
- "items": [
- {
- "type": "integer",
- "description": "Timestamp"
- },
- {
- "type": "object",
- "description": "Chain and protocol breakdown"
+ "properties": {
+ "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
+ "type": "object",
+ "properties": {
+ "price": {
+ "type": "number",
+ "example": 0.9992047673109988
+ },
+ "symbol": {
+ "type": "string",
+ "example": "HUSD"
+ },
+ "timestamp": {
+ "type": "number",
+ "example": 1568883821
+ }
}
- ]
- },
- "description": "Total data chart breakdown by chain and protocol"
- },
- "change_1d": {
- "type": "number",
- "description": "1 day change percentage"
+ }
+ }
}
}
- },
- "example": {
- "id": "parent#hyperliquid",
- "name": "Hyperliquid",
- "url": "https://hyperliquid.xyz",
- "referralUrl": "https://app.hyperliquid.xyz/join/DEFILLAMAO",
- "description": "Hyperliquid is a decentralized perpetual exchange with best-in-class speed, liquidity, and price",
- "logo": "https://icons.llama.fi/hyperliquid.png",
- "gecko_id": "hyperliquid",
- "cmcId": "32196",
- "chains": ["Hyperliquid L1"],
- "twitter": "HyperliquidX",
- "github": ["hyperliquid-dex"],
- "symbol": "HYPE",
- "address": "hyperliquid:0x0d01dc56dcaaca66ad901c959b4011ec",
- "childProtocols": [{}],
- "linkedProtocols": ["Hyperliquid", "Hyperliquid Perps"],
- "defillamaId": "parent#hyperliquid",
- "disabled": null,
- "displayName": "Hyperliquid",
- "module": null,
- "category": null,
- "methodologyURL": null,
- "methodology": null,
- "forkedFrom": null,
- "audits": null,
- "audit_links": null,
- "versionKey": null,
- "governanceID": null,
- "treasury": null,
- "parentProtocol": null,
- "previousNames": null,
- "latestFetchIsOk": true,
- "slug": "hyperliquid",
- "protocolType": "protocol",
- "total24h": 16946528076,
- "total48hto24h": 14792562336,
- "total7d": 86747987334,
- "totalAllTime": 2003035982525,
- "totalDataChart": [[1752710400, 16946528076], [1752796800, 21220070880]],
- "totalDataChartBreakdown": [
- [
- 1752710400,
- {
- "Hyperliquid L1": {
- "Hyperliquid Perps": 16946528076
- }
- }
- ],
- [
- 1752796800,
- {
- "Hyperliquid L1": {
- "Hyperliquid Perps": 21220070880
- }
- }
- ]
- ],
- "change_1d": 14.56
}
}
}
+ },
+ "502": {
+ "description": "Internal error"
}
},
- "x-api-plan-only": true,
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await proClient.volumes.getDerivativesSummary('')"
+ "source": "const result = await client.prices.getFirstPrices([''])"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = pro_client.volumes.getDerivativesSummary('')"
+ "source": "result = client.prices.getFirstPrices([''])"
}
]
}
},
- "/api/protocols": {
+ "/coins/block/{chain}/{timestamp}": {
"get": {
- "tags": ["TVL"],
- "summary": "List all protocols on defillama along with their tvl",
+ "tags": ["coins"],
+ "summary": "Get the closest block to a timestamp",
+ "description": "Runs binary search over a blockchain's blocks to get the closest one to a timestamp.\nEvery time this is run we add new data to our database, so each query permanently speeds up future queries.\n",
+ "parameters": [
+ {
+ "name": "chain",
+ "in": "path",
+ "description": "Chain which you want to get the block from",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "Ethereum"
+ }
+ },
+ {
+ "name": "timestamp",
+ "in": "path",
+ "description": "UNIX timestamp of the block you are searching for",
+ "required": true,
+ "schema": {
+ "type": "integer",
+ "example": 1603964988
+ }
+ }
+ ],
"responses": {
"200": {
- "description": "Array of all protocols with their TVL data",
+ "description": "successful operation",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "example": "2269"
- },
- "name": {
- "type": "string",
- "example": "Aave"
- },
- "symbol": {
- "type": "string",
- "example": "AAVE"
- },
- "category": {
- "type": "string",
- "example": "Lending"
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Ethereum", "Polygon"]
- },
- "tvl": {
- "type": "number",
- "nullable": true,
- "example": 5200000000
- },
- "chainTvls": {
- "type": "object",
- "additionalProperties": {
- "type": "number"
- },
- "example": {
- "Ethereum": 3200000000,
- "Polygon": 2000000000
- }
- },
- "change_1d": {
- "type": "number",
- "nullable": true,
- "example": 2.1
- },
- "change_7d": {
- "type": "number",
- "nullable": true,
- "example": -5.3
- }
+ "type": "object",
+ "properties": {
+ "height": {
+ "type": "integer",
+ "format": "uint",
+ "example": 11150916
+ },
+ "timestamp": {
+ "type": "integer",
+ "format": "uint",
+ "example": 1603964988
}
}
}
}
}
+ },
+ "400": {
+ "description": "Invalid chain or timestamp provided"
}
},
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.tvl.getProtocols()"
+ "source": "const result = await client.prices.getBlockAtTimestamp('', 1704067200)"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.tvl.getProtocols()"
+ "source": "result = client.prices.getBlockAtTimestamp('', 1704067200)"
}
]
}
},
- "/api/protocol/{protocol}": {
+ "/stablecoins/stablecoins": {
"get": {
- "tags": ["TVL"],
- "summary": "Get historical TVL of a protocol and breakdowns by token and chain",
+ "tags": ["stablecoins"],
+ "summary": "List all stablecoins along with their circulating amounts",
+ "description": "**Response:** `peggedAssets[]`. Each asset's supply is nested in `circulating` under its `pegType`: `circulating.peggedUSD` for USD-pegged coins, `circulating.peggedEUR` for EURC, and so on. Read `circulating[asset.pegType]`. `price` is the USD price of one coin, or `null` when there is no quote (many assets). Compute the USD value as `circulating[asset.pegType] * price` only when `price` is a number. Otherwise the USD value is unavailable, not zero.",
"parameters": [
{
- "name": "protocol",
- "in": "path",
- "description": "protocol slug",
- "required": true,
+ "name": "includePrices",
+ "in": "query",
+ "required": false,
+ "description": "set whether to include current stablecoin prices",
"schema": {
- "type": "string",
- "example": "aave"
+ "type": "boolean",
+ "example": true
}
}
],
"responses": {
"200": {
- "description": "Protocol details with historical TVL data and chain breakdowns",
+ "description": "Array of all stablecoins with their circulation data",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "id": {
- "type": "string",
- "example": "parent#aave"
- },
- "name": {
- "type": "string",
- "example": "AAVE"
- },
- "symbol": {
- "type": "string",
- "example": "AAVE"
- },
- "category": {
- "type": "string",
- "example": "Lending"
- },
- "chains": {
+ "peggedAssets": {
"type": "array",
"items": {
- "type": "string"
- },
- "example": ["Ethereum", "Polygon", "Avalanche"]
- },
- "currentChainTvls": {
- "type": "object",
- "additionalProperties": {
- "type": "number"
- },
- "example": {
- "Ethereum": 3200000000,
- "Polygon": 1500000000
- }
- },
- "chainTvls": {
- "type": "object",
- "additionalProperties": {
"type": "object",
"properties": {
- "tvl": {
+ "id": {
+ "type": "string",
+ "example": "1"
+ },
+ "name": {
+ "type": "string",
+ "example": "Tether"
+ },
+ "symbol": {
+ "type": "string",
+ "example": "USDT"
+ },
+ "pegType": {
+ "type": "string",
+ "example": "peggedUSD"
+ },
+ "pegMechanism": {
+ "type": "string",
+ "example": "fiat-backed"
+ },
+ "circulating": {
+ "type": "object",
+ "properties": {
+ "peggedUSD": {
+ "type": "number",
+ "example": 159510682147.76874
+ }
+ }
+ },
+ "chains": {
"type": "array",
"items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Tron", "BSC"]
+ },
+ "chainCirculating": {
+ "type": "object",
+ "additionalProperties": {
"type": "object",
"properties": {
- "date": {
- "type": "number",
- "example": 1609459200
- },
- "totalLiquidityUSD": {
- "type": "number",
- "example": 1000000
+ "current": {
+ "type": "object",
+ "properties": {
+ "peggedUSD": {
+ "type": "number",
+ "example": 50000000000
+ }
+ }
}
}
}
},
- "tokens": {
- "type": "array",
+ "price": {
+ "type": "number",
"nullable": true,
- "items": {
- "type": "object",
- "properties": {
- "date": {
- "type": "number",
- "example": 1609459200
- },
- "tokens": {
- "type": "object",
- "additionalProperties": {
- "type": "number"
- },
- "example": {
- "USDC": 1000000,
- "USDT": 800000
- }
- }
- }
- }
+ "example": 1.001
}
}
}
@@ -2716,32 +2280,41 @@
}
}
}
- },
- "404": {
- "description": "Protocol not found"
}
},
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.tvl.getProtocol('')"
+ "source": "const result = await client.stablecoins.getStablecoins()"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.tvl.getProtocol('')"
+ "source": "result = client.stablecoins.getStablecoins()"
}
]
}
},
- "/api/v2/historicalChainTvl": {
+ "/stablecoins/stablecoincharts/all": {
"get": {
- "tags": ["TVL"],
- "summary": "Get historical TVL (excludes liquid staking and double counted tvl) of DeFi on all chains",
+ "tags": ["stablecoins"],
+ "summary": "Get historical mcap sum of all stablecoins",
+ "parameters": [
+ {
+ "name": "stablecoin",
+ "in": "query",
+ "required": false,
+ "description": "stablecoin ID, you can get these from /stablecoins",
+ "schema": {
+ "type": "integer",
+ "example": 1
+ }
+ }
+ ],
"responses": {
"200": {
- "description": "Historical TVL data for all chains combined",
+ "description": "Historical market cap data for all stablecoins",
"content": {
"application/json": {
"schema": {
@@ -2750,14 +2323,18 @@
"type": "object",
"properties": {
"date": {
- "type": "number",
- "description": "Unix timestamp",
- "example": 1609459200
+ "type": "string",
+ "description": "Unix timestamp in seconds, as a string",
+ "example": "1609459200"
},
- "tvl": {
- "type": "number",
- "description": "Total Value Locked in USD across all chains",
- "example": 15000000000
+ "totalCirculating": {
+ "type": "object",
+ "properties": {
+ "peggedUSD": {
+ "type": "number",
+ "example": 45000000000
+ }
+ }
}
}
}
@@ -2770,20 +2347,20 @@
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.tvl.getHistoricalChainTvl()"
+ "source": "const result = await client.stablecoins.getAllCharts()"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.tvl.getHistoricalChainTvl()"
+ "source": "result = client.stablecoins.getAllCharts()"
}
]
}
},
- "/api/v2/historicalChainTvl/{chain}": {
+ "/stablecoins/stablecoincharts/{chain}": {
"get": {
- "tags": ["TVL"],
- "summary": "Get historical TVL (excludes liquid staking and double counted tvl) of a chain",
+ "tags": ["stablecoins"],
+ "summary": "Get historical mcap sum of all stablecoins in a chain",
"parameters": [
{
"name": "chain",
@@ -2794,11 +2371,21 @@
"type": "string",
"example": "Ethereum"
}
+ },
+ {
+ "name": "stablecoin",
+ "in": "query",
+ "required": false,
+ "description": "stablecoin ID, you can get these from /stablecoins",
+ "schema": {
+ "type": "integer",
+ "example": 1
+ }
}
],
"responses": {
"200": {
- "description": "Historical TVL data for the specified chain",
+ "description": "Historical market cap data for stablecoins on specified chain",
"content": {
"application/json": {
"schema": {
@@ -2807,94 +2394,138 @@
"type": "object",
"properties": {
"date": {
- "type": "number",
- "description": "Unix timestamp",
- "example": 1609459200
+ "type": "string",
+ "description": "Unix timestamp in seconds, as a string",
+ "example": "1609459200"
},
- "tvl": {
- "type": "number",
- "description": "Total Value Locked in USD for this chain",
- "example": 45000000000
+ "totalCirculating": {
+ "type": "object",
+ "properties": {
+ "peggedUSD": {
+ "type": "number",
+ "example": 12000000000
+ }
+ }
}
}
}
}
}
}
- },
- "404": {
- "description": "Chain not found"
}
},
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.tvl.getHistoricalChainTvl('')"
+ "source": "const result = await client.stablecoins.getChartsByChain('')"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.tvl.getHistoricalChainTvl()"
+ "source": "result = client.stablecoins.getChartsByChain('')"
}
]
}
},
- "/api/tvl/{protocol}": {
+ "/stablecoins/stablecoin/{asset}": {
"get": {
- "tags": ["TVL"],
- "summary": "Simplified endpoint to get current TVL of a protocol",
- "description": "Simplified endpoint that only returns a number, the current TVL of a protocol",
+ "tags": ["stablecoins"],
+ "summary": "Get historical mcap and historical chain distribution of a stablecoin",
"parameters": [
{
- "name": "protocol",
+ "name": "asset",
"in": "path",
"required": true,
- "description": "protocol slug",
+ "description": "stablecoin ID, you can get these from /stablecoins",
"schema": {
- "type": "string",
- "example": "uniswap"
+ "type": "integer",
+ "example": 1
}
}
],
"responses": {
"200": {
- "description": "Current TVL of the protocol in USD",
+ "description": "Historical market cap and chain distribution for specific stablecoin",
"content": {
"application/json": {
"schema": {
- "type": "number",
- "description": "Total Value Locked in USD",
- "example": 4962012809.795062
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "example": "1"
+ },
+ "name": {
+ "type": "string",
+ "example": "Tether"
+ },
+ "symbol": {
+ "type": "string",
+ "example": "USDT"
+ },
+ "totalCirculating": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "number",
+ "example": 1609459200
+ },
+ "totalCirculating": {
+ "type": "number",
+ "example": 50000000000
+ }
+ }
+ }
+ },
+ "chainCirculating": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "number",
+ "example": 1609459200
+ },
+ "circulating": {
+ "type": "number",
+ "example": 20000000000
+ }
+ }
+ }
+ }
+ }
+ }
}
}
}
- },
- "404": {
- "description": "Protocol not found"
}
},
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.tvl.getTvl('')"
+ "source": "const result = await client.stablecoins.getStablecoin('')"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.tvl.getTvl('')"
+ "source": "result = client.stablecoins.getStablecoin('')"
}
]
}
},
- "/api/v2/chains": {
+ "/stablecoins/stablecoinchains": {
"get": {
- "tags": ["TVL"],
- "summary": "Get current TVL of all chains",
+ "tags": ["stablecoins"],
+ "summary": "Get current mcap sum of all stablecoins on each chain",
"responses": {
"200": {
- "description": "Array of all chains with their TVL data",
+ "description": "Current market cap of stablecoins by chain",
"content": {
"application/json": {
"schema": {
@@ -2902,39 +2533,19 @@
"items": {
"type": "object",
"properties": {
- "gecko_id": {
- "type": "string",
- "nullable": true,
- "description": "CoinGecko ID for the chain's native token",
- "example": "ethereum"
- },
- "tvl": {
- "type": "number",
- "description": "Total Value Locked in USD",
- "example": 65998652431.40251
- },
- "tokenSymbol": {
- "type": "string",
- "nullable": true,
- "description": "Native token symbol",
- "example": "ETH"
- },
- "cmcId": {
- "type": "string",
- "nullable": true,
- "description": "CoinMarketCap ID",
- "example": "1027"
- },
"name": {
"type": "string",
- "description": "Chain name",
"example": "Ethereum"
},
- "chainId": {
- "type": "number",
- "nullable": true,
- "description": "Chain ID number",
- "example": 1
+ "totalCirculatingUSD": {
+ "type": "object",
+ "description": "Circulating supply in USD, by peg type",
+ "additionalProperties": {
+ "type": "number"
+ },
+ "example": {
+ "peggedUSD": 75000000000
+ }
}
}
}
@@ -2947,1280 +2558,461 @@
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.tvl.getChains()"
+ "source": "const result = await client.stablecoins.getChains()"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.tvl.getChains()"
+ "source": "result = client.stablecoins.getChains()"
}
]
}
},
- "/api/v2/metrics/tvl/protocol/{protocol}": {
+ "/stablecoins/stablecoinprices": {
"get": {
- "tags": ["TVL"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get aggregate TVL metrics for a protocol",
- "description": "Returns protocol metadata along with current TVL figures, chain breakdowns, and other aggregate metrics.",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug",
- "schema": {
- "type": "string",
- "example": "aave"
- }
- }
- ],
+ "tags": ["stablecoins"],
+ "summary": "Get historical prices of all stablecoins",
"responses": {
"200": {
- "description": "Protocol TVL metrics",
+ "description": "Historical prices for all stablecoins",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "example": "parent#aave"
- },
- "name": {
- "type": "string",
- "example": "Aave"
- },
- "address": {
- "type": "string",
- "nullable": true,
- "example": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
- },
- "symbol": {
- "type": "string",
- "nullable": true,
- "example": "AAVE"
- },
- "url": {
- "type": "string",
- "example": "https://aave.com"
- },
- "referralUrl": {
- "type": "string",
- "nullable": true
- },
- "description": {
- "type": "string",
- "example": "Aave is an Open Source and Non-Custodial protocol to earn interest on deposits & borrow assets"
- },
- "chain": {
- "type": "string",
- "example": "Multi-Chain"
- },
- "logo": {
- "type": "string",
- "example": "https://icons.llama.fi/aave.png"
- },
- "audits": {
- "type": "string",
- "nullable": true
- },
- "audit_note": {
- "type": "string",
- "nullable": true
- },
- "gecko_id": {
- "type": "string",
- "nullable": true,
- "example": "aave"
- },
- "cmcId": {
- "type": "string",
- "nullable": true,
- "example": "7278"
- },
- "category": {
- "type": "string",
- "example": "Lending"
- },
- "tags": {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "number",
+ "example": 1609459200
},
- "example": ["Ethereum", "Polygon", "Avalanche"]
- },
- "module": {
- "type": "string",
- "nullable": true
- },
- "treasury": {
- "type": "string",
- "nullable": true
- },
- "twitter": {
- "type": "string",
- "example": "AaveAave"
- },
- "audit_links": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "openSource": {
- "type": "boolean"
- },
- "forkedFrom": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "oraclesByChain": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "string"
+ "prices": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "number"
+ },
+ "example": {
+ "USDT": 1.001,
+ "USDC": 0.999,
+ "DAI": 1.002
}
- },
- "example": {
- "Ethereum": ["Chainlink"],
- "Polygon": ["Chainlink"]
}
- },
- "parentProtocol": {
- "type": "string"
- },
- "governanceID": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "github": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "currentChainTvls": {
- "type": "object",
- "additionalProperties": {
- "type": "number"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.stablecoins.getPrices()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.stablecoins.getPrices()"
+ }
+ ]
+ }
+ },
+ "/stablecoins/stablecoindominance/{chain}": {
+ "get": {
+ "tags": ["stablecoins"],
+ "summary": "Get stablecoin dominance per chain along with the info about the larges coin in a chain",
+ "parameters": [
+ {
+ "name": "chain",
+ "in": "path",
+ "required": true,
+ "description": "chain slug, you can get these from /chains or the chains property on /protocols",
+ "schema": {
+ "type": "string",
+ "example": "Ethereum"
+ }
+ },
+ {
+ "name": "stablecoin",
+ "in": "query",
+ "required": false,
+ "description": "stablecoin ID, you can get these from /stablecoins",
+ "schema": {
+ "type": "integer",
+ "example": 1
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "string",
+ "example": "1752796800"
},
- "example": {
- "Ethereum": 3200000000,
- "Polygon": 1500000000
- }
- },
- "isParentProtocol": {
- "type": "boolean"
- },
- "mcap": {
- "type": "number",
- "nullable": true,
- "example": 2400000000
- },
- "methodology": {
- "type": "string",
- "nullable": true
- },
- "raises": {
- "type": "array",
- "items": {
+ "totalCirculatingUSD": {
"type": "object",
"properties": {
- "round": {
- "type": "string",
- "example": "Series A"
- },
- "amount": {
+ "peggedUSD": {
"type": "number",
- "example": 25000000
- },
- "valuation": {
- "type": "string"
- },
- "source": {
- "type": "string"
+ "example": 129531632690.44954
},
- "date": {
+ "peggedVAR": {
"type": "number",
- "example": 1601510400
- },
- "defillamaId": {
- "type": "string"
- },
- "leadInvestors": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "example": 100466426.71408615
},
- "otherInvestors": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "investors": {
- "type": "array",
- "items": {
- "type": "string"
- }
+ "peggedEUR": {
+ "type": "number",
+ "example": 286714265.91542196
}
}
- }
- },
- "otherProtocols": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "hallmarks": {
- "type": "array",
- "description": "Notable events in the protocol's history as [timestamp, description] pairs",
- "items": {
- "type": "array"
- }
- },
- "stablecoins": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "misrepresentedTokens": {
- "type": "boolean"
- },
- "deprecated": {
- "type": "boolean"
- },
- "rugged": {
- "type": "boolean"
- },
- "deadUrl": {
- "type": "boolean"
- },
- "warningBanners": {
- "type": "array",
- "items": {
+ },
+ "greatestMcap": {
"type": "object",
"properties": {
- "message": {
- "type": "string"
- },
- "until": {
+ "gecko_id": {
"type": "string",
- "nullable": true
+ "example": "tether"
},
- "level": {
+ "symbol": {
"type": "string",
- "enum": ["low", "alert", "rug"]
+ "example": "USDT"
+ },
+ "mcap": {
+ "type": "number",
+ "example": 65836754910.17763
}
}
}
- },
- "tokenRights": {
- "type": "object",
- "description": "Token governance and value accrual rights"
- },
- "wrongLiquidity": {
- "type": "boolean"
- },
- "tvlCodePath": {
- "type": "string",
- "description": "Path to the TVL adapter source code"
}
- },
- "example": {
- "id": "parent#aave",
- "name": "Aave",
- "url": "https://aave.com",
- "description": "Aave is an Open Source and Non-Custodial protocol to earn interest on deposits and borrow assets",
- "logo": "https://icons.llama.fi/aave.png",
- "chains": [],
- "gecko_id": "aave",
- "cmcId": "7278",
- "treasury": "aave.js",
- "twitter": "aave",
- "governanceID": ["snapshot:aave.eth", "eip155:1:0xEC568fffba86c094cf06b22134B23074DFE2252c"],
- "wrongLiquidity": true,
- "github": ["aave", "bgd-labs"],
- "stablecoins": ["gho"],
- "tokenRights": {
- "rights": [
- {
- "label": "Governance",
- "hasRight": true,
- "details": "AAVE"
- },
- {
- "label": "Treasury",
- "hasRight": true,
- "details": "AAVE"
- },
- {
- "label": "Revenue",
- "hasRight": true,
- "details": "AAVE"
- }
- ],
- "governanceData": {
- "rights": "LIMITED",
- "details": "Governance includes protocol parameters, treasury management, upgrades & onchain revenue",
- "feeSwitchStatus": "ON",
- "feeSwitchDetails": "$50m annual budget for token buybacks"
- },
- "holdersRevenueAndValueAccrual": {
- "buybacks": "ACTIVE",
- "dividends": "NONE",
- "burns": "NONE",
- "primaryValueAccrual": "Buybacks - $50M yearly budget for buybacks"
- },
- "tokenAlignment": {
- "fundraising": "TOKEN",
- "raiseDetailsLink": {
- "label": "Strategic Round (Decrypt)",
- "url": "https://decrypt.co/44653/aave-raises-25-million-to-bring-defi-to-institutions"
- },
- "associatedEntities": ["DAO", "Labs", "Parent / Holdings Co"],
- "equityRevenueCapture": "PARTIAL",
- "equityStatement": "Labs owns the interface and offchain revenue"
- }
- },
- "symbol": "AAVE",
- "address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
- "currentChainTvls": {
- "Ethereum-staking": 300390294,
- "Ethereum-pool2": 1001784,
- "Avalanche-borrowed": 230805193,
- "Ethereum": 21541108640,
- "Ethereum-borrowed": 13105470847,
- "Polygon": 164069009,
- "Avalanche": 425186004,
- "Polygon-borrowed": 71777370,
- "staking": 300390294,
- "pool2": 1001784,
- "borrowed": 16477546481,
- "Base": 720897079,
- "Base-borrowed": 539408955,
- "Arbitrum": 710909114,
- "Arbitrum-borrowed": 493502165,
- "OP Mainnet": 53112825,
- "OP Mainnet-borrowed": 30898499,
- "Gnosis": 67454440,
- "Gnosis-borrowed": 28683972,
- "Mantle": 285136854,
- "Mantle-borrowed": 186143806,
- "Plasma": 1958242285,
- "Plasma-borrowed": 1655750534,
- "BSC": 174954075,
- "BSC-borrowed": 70470380,
- "Linea": 49717184,
- "Linea-borrowed": 38569924,
- "Sonic": 12939987,
- "Sonic-borrowed": 5315322,
- "Scroll": 6971724,
- "Scroll-borrowed": 5290161,
- "ZKsync Era": 2782917,
- "ZKsync Era-borrowed": 1245328,
- "Soneium": 2038301,
- "Soneium-borrowed": 292179,
- "Metis": 959354,
- "Metis-borrowed": 159370,
- "Celo": 13373563,
- "Celo-borrowed": 4923675,
- "MegaETH": 19380664,
- "MegaETH-borrowed": 34443,
- "Aptos": 18649107,
- "Aptos-borrowed": 8493938,
- "Fantom": 4575,
- "Fantom-borrowed": 1034,
- "Harmony": 0,
- "Harmony-borrowed": 309375
- },
- "isParentProtocol": true,
- "raises": [
- {
- "date": 1594771200,
- "name": "Aave",
- "round": "Private token sale",
- "amount": 3,
- "source": "https://www.dcforecasts.com/altcoin-news/aave-raises-3m-from-three-arrows-capital-and-framework-ventures/",
- "leadInvestors": ["Framework Ventures", "3AC"],
- "otherInvestors": [],
- "valuation": null,
- "defillamaId": "111"
- },
- {
- "date": 1602460800,
- "name": "Aave",
- "round": "Strategic ",
- "amount": 25,
- "source": "https://decrypt.co/44653/aave-raises-25-million-to-bring-defi-to-institutions",
- "leadInvestors": ["Blockchain Capital", "Blockchain.com Ventures", "Standard Crypto"],
- "otherInvestors": [],
- "valuation": null,
- "defillamaId": "111"
- },
- {
- "date": 1594166400,
- "name": "Aave",
- "round": "Private token sale",
- "amount": 4.5,
- "source": "https://decrypt.co/34991/parafi-invests-defi-lending-protocol",
- "leadInvestors": ["ParaFi Capital"],
- "otherInvestors": [],
- "valuation": null,
- "defillamaId": "111"
- },
- {
- "date": 1512000000,
- "name": "Aave",
- "round": "ICO",
- "amount": 16.2,
- "source": "https://twitter.com/aaveaave/status/936247348816175104",
- "leadInvestors": [],
- "otherInvestors": [],
- "valuation": null,
- "defillamaId": "1838"
- }
- ],
- "mcap": 1775192426.0010407,
- "otherProtocols": [
- "Aave",
- "Aave V3",
- "Aave Horizon RWA",
- "Aave V2",
- "Aave Aptos",
- "Aave V1",
- "Aave Arc"
- ],
- "hallmarks": [
- [1619395200, "Start Ethereum V2 Rewards"],
- [1633305600, "Start AVAX V2 Rewards"],
- [1635292800, "Potential xSUSHI attack found"],
- [1650412800, "Start AVAX Rewards"],
- [1651881600, "UST depeg"],
- [1654819200, "stETH depeg"],
- [1659571200, "Start OP Rewards"]
- ]
}
}
}
}
- },
- "404": {
- "description": "Protocol not found"
}
- }
- }
- },
- "/api/v2/chart/tvl/protocol/{protocol}": {
- "get": {
- "tags": ["TVL"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get historical TVL chart for a protocol",
- "description": "Returns an array of [timestamp, value] pairs representing the protocol's TVL over time. By default returns the base TVL metric. Use the `key` parameter to select a different metric or aggregate all metrics.",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug",
- "schema": {
- "type": "string",
- "example": "uniswap"
- }
- },
- {
- "name": "key",
- "in": "query",
- "required": false,
- "description": "Metric to return. Omit for default TVL. Use \"all\" for the sum of tvl+borrowed+staking+pool2+vesting, or a specific metric like \"staking\", \"borrowed\", \"vesting\", \"pool2\".",
- "schema": {
- "type": "string",
- "enum": ["all", "staking", "borrowed", "vesting", "pool2"],
- "example": "all"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, value] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "number"
- },
- "minItems": 2,
- "maxItems": 2,
- "example": [1609459200, 5200000000]
- }
- }
- }
- }
- },
- "404": {
- "description": "Protocol not found"
- }
- }
- }
- },
- "/api/v2/chart/tvl/protocol/{protocol}/chain-breakdown": {
- "get": {
- "tags": ["TVL"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get historical TVL chart for a protocol broken down by chain",
- "description": "Returns an array of [timestamp, { chain: value }] pairs showing the selected metric per chain over time.",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug",
- "schema": {
- "type": "string",
- "example": "euler"
- }
- },
- {
- "name": "key",
- "in": "query",
- "required": false,
- "description": "Metric to return. Omit for default TVL. Use \"all\" for the sum of tvl+borrowed+staking+pool2+vesting, or a specific metric like \"staking\", \"borrowed\", \"vesting\", \"pool2\".",
- "schema": {
- "type": "string",
- "enum": ["all", "staking", "borrowed", "vesting", "pool2"],
- "example": "borrowed"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, chainBreakdown] pairs. Each entry is a two-element array: first element is a unix timestamp, second is an object mapping chain names to values.",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1609459200,
- {
- "Ethereum": 3200000000,
- "Polygon": 1500000000
- }
- ],
- [
- 1609545600,
- {
- "Ethereum": 3250000000,
- "Polygon": 1520000000
- }
- ]
- ]
- }
- }
- }
- },
- "404": {
- "description": "Protocol not found"
- }
- }
- }
- },
- "/api/v2/chart/tvl/protocol/{protocol}/token-breakdown": {
- "get": {
- "tags": ["TVL"],
+ },
"x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get historical TVL chart for a protocol broken down by token",
- "description": "Returns an array of [timestamp, { token: value }] pairs showing TVL per token over time. Values are in USD by default, set currency=tokens for raw token amounts.",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug",
- "schema": {
- "type": "string",
- "example": "aave"
- }
- },
+ "x-codeSamples": [
{
- "name": "key",
- "in": "query",
- "required": false,
- "description": "Metric to return. Omit for default TVL. Use \"all\" for the sum of tvl+borrowed+staking+pool2+vesting, or a specific metric like \"staking\", \"borrowed\", \"vesting\", \"pool2\".",
- "schema": {
- "type": "string",
- "enum": ["all", "staking", "borrowed", "vesting", "pool2"]
- }
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.stablecoins.getDominance('')"
},
{
- "name": "currency",
- "in": "query",
- "required": false,
- "description": "Set to \"tokens\" to return values denominated in raw token amounts instead of USD",
- "schema": {
- "type": "string",
- "enum": ["usd", "token", "raw"],
- "example": "usd"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, tokenBreakdown] pairs. Each entry is a two-element array: first element is a unix timestamp, second is an object mapping token names to values (USD by default, raw token amounts if currency=tokens).",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1609459200,
- {
- "USDC": 1000000000,
- "USDT": 800000000,
- "WETH": 500000000
- }
- ],
- [
- 1609545600,
- {
- "USDC": 1010000000,
- "USDT": 810000000,
- "WETH": 510000000
- }
- ]
- ]
- }
- }
- }
- },
- "404": {
- "description": "Protocol not found"
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.stablecoins.getDominance('')"
}
- }
+ ]
}
},
- "/api/v2/metrics/treasury/protocol/{protocol}": {
+ "/yields/v1/pools": {
"get": {
- "tags": ["Treasury"],
+ "tags": ["yields"],
"x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get aggregate treasury metrics for a protocol",
- "description": "Returns protocol metadata along with current treasury figures and chain breakdowns.",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug",
- "schema": {
- "type": "string",
- "example": "aave"
- }
- }
- ],
+ "summary": "Retrieve the latest data for all pools in the legacy v1 response format",
+ "description": "Serves the former `/yields/pools` response format, including the extra fields from `/yields/poolsOld`. Frozen for compatibility: the shape will not change and no new fields will be added - use `/yields/v2/earn` for new integrations.",
"responses": {
"200": {
- "description": "Protocol treasury metrics",
+ "description": "Array of all pools in the legacy v1 format",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "id": {
- "type": "string",
- "example": "parent#aave"
- },
- "name": {
- "type": "string",
- "example": "Aave"
- },
- "address": {
- "type": "string",
- "nullable": true,
- "example": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
- },
- "symbol": {
- "type": "string",
- "nullable": true,
- "example": "AAVE"
- },
- "url": {
- "type": "string",
- "example": "https://aave.com"
- },
- "referralUrl": {
- "type": "string",
- "nullable": true
- },
- "description": {
- "type": "string",
- "example": "Aave is an Open Source and Non-Custodial protocol to earn interest on deposits & borrow assets"
- },
- "chain": {
+ "status": {
"type": "string",
- "example": "Multi-Chain"
+ "example": "success"
},
- "logo": {
- "type": "string",
- "example": "https://icons.llama.fi/aave.png"
- },
- "audits": {
- "type": "string",
- "nullable": true
- },
- "audit_note": {
- "type": "string",
- "nullable": true
- },
- "gecko_id": {
- "type": "string",
- "nullable": true,
- "example": "aave"
- },
- "cmcId": {
- "type": "string",
- "nullable": true,
- "example": "7278"
- },
- "category": {
- "type": "string",
- "example": "Lending"
- },
- "tags": {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Ethereum", "Polygon", "Avalanche"]
- },
- "module": {
- "type": "string",
- "nullable": true
- },
- "treasury": {
- "type": "string",
- "nullable": true
- },
- "twitter": {
- "type": "string",
- "example": "AaveAave"
- },
- "audit_links": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "openSource": {
- "type": "boolean"
- },
- "forkedFrom": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "oraclesByChain": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "example": {
- "Ethereum": ["Chainlink"],
- "Polygon": ["Chainlink"]
- }
- },
- "parentProtocol": {
- "type": "string"
- },
- "governanceID": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "github": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "currentChainTvls": {
- "type": "object",
- "additionalProperties": {
- "type": "number"
- },
- "example": {
- "Ethereum": 80000000,
- "Polygon": 20000000
- }
- },
- "isParentProtocol": {
- "type": "boolean"
- },
- "mcap": {
- "type": "number",
- "nullable": true,
- "example": 2400000000
- },
- "methodology": {
- "type": "string",
- "nullable": true
- },
- "raises": {
+ "data": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "round": {
+ "pool": {
"type": "string",
- "example": "Series A"
+ "description": "Pool id (UUID). Same id space as the v2 yields API.",
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
},
- "amount": {
- "type": "number",
- "example": 25000000
+ "timestamp": {
+ "type": "string",
+ "description": "Timestamp of the latest data point.",
+ "example": "2026-09-17T14:10:48.521Z"
},
- "valuation": {
- "type": "string"
+ "project": {
+ "type": "string",
+ "example": "lido"
},
- "source": {
- "type": "string"
+ "chain": {
+ "type": "string",
+ "example": "Ethereum"
},
- "date": {
- "type": "number",
- "example": 1601510400
+ "symbol": {
+ "type": "string",
+ "description": "Uppercase symbol.",
+ "example": "STETH"
},
- "defillamaId": {
- "type": "string"
+ "poolMeta": {
+ "type": ["string", "null"],
+ "example": null
},
- "leadInvestors": {
- "type": "array",
+ "underlyingTokens": {
+ "type": ["array", "null"],
+ "description": "Underlying token addresses, lowercase.",
"items": {
"type": "string"
- }
+ },
+ "example": ["0x0000000000000000000000000000000000000000"]
},
- "otherInvestors": {
- "type": "array",
+ "rewardTokens": {
+ "type": ["array", "null"],
+ "description": "Reward token addresses, lowercase; null when no rewards are currently flowing.",
"items": {
"type": "string"
- }
+ },
+ "example": null
},
- "investors": {
- "type": "array",
- "items": {
- "type": "string"
- }
- }
- }
- }
- },
- "otherProtocols": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "hallmarks": {
- "type": "array",
- "description": "Notable events in the protocol's history as [timestamp, description] pairs",
- "items": {
- "type": "array"
- }
- },
- "stablecoins": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "misrepresentedTokens": {
- "type": "boolean"
- },
- "deprecated": {
- "type": "boolean"
- },
- "rugged": {
- "type": "boolean"
- },
- "deadUrl": {
- "type": "boolean"
- },
- "warningBanners": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "message": {
- "type": "string"
+ "poolTokenAddress": {
+ "type": ["string", "null"],
+ "description": "Receipt/pool token address, lowercase.",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
},
- "until": {
- "type": "string",
- "nullable": true
+ "tvlUsd": {
+ "type": "number",
+ "description": "TVL in USD; for lending markets this is available liquidity, not total supplied.",
+ "example": 23592091898
},
- "level": {
- "type": "string",
- "enum": ["low", "alert", "rug"]
- }
- }
- }
- },
- "tokenRights": {
- "type": "object",
- "description": "Token governance and value accrual rights"
- },
- "wrongLiquidity": {
- "type": "boolean"
- },
- "tvlCodePath": {
- "type": "string",
- "description": "Path to the TVL adapter source code"
- }
- },
- "example": {
- "id": "parent#aave-treasury",
- "name": "Aave (treasury)",
- "url": "https://aave.com",
- "description": "Aave is an Open Source and Non-Custodial protocol to earn interest on deposits and borrow assets",
- "logo": "https://icons.llama.fi/aave.png",
- "chains": ["Ethereum", "Arbitrum", "OP Mainnet", "Avalanche", "Fantom", "Polygon"],
- "gecko_id": "aave",
- "cmcId": "7278",
- "treasury": "aave.js",
- "twitter": "aave",
- "governanceID": ["snapshot:aave.eth", "eip155:1:0xEC568fffba86c094cf06b22134B23074DFE2252c"],
- "wrongLiquidity": true,
- "github": ["aave", "bgd-labs"],
- "stablecoins": ["gho"],
- "tokenRights": {
- "rights": [
- {
- "label": "Governance",
- "hasRight": true,
- "details": "AAVE"
- },
- {
- "label": "Treasury",
- "hasRight": true,
- "details": "AAVE"
- },
- {
- "label": "Revenue",
- "hasRight": true,
- "details": "AAVE"
+ "apy": {
+ "type": "number",
+ "example": 2.212
+ },
+ "apyBase": {
+ "type": ["number", "null"],
+ "example": 2.212
+ },
+ "apyReward": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "il7d": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "apyBase7d": {
+ "type": ["number", "null"],
+ "description": "7-day base APY, where the adapter reports one.",
+ "example": null
+ },
+ "volumeUsd1d": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "volumeUsd7d": {
+ "type": ["number", "null"],
+ "description": "7-day volume in USD.",
+ "example": null
+ },
+ "apyBaseInception": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "url": {
+ "type": "string",
+ "example": "https://lido.fi/#networks"
+ },
+ "apyPct1D": {
+ "type": ["number", "null"],
+ "description": "Absolute APY change vs 1 day ago, in percentage points.",
+ "example": -0.02227
+ },
+ "apyPct7D": {
+ "type": ["number", "null"],
+ "example": -0.06154
+ },
+ "apyPct30D": {
+ "type": ["number", "null"],
+ "example": 0.01517
+ },
+ "apyMean30d": {
+ "type": ["number", "null"],
+ "description": "30-day mean APY.",
+ "example": 2.21043
+ },
+ "stablecoin": {
+ "type": "boolean",
+ "description": "Whether every underlying asset is a stablecoin.",
+ "example": false
+ },
+ "ilRisk": {
+ "type": "string",
+ "example": "no"
+ },
+ "exposure": {
+ "type": "string",
+ "example": "single"
+ },
+ "return": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "count": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "apyMeanExpanding": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "apyStdExpanding": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "mu": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "sigma": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "outlier": {
+ "type": ["boolean", "null"],
+ "description": "True when the pool's APY is a statistical outlier within its cohort.",
+ "example": false
+ },
+ "project_factorized": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "chain_factorized": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "predictions": {
+ "type": "object",
+ "description": "Always null; no longer computed.",
+ "properties": {
+ "predictedClass": {
+ "type": ["string", "null"],
+ "example": null
+ },
+ "predictedProbability": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "binnedConfidence": {
+ "type": ["number", "null"],
+ "example": null
+ }
+ }
+ },
+ "pool_old": {
+ "type": "string",
+ "description": "The original pool key (usually contains a pool address).",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
+ }
}
- ],
- "governanceData": {
- "rights": "LIMITED",
- "details": "Governance includes protocol parameters, treasury management, upgrades & onchain revenue",
- "feeSwitchStatus": "ON",
- "feeSwitchDetails": "$50m annual budget for token buybacks"
- },
- "holdersRevenueAndValueAccrual": {
- "buybacks": "ACTIVE",
- "dividends": "NONE",
- "burns": "NONE",
- "primaryValueAccrual": "Buybacks - $50M yearly budget for buybacks"
- },
- "tokenAlignment": {
- "fundraising": "TOKEN",
- "raiseDetailsLink": {
- "label": "Strategic Round (Decrypt)",
- "url": "https://decrypt.co/44653/aave-raises-25-million-to-bring-defi-to-institutions"
- },
- "associatedEntities": ["DAO", "Labs", "Parent / Holdings Co"],
- "equityRevenueCapture": "PARTIAL",
- "equityStatement": "Labs owns the interface and offchain revenue"
}
- },
- "symbol": "AAVE",
- "address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
- "module": "treasury/aave.js",
- "category": "Treasury",
- "tvlCodePath": "https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/treasury/aave.js",
- "currentChainTvls": {
- "Ethereum-OwnTokens": 51486143.11756,
- "Arbitrum-OwnTokens": 108.33167,
- "OP Mainnet-OwnTokens": 339.41814,
- "Avalanche-OwnTokens": 200.26047,
- "Fantom-OwnTokens": 0,
- "Fantom": 5317.95627,
- "Polygon-OwnTokens": 0.49868,
- "Arbitrum": 7665284.15367,
- "Avalanche": 12653199.04222,
- "OP Mainnet": 266147.25573,
- "Ethereum": 50207476.33278,
- "Polygon": 774382.58832,
- "OwnTokens": 51486791.62651
- },
- "raises": [],
- "mcap": 1775192426.0010407
+ }
}
}
}
}
- },
- "404": {
- "description": "Protocol not found"
}
}
}
},
- "/api/v2/chart/treasury/protocol/{protocol}": {
+ "/yields/v1/chart/{pool}": {
"get": {
- "tags": ["Treasury"],
+ "tags": ["yields"],
"x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get historical treasury chart for a protocol",
- "description": "Returns an array of [timestamp, value] pairs representing the protocol's treasury value over time. By default excludes the protocol's own tokens (OwnTokens).",
+ "summary": "Get historical APY and TVL of a pool in the legacy v1 response format",
+ "description": "Daily history in the legacy v1 format. Every value is the day's last observation. Unknown pool ids return an empty `data` array.",
"parameters": [
{
- "name": "protocol",
+ "name": "pool",
"in": "path",
"required": true,
- "description": "protocol slug",
- "schema": {
- "type": "string",
- "example": "uniswap"
- }
- },
- {
- "name": "key",
- "in": "query",
- "required": false,
- "description": "Token filter. Omit to exclude OwnTokens (default). Use \"OwnTokens\" to return only the protocol's own tokens, or \"all\" for the sum of all tokens including OwnTokens.",
+ "description": "pool id (UUID), from /yields/v1/pools (property is called pool)",
"schema": {
"type": "string",
- "enum": ["OwnTokens", "all"],
- "example": "all"
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
}
}
],
"responses": {
"200": {
- "description": "Array of [timestamp, value] pairs",
+ "description": "Historical APY and TVL data for the specified pool",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "number"
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "example": "success"
},
- "minItems": 2,
- "maxItems": 2,
- "example": [1609459200, 120000000]
- }
- }
- }
- }
- },
- "404": {
- "description": "Protocol not found"
- }
- }
- }
- },
- "/api/v2/chart/treasury/protocol/{protocol}/chain-breakdown": {
- "get": {
- "tags": ["Treasury"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get historical treasury chart for a protocol broken down by chain",
- "description": "Returns an array of [timestamp, { chain: value }] pairs showing treasury value per chain over time. By default excludes the protocol's own tokens.",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug",
- "schema": {
- "type": "string",
- "example": "aave"
- }
- },
- {
- "name": "key",
- "in": "query",
- "required": false,
- "description": "Token filter. Omit to exclude OwnTokens (default). Use \"OwnTokens\" to return only the protocol's own tokens, or \"all\" for the sum of all tokens including OwnTokens.",
- "schema": {
- "type": "string",
- "enum": ["OwnTokens", "all"],
- "example": "OwnTokens"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, chainBreakdown] pairs. Each entry is a two-element array: first element is a unix timestamp, second is an object mapping chain names to treasury values.",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1609459200,
- {
- "Ethereum": 80000000,
- "Polygon": 20000000
- }
- ],
- [
- 1609545600,
- {
- "Ethereum": 81000000,
- "Polygon": 20500000
- }
- ]
- ]
- }
- }
- }
- },
- "404": {
- "description": "Protocol not found"
- }
- }
- }
- },
- "/api/v2/chart/treasury/protocol/{protocol}/token-breakdown": {
- "get": {
- "tags": ["Treasury"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get historical treasury chart for a protocol broken down by token",
- "description": "Returns an array of [timestamp, { token: value }] pairs showing treasury value per token over time. By default excludes OwnTokens and values are in USD. Use key and currency params to customize.",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug",
- "schema": {
- "type": "string",
- "example": "aave"
- }
- },
- {
- "name": "key",
- "in": "query",
- "required": false,
- "description": "Token filter. Omit to exclude OwnTokens (default). Use \"OwnTokens\" to return only the protocol's own tokens, or \"all\" for the sum of all tokens including OwnTokens.",
- "schema": {
- "type": "string",
- "enum": ["OwnTokens", "all"],
- "example": "OwnTokens"
- }
- },
- {
- "name": "currency",
- "in": "query",
- "required": false,
- "description": "Set to \"tokens\" to return values denominated in raw token amounts instead of USD",
- "schema": {
- "type": "string",
- "enum": ["usd", "token", "raw"],
- "example": "usd"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, tokenBreakdown] pairs. Each entry is a two-element array: first element is a unix timestamp, second is an object mapping token names to treasury values (USD by default, raw token amounts if currency=tokens).",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1609459200,
- {
- "AAVE": 50000000,
- "USDC": 30000000,
- "WETH": 20000000
- }
- ],
- [
- 1609545600,
- {
- "AAVE": 51000000,
- "USDC": 30500000,
- "WETH": 20500000
- }
- ]
- ]
- }
- }
- }
- },
- "404": {
- "description": "Protocol not found"
- }
- }
- }
- },
- "/api/v2/metrics/oracle": {
- "get": {
- "tags": ["Oracles"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get oracle data overview",
- "description": "Returns an object mapping oracle names to arrays of protocol names that use each oracle.",
- "responses": {
- "200": {
- "description": "Oracle data overview",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "oracles": {
- "type": "object",
- "description": "Mapping of oracle names to arrays of protocol names using that oracle",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "string"
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "string",
+ "example": "2022-05-03T00:00:00.000Z"
+ },
+ "tvlUsd": {
+ "type": ["number", "null"],
+ "description": "The day's last observation.",
+ "example": 11074372760
+ },
+ "apy": {
+ "type": ["number", "null"],
+ "description": "The day's last observation.",
+ "example": 3.6
+ },
+ "apyBase": {
+ "type": ["number", "null"],
+ "example": 3.6
+ },
+ "apyReward": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "il7d": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "apyBase7d": {
+ "type": ["number", "null"],
+ "description": "7-day base APY, where the adapter reports one.",
+ "example": null
+ },
+ "pricePerShare": {
+ "type": ["number", "null"],
+ "description": "The day's last observation.",
+ "example": null
+ }
}
- },
- "example": {
- "Chainlink": ["Aave V2", "Compound V2", "Synthetix v1+v2"],
- "Band": ["Mirror", "Anchor"],
- "TWAP": ["Uniswap V3"]
}
}
}
@@ -4231,73 +3023,219 @@
}
}
},
- "/api/v2/chart/oracle": {
+ "/yields/v1/poolsBorrow": {
"get": {
- "tags": ["Oracles"],
+ "tags": ["yields"],
"x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get timeseries chart data for all oracles",
- "description": "Returns an array of [timestamp, value] pairs representing total TVL across all oracles over time.",
+ "summary": "Borrow costs APY of assets from lending markets in the legacy v1 response format",
+ "description": "Serves the former `/yields/poolsBorrow` response format. Markets that cannot currently be borrowed from are not listed. Frozen for compatibility: the shape will not change and no new fields will be added - use `/yields/v2/borrow/markets` for new integrations.",
"responses": {
"200": {
- "description": "Array of [timestamp, value] pairs",
+ "description": "Array of lending markets in the legacy v1 format",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "number"
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "example": "success"
},
- "minItems": 2,
- "maxItems": 2,
- "example": [1546560000, 273845651.27]
- }
- }
- }
- }
- }
- }
- }
- },
- "/api/v2/chart/oracle/chain-breakdown": {
- "get": {
- "tags": ["Oracles"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get timeseries chart data breakdown by chain",
- "description": "Returns an array of objects with a timestamp and TVL values broken down by chain.",
- "responses": {
- "200": {
- "description": "Array of timestamped chain breakdowns",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number",
- "description": "Unix timestamp",
- "example": 1546560000
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "chain": {
+ "type": "string",
+ "example": "Ethereum"
+ },
+ "project": {
+ "type": "string",
+ "example": "aave-v3"
+ },
+ "symbol": {
+ "type": "string",
+ "description": "Uppercase symbol.",
+ "example": "WETH"
+ },
+ "tvlUsd": {
+ "type": ["number", "null"],
+ "description": "TVL in USD; for lending markets this is available liquidity, not total supplied.",
+ "example": 727935089
+ },
+ "apyBase": {
+ "type": ["number", "null"],
+ "example": 1.45716
+ },
+ "apyReward": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "apy": {
+ "type": ["number", "null"],
+ "example": 1.45716
+ },
+ "rewardTokens": {
+ "type": ["array", "null"],
+ "description": "Reward token addresses, lowercase; null when no rewards are currently flowing.",
+ "items": {
+ "type": "string"
+ },
+ "example": null
+ },
+ "pool": {
+ "type": "string",
+ "description": "Pool id (UUID). Same id space as the v2 yields API.",
+ "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
+ },
+ "apyPct1D": {
+ "type": ["number", "null"],
+ "description": "Absolute APY change vs 1 day ago, in percentage points.",
+ "example": -0.05531
+ },
+ "apyPct7D": {
+ "type": ["number", "null"],
+ "example": -0.06874
+ },
+ "apyPct30D": {
+ "type": ["number", "null"],
+ "example": -0.02456
+ },
+ "stablecoin": {
+ "type": "boolean",
+ "description": "Whether every underlying asset is a stablecoin.",
+ "example": false
+ },
+ "ilRisk": {
+ "type": "string",
+ "example": "no"
+ },
+ "exposure": {
+ "type": "string",
+ "example": "single"
+ },
+ "predictions": {
+ "type": "object",
+ "description": "Always null; no longer computed.",
+ "properties": {
+ "predictedClass": {
+ "type": ["string", "null"],
+ "example": null
+ },
+ "predictedProbability": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "binnedConfidence": {
+ "type": ["number", "null"],
+ "example": null
+ }
+ }
+ },
+ "poolMeta": {
+ "type": ["string", "null"],
+ "example": null
+ },
+ "mu": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "sigma": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "count": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "outlier": {
+ "type": ["boolean", "null"],
+ "description": "True when the pool's APY is a statistical outlier within its cohort.",
+ "example": false
+ },
+ "underlyingTokens": {
+ "type": ["array", "null"],
+ "description": "Underlying token addresses, lowercase.",
+ "items": {
+ "type": "string"
+ },
+ "example": ["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"]
+ },
+ "il7d": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "apyBase7d": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "apyMean30d": {
+ "type": ["number", "null"],
+ "description": "30-day mean APY.",
+ "example": 1.4662
+ },
+ "volumeUsd1d": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "volumeUsd7d": {
+ "type": ["number", "null"],
+ "description": "7-day volume in USD.",
+ "example": null
+ },
+ "apyBaseInception": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ },
+ "apyBaseBorrow": {
+ "type": ["number", "null"],
+ "example": 2.05028
+ },
+ "apyRewardBorrow": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "totalSupplyUsd": {
+ "type": ["number", "null"],
+ "example": 5234129189
+ },
+ "totalBorrowUsd": {
+ "type": ["number", "null"],
+ "example": 4376489739
+ },
+ "debtCeilingUsd": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "ltv": {
+ "type": ["number", "null"],
+ "example": 0.805
+ },
+ "borrowable": {
+ "type": ["boolean", "null"],
+ "example": true
+ },
+ "mintedCoin": {
+ "type": ["string", "null"],
+ "description": "The borrowed token's symbol when it differs from the deposited asset (CDP-style markets).",
+ "example": null
+ },
+ "borrowFactor": {
+ "type": ["number", "null"],
+ "description": "Always null; no longer computed.",
+ "example": null
+ }
+ }
}
- },
- "additionalProperties": {
- "type": "number"
- }
- },
- "example": [
- {
- "timestamp": 1546560000,
- "Ethereum": 273845651.27
- },
- {
- "timestamp": 1546646400,
- "Ethereum": 288674544.41
}
- ]
+ }
}
}
}
@@ -4305,1645 +3243,1107 @@
}
}
},
- "/api/v2/chart/oracle/protocol-breakdown": {
+ "/yields/v1/chartLendBorrow/{pool}": {
"get": {
- "tags": ["Oracles"],
+ "tags": ["yields"],
"x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get timeseries chart data breakdown by protocol",
- "description": "Returns an array of objects with a timestamp and TVL values broken down by oracle/protocol.",
+ "summary": "Historical borrow cost APY from a pool on a lending market in the legacy v1 response format",
+ "description": "Daily borrow-market history in the legacy v1 format. Every value is the day's last observation. Unknown pool ids return an empty `data` array.",
+ "parameters": [
+ {
+ "name": "pool",
+ "in": "path",
+ "required": true,
+ "description": "pool id (UUID), from /yields/v1/poolsBorrow (property is called pool)",
+ "schema": {
+ "type": "string",
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
+ }
+ }
+ ],
"responses": {
"200": {
- "description": "Array of timestamped protocol breakdowns",
+ "description": "Historical lend/borrow data for the specified pool",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number",
- "description": "Unix timestamp",
- "example": 1546560000
- }
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "example": "success"
},
- "additionalProperties": {
- "type": "number"
- }
- },
- "example": [
- {
- "timestamp": 1546560000,
- "Chronicle": 273845651.27
- },
- {
- "timestamp": 1546646400,
- "Chronicle": 288674544.41
- }
- ]
- }
- }
- }
- }
- }
- }
- },
- "/api/v2/chart/oracle/protocol/{protocol}": {
- "get": {
- "tags": ["Oracles"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get timeseries chart data by protocol/oracle",
- "description": "Returns an array of [timestamp, value] pairs representing TVL over time for a specific oracle/protocol.",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "oracle/protocol name",
- "schema": {
- "type": "string",
- "example": "Chainlink"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, value] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "number"
- },
- "minItems": 2,
- "maxItems": 2,
- "example": [1557273600, 9546.16]
- }
- }
- }
- }
- },
- "404": {
- "description": "Protocol not found"
- }
- }
- }
- },
- "/api/v2/chart/oracle/protocol/{protocol}/chain-breakdown": {
- "get": {
- "tags": ["Oracles"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get chain breakdown timeseries chart data by protocol/oracle",
- "description": "Returns an array of objects with a timestamp and TVL values broken down by chain for a specific oracle/protocol.",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "oracle/protocol name",
- "schema": {
- "type": "string",
- "example": "Chainlink"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of timestamped chain breakdowns",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number",
- "description": "Unix timestamp",
- "example": 1557273600
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "string",
+ "example": "2023-02-06T23:01:24.670Z"
+ },
+ "totalSupplyUsd": {
+ "type": ["number", "null"],
+ "description": "The day's last observation.",
+ "example": 60767153
+ },
+ "totalBorrowUsd": {
+ "type": ["number", "null"],
+ "description": "The day's last observation.",
+ "example": 33150230
+ },
+ "debtCeilingUsd": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "apyBase": {
+ "type": ["number", "null"],
+ "description": "The day's last observation.",
+ "example": 1.66533
+ },
+ "apyReward": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "apyBaseBorrow": {
+ "type": ["number", "null"],
+ "description": "The day's last observation.",
+ "example": 3.59132
+ },
+ "apyRewardBorrow": {
+ "type": ["number", "null"],
+ "example": null
+ }
+ }
}
- },
- "additionalProperties": {
- "type": "number"
- }
- },
- "example": [
- {
- "timestamp": 1557273600,
- "Ethereum": 9546.16
- },
- {
- "timestamp": 1557360000,
- "Ethereum": 10826.13
}
- ]
- }
- }
- }
- },
- "404": {
- "description": "Protocol not found"
- }
- }
- }
- },
- "/api/v2/chart/oracle/chain/{chain}": {
- "get": {
- "tags": ["Oracles"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get timeseries chart data by chain",
- "description": "Returns an array of [timestamp, value] pairs representing oracle TVL over time for a specific chain.",
- "parameters": [
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain name",
- "schema": {
- "type": "string",
- "example": "Ethereum"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, value] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "number"
- },
- "minItems": 2,
- "maxItems": 2,
- "example": [1546560000, 273845651.27]
}
}
}
}
- },
- "404": {
- "description": "Chain not found"
}
}
}
},
- "/api/v2/chart/oracle/chain/{chain}/protocol-breakdown": {
+ "/yields/v2/earn": {
"get": {
- "tags": ["Oracles"],
+ "tags": ["yields"],
"x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get protocol breakdown timeseries chart data by chain",
- "description": "Returns an array of objects with a timestamp and TVL values broken down by oracle/protocol for a specific chain.",
- "parameters": [
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain name",
- "schema": {
- "type": "string",
- "example": "Ethereum"
- }
- }
- ],
+ "summary": "Retrieve the latest data for all earn pools",
+ "description": "Returns every tracked earn pool (supply-side yield), sorted by TVL descending. APY values are percentages, attributed into `base` (organic), `reward` (incentive emissions) and `total` (base + reward) over `current`, `avg_7d` and `avg_30d` windows. Pools whose underlying token is itself yield-bearing additionally report that yield under `intrinsic`; it is not included in the pool APY. For a filtered, paginated variant of the same rows use `/yields/v2/earn/query`.",
"responses": {
"200": {
- "description": "Array of timestamped protocol breakdowns",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number",
- "description": "Unix timestamp",
- "example": 1546560000
- }
- },
- "additionalProperties": {
- "type": "number"
- }
- },
- "example": [
- {
- "timestamp": 1546560000,
- "Chronicle": 273845651.27
- },
- {
- "timestamp": 1546646400,
- "Chronicle": 288674544.41
- }
- ]
- }
- }
- }
- },
- "404": {
- "description": "Chain not found"
- }
- }
- }
- },
- "/api/v2/metrics/fork": {
- "get": {
- "tags": ["Forks"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get fork data overview",
- "description": "Returns an object mapping fork names to arrays of protocol names that are forks of each protocol.",
- "responses": {
- "200": {
- "description": "Fork data overview",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "string"
- }
- },
- "example": {
- "Uniswap V2": ["SushiSwap", "PancakeSwap AMM", "QuickSwap Dex"],
- "Aave V2": ["Geist Finance", "Hundred Finance"]
- }
- }
- }
- }
- }
- }
- }
- },
- "/api/v2/chart/fork/protocol-breakdown": {
- "get": {
- "tags": ["Forks"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get timeseries chart data breakdown by protocol",
- "description": "Returns an array of objects with a timestamp and TVL values broken down by fork protocol.",
- "responses": {
- "200": {
- "description": "Array of timestamped protocol breakdowns",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number",
- "description": "Unix timestamp",
- "example": 1599264000
- }
- },
- "additionalProperties": {
- "type": "number"
- }
- },
- "example": [
- {
- "timestamp": 1599696000,
- "Uniswap V2": 1082367977.05
- },
- {
- "timestamp": 1599868800,
- "Uniswap V2": 1456479137.61,
- "Saddle Finance": 41.34
- }
- ]
- }
- }
- }
- }
- }
- }
- },
- "/api/v2/chart/fork/protocol/{protocol}": {
- "get": {
- "tags": ["Forks"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get timeseries chart data by protocol",
- "description": "Returns an array of [timestamp, value] pairs representing TVL over time for all forks of a specific protocol.",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug",
- "schema": {
- "type": "string",
- "example": "aave-v3"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, value] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "number"
- },
- "minItems": 2,
- "maxItems": 2,
- "example": [1682899200, 31.73]
- }
- }
- }
- }
- },
- "404": {
- "description": "Protocol not found"
- }
- }
- }
- },
- "/api/overview/dexs": {
- "get": {
- "tags": ["volumes"],
- "summary": "List all dexs along with summaries of their volumes and dataType history data",
- "parameters": [
- {
- "name": "excludeTotalDataChart",
- "in": "query",
- "required": true,
- "description": "true to exclude aggregated chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
- },
- {
- "name": "excludeTotalDataChartBreakdown",
- "in": "query",
- "required": true,
- "description": "true to exclude broken down chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Overview of all DEXs with volume data",
+ "description": "Array of all earn pools",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "protocols": {
+ "data": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "name": {
+ "id": {
"type": "string",
- "example": "Uniswap"
+ "description": "Pool id (UUID). Same id space as the v1 yields API pool field.",
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
},
- "displayName": {
+ "pool_key": {
"type": "string",
- "example": "Uniswap V3"
+ "description": "Stable pool key.",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84-ethereum"
},
- "total24h": {
- "type": "number",
- "nullable": true,
- "example": 1500000000
+ "pool_token": {
+ "type": ["object", "null"],
+ "description": "Receipt / vault token representing the position; null when the pool has no transferable pool token",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "stETH"
+ },
+ "name": {
+ "type": ["string", "null"],
+ "example": "Liquid staked Ether 2.0"
+ }
+ }
},
- "total7d": {
- "type": "number",
- "example": 10000000000
+ "display": {
+ "type": "object",
+ "description": "Display strings for listings",
+ "properties": {
+ "label": {
+ "type": ["string", "null"],
+ "example": "stETH"
+ },
+ "detail": {
+ "type": ["string", "null"],
+ "example": "Liquid staked Ether 2.0"
+ }
+ }
},
- "change_1d": {
- "type": "number",
- "example": 5.2
+ "reference_asset_symbol": {
+ "type": ["string", "null"],
+ "description": "The asset you provide to enter the pool (e.g. ETH, USDC, BTC)",
+ "example": "ETH"
},
- "change_7d": {
- "type": "number",
- "example": -2.1
+ "url": {
+ "type": ["string", "null"],
+ "description": "Pool page on the protocol app",
+ "example": "https://lido.fi/#networks"
},
- "chains": {
+ "protocol": {
+ "type": "string",
+ "description": "Protocol display name",
+ "example": "Lido"
+ },
+ "chain": {
+ "type": "string",
+ "description": "Chain display name",
+ "example": "Ethereum"
+ },
+ "underlying_tokens": {
"type": "array",
+ "description": "Tokens deposited into the pool",
"items": {
- "type": "string"
- },
- "example": ["Ethereum", "Polygon"]
- }
- }
- }
- },
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "object"
- }
- ]
- },
- "example": [1640995200, 2500000000]
- }
- },
- "allChains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Ethereum", "BSC", "Polygon"]
- }
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.volumes.getDexOverview()"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.volumes.getDexOverview()"
- }
- ]
- }
- },
- "/api/overview/dexs/{chain}": {
- "get": {
- "tags": ["volumes"],
- "summary": "List all dexs along with summaries of their volumes and dataType history data filtering by chain",
- "parameters": [
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain name, list of all supported chains can be found under allChains attribute in /overview/dexs response",
- "schema": {
- "type": "string",
- "example": "ethereum"
- }
- },
- {
- "name": "excludeTotalDataChart",
- "in": "query",
- "required": true,
- "description": "true to exclude aggregated chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
- },
- {
- "name": "excludeTotalDataChartBreakdown",
- "in": "query",
- "required": true,
- "description": "true to exclude broken down chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Overview of DEXs on specified chain with volume data",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "protocols": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "example": "Uniswap"
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0x0000000000000000000000000000000000000000"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "ETH"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 18
+ }
+ }
+ }
},
- "total24h": {
- "type": "number",
- "nullable": true,
- "example": 800000000
+ "reward_tokens": {
+ "type": "array",
+ "description": "Incentive tokens currently emitted to the pool; empty when there are none",
+ "items": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0xd533a949740bb3306d119cc777fa900ba034cd52"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "CRV"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 18
+ }
+ }
+ }
},
- "change_1d": {
- "type": "number",
- "example": 3.2
- }
- }
- }
- },
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "example": [1640995200, 1200000000]
- }
- }
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.volumes.getDexOverviewByChain('')"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.volumes.getDexOverviewByChain('')"
- }
- ]
- }
- },
- "/api/summary/dexs/{protocol}": {
- "get": {
- "tags": ["volumes"],
- "summary": "Get summary of dex volume with historical data",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug",
- "schema": {
- "type": "string",
- "example": "uniswap"
- }
- },
- {
- "name": "excludeTotalDataChart",
- "in": "query",
- "required": true,
- "description": "true to exclude aggregated chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
- },
- {
- "name": "excludeTotalDataChartBreakdown",
- "in": "query",
- "required": true,
- "description": "true to exclude broken down chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
- }
- ],
- "responses": {
- "200": {
- "description": "DEX protocol volume summary with historical data",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "example": "Uniswap"
- },
- "total24h": {
- "type": "number",
- "example": 1500000000
- },
- "totalAllTime": {
- "type": "number",
- "example": 500000000000
- },
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "example": [1640995200, 1500000000]
- }
- },
- "totalDataChartBreakdown": {
- "type": "array",
- "items": {
- "type": "array",
- "example": [
- 1640995200,
- {
- "Uniswap V3": 1200000000,
- "Uniswap V2": 300000000
- }
- ]
- }
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Ethereum", "Polygon"]
- }
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.volumes.getDexSummary('')"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.volumes.getDexSummary('')"
- }
- ]
- }
- },
- "/api/overview/options": {
- "get": {
- "tags": ["volumes"],
- "summary": "List all options dexs along with summaries of their volumes and dataType history data",
+ "tvl_usd": {
+ "type": ["number", "null"],
+ "description": "Total value locked in USD",
+ "example": 18050422129
+ },
+ "apy": {
+ "type": "object",
+ "description": "Supply APY in percent, attributed into base (organic) and reward (incentive emissions) components",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed values",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.206
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 2.206
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.18932
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 2.18932
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.22409
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 2.22409
+ }
+ }
+ }
+ }
+ },
+ "intrinsic": {
+ "type": ["object", "null"],
+ "description": "Yield accruing inside a yield-bearing underlying token, e.g. the stETH staking yield inside a wstETH pool. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
+ "properties": {
+ "apy": {
+ "type": "object",
+ "description": "Intrinsic APY in percent",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed value",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.11
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.05
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.02
+ }
+ }
+ }
+ }
+ },
+ "source_pool": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Earn pool the intrinsic yield is sourced from",
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
+ },
+ "pool_token": {
+ "type": "string",
+ "description": "Address of the yield-bearing token",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "stETH"
+ }
+ }
+ }
+ }
+ },
+ "stability_30d": {
+ "type": "object",
+ "description": "Stability score (0 to 1) of the trailing 30-day APY series, computed as 1 / (1 + coefficient of variation); higher is steadier. Keyed by APY composition: read the leaf matching the APY components you consume (base, base + reward, base + intrinsic, base + reward + intrinsic).",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 0.9804
+ },
+ "base_reward": {
+ "type": ["number", "null"],
+ "example": 0.9804
+ },
+ "base_intrinsic": {
+ "type": ["number", "null"],
+ "example": 0.9804
+ },
+ "base_reward_intrinsic": {
+ "type": ["number", "null"],
+ "example": 0.9804
+ }
+ }
+ },
+ "price_per_share": {
+ "type": ["number", "null"],
+ "description": "Pool token price per share for vault-style pools; null otherwise",
+ "example": null
+ },
+ "volume_1d_usd": {
+ "type": ["number", "null"],
+ "description": "Trailing 24h trading volume in USD for DEX pools; null otherwise",
+ "example": null
+ },
+ "attributes": {
+ "type": "object",
+ "description": "Boolean attributes, also available as filters on /yields/v2/earn/query",
+ "properties": {
+ "stablecoin_only": {
+ "type": "boolean",
+ "description": "All pool assets are stablecoins",
+ "example": false
+ },
+ "single_asset_exposure": {
+ "type": "boolean",
+ "description": "Position is exposed to a single asset",
+ "example": true
+ },
+ "impermanent_loss_risk": {
+ "type": "boolean",
+ "description": "Position can suffer impermanent loss",
+ "example": false
+ }
+ }
+ },
+ "holders": {
+ "type": "object",
+ "description": "Pool token holder statistics; values are null where holder data is not tracked",
+ "properties": {
+ "count": {
+ "type": ["number", "null"],
+ "description": "Number of pool token holders",
+ "example": 618311
+ },
+ "avg_position_usd": {
+ "type": ["number", "null"],
+ "description": "Average position size in USD",
+ "example": 29423.56
+ },
+ "top_10_share_pct": {
+ "type": ["number", "null"],
+ "description": "Share of supply held by the top 10 holders, in percent",
+ "example": 61.97
+ }
+ }
+ },
+ "available_supply_usd": {
+ "type": ["number", "null"],
+ "description": "Remaining deposit capacity in USD for lending pools with a supply cap (cap minus TVL, floored at 0); null when the pool has no cap",
+ "example": null
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/yields/v2/earn/query": {
+ "get": {
+ "tags": ["yields"],
+ "x-api-plan-only": true,
+ "summary": "Retrieve a filtered, paginated page of earn pools",
+ "description": "Same rows as `/yields/v2/earn`, filtered and paginated server-side while keeping the TVL-descending order. All filters combine with AND; `chain` and `protocol` may be repeated to match any of up to 20 values. Unknown query parameters and out-of-range values are rejected with `400 INVALID_QUERY_PARAM`. Without parameters the top 100 pools by TVL are returned.",
"parameters": [
{
- "name": "excludeTotalDataChart",
+ "name": "chain",
"in": "query",
- "required": true,
- "description": "true to exclude aggregated chart from response",
+ "required": false,
+ "description": "Chain slug (lowercase). Repeat the parameter to match any of several chains, e.g. chain=ethereum&chain=arbitrum (at most 20 values)",
"schema": {
- "type": "boolean",
- "example": true
+ "type": "string",
+ "example": "ethereum"
}
},
{
- "name": "excludeTotalDataChartBreakdown",
+ "name": "protocol",
"in": "query",
- "required": true,
- "description": "true to exclude broken down chart from response",
+ "required": false,
+ "description": "Protocol slug (lowercase, e.g. aave-v3). Repeat the parameter to match any of several protocols (at most 20 values)",
"schema": {
- "type": "boolean",
- "example": true
+ "type": "string",
+ "example": "lido"
}
},
{
- "name": "dataType",
+ "name": "stablecoin",
"in": "query",
"required": false,
- "description": "Desired data type, dailyNotionalVolume by default.",
+ "description": "true keeps only pools whose assets are all stablecoins, false only the rest",
"schema": {
- "type": "string",
- "enum": ["dailyPremiumVolume", "dailyNotionalVolume"],
- "example": "dailyPremiumVolume"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Overview of all options DEXs with volume data",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "protocols": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "example": "Deribit"
- },
- "total24h": {
- "type": "number",
- "nullable": true,
- "example": 500000000
- },
- "change_1d": {
- "type": "number",
- "example": 8.5
- }
- }
- }
- },
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "example": [1640995200, 750000000]
- }
- }
- }
- }
- }
+ "type": "boolean",
+ "example": true
}
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.volumes.getOptionsOverview()"
},
{
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.volumes.getOptionsOverview()"
- }
- ]
- }
- },
- "/api/overview/options/{chain}": {
- "get": {
- "tags": ["volumes"],
- "summary": "List all options dexs along with summaries of their volumes and dataType history data filtering by chain",
- "parameters": [
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain name, list of all supported chains can be found under allChains attribute in /overview/options response",
+ "name": "single_asset_exposure",
+ "in": "query",
+ "required": false,
+ "description": "true keeps only pools exposed to a single asset, false only the rest",
"schema": {
- "type": "string",
- "example": "ethereum"
+ "type": "boolean",
+ "example": true
}
},
{
- "name": "excludeTotalDataChart",
+ "name": "impermanent_loss_risk",
"in": "query",
- "required": true,
- "description": "true to exclude aggregated chart from response",
+ "required": false,
+ "description": "true keeps only pools with impermanent loss risk, false only the rest",
"schema": {
"type": "boolean",
- "example": true
+ "example": false
}
},
{
- "name": "excludeTotalDataChartBreakdown",
+ "name": "min_tvl",
"in": "query",
- "required": true,
- "description": "true to exclude broken down chart from response",
+ "required": false,
+ "description": "Minimum pool TVL in USD (inclusive)",
"schema": {
- "type": "boolean",
- "example": true
+ "type": "number",
+ "example": 1000000
}
},
{
- "name": "dataType",
+ "name": "page",
"in": "query",
"required": false,
- "description": "Desired data type, dailyNotionalVolume by default.",
+ "description": "1-based page number; default 1",
"schema": {
- "type": "string",
- "enum": ["dailyPremiumVolume", "dailyNotionalVolume"],
- "example": "dailyPremiumVolume"
+ "type": "integer",
+ "minimum": 1,
+ "example": 1
+ }
+ },
+ {
+ "name": "limit",
+ "in": "query",
+ "required": false,
+ "description": "Page size between 1 and 300; default 100. Values above 300 are rejected, not clamped",
+ "schema": {
+ "type": "integer",
+ "minimum": 1,
+ "maximum": 300,
+ "example": 100
}
}
],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Page of earn pools matching the filters",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[timestamp, volume]",
- "items": {
- "type": "number"
- },
- "minItems": 2,
- "maxItems": 2
- },
- "description": "Historical chart data with timestamps and total volumes"
- },
- "totalDataChartBreakdown": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[timestamp, breakdown]",
- "items": {
- "oneOf": [
- {
- "type": "integer",
- "description": "Unix timestamp"
- },
- {
- "type": "object",
- "additionalProperties": {
- "type": "number"
- },
- "description": "Protocol breakdown with volume values"
- }
- ]
- },
- "minItems": 2,
- "maxItems": 2
- },
- "description": "Historical chart data broken down by protocol"
- },
- "breakdown24h": {
- "type": "object",
- "nullable": true,
- "description": "24-hour breakdown data"
- },
- "breakdown30d": {
- "type": "object",
- "nullable": true,
- "description": "30-day breakdown data"
- },
- "chain": {
- "type": "string",
- "description": "Chain name"
- },
- "allChains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "List of all supported chains"
- },
- "total24h": {
- "type": "number",
- "description": "Total 24-hour volume"
- },
- "total48hto24h": {
- "type": "number",
- "description": "Total 48-hour to 24-hour volume"
- },
- "total7d": {
- "type": "number",
- "description": "Total 7-day volume"
- },
- "total14dto7d": {
- "type": "number",
- "description": "Total 14-day to 7-day volume"
- },
- "total60dto30d": {
- "type": "number",
- "description": "Total 60-day to 30-day volume"
- },
- "total30d": {
- "type": "number",
- "description": "Total 30-day volume"
- },
- "total1y": {
- "type": "number",
- "description": "Total 1-year volume"
- },
- "change_1d": {
- "type": "number",
- "description": "1-day change percentage"
- },
- "change_7d": {
- "type": "number",
- "description": "7-day change percentage"
- },
- "change_1m": {
- "type": "number",
- "description": "1-month change percentage"
- },
- "change_7dover7d": {
- "type": "number",
- "description": "7-day over 7-day change percentage"
- },
- "change_30dover30d": {
- "type": "number",
- "description": "30-day over 30-day change percentage"
- },
- "total7DaysAgo": {
- "type": "number",
- "description": "Total volume 7 days ago"
- },
- "total30DaysAgo": {
- "type": "number",
- "description": "Total volume 30 days ago"
- },
- "totalAllTime": {
- "type": "number",
- "description": "Total all-time volume"
- },
- "protocols": {
+ "data": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "total24h": {
- "type": "number",
- "nullable": true,
- "description": "24-hour volume"
- },
- "total48hto24h": {
- "type": "number",
- "nullable": true,
- "description": "48-hour to 24-hour volume"
+ "id": {
+ "type": "string",
+ "description": "Pool id (UUID). Same id space as the v1 yields API pool field.",
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
},
- "total7d": {
- "type": "number",
- "description": "7-day volume"
- },
- "total14dto7d": {
- "type": "number",
- "description": "14-day to 7-day volume"
- },
- "total60dto30d": {
- "type": "number",
- "description": "60-day to 30-day volume"
- },
- "total30d": {
- "type": "number",
- "description": "30-day volume"
- },
- "total1y": {
- "type": "number",
- "description": "1-year volume"
- },
- "totalAllTime": {
- "type": "number",
- "description": "All-time volume"
- },
- "total7DaysAgo": {
- "type": "number",
- "description": "Volume 7 days ago"
- },
- "total30DaysAgo": {
- "type": "number",
- "description": "Volume 30 days ago"
- },
- "average1y": {
- "type": "number",
- "description": "Average 1-year volume"
- },
- "change_1d": {
- "type": "number",
- "description": "1-day change percentage"
- },
- "change_7d": {
- "type": "number",
- "description": "7-day change percentage"
- },
- "change_1m": {
- "type": "number",
- "description": "1-month change percentage"
- },
- "change_7dover7d": {
- "type": "number",
- "description": "7-day over 7-day change percentage"
- },
- "change_30dover30d": {
- "type": "number",
- "description": "30-day over 30-day change percentage"
- },
- "defillamaId": {
+ "pool_key": {
"type": "string",
- "description": "DefiLlama protocol ID"
+ "description": "Stable pool key.",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84-ethereum"
},
- "name": {
- "type": "string",
- "description": "Protocol name"
+ "pool_token": {
+ "type": ["object", "null"],
+ "description": "Receipt / vault token representing the position; null when the pool has no transferable pool token",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "stETH"
+ },
+ "name": {
+ "type": ["string", "null"],
+ "example": "Liquid staked Ether 2.0"
+ }
+ }
},
- "displayName": {
- "type": "string",
- "description": "Protocol display name"
+ "display": {
+ "type": "object",
+ "description": "Display strings for listings",
+ "properties": {
+ "label": {
+ "type": ["string", "null"],
+ "example": "stETH"
+ },
+ "detail": {
+ "type": ["string", "null"],
+ "example": "Liquid staked Ether 2.0"
+ }
+ }
},
- "module": {
- "type": "string",
- "description": "Protocol module name"
+ "reference_asset_symbol": {
+ "type": ["string", "null"],
+ "description": "The asset you provide to enter the pool (e.g. ETH, USDC, BTC)",
+ "example": "ETH"
},
- "category": {
+ "url": {
+ "type": ["string", "null"],
+ "description": "Pool page on the protocol app",
+ "example": "https://lido.fi/#networks"
+ },
+ "protocol": {
"type": "string",
- "description": "Protocol category"
+ "description": "Protocol display name",
+ "example": "Lido"
},
- "logo": {
+ "chain": {
"type": "string",
- "description": "Protocol logo URL"
+ "description": "Chain display name",
+ "example": "Ethereum"
},
- "chains": {
+ "underlying_tokens": {
"type": "array",
+ "description": "Tokens deposited into the pool",
"items": {
- "type": "string"
- },
- "description": "Supported chains"
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0x0000000000000000000000000000000000000000"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "ETH"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 18
+ }
+ }
+ }
},
- "protocolType": {
- "type": "string",
- "description": "Protocol type"
+ "reward_tokens": {
+ "type": "array",
+ "description": "Incentive tokens currently emitted to the pool; empty when there are none",
+ "items": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0xd533a949740bb3306d119cc777fa900ba034cd52"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "CRV"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 18
+ }
+ }
+ }
},
- "methodologyURL": {
- "type": "string",
- "description": "Methodology documentation URL"
+ "tvl_usd": {
+ "type": ["number", "null"],
+ "description": "Total value locked in USD",
+ "example": 18050422129
},
- "methodology": {
+ "apy": {
"type": "object",
- "additionalProperties": {
- "type": "string"
- },
- "description": "Protocol methodology details"
- },
- "parentProtocol": {
- "type": "string",
- "description": "Parent protocol identifier"
- },
- "slug": {
- "type": "string",
- "description": "Protocol slug"
+ "description": "Supply APY in percent, attributed into base (organic) and reward (incentive emissions) components",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed values",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.206
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 2.206
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.18932
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 2.18932
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.22409
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 2.22409
+ }
+ }
+ }
+ }
},
- "linkedProtocols": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "Linked protocol names"
+ "intrinsic": {
+ "type": ["object", "null"],
+ "description": "Yield accruing inside a yield-bearing underlying token, e.g. the stETH staking yield inside a wstETH pool. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
+ "properties": {
+ "apy": {
+ "type": "object",
+ "description": "Intrinsic APY in percent",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed value",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.11
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.05
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.02
+ }
+ }
+ }
+ }
+ },
+ "source_pool": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Earn pool the intrinsic yield is sourced from",
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
+ },
+ "pool_token": {
+ "type": "string",
+ "description": "Address of the yield-bearing token",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "stETH"
+ }
+ }
+ }
+ }
},
- "id": {
- "type": "string",
- "description": "Protocol ID"
+ "stability_30d": {
+ "type": "object",
+ "description": "Stability score (0 to 1) of the trailing 30-day APY series, computed as 1 / (1 + coefficient of variation); higher is steadier. Keyed by APY composition: read the leaf matching the APY components you consume (base, base + reward, base + intrinsic, base + reward + intrinsic).",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 0.9804
+ },
+ "base_reward": {
+ "type": ["number", "null"],
+ "example": 0.9804
+ },
+ "base_intrinsic": {
+ "type": ["number", "null"],
+ "example": 0.9804
+ },
+ "base_reward_intrinsic": {
+ "type": ["number", "null"],
+ "example": 0.9804
+ }
+ }
+ },
+ "price_per_share": {
+ "type": ["number", "null"],
+ "description": "Pool token price per share for vault-style pools; null otherwise",
+ "example": null
+ },
+ "volume_1d_usd": {
+ "type": ["number", "null"],
+ "description": "Trailing 24h trading volume in USD for DEX pools; null otherwise",
+ "example": null
+ },
+ "attributes": {
+ "type": "object",
+ "description": "Boolean attributes, also available as filters on /yields/v2/earn/query",
+ "properties": {
+ "stablecoin_only": {
+ "type": "boolean",
+ "description": "All pool assets are stablecoins",
+ "example": false
+ },
+ "single_asset_exposure": {
+ "type": "boolean",
+ "description": "Position is exposed to a single asset",
+ "example": true
+ },
+ "impermanent_loss_risk": {
+ "type": "boolean",
+ "description": "Position can suffer impermanent loss",
+ "example": false
+ }
+ }
+ },
+ "holders": {
+ "type": "object",
+ "description": "Pool token holder statistics; values are null where holder data is not tracked",
+ "properties": {
+ "count": {
+ "type": ["number", "null"],
+ "description": "Number of pool token holders",
+ "example": 618311
+ },
+ "avg_position_usd": {
+ "type": ["number", "null"],
+ "description": "Average position size in USD",
+ "example": 29423.56
+ },
+ "top_10_share_pct": {
+ "type": ["number", "null"],
+ "description": "Share of supply held by the top 10 holders, in percent",
+ "example": 61.97
+ }
+ }
+ },
+ "available_supply_usd": {
+ "type": ["number", "null"],
+ "description": "Remaining deposit capacity in USD for lending pools with a supply cap (cap minus TVL, floored at 0); null when the pool has no cap",
+ "example": null
}
}
- },
- "description": "List of protocols with their volume data"
- }
- }
- },
- "example": {
- "totalDataChart": [[1656201600, 3947]],
- "totalDataChartBreakdown": [
- [
- 1656201600,
- {
- "Premia V2": 3947
- }
- ],
- [
- 1656288000,
- {
- "Premia V2": 4716
}
- ],
- [
- 1656374400,
- {
- "Premia V2": 4716
+ },
+ "pagination": {
+ "type": "object",
+ "properties": {
+ "total": {
+ "type": "integer",
+ "description": "Total number of rows matching the filters, across all pages",
+ "example": 4519
+ },
+ "page": {
+ "type": "integer",
+ "example": 1
+ },
+ "limit": {
+ "type": "integer",
+ "example": 100
+ }
}
- ]
- ],
- "breakdown24h": null,
- "breakdown30d": null,
- "chain": "Ethereum",
- "allChains": [
- "Hyperliquid L1",
- "Derive Chain",
- "Arbitrum",
- "Ethereum",
- "Base",
- "Berachain",
- "Sui",
- "OP Mainnet",
- "Polygon",
- "Fantom",
- "Sonic",
- "Blast",
- "Mantle",
- "Bitlayer",
- "BSC",
- "Sei",
- "TON"
- ],
- "total24h": 38508,
- "total48hto24h": 57674,
- "total7d": 244966,
- "total14dto7d": 181066,
- "total60dto30d": 1543832,
- "total30d": 715276,
- "total1y": 38047667,
- "change_1d": -33.23,
- "change_7d": -0.13,
- "change_1m": 619.37,
- "change_7dover7d": 35.29,
- "change_30dover30d": -53.67,
- "total7DaysAgo": 38559,
- "total30DaysAgo": 5353,
- "totalAllTime": 212572409,
- "protocols": [
- {
- "total24h": 0,
- "total48hto24h": 0,
- "total7d": 0,
- "total14dto7d": 0,
- "total60dto30d": 0,
- "total30d": 0,
- "total1y": 0,
- "totalAllTime": 920677,
- "total7DaysAgo": 0,
- "total30DaysAgo": 0,
- "defillamaId": "381",
- "name": "Premia V2",
- "displayName": "Premia V2",
- "module": "premia-v2",
- "category": "Options",
- "logo": "https://icons.llamao.fi/icons/protocols/premia-v2.jpg",
- "chains": ["Ethereum", "Arbitrum", "Fantom", "OP Mainnet"],
- "protocolType": "protocol",
- "methodologyURL": "https://github.com/DefiLlama/dimension-adapters/blob/master/options/premia-v2.ts",
- "methodology": {
- "UserFees": "Traders pay taker fees on each trade up to 3% of the option premium.",
- "Fees": "Fees paid by users",
- "Revenue": "Treasury and token holders revenue",
- "ProtocolRevenue": "The protocol collects 20% of the taker fees.",
- "HoldersRevenue": "vxPREMIA holders collect 80% of the taker fees.",
- "SupplySideRevenue": "Liquidity providers earn revenue from market-making options."
- },
- "latestFetchIsOk": true,
- "parentProtocol": "parent#premia",
- "slug": "premia-v2",
- "linkedProtocols": ["Premia", "Premia V2", "Premia V3"],
- "id": "381"
}
- ]
+ }
}
}
}
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.volumes.getOptionsOverviewByChain('')"
},
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.volumes.getOptionsOverviewByChain('')"
+ "400": {
+ "description": "Unknown query parameter or invalid value",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string",
+ "example": "INVALID_QUERY_PARAM"
+ },
+ "message": {
+ "type": "string",
+ "example": "unknown query parameter: chains"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
- ]
+ }
}
},
- "/api/summary/options/{protocol}": {
+ "/yields/v2/earn/{id}/history": {
"get": {
- "tags": ["volumes"],
- "summary": "Get summary of options dex volume with historical data",
+ "tags": ["yields"],
+ "x-api-plan-only": true,
+ "summary": "Retrieve daily history for an earn pool",
+ "description": "Daily TVL, attributed APY and price per share for one earn pool, oldest first. APY carries `avg_1d` (that day), `avg_7d` and `avg_30d` (trailing averages ending that day) windows, each attributed into base/reward/total.",
"parameters": [
{
- "name": "protocol",
+ "name": "id",
"in": "path",
"required": true,
- "description": "protocol slug",
+ "description": "Earn pool id (UUID)",
"schema": {
"type": "string",
- "example": "derive"
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
}
},
{
- "name": "dataType",
+ "name": "range",
"in": "query",
"required": false,
- "description": "Desired data type, dailyNotionalVolume by default.",
+ "description": "History window; defaults to max (the full series)",
"schema": {
"type": "string",
- "enum": ["dailyPremiumVolume", "dailyNotionalVolume"],
- "example": "dailyPremiumVolume"
+ "enum": ["30d", "90d", "max"],
+ "example": "90d"
}
}
],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Daily history rows, oldest first",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "id": {
- "type": "string",
- "description": "Protocol ID"
- },
- "name": {
- "type": "string",
- "description": "Protocol name"
- },
- "url": {
- "type": "string",
- "description": "Protocol URL"
- },
- "description": {
- "type": "string",
- "nullable": true,
- "description": "Protocol description"
- },
- "logo": {
- "type": "string",
- "description": "Protocol logo URL"
- },
- "gecko_id": {
- "type": "string",
- "nullable": true,
- "description": "CoinGecko ID"
- },
- "cmcId": {
- "type": "string",
- "nullable": true,
- "description": "CoinMarketCap ID"
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "Supported chains"
- },
- "twitter": {
- "type": "string",
- "description": "Twitter handle"
- },
- "governanceID": {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- },
- "description": "Governance IDs"
- },
- "github": {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- },
- "description": "GitHub repositories"
- },
- "treasury": {
- "type": "string",
- "nullable": true,
- "description": "Treasury address"
- },
- "symbol": {
- "type": "string",
- "description": "Token symbol"
- },
- "address": {
- "type": "string",
- "nullable": true,
- "description": "Protocol address"
- },
- "childProtocols": {
- "type": "array",
- "items": {
- "type": "object"
- },
- "description": "Child protocols"
- },
- "linkedProtocols": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "Linked protocols"
- },
- "defillamaId": {
- "type": "string",
- "description": "DefiLlama protocol ID"
- },
- "disabled": {
- "type": "boolean",
- "nullable": true,
- "description": "Whether protocol is disabled"
- },
- "displayName": {
- "type": "string",
- "description": "Display name"
- },
- "module": {
- "type": "string",
- "nullable": true,
- "description": "Module name"
- },
- "category": {
- "type": "string",
- "nullable": true,
- "description": "Protocol category"
- },
- "methodologyURL": {
- "type": "string",
- "nullable": true,
- "description": "Methodology URL"
- },
- "methodology": {
- "type": "object",
- "nullable": true,
- "description": "Methodology details"
- },
- "forkedFrom": {
- "type": "string",
- "nullable": true,
- "description": "Forked from protocol"
- },
- "audits": {
- "type": "string",
- "nullable": true,
- "description": "Audit information"
- },
- "audit_links": {
- "type": "array",
- "nullable": true,
- "description": "Audit links"
- },
- "versionKey": {
- "type": "string",
- "nullable": true,
- "description": "Version key"
- },
- "parentProtocol": {
- "type": "string",
- "nullable": true,
- "description": "Parent protocol"
- },
- "previousNames": {
- "type": "array",
- "nullable": true,
- "description": "Previous names"
- },
- "slug": {
- "type": "string",
- "description": "Protocol slug"
- },
- "protocolType": {
- "type": "string",
- "description": "Protocol type"
- },
- "total24h": {
- "type": "number",
- "nullable": true,
- "description": "24-hour volume"
- },
- "total48hto24h": {
- "type": "number",
- "nullable": true,
- "description": "48-hour to 24-hour volume"
- },
- "total7d": {
- "type": "number",
- "description": "7-day volume"
- },
- "totalAllTime": {
- "type": "number",
- "description": "All-time volume"
- },
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[timestamp, volume]",
- "items": {
- "type": "number"
- },
- "minItems": 2,
- "maxItems": 2
- },
- "description": "Historical chart data with timestamps and volumes"
- },
- "totalDataChartBreakdown": {
+ "data": {
"type": "array",
"items": {
- "type": "array",
- "description": "[timestamp, breakdown]",
- "items": {
- "oneOf": [
- {
- "type": "integer",
- "description": "Unix timestamp"
- },
- {
- "type": "object",
- "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "Day (UTC)",
+ "example": "2026-07-27"
+ },
+ "tvl_usd": {
+ "type": ["number", "null"],
+ "description": "Total value locked in USD at that day",
+ "example": 18233358161
+ },
+ "apy": {
+ "type": "object",
+ "description": "Supply APY in percent, attributed into base (organic) and reward (incentive emissions) components",
+ "properties": {
+ "avg_1d": {
"type": "object",
- "additionalProperties": {
- "type": "number"
+ "description": "Average over that day",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.26695
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 2.26695
+ }
}
},
- "description": "Chain and protocol breakdown with volume values"
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.18878
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 2.18878
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.22396
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 2.22396
+ }
+ }
+ }
}
- ]
- },
- "minItems": 2,
- "maxItems": 2
- },
- "description": "Historical chart data broken down by chain and protocol"
- },
- "change_1d": {
- "type": "number",
- "description": "1-day change percentage"
- }
- }
- },
- "example": {
- "id": "parent#lyra",
- "name": "Derive",
- "url": "https://derive.xyz",
- "description": "Trade options & perps. Earn yield with restaking derivatives.",
- "logo": "https://icons.llama.fi/derive.png",
- "gecko_id": "derive",
- "cmcId": "35014",
- "chains": ["OP Mainnet", "Arbitrum", "Derive Chain"],
- "twitter": "derivexyz",
- "governanceID": ["snapshot:lyra.eth"],
- "github": ["lyra-finance"],
- "treasury": "lyra.js",
- "symbol": "DRV",
- "address": "0xb1d1eae60eea9525032a6dcb4c1ce336a1de71be",
- "childProtocols": [{}, {}],
- "linkedProtocols": ["Derive", "Derive V2", "Derive Options"],
- "defillamaId": "parent#lyra",
- "disabled": null,
- "displayName": "Derive",
- "module": null,
- "category": null,
- "methodologyURL": null,
- "methodology": null,
- "forkedFrom": null,
- "audits": null,
- "audit_links": null,
- "versionKey": null,
- "parentProtocol": null,
- "previousNames": null,
- "latestFetchIsOk": true,
- "slug": "derive",
- "protocolType": "protocol",
- "total24h": 849389,
- "total48hto24h": 529694,
- "total7d": 2327481,
- "totalAllTime": 156317108,
- "totalDataChart": [[1702684800, 15019], [1702771200, 15019]],
- "totalDataChartBreakdown": [
- [
- 1702684800,
- {
- "Ethereum": {
- "Derive V2": 15019
- }
- }
- ],
- [
- 1702771200,
- {
- "Derive Chain": {
- "Derive V2": 15019
+ },
+ "intrinsic": {
+ "type": ["object", "null"],
+ "description": "Intrinsic yield of a yield-bearing underlying token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
+ "properties": {
+ "apy": {
+ "type": "object",
+ "description": "Intrinsic APY in percent",
+ "properties": {
+ "avg_1d": {
+ "type": "object",
+ "description": "Average over that day",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.11
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.05
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.02
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "price_per_share": {
+ "type": ["number", "null"],
+ "description": "Pool token price per share for vault-style pools; null otherwise",
+ "example": null
+ }
}
}
- ]
- ],
- "change_1d": 60.35
+ }
+ }
}
}
}
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.volumes.getOptionsSummary('')"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.volumes.getOptionsSummary('')"
- }
- ]
- }
- },
- "/api/overview/open-interest": {
- "get": {
- "tags": ["perps"],
- "summary": "List all open interest dex exchanges along with summaries of their open interest",
- "parameters": [
- {
- "name": "excludeTotalDataChart",
- "in": "query",
- "required": true,
- "description": "true to exclude aggregated chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
},
- {
- "name": "excludeTotalDataChartBreakdown",
- "in": "query",
- "required": true,
- "description": "true to exclude broken down chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Overview of all open interest DEXs",
+ "404": {
+ "description": "No earn pool with this id",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "protocols": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "example": "Hyperliquid Perps"
- },
- "displayName": {
- "type": "string",
- "example": "Hyperliquid Perps"
- },
- "total24h": {
- "type": "number",
- "nullable": true,
- "example": 14304709847
- },
- "total7d": {
- "type": "number",
- "example": 93112774041
- },
- "change_1d": {
- "type": "number",
- "example": 3.62
- },
- "change_7d": {
- "type": "number",
- "example": 12.63
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Hyperliquid L1"]
- }
- }
- }
- },
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "oneOf": [
- {
- "type": "number"
- },
- {
- "type": "object"
- }
- ]
+ "error": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string",
+ "example": "POOL_NOT_FOUND"
},
- "example": [1654819200, 607785941]
+ "message": {
+ "type": "string",
+ "example": "earn pool not found"
+ }
}
- },
- "allChains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Hyperliquid L1", "Off Chain", "zkLighter"]
}
}
}
@@ -5953,735 +4353,926 @@
}
}
},
- "/api/overview/fees": {
+ "/yields/v2/earn/verified": {
"get": {
- "tags": ["fees and revenue"],
- "summary": "List all protocols along with summaries of their fees and revenue and dataType history data",
- "parameters": [
- {
- "name": "excludeTotalDataChart",
- "in": "query",
- "required": true,
- "description": "true to exclude aggregated chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
- },
- {
- "name": "excludeTotalDataChartBreakdown",
- "in": "query",
- "required": true,
- "description": "true to exclude broken down chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Desired data type, dailyFees by default.",
- "schema": {
- "type": "string",
- "enum": ["dailyFees", "dailyRevenue", "dailyHoldersRevenue"],
- "example": "dailyFees"
- }
- }
- ],
+ "tags": ["yields"],
+ "x-api-plan-only": true,
+ "summary": "Retrieve the latest verified data for all measured earn pools",
+ "description": "Measured yield for the `/yields/v2/earn` pools we simulate, sorted by verified TVL descending. Each figure is replayed from a real holder's withdrawal against archive state, so it shows what an exit would have paid rather than what the protocol reports; the two can disagree without either being wrong. `apy` is the base leg, since a withdrawal cannot see reward emissions, and is unclamped, so it can be negative; verified reward APR is served separately in `apy_reward`. A pool appears here only while it is listed on `/yields/v2/earn`, is not withheld for review, and has at least one measured day; join on `id`.",
"responses": {
"200": {
- "description": "Overview of all protocols with fees and revenue data",
+ "description": "Array of all verified earn pools",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "protocols": {
+ "data": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "name": {
+ "id": {
"type": "string",
- "example": "Uniswap"
+ "description": "Pool id (UUID); joins to `/yields/v2/earn`",
+ "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
},
- "total24h": {
- "type": "number",
- "nullable": true,
- "example": 5000000
+ "apy": {
+ "type": "object",
+ "description": "Measured base APY in percent. Base only, since a withdrawal cannot see reward emissions (verified rewards are `apy_reward`), and unclamped, so it can be negative. All three windows end at `apy_as_of`.",
+ "properties": {
+ "avg_1d": {
+ "type": ["number", "null"],
+ "description": "Trailing 1-day average",
+ "example": 1.45698
+ },
+ "avg_7d": {
+ "type": ["number", "null"],
+ "description": "Trailing 7-day average",
+ "example": 1.44895
+ },
+ "avg_30d": {
+ "type": ["number", "null"],
+ "description": "Trailing 30-day average",
+ "example": 1.47156
+ }
+ }
},
- "change_1d": {
- "type": "number",
- "example": 12.5
+ "apy_as_of": {
+ "type": ["string", "null"],
+ "description": "Timestamp the APY windows end at",
+ "example": "2026-09-14T09:19:11.000Z"
},
- "chains": {
- "type": "array",
+ "apy_note": {
+ "type": ["string", "null"],
+ "description": "Why the APY is absent or qualified. Show it wherever the APY renders blank; null for most pools.",
+ "example": null
+ },
+ "apy_confidence": {
+ "type": ["string", "null"],
+ "description": "How closely independent holders agreed on the redemption rate. Grades the measurement, not the pool.",
+ "enum": ["high", "medium", "low", "conflict", null],
+ "example": "high"
+ },
+ "apy_reward": {
+ "type": "object",
+ "description": "Verified reward APR in percent: simple, not compounded, from reward claims simulated for real holders (a Merkl leaf proven against the on-chain root, or the protocol's reward index). All three windows end at `apy_reward_as_of`. Null in every window means no verified reading (see `apy_reward_notes`); 0 is a verified reading. One window can be withheld while the others are served.",
+ "properties": {
+ "avg_1d": {
+ "type": ["number", "null"],
+ "description": "Trailing 1-day average",
+ "example": 2.71
+ },
+ "avg_7d": {
+ "type": ["number", "null"],
+ "description": "Trailing 7-day average",
+ "example": 2.73
+ },
+ "avg_30d": {
+ "type": ["number", "null"],
+ "description": "Trailing 30-day average",
+ "example": null
+ }
+ }
+ },
+ "apy_reward_as_of": {
+ "type": ["string", "null"],
+ "description": "End of the newest finished reward day (00:00 UTC the next day). Null when the pool has no reward reading or note.",
+ "example": "2026-10-24T00:00:00.000Z"
+ },
+ "apy_reward_tokens": {
+ "type": ["array", "null"],
+ "description": "Reward tokens bound to the pool, including any a note names. Null when none are bound.",
"items": {
- "type": "string"
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "description": "Reward token address",
+ "example": "0x8292bb45bf1ee4d140127049757c2e0ff06317ed"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "description": "Token symbol; null until its metadata is known",
+ "example": "RLUSD"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "description": "Token decimals; null until its metadata is known",
+ "example": 18
+ }
+ }
+ }
+ },
+ "apy_reward_sources": {
+ "type": ["array", "null"],
+ "description": "Where the reward reading was measured, a verified 0 included. Null when there is no reading.",
+ "items": {
+ "type": "string",
+ "enum": [
+ "merkl",
+ "aave-v3",
+ "umbrella",
+ "compound",
+ "curve-gauge",
+ "tokemak",
+ "staking-rewards",
+ "usual"
+ ]
},
- "example": ["Ethereum", "Polygon"]
- }
- }
- }
- },
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "example": [1640995200, 25000000]
- }
- },
- "totalDataChartBreakdown": {
- "type": "array",
- "items": {
- "type": "array",
- "example": [
- 1640995200,
- {
- "Uniswap": 5000000,
- "Compound": 3000000
- }
- ]
- }
- }
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.fees.getOverview()"
+ "example": ["aave-v3", "merkl"]
+ },
+ "apy_reward_notes": {
+ "type": "array",
+ "description": "Readable sentences; empty for most pools. Beside a reading, who earns it when not every holder does; with no reading, why it is withheld. Show them wherever the reward renders, or renders blank.",
+ "items": {
+ "type": "string",
+ "example": "Only eligible wallets earn this."
+ }
+ },
+ "exit": {
+ "type": "object",
+ "description": "Exit health from the most recent simulated withdrawal.",
+ "properties": {
+ "status": {
+ "type": ["string", "null"],
+ "description": "What a withdrawal would do today: `instant` all of it leaves now, `queued` accepted but paid later, `partial` bounded by `exit_liquidity`, `depleted` the lane is dust (under 0.1% of TVL and under $10k), `unavailable` nothing was accepted, `blocked` reverted as paused or unrecognized. Null when unclassified.",
+ "enum": ["instant", "queued", "partial", "depleted", "unavailable", "blocked", null],
+ "example": "instant"
+ },
+ "eta_seconds": {
+ "type": ["number", "null"],
+ "description": "Wait before a queued withdrawal can be claimed. Only set while `status` is `queued`.",
+ "example": null
+ },
+ "fee_bps": {
+ "type": ["number", "null"],
+ "description": "Exit fee in basis points. When the protocol discloses a structured fee, this is that fee, observed with `price_per_share` on `tvl.as_of`; otherwise the median discount against the reported rate over the last 30 discount observations. Null when unknown, never a claimed zero.",
+ "example": 0
+ },
+ "as_of": {
+ "type": ["string", "null"],
+ "description": "Timestamp of the exit observation",
+ "example": "2026-09-14T09:19:11.000Z"
+ },
+ "fee_flat": {
+ "type": "string",
+ "description": "Flat exit fee in raw base units of `denomination`, as a decimal string; parse with BigInt, not Number. Present only when the protocol discloses a structured fee, observed with `price_per_share` on `tvl.as_of`. Estimated proceeds: max(0, balance × price_per_share × (1 − fee_bps / 1e4) − fee_flat / 10^denomination.decimals), subject to rounding and later fee changes.",
+ "example": "0"
+ }
+ }
+ },
+ "exit_liquidity": {
+ "type": "object",
+ "description": "Funded exit capacity, not backing inventory; for queued pools this is the on-chain funding buffer, not instant liquidity. Null means no on-chain capacity is exposed, not zero.",
+ "properties": {
+ "amount": {
+ "type": ["string", "null"],
+ "description": "Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
+ "example": "302770028148448411826143"
+ },
+ "usd": {
+ "type": ["number", "null"],
+ "description": "Capacity in USD. Null when `denomination` is, since the conversion needs its decimals.",
+ "example": 749593682.56
+ },
+ "slippage_bps": {
+ "type": ["number", "null"],
+ "description": "Price impact of the simulated exit, in basis points",
+ "example": 0
+ },
+ "as_of": {
+ "type": ["string", "null"],
+ "description": "Day (UTC) the capacity was measured",
+ "example": "2026-09-14"
+ }
+ }
+ },
+ "tvl": {
+ "type": "object",
+ "description": "Receipt supply priced at the rate an exit actually paid, not the reported figure.",
+ "properties": {
+ "amount": {
+ "type": ["string", "null"],
+ "description": "Receipt supply at the executed redemption rate. Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
+ "example": "2120826166919814406207431"
+ },
+ "usd": {
+ "type": ["number", "null"],
+ "description": "Verified TVL in USD. Null when `denomination` is.",
+ "example": 5250710931.5
+ },
+ "as_of": {
+ "type": ["string", "null"],
+ "description": "Day (UTC) the TVL was measured",
+ "example": "2026-09-14"
+ }
+ }
+ },
+ "price_per_share": {
+ "type": ["number", "null"],
+ "description": "Underlying assets per position token, in human units. For rebasing tokens (aTokens, stETH) this is per internal share, so read it as a series normalized to its first point, not as an absolute. Null for LP pools (`denomination.kind` is `lp_unit`): their unit is √(x·y) of the reserves, so a price per share would read as a token price.",
+ "example": 1.0706808832358203
+ },
+ "denomination": {
+ "description": "Asset an exit pays out, and the decimals its raw amounts use. A token for most pools; for LP pools (`kind` is `lp_unit`) a synthetic unit, √(x·y) of the pool's reserves, labelled with its LP token and coins. Null when it could not be pinned; the USD fields go null with it, and you must not assume 18.",
+ "oneOf": [
+ {
+ "type": "object",
+ "title": "Token",
+ "required": ["address", "decimals"],
+ "properties": {
+ "address": {
+ "type": "string",
+ "description": "Payout token address",
+ "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "description": "Decimals of the payout token",
+ "example": 18
+ }
+ }
+ },
+ {
+ "type": "object",
+ "title": "LP unit",
+ "required": ["kind", "lp_token", "decimals", "coins"],
+ "properties": {
+ "kind": {
+ "type": "string",
+ "enum": ["lp_unit"],
+ "description": "Marks an LP pool's synthetic unit",
+ "example": "lp_unit"
+ },
+ "lp_token": {
+ "type": "string",
+ "description": "Address of the LP token the unit belongs to",
+ "example": "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "description": "Decimals of the raw amounts",
+ "example": 18
+ },
+ "coins": {
+ "type": ["array", "null"],
+ "description": "The pool's coins, as its underlying tokens",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ ]
+ }
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
},
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.fees.getOverview()"
+ "400": {
+ "description": "Unknown query parameter or invalid value",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string",
+ "example": "INVALID_QUERY_PARAM"
+ },
+ "message": {
+ "type": "string",
+ "example": "unknown query parameter: chain"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
- ]
+ }
}
},
- "/api/overview/fees/{chain}": {
+ "/yields/v2/earn/verified/{id}": {
"get": {
- "tags": ["fees and revenue"],
- "summary": "List all protocols along with summaries of their fees and revenue and dataType history data by chain",
+ "tags": ["yields"],
+ "x-api-plan-only": true,
+ "summary": "Retrieve the latest verified data for one earn pool",
+ "description": "The same row `/yields/v2/earn/verified` serves for this pool, plus `methods`: the on-chain calls the simulation executes, in order.",
"parameters": [
{
- "name": "chain",
+ "name": "id",
"in": "path",
"required": true,
- "description": "chain name, list of all supported chains can be found under allChains attribute in /overview/fees response",
- "schema": {
- "type": "string",
- "example": "ethereum"
- }
- },
- {
- "name": "excludeTotalDataChart",
- "in": "query",
- "required": true,
- "description": "true to exclude aggregated chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
- },
- {
- "name": "excludeTotalDataChartBreakdown",
- "in": "query",
- "required": true,
- "description": "true to exclude broken down chart from response",
- "schema": {
- "type": "boolean",
- "example": true
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Desired data type, dailyFees by default.",
+ "description": "Earn pool id (UUID)",
"schema": {
"type": "string",
- "enum": ["dailyFees", "dailyRevenue", "dailyHoldersRevenue"],
- "example": "dailyFees"
+ "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
}
}
],
"responses": {
"200": {
- "description": "Overview of all protocols with fees and revenue data",
+ "description": "Verified data for the pool",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "protocols": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "example": "Uniswap"
- },
- "total24h": {
- "type": "number",
- "nullable": true,
- "example": 5000000
- },
- "change_1d": {
- "type": "number",
- "example": 12.5
+ "data": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Pool id (UUID); joins to `/yields/v2/earn`",
+ "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
+ },
+ "apy": {
+ "type": "object",
+ "description": "Measured base APY in percent. Base only, since a withdrawal cannot see reward emissions (verified rewards are `apy_reward`), and unclamped, so it can be negative. All three windows end at `apy_as_of`.",
+ "properties": {
+ "avg_1d": {
+ "type": ["number", "null"],
+ "description": "Trailing 1-day average",
+ "example": 1.45698
+ },
+ "avg_7d": {
+ "type": ["number", "null"],
+ "description": "Trailing 7-day average",
+ "example": 1.44895
+ },
+ "avg_30d": {
+ "type": ["number", "null"],
+ "description": "Trailing 30-day average",
+ "example": 1.47156
+ }
+ }
+ },
+ "apy_as_of": {
+ "type": ["string", "null"],
+ "description": "Timestamp the APY windows end at",
+ "example": "2026-09-14T09:19:11.000Z"
+ },
+ "apy_note": {
+ "type": ["string", "null"],
+ "description": "Why the APY is absent or qualified. Show it wherever the APY renders blank; null for most pools.",
+ "example": null
+ },
+ "apy_confidence": {
+ "type": ["string", "null"],
+ "description": "How closely independent holders agreed on the redemption rate. Grades the measurement, not the pool.",
+ "enum": ["high", "medium", "low", "conflict", null],
+ "example": "high"
+ },
+ "apy_reward": {
+ "type": "object",
+ "description": "Verified reward APR in percent: simple, not compounded, from reward claims simulated for real holders (a Merkl leaf proven against the on-chain root, or the protocol's reward index). All three windows end at `apy_reward_as_of`. Null in every window means no verified reading (see `apy_reward_notes`); 0 is a verified reading. One window can be withheld while the others are served.",
+ "properties": {
+ "avg_1d": {
+ "type": ["number", "null"],
+ "description": "Trailing 1-day average",
+ "example": 2.71
+ },
+ "avg_7d": {
+ "type": ["number", "null"],
+ "description": "Trailing 7-day average",
+ "example": 2.73
+ },
+ "avg_30d": {
+ "type": ["number", "null"],
+ "description": "Trailing 30-day average",
+ "example": null
+ }
+ }
+ },
+ "apy_reward_as_of": {
+ "type": ["string", "null"],
+ "description": "End of the newest finished reward day (00:00 UTC the next day). Null when the pool has no reward reading or note.",
+ "example": "2026-10-24T00:00:00.000Z"
+ },
+ "apy_reward_tokens": {
+ "type": ["array", "null"],
+ "description": "Reward tokens bound to the pool, including any a note names. Null when none are bound.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "description": "Reward token address",
+ "example": "0x8292bb45bf1ee4d140127049757c2e0ff06317ed"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "description": "Token symbol; null until its metadata is known",
+ "example": "RLUSD"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "description": "Token decimals; null until its metadata is known",
+ "example": 18
+ }
+ }
+ }
+ },
+ "apy_reward_sources": {
+ "type": ["array", "null"],
+ "description": "Where the reward reading was measured, a verified 0 included. Null when there is no reading.",
+ "items": {
+ "type": "string",
+ "enum": [
+ "merkl",
+ "aave-v3",
+ "umbrella",
+ "compound",
+ "curve-gauge",
+ "tokemak",
+ "staking-rewards",
+ "usual"
+ ]
},
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
+ "example": ["aave-v3", "merkl"]
+ },
+ "apy_reward_notes": {
+ "type": "array",
+ "description": "Readable sentences; empty for most pools. Beside a reading, who earns it when not every holder does; with no reading, why it is withheld. Show them wherever the reward renders, or renders blank.",
+ "items": {
+ "type": "string",
+ "example": "Only eligible wallets earn this."
+ }
+ },
+ "exit": {
+ "type": "object",
+ "description": "Exit health from the most recent simulated withdrawal.",
+ "properties": {
+ "status": {
+ "type": ["string", "null"],
+ "description": "What a withdrawal would do today: `instant` all of it leaves now, `queued` accepted but paid later, `partial` bounded by `exit_liquidity`, `depleted` the lane is dust (under 0.1% of TVL and under $10k), `unavailable` nothing was accepted, `blocked` reverted as paused or unrecognized. Null when unclassified.",
+ "enum": ["instant", "queued", "partial", "depleted", "unavailable", "blocked", null],
+ "example": "instant"
},
- "example": ["Ethereum", "Polygon"]
+ "eta_seconds": {
+ "type": ["number", "null"],
+ "description": "Wait before a queued withdrawal can be claimed. Only set while `status` is `queued`.",
+ "example": null
+ },
+ "fee_bps": {
+ "type": ["number", "null"],
+ "description": "Exit fee in basis points. When the protocol discloses a structured fee, this is that fee, observed with `price_per_share` on `tvl.as_of`; otherwise the median discount against the reported rate over the last 30 discount observations. Null when unknown, never a claimed zero.",
+ "example": 0
+ },
+ "as_of": {
+ "type": ["string", "null"],
+ "description": "Timestamp of the exit observation",
+ "example": "2026-09-14T09:19:11.000Z"
+ },
+ "fee_flat": {
+ "type": "string",
+ "description": "Flat exit fee in raw base units of `denomination`, as a decimal string; parse with BigInt, not Number. Present only when the protocol discloses a structured fee, observed with `price_per_share` on `tvl.as_of`. Estimated proceeds: max(0, balance × price_per_share × (1 − fee_bps / 1e4) − fee_flat / 10^denomination.decimals), subject to rounding and later fee changes.",
+ "example": "0"
+ }
}
- }
- }
- },
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "example": [1640995200, 25000000]
- }
- },
- "totalDataChartBreakdown": {
- "type": "array",
- "items": {
- "type": "array",
- "example": [
- 1640995200,
- {
- "Uniswap": 5000000,
- "Compound": 3000000
+ },
+ "exit_liquidity": {
+ "type": "object",
+ "description": "Funded exit capacity, not backing inventory; for queued pools this is the on-chain funding buffer, not instant liquidity. Null means no on-chain capacity is exposed, not zero.",
+ "properties": {
+ "amount": {
+ "type": ["string", "null"],
+ "description": "Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
+ "example": "302770028148448411826143"
+ },
+ "usd": {
+ "type": ["number", "null"],
+ "description": "Capacity in USD. Null when `denomination` is, since the conversion needs its decimals.",
+ "example": 749593682.56
+ },
+ "slippage_bps": {
+ "type": ["number", "null"],
+ "description": "Price impact of the simulated exit, in basis points",
+ "example": 0
+ },
+ "as_of": {
+ "type": ["string", "null"],
+ "description": "Day (UTC) the capacity was measured",
+ "example": "2026-09-14"
+ }
}
- ]
- }
- }
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.fees.getOverviewByChain('')"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.fees.getOverviewByChain('')"
- }
- ]
- }
- },
- "/api/summary/fees/{protocol}": {
- "get": {
- "tags": ["fees and revenue"],
- "summary": "Get summary of protocol fees and revenue with historical data",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug",
- "schema": {
- "type": "string",
- "example": "derive"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Desired data type, dailyFees by default.",
- "schema": {
- "type": "string",
- "enum": ["dailyFees", "dailyRevenue", "dailyHoldersRevenue"],
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Protocol ID"
- },
- "name": {
- "type": "string",
- "description": "Protocol name"
- },
- "url": {
- "type": "string",
- "description": "Protocol URL"
- },
- "referralUrl": {
- "type": "string",
- "description": "Referral URL"
- },
- "description": {
- "type": "string",
- "nullable": true,
- "description": "Protocol description"
- },
- "logo": {
- "type": "string",
- "description": "Protocol logo URL"
- },
- "gecko_id": {
- "type": "string",
- "nullable": true,
- "description": "CoinGecko ID"
- },
- "cmcId": {
- "type": "string",
- "nullable": true,
- "description": "CoinMarketCap ID"
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "Supported chains"
- },
- "twitter": {
- "type": "string",
- "description": "Twitter handle"
- },
- "github": {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- },
- "description": "GitHub repositories"
- },
- "symbol": {
- "type": "string",
- "description": "Token symbol"
- },
- "address": {
- "type": "string",
- "nullable": true,
- "description": "Protocol address"
- },
- "childProtocols": {
- "type": "array",
- "items": {
- "type": "object"
- },
- "description": "Child protocols"
- },
- "linkedProtocols": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "Linked protocols"
- },
- "defillamaId": {
- "type": "string",
- "description": "DefiLlama protocol ID"
- },
- "disabled": {
- "type": "boolean",
- "nullable": true,
- "description": "Whether protocol is disabled"
- },
- "displayName": {
- "type": "string",
- "description": "Display name"
- },
- "module": {
- "type": "string",
- "nullable": true,
- "description": "Module name"
- },
- "category": {
- "type": "string",
- "nullable": true,
- "description": "Protocol category"
- },
- "methodologyURL": {
- "type": "string",
- "nullable": true,
- "description": "Methodology URL"
- },
- "methodology": {
- "type": "object",
- "nullable": true,
- "description": "Methodology details"
- },
- "forkedFrom": {
- "type": "string",
- "nullable": true,
- "description": "Forked from protocol"
- },
- "audits": {
- "type": "string",
- "nullable": true,
- "description": "Audit information"
- },
- "audit_links": {
- "type": "array",
- "nullable": true,
- "description": "Audit links"
- },
- "versionKey": {
- "type": "string",
- "nullable": true,
- "description": "Version key"
- },
- "governanceID": {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- },
- "description": "Governance IDs"
- },
- "treasury": {
- "type": "string",
- "nullable": true,
- "description": "Treasury address"
- },
- "parentProtocol": {
- "type": "string",
- "nullable": true,
- "description": "Parent protocol"
- },
- "previousNames": {
- "type": "array",
- "nullable": true,
- "description": "Previous names"
- },
- "slug": {
- "type": "string",
- "description": "Protocol slug"
- },
- "protocolType": {
- "type": "string",
- "description": "Protocol type"
- },
- "total24h": {
- "type": "number",
- "nullable": true,
- "description": "24 hour fees"
- },
- "total48hto24h": {
- "type": "number",
- "nullable": true,
- "description": "48h to 24h fees"
- },
- "total7d": {
- "type": "number",
- "description": "7 day fees"
- },
- "totalAllTime": {
- "type": "number",
- "description": "All time fees"
- },
- "change_1d": {
- "type": "number",
- "description": "1 day change percentage"
- },
- "totalDataChart": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[timestamp, fee value]",
- "items": {
- "type": "number"
},
- "minItems": 2,
- "maxItems": 2
- },
- "description": "Total data chart with timestamps and fees"
- },
- "totalDataChartBreakdown": {
- "type": "array",
- "items": {
- "type": "array",
- "description": "[timestamp, chain and protocol breakdown]",
- "items": {
+ "tvl": {
+ "type": "object",
+ "description": "Receipt supply priced at the rate an exit actually paid, not the reported figure.",
+ "properties": {
+ "amount": {
+ "type": ["string", "null"],
+ "description": "Receipt supply at the executed redemption rate. Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
+ "example": "2120826166919814406207431"
+ },
+ "usd": {
+ "type": ["number", "null"],
+ "description": "Verified TVL in USD. Null when `denomination` is.",
+ "example": 5250710931.5
+ },
+ "as_of": {
+ "type": ["string", "null"],
+ "description": "Day (UTC) the TVL was measured",
+ "example": "2026-09-14"
+ }
+ }
+ },
+ "price_per_share": {
+ "type": ["number", "null"],
+ "description": "Underlying assets per position token, in human units. For rebasing tokens (aTokens, stETH) this is per internal share, so read it as a series normalized to its first point, not as an absolute. Null for LP pools (`denomination.kind` is `lp_unit`): their unit is √(x·y) of the reserves, so a price per share would read as a token price.",
+ "example": 1.0706808832358203
+ },
+ "denomination": {
+ "description": "Asset an exit pays out, and the decimals its raw amounts use. A token for most pools; for LP pools (`kind` is `lp_unit`) a synthetic unit, √(x·y) of the pool's reserves, labelled with its LP token and coins. Null when it could not be pinned; the USD fields go null with it, and you must not assume 18.",
"oneOf": [
{
- "type": "integer",
- "description": "Timestamp"
+ "type": "object",
+ "title": "Token",
+ "required": ["address", "decimals"],
+ "properties": {
+ "address": {
+ "type": "string",
+ "description": "Payout token address",
+ "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "description": "Decimals of the payout token",
+ "example": 18
+ }
+ }
},
{
"type": "object",
- "description": "Chain and protocol breakdown"
- }
- ]
- },
- "minItems": 2,
- "maxItems": 2
- },
- "description": "Total data chart breakdown by chain and protocol"
- }
+ "title": "LP unit",
+ "required": ["kind", "lp_token", "decimals", "coins"],
+ "properties": {
+ "kind": {
+ "type": "string",
+ "enum": ["lp_unit"],
+ "description": "Marks an LP pool's synthetic unit",
+ "example": "lp_unit"
+ },
+ "lp_token": {
+ "type": "string",
+ "description": "Address of the LP token the unit belongs to",
+ "example": "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "description": "Decimals of the raw amounts",
+ "example": 18
+ },
+ "coins": {
+ "type": ["array", "null"],
+ "description": "The pool's coins, as its underlying tokens",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
+ "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ ]
+ }
+ }
+ },
+ {
+ "type": "null"
+ }
+ ]
+ },
+ "methods": {
+ "type": ["array", "null"],
+ "description": "On-chain calls the simulation executes, in order. Null when not recorded.",
+ "items": {
+ "type": "string",
+ "example": "Pool.withdraw(underlying, type(uint256).max, holder) — EXECUTED as the holder; returns underlying actually received"
+ }
+ }
+ }
+ }
}
- },
- "example": {
- "id": "parent#hyperliquid",
- "name": "Hyperliquid",
- "url": "https://hyperliquid.xyz",
- "referralUrl": "https://app.hyperliquid.xyz/join/DEFILLAMAO",
- "description": "Hyperliquid is a decentralized perpetual exchange with best-in-class speed, liquidity, and price",
- "logo": "https://icons.llama.fi/hyperliquid.png",
- "gecko_id": "hyperliquid",
- "cmcId": "32196",
- "chains": ["Hyperliquid L1"],
- "twitter": "HyperliquidX",
- "github": ["hyperliquid-dex"],
- "symbol": "HYPE",
- "address": "hyperliquid:0x0d01dc56dcaaca66ad901c959b4011ec",
- "childProtocols": [{}],
- "linkedProtocols": ["Hyperliquid", "Hyperliquid Spot Orderbook"],
- "defillamaId": "parent#hyperliquid",
- "disabled": null,
- "displayName": "Hyperliquid",
- "module": null,
- "category": null,
- "methodologyURL": null,
- "methodology": null,
- "forkedFrom": null,
- "audits": null,
- "audit_links": null,
- "versionKey": null,
- "governanceID": null,
- "treasury": null,
- "parentProtocol": null,
- "previousNames": null,
- "slug": "hyperliquid",
- "protocolType": "protocol",
- "total24h": 4890250,
- "total48hto24h": 4550411,
- "total7d": 26184696,
- "totalAllTime": 499292857,
- "change_1d": 7.47,
- "totalDataChart": [[1734912000, 1472923]],
- "totalDataChartBreakdown": [
- [
- 1734912000,
- {
- "Hyperliquid L1": {
- "Hyperliquid Spot Orderbook": 1472923
+ }
+ }
+ }
+ },
+ "400": {
+ "description": "Unknown query parameter or invalid value",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string",
+ "example": "INVALID_QUERY_PARAM"
+ },
+ "message": {
+ "type": "string",
+ "example": "unknown query parameter: range"
}
}
- ]
- ]
+ }
+ }
}
}
}
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.fees.getSummary('')"
},
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.fees.getSummary('')"
+ "404": {
+ "description": "No verified pool with this id",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string",
+ "example": "VERIFIED_POOL_NOT_FOUND"
+ },
+ "message": {
+ "type": "string",
+ "example": "verified pool not found"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
- ]
+ }
}
},
- "/api/v2/metrics/{metric}": {
+ "/yields/v2/earn/verified/{id}/history": {
"get": {
- "tags": ["Dimensions"],
+ "tags": ["yields"],
"x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get dimension data overview",
- "description": "Returns aggregate metrics for the specified dimension including totals and percentage changes across different time periods.",
+ "summary": "Retrieve daily verified history for an earn pool",
+ "description": "Daily measured APY, verified reward APR, share price, verified TVL and exit health for one pool, oldest first. `apy` and `apy_reward` carry `avg_1d` (that day), `avg_7d` and `avg_30d` (trailing averages ending that day). Days the pool was not measured are omitted, so the dates are not contiguous. Every `range` is sliced from the same cached series.",
"parameters": [
{
- "name": "metric",
+ "name": "id",
"in": "path",
"required": true,
- "description": "The dimension metric type",
+ "description": "Earn pool id (UUID)",
"schema": {
"type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume",
- "active-users"
- ],
- "example": "fees"
+ "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
}
},
{
- "name": "dataType",
+ "name": "range",
"in": "query",
"required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n- **active-users**: dailyActiveUsers (default), dailyTransactionCount, dailyGasUsed\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "description": "History window; defaults to max (the full series)",
"schema": {
"type": "string",
- "example": "dailyFees"
+ "enum": ["30d", "90d", "max"],
+ "example": "90d"
}
}
],
"responses": {
"200": {
- "description": "Dimension metrics overview",
+ "description": "Daily verified history rows, oldest first",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "allChains": {
+ "data": {
"type": "array",
"items": {
- "type": "string"
- },
- "example": ["Ethereum", "Solana", "BSC", "Base"]
- },
- "total24h": {
- "type": "number",
- "example": 42000000
- },
- "total48hto24h": {
- "type": "number",
- "example": 38000000
- },
- "total7d": {
- "type": "number",
- "example": 280000000
- },
- "total14dto7d": {
- "type": "number",
- "example": 260000000
- },
- "total60dto30d": {
- "type": "number",
- "example": 1100000000
- },
- "total30d": {
- "type": "number",
- "example": 1200000000
- },
- "total1y": {
- "type": "number",
- "example": 15000000000
- },
- "change_1d": {
- "type": "number",
- "example": 10.5
- },
- "change_7d": {
- "type": "number",
- "example": 7.8
- },
- "change_1m": {
- "type": "number",
- "example": 9.1
- },
- "change_7dover7d": {
- "type": "number",
- "example": 5.2
- },
- "change_30dover30d": {
- "type": "number",
- "example": 8.3
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "/api/v2/chart/{metric}": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get historical timeseries chart data",
- "description": "Returns an array of [timestamp, value] pairs representing the total metric value over time.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume",
- "active-users"
- ],
- "example": "fees"
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "Day (UTC)",
+ "example": "2026-09-14"
+ },
+ "outcome": {
+ "type": ["string", "null"],
+ "description": "Raw measurement outcome for that day, the uninterpreted form of `exit.status`. The `reverted_*` values are days a real withdrawal would have failed.",
+ "enum": [
+ "ok_full",
+ "ok_partial",
+ "delayed",
+ "no_exit_primary",
+ "reverted_liquidity",
+ "reverted_paused",
+ "reverted_unknown",
+ "error_rpc",
+ null
+ ],
+ "example": "ok_full"
+ },
+ "eta_seconds": {
+ "type": ["number", "null"],
+ "description": "Wait before that day's queued withdrawal could be claimed. Only set when `outcome` is `delayed`.",
+ "example": null
+ },
+ "confidence": {
+ "type": ["string", "null"],
+ "description": "Holder-consensus confidence in that day's measurement",
+ "enum": ["high", "medium", "low", "conflict", null],
+ "example": "high"
+ },
+ "apy": {
+ "type": "object",
+ "description": "Measured base APY in percent. Base only, since a withdrawal cannot see reward emissions (verified rewards are `apy_reward`), and unclamped, so it can be negative.",
+ "properties": {
+ "avg_1d": {
+ "type": ["number", "null"],
+ "description": "Average over that day",
+ "example": 1.45698
+ },
+ "avg_7d": {
+ "type": ["number", "null"],
+ "description": "Trailing 7-day average ending that day",
+ "example": 1.44895
+ },
+ "avg_30d": {
+ "type": ["number", "null"],
+ "description": "Trailing 30-day average ending that day",
+ "example": 1.47156
+ }
+ }
+ },
+ "apy_reward": {
+ "type": "object",
+ "description": "Verified reward APR in percent, simple, not compounded. Null in every window means no verified reading that day; 0 is a verified reading.",
+ "properties": {
+ "avg_1d": {
+ "type": ["number", "null"],
+ "description": "That day's reward APR",
+ "example": 2.71
+ },
+ "avg_7d": {
+ "type": ["number", "null"],
+ "description": "Trailing 7-day average ending that day",
+ "example": 2.73
+ },
+ "avg_30d": {
+ "type": ["number", "null"],
+ "description": "Trailing 30-day average ending that day",
+ "example": null
+ }
+ }
+ },
+ "apy_reward_notes": {
+ "type": "array",
+ "description": "That day's reward notes: who earns the reading, or why it is withheld. Empty for most days.",
+ "items": {
+ "type": "string",
+ "example": "Only eligible wallets earn this."
+ }
+ },
+ "price_per_share": {
+ "type": ["number", "null"],
+ "description": "Underlying assets per position token, in human units. For rebasing tokens (aTokens, stETH) this is per internal share, so read it as a series normalized to its first point, not as an absolute. Null for LP pools (`denomination.kind` is `lp_unit`): their unit is √(x·y) of the reserves, so a price per share would read as a token price.",
+ "example": 1.0706808832358203
+ },
+ "price_per_share_quoted": {
+ "type": ["number", "null"],
+ "description": "The pool's reported price, for days the executed exit could not price one. A quote, not a measurement, so mark it differently in a chart. Null unless corroborated, and always for LP pools.",
+ "example": 1.0706808832358203
+ },
+ "reason": {
+ "type": ["string", "null"],
+ "description": "Why `price_per_share` is null on a day that was otherwise measured; null when it is present.",
+ "enum": ["rate_quality_floor", "nav_quote_no_exit_path", "no_executed_exit_path", null],
+ "example": null
+ },
+ "exit_liquidity": {
+ "type": "object",
+ "description": "Funded exit capacity, not backing inventory; for queued pools this is the on-chain funding buffer, not instant liquidity. Null means no on-chain capacity is exposed, not zero.",
+ "properties": {
+ "amount": {
+ "type": ["string", "null"],
+ "description": "Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
+ "example": "302770028148448411826143"
+ },
+ "usd": {
+ "type": ["number", "null"],
+ "description": "Capacity in USD. Null when `denomination` is, since the conversion needs its decimals.",
+ "example": 749593682.56
+ },
+ "slippage_bps": {
+ "type": ["number", "null"],
+ "description": "Price impact of the simulated exit, in basis points",
+ "example": 0
+ }
+ }
+ },
+ "tvl": {
+ "type": "object",
+ "description": "Receipt supply priced at the rate an exit actually paid, not the reported figure.",
+ "properties": {
+ "amount": {
+ "type": ["string", "null"],
+ "description": "Receipt supply at the executed redemption rate. Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
+ "example": "2120826166919814406207431"
+ },
+ "usd": {
+ "type": ["number", "null"],
+ "description": "Verified TVL in USD. Null when `denomination` is.",
+ "example": 5250710931.5
+ }
+ }
+ },
+ "tvl_quoted": {
+ "type": "object",
+ "description": "Supply valued at the reported rate, for the days `tvl` is null. A valuation, not an exit measure.",
+ "properties": {
+ "amount": {
+ "type": ["string", "null"],
+ "description": "Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
+ "example": "2120826166919814406207431"
+ },
+ "usd": {
+ "type": ["number", "null"],
+ "description": "Quoted valuation in USD",
+ "example": 5250710931.5
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
},
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n- **active-users**: dailyActiveUsers (default), dailyTransactionCount, dailyGasUsed\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
+ "400": {
+ "description": "Unknown query parameter or invalid value",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string",
+ "example": "INVALID_QUERY_PARAM"
+ },
+ "message": {
+ "type": "string",
+ "example": "range must be one of: 30d, 90d, max"
+ }
+ }
+ }
+ }
+ }
+ }
}
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, value] pairs",
+ },
+ "404": {
+ "description": "No verified pool with this id",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "number"
- },
- "minItems": 2,
- "maxItems": 2,
- "example": [1534550400, 42000000]
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string",
+ "example": "VERIFIED_POOL_NOT_FOUND"
+ },
+ "message": {
+ "type": "string",
+ "example": "verified pool not found"
+ }
+ }
+ }
}
}
}
@@ -6690,2839 +5281,425 @@
}
}
},
- "/api/v2/chart/{metric}/chain-breakdown": {
+ "/yields/v2/borrow/markets": {
"get": {
- "tags": ["Dimensions"],
+ "tags": ["yields"],
"x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get historical timeseries chart data breakdown by chain",
- "description": "Returns an array of [timestamp, {chain: value}] pairs showing the metric broken down by chain over time. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume",
- "active-users"
- ],
- "example": "fees"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n- **active-users**: dailyActiveUsers (default), dailyTransactionCount, dailyGasUsed\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, chainBreakdown] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1534550400,
- {
- "Ethereum": 30000000,
- "Solana": 12000000
- }
- ],
- [
- 1534636800,
- {
- "Ethereum": 31000000,
- "Solana": 12500000
- }
- ]
- ]
- }
- }
- }
- }
- }
- }
- },
- "/api/v2/chart/{metric}/protocol-breakdown": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get historical timeseries chart data breakdown by protocol",
- "description": "Returns an array of [timestamp, {protocol: value}] pairs showing the metric broken down by protocol over time.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, protocolBreakdown] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1534550400,
- {
- "Uniswap V3": 15000000,
- "Aave": 8000000
- }
- ],
- [
- 1534636800,
- {
- "Uniswap V3": 15500000,
- "Aave": 8200000
- }
- ]
- ]
- }
- }
- }
- }
- }
- }
- },
- "/api/v2/metrics/{metric}/chain/{chain}": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get chain dimension data overview",
- "description": "Returns aggregate metrics for the specified dimension filtered by a specific chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain name",
- "schema": {
- "type": "string",
- "example": "Ethereum"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
+ "summary": "Retrieve the latest data for all borrow markets",
+ "description": "One row per borrow market: collateral and debt token, maximum loan-to-value, USD supply/borrow totals and attributed APY for both sides over `current`, `avg_7d` and `avg_30d` windows. Reward emissions offset borrowing costs, so `borrow_cost_apy` totals can be negative (the borrower is net paid).",
"responses": {
"200": {
- "description": "Chain dimension metrics overview",
+ "description": "Array of all borrow markets",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "allChains": {
+ "data": {
"type": "array",
"items": {
- "type": "string"
- },
- "example": ["Ethereum", "Solana", "BSC", "Base"]
- },
- "total24h": {
- "type": "number",
- "example": 42000000
- },
- "total48hto24h": {
- "type": "number",
- "example": 38000000
- },
- "total7d": {
- "type": "number",
- "example": 280000000
- },
- "total14dto7d": {
- "type": "number",
- "example": 260000000
- },
- "total60dto30d": {
- "type": "number",
- "example": 1100000000
- },
- "total30d": {
- "type": "number",
- "example": 1200000000
- },
- "total1y": {
- "type": "number",
- "example": 15000000000
- },
- "change_1d": {
- "type": "number",
- "example": 10.5
- },
- "change_7d": {
- "type": "number",
- "example": 7.8
- },
- "change_1m": {
- "type": "number",
- "example": 9.1
- },
- "change_7dover7d": {
- "type": "number",
- "example": 5.2
- },
- "change_30dover30d": {
- "type": "number",
- "example": 8.3
- },
- "chain": {
- "type": "string",
- "example": "Ethereum"
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/chart/{metric}/chain/{chain}": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get chain historical timeseries chart data",
- "description": "Returns an array of [timestamp, value] pairs for the metric filtered by a specific chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain name",
- "schema": {
- "type": "string",
- "example": "Ethereum"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, value] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "number"
- },
- "minItems": 2,
- "maxItems": 2,
- "example": [1534550400, 42000000]
- }
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/chart/{metric}/chain/{chain}/protocol-breakdown": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get chain timeseries chart data breakdown by protocol",
- "description": "Returns an array of [timestamp, {protocol: value}] pairs showing the metric on a specific chain broken down by protocol. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain name",
- "schema": {
- "type": "string",
- "example": "Ethereum"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, protocolBreakdown] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1534550400,
- {
- "Uniswap V3": 15000000,
- "Aave": 8000000
- }
- ],
- [
- 1534636800,
- {
- "Uniswap V3": 15500000,
- "Aave": 8200000
- }
- ]
- ]
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/metrics/{metric}/protocol/{protocol}": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get protocol dimension data overview",
- "description": "Returns protocol metadata along with aggregate metrics for the specified dimension.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug (slugified protocol name)",
- "schema": {
- "type": "string",
- "example": "aave"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Protocol dimension metrics overview",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "example": "2196"
- },
- "name": {
- "type": "string",
- "example": "Aave"
- },
- "url": {
- "type": "string",
- "example": "https://aave.com"
- },
- "description": {
- "type": "string"
- },
- "logo": {
- "type": "string",
- "example": "https://icons.llama.fi/aave.png"
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Ethereum", "Polygon", "Avalanche"]
- },
- "gecko_id": {
- "type": "string",
- "nullable": true,
- "example": "aave"
- },
- "cmcId": {
- "type": "string",
- "nullable": true,
- "example": "7278"
- },
- "symbol": {
- "type": "string",
- "nullable": true,
- "example": "AAVE"
- },
- "twitter": {
- "type": "string",
- "nullable": true
- },
- "github": {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- },
- "treasury": {
- "type": "string",
- "nullable": true
- },
- "governanceID": {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- },
- "wrongLiquidity": {
- "type": "boolean",
- "nullable": true
- },
- "stablecoins": {
- "type": "array",
- "nullable": true,
- "items": {
- "type": "string"
- }
- },
- "total24h": {
- "type": "number",
- "example": 1200000
- },
- "total48hto24h": {
- "type": "number",
- "example": 1100000
- },
- "total7d": {
- "type": "number",
- "example": 8000000
- },
- "total30d": {
- "type": "number",
- "example": 35000000
- },
- "total1y": {
- "type": "number",
- "example": 400000000
- },
- "change_1d": {
- "type": "number",
- "example": 9.1
- },
- "change_7d": {
- "type": "number",
- "example": 5.3
- },
- "change_1m": {
- "type": "number",
- "example": 12.4
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/chart/{metric}/protocol/{protocol}": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get protocol historical timeseries chart data",
- "description": "Returns an array of [timestamp, value] pairs for the metric of a specific protocol.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug (slugified protocol name)",
- "schema": {
- "type": "string",
- "example": "aave"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, value] pairs",
- "content": {
- "application/json": {
- "examples": {
- "dailyAggregatedVolume": {
- "summary": "Bridge dailyAggregatedVolume",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyAggregatedVolume. Historical example for 2022-10-17 UTC.",
- "value": [[1665964800, 834139]]
- },
- "dailyOutgoingVolume": {
- "summary": "Bridge dailyOutgoingVolume",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyOutgoingVolume. Historical example for 2022-10-17 UTC.",
- "value": [[1665964800, 834139]]
- },
- "dailyIncomingVolume": {
- "summary": "Bridge dailyIncomingVolume",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyIncomingVolume. Historical example for 2022-10-17 UTC.",
- "value": [[1665964800, 834139]]
- },
- "dailyTxCount": {
- "summary": "Bridge dailyTxCount",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyTxCount. Historical example for 2022-10-17 UTC.",
- "value": [[1665964800, 33]]
- },
- "dailyOutgoingTxCount": {
- "summary": "Bridge dailyOutgoingTxCount",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyOutgoingTxCount. Historical example for 2022-10-17 UTC.",
- "value": [[1665964800, 33]]
- },
- "dailyIncomingTxCount": {
- "summary": "Bridge dailyIncomingTxCount",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyIncomingTxCount. Historical example for 2022-10-17 UTC.",
- "value": [[1665964800, 33]]
- }
- },
- "schema": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "number"
- },
- "minItems": 2,
- "maxItems": 2,
- "example": [1534550400, 42000000]
- }
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/chart/{metric}/protocol/{protocol}/chain-breakdown": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get protocol timeseries chart data breakdown by chain",
- "description": "Returns an array of [timestamp, {chain: value}] pairs showing the metric for a specific protocol broken down by chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug (slugified protocol name)",
- "schema": {
- "type": "string",
- "example": "aave"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, chainBreakdown] pairs",
- "content": {
- "application/json": {
- "examples": {
- "dailyAggregatedVolume": {
- "summary": "Bridge dailyAggregatedVolume",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyAggregatedVolume. Historical example for 2022-10-17 UTC.",
- "value": [
- [
- 1665964800,
- {
- "Ethereum": 834139,
- "OP Mainnet": 834139
- }
- ]
- ]
- },
- "dailyOutgoingVolume": {
- "summary": "Bridge dailyOutgoingVolume",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyOutgoingVolume. Historical example for 2022-10-17 UTC.",
- "value": [
- [
- 1665964800,
- {
- "Ethereum": 811248,
- "OP Mainnet": 22891
- }
- ]
- ]
- },
- "dailyIncomingVolume": {
- "summary": "Bridge dailyIncomingVolume",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyIncomingVolume. Historical example for 2022-10-17 UTC.",
- "value": [
- [
- 1665964800,
- {
- "Ethereum": 22891,
- "OP Mainnet": 811248
- }
- ]
- ]
- },
- "dailyTxCount": {
- "summary": "Bridge dailyTxCount",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyTxCount. Historical example for 2022-10-17 UTC.",
- "value": [
- [
- 1665964800,
- {
- "Ethereum": 33,
- "OP Mainnet": 33
- }
- ]
- ]
- },
- "dailyOutgoingTxCount": {
- "summary": "Bridge dailyOutgoingTxCount",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyOutgoingTxCount. Historical example for 2022-10-17 UTC.",
- "value": [
- [
- 1665964800,
- {
- "Ethereum": 28,
- "OP Mainnet": 5
- }
- ]
- ]
- },
- "dailyIncomingTxCount": {
- "summary": "Bridge dailyIncomingTxCount",
- "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyIncomingTxCount. Historical example for 2022-10-17 UTC.",
- "value": [
- [
- 1665964800,
- {
- "Ethereum": 5,
- "OP Mainnet": 28
- }
- ]
- ]
- }
- },
- "schema": {
- "type": "array",
- "example": [
- [
- 1534550400,
- {
- "Ethereum": 30000000,
- "Solana": 12000000
- }
- ],
- [
- 1534636800,
- {
- "Ethereum": 31000000,
- "Solana": 12500000
- }
- ]
- ]
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/chart/{metric}/protocol/{protocol}/version-breakdown": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get protocol timeseries chart data breakdown by version",
- "description": "Returns an array of [timestamp, {version: value}] pairs showing the metric for a specific protocol broken down by version (e.g. Aave V2, Aave V3). For bridges, version values sum chain activity and can exceed the protocol total for dailyAggregatedVolume and dailyTxCount. Use /api/v2/chart/bridges/protocol/{protocol} for the protocol total.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug (slugified protocol name)",
- "schema": {
- "type": "string",
- "example": "aave"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, versionBreakdown] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1607040000,
- {
- "Aave V2": 131
- }
- ],
- [
- 1607126400,
- {
- "Aave V2": 334,
- "Aave V3": 500
- }
- ]
- ]
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/chart/{metric}/protocol/{protocol}/label-breakdown": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get protocol timeseries chart data breakdown by label",
- "description": "Returns an array of [timestamp, {label: value}] pairs showing the metric for a specific protocol broken down by label (e.g. Borrow Interest, Flash Loans). Currently only supported for metric=fees.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug (slugified protocol name)",
- "schema": {
- "type": "string",
- "example": "aave"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, labelBreakdown] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1607040000,
- {
- "Borrow Interest": 131
- }
- ],
- [
- 1607126400,
- {
- "Borrow Interest": 334,
- "Flash Loans": 50
- }
- ]
- ]
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/metrics/{metric}/categories": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get categories available for a dimension",
- "description": "Returns the categories that have data for the selected metric and dataType, with aggregate totals and active chain names. Use category names in slug form for category routes, for example canonical-bridge for Canonical Bridge. For bridges, totals are in USD for volume dataTypes and transfer counts for TxCount dataTypes.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume",
- "active-users"
- ],
- "example": "fees"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n- **active-users**: dailyActiveUsers (default), dailyTransactionCount, dailyGasUsed\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Categories with data for the selected dimension and dataType",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "category": {
- "type": "string",
- "example": "Canonical Bridge"
- },
- "total24h": {
- "type": "number",
- "nullable": true
- },
- "total7d": {
- "type": "number",
- "nullable": true
- },
- "total30d": {
- "type": "number",
- "nullable": true
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Ethereum", "OP Mainnet"]
- }
- }
- }
- }
- }
- }
- },
- "500": {
- "description": "Category data not available"
- }
- }
- }
- },
- "/api/v2/metrics/{metric}/category/{category}": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get category dimension data overview",
- "description": "Returns aggregate metrics for the specified dimension filtered by a specific category.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "category",
- "in": "path",
- "required": true,
- "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
- "schema": {
- "type": "string",
- "example": "dexs"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Category dimension metrics overview",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "allChains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Ethereum", "Solana", "BSC", "Base"]
- },
- "total24h": {
- "type": "number",
- "example": 42000000
- },
- "total48hto24h": {
- "type": "number",
- "example": 38000000
- },
- "total7d": {
- "type": "number",
- "example": 280000000
- },
- "total14dto7d": {
- "type": "number",
- "example": 260000000
- },
- "total60dto30d": {
- "type": "number",
- "example": 1100000000
- },
- "total30d": {
- "type": "number",
- "example": 1200000000
- },
- "total1y": {
- "type": "number",
- "example": 15000000000
- },
- "change_1d": {
- "type": "number",
- "example": 10.5
- },
- "change_7d": {
- "type": "number",
- "example": 7.8
- },
- "change_1m": {
- "type": "number",
- "example": 9.1
- },
- "change_7dover7d": {
- "type": "number",
- "example": 5.2
- },
- "change_30dover30d": {
- "type": "number",
- "example": 8.3
- },
- "category": {
- "type": "string",
- "example": "Dexs"
- },
- "allCategories": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Dexs", "Lending", "Bridge", "Derivatives"]
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/chart/{metric}/category/{category}": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get category historical timeseries chart data",
- "description": "Returns an array of [timestamp, value] pairs for the metric filtered by a specific category.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "category",
- "in": "path",
- "required": true,
- "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
- "schema": {
- "type": "string",
- "example": "dexs"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, value] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "number"
- },
- "minItems": 2,
- "maxItems": 2,
- "example": [1534550400, 42000000]
- }
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/chart/{metric}/category/{category}/chain-breakdown": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get category timeseries chart data breakdown by chain",
- "description": "Returns an array of [timestamp, {chain: value}] pairs showing the metric for a specific category broken down by chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "category",
- "in": "path",
- "required": true,
- "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
- "schema": {
- "type": "string",
- "example": "dexs"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, chainBreakdown] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1534550400,
- {
- "Ethereum": 30000000,
- "Solana": 12000000
- }
- ],
- [
- 1534636800,
- {
- "Ethereum": 31000000,
- "Solana": 12500000
- }
- ]
- ]
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/chart/{metric}/category/{category}/protocol-breakdown": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get category timeseries chart data breakdown by protocol",
- "description": "Returns an array of [timestamp, {protocol: value}] pairs showing the metric for a specific category broken down by protocol.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "category",
- "in": "path",
- "required": true,
- "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
- "schema": {
- "type": "string",
- "example": "dexs"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, protocolBreakdown] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1534550400,
- {
- "Uniswap V3": 15000000,
- "Aave": 8000000
- }
- ],
- [
- 1534636800,
- {
- "Uniswap V3": 15500000,
- "Aave": 8200000
- }
- ]
- ]
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/metrics/{metric}/category/{category}/chain/{chain}": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get category chain dimension data overview",
- "description": "Returns aggregate metrics for the specified dimension filtered by both category and chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "category",
- "in": "path",
- "required": true,
- "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
- "schema": {
- "type": "string",
- "example": "dexs"
- }
- },
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain name",
- "schema": {
- "type": "string",
- "example": "Ethereum"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Category chain dimension metrics overview",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "allChains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Ethereum", "Solana", "BSC", "Base"]
- },
- "total24h": {
- "type": "number",
- "example": 42000000
- },
- "total48hto24h": {
- "type": "number",
- "example": 38000000
- },
- "total7d": {
- "type": "number",
- "example": 280000000
- },
- "total14dto7d": {
- "type": "number",
- "example": 260000000
- },
- "total60dto30d": {
- "type": "number",
- "example": 1100000000
- },
- "total30d": {
- "type": "number",
- "example": 1200000000
- },
- "total1y": {
- "type": "number",
- "example": 15000000000
- },
- "change_1d": {
- "type": "number",
- "example": 10.5
- },
- "change_7d": {
- "type": "number",
- "example": 7.8
- },
- "change_1m": {
- "type": "number",
- "example": 9.1
- },
- "change_7dover7d": {
- "type": "number",
- "example": 5.2
- },
- "change_30dover30d": {
- "type": "number",
- "example": 8.3
- },
- "category": {
- "type": "string",
- "example": "Dexs"
- },
- "allCategories": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Dexs", "Lending", "Bridge", "Derivatives"]
- },
- "chain": {
- "type": "string",
- "example": "Ethereum"
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/chart/{metric}/category/{category}/chain/{chain}": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get category chain historical timeseries chart data",
- "description": "Returns an array of [timestamp, value] pairs for the metric filtered by both category and chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "category",
- "in": "path",
- "required": true,
- "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
- "schema": {
- "type": "string",
- "example": "dexs"
- }
- },
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain name",
- "schema": {
- "type": "string",
- "example": "Ethereum"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, value] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "array",
- "items": {
- "type": "number"
- },
- "minItems": 2,
- "maxItems": 2,
- "example": [1534550400, 42000000]
- }
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/chart/{metric}/category/{category}/chain/{chain}/protocol-breakdown": {
- "get": {
- "tags": ["Dimensions"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get category chain timeseries chart data breakdown by protocol",
- "description": "Returns an array of [timestamp, {protocol: value}] pairs showing the metric filtered by both category and chain, broken down by protocol. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
- "parameters": [
- {
- "name": "metric",
- "in": "path",
- "required": true,
- "description": "The dimension metric type",
- "schema": {
- "type": "string",
- "enum": [
- "fees",
- "liquidations",
- "dexs",
- "derivatives",
- "options",
- "aggregators",
- "bridge-aggregators",
- "bridges",
- "open-interest",
- "normalized-volume"
- ],
- "example": "fees"
- }
- },
- {
- "name": "category",
- "in": "path",
- "required": true,
- "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
- "schema": {
- "type": "string",
- "example": "dexs"
- }
- },
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain name",
- "schema": {
- "type": "string",
- "example": "Ethereum"
- }
- },
- {
- "name": "dataType",
- "in": "query",
- "required": false,
- "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
- "schema": {
- "type": "string",
- "example": "dailyFees"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Array of [timestamp, protocolBreakdown] pairs",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "example": [
- [
- 1534550400,
- {
- "Uniswap V3": 15000000,
- "Aave": 8000000
- }
- ],
- [
- 1534636800,
- {
- "Uniswap V3": 15500000,
- "Aave": 8200000
- }
- ]
- ]
- }
- }
- }
- },
- "404": {
- "description": "Not found"
- }
- }
- }
- },
- "/api/v2/metrics/financial-statement/protocol/{protocol}": {
- "get": {
- "tags": ["Financial Statements"],
- "x-api-plan-only": true,
- "x-api-beta": true,
- "summary": "Get protocol income statement report",
- "description": "Returns protocol metadata, methodology details, and aggregated financial statement data (yearly, quarterly, monthly). Each period contains line items such as Gross Protocol Revenue, Cost Of Revenue, Gross Profit, Token Holder Net Income, Incentives, and Earnings, with values and optional label breakdowns.\n\nWhen querying a parent protocol (e.g. `aave`), the response includes a `childProtocols` array with per-version methodology. When querying a child protocol (e.g. `aave-v3`), methodology and breakdownMethodology are at the top level.",
- "parameters": [
- {
- "name": "protocol",
- "in": "path",
- "required": true,
- "description": "protocol slug (e.g. aave-v3, hyperliquid)",
- "schema": {
- "type": "string",
- "example": "aave-v3"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Protocol income statement report",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Protocol ID. Parent protocols use 'parent#slug' format.",
- "example": "1599"
- },
- "name": {
- "type": "string",
- "example": "Aave V3"
- },
- "address": {
- "type": "string",
- "nullable": true,
- "example": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
- },
- "symbol": {
- "type": "string",
- "nullable": true,
- "example": "AAVE"
- },
- "url": {
- "type": "string",
- "example": "https://aave.com"
- },
- "description": {
- "type": "string",
- "example": "Earn interest, borrow assets, and build applications"
- },
- "chain": {
- "type": "string",
- "nullable": true,
- "description": "Primary chain (present for child protocols)",
- "example": "Optimism"
- },
- "logo": {
- "type": "string",
- "example": "https://icons.llamao.fi/icons/protocols/aave-v3.png"
- },
- "audits": {
- "type": "string",
- "nullable": true,
- "example": "2"
- },
- "audit_links": {
- "type": "array",
- "nullable": true,
- "items": { "type": "string" },
- "example": ["https://aave.com/security"]
- },
- "category": {
- "type": "string",
- "nullable": true,
- "description": "Protocol category (present for child protocols)",
- "example": "Lending"
- },
- "chains": {
- "type": "array",
- "items": { "type": "string" },
- "example": ["Polygon", "Arbitrum", "Avalanche", "OP Mainnet", "Ethereum", "Base"]
- },
- "oraclesBreakdown": {
- "type": "array",
- "nullable": true,
- "description": "Oracles used by the protocol",
- "items": {
- "type": "object",
- "properties": {
- "name": { "type": "string", "example": "Chainlink" },
- "type": { "type": "string", "example": "Primary" },
- "proof": { "type": "array", "items": { "type": "string" } }
- }
- }
- },
- "module": {
- "type": "string",
- "nullable": true,
- "example": "aave-v3"
- },
- "twitter": {
- "type": "string",
- "nullable": true,
- "example": "aave"
- },
- "github": {
- "type": "array",
- "nullable": true,
- "items": { "type": "string" }
- },
- "listedAt": {
- "type": "integer",
- "nullable": true,
- "description": "Unix timestamp when protocol was listed",
- "example": 1648776877
- },
- "parentProtocol": {
- "type": "string",
- "nullable": true,
- "description": "Parent protocol ID (present for child protocols)",
- "example": "parent#aave"
- },
- "dimensions": {
- "type": "object",
- "nullable": true,
- "description": "Available dimension adapters for this protocol",
- "additionalProperties": {
- "oneOf": [
- { "type": "string", "example": "aave-v3" },
- {
- "type": "object",
- "properties": {
- "adapter": { "type": "string" },
- "genuineSpikes": { "type": "array" }
- }
- }
- ]
- },
- "example": {
- "fees": { "genuineSpikes": [["2024-08-05", "-"]], "adapter": "aave-v3" },
- "liquidations": "aave-v3"
- }
- },
- "methodology": {
- "type": "object",
- "nullable": true,
- "description": "Maps line item names to descriptions. Present at top level for child protocols, inside childProtocols for parent protocols.",
- "additionalProperties": { "type": "string" },
- "example": {
- "Gross Protocol Revenue": "Include borrow interest, flashloan fee, liquidation fee, penalty paid by borrowers and swap fees from Paraswap.",
- "Cost Of Revenue": "Amount of fees distributed to suppliers.",
- "Gross Profit": "Amount of fees go to Aave treasury.",
- "Token Holder Net Income": "Aave starts buy back AAVE tokens using Aave Treasury after 9th April 2025."
- }
- },
- "breakdownMethodology": {
- "type": "object",
- "nullable": true,
- "description": "Maps line item names to objects mapping label names to descriptions. Present at top level for child protocols, inside childProtocols for parent protocols.",
- "additionalProperties": {
- "type": "object",
- "additionalProperties": { "type": "string" }
- },
- "example": {
- "Gross Protocol Revenue": {
- "Borrow Interest": "All interest paid by borrowers from all markets (excluding GHO).",
- "Borrow Interest GHO": "All interest paid by borrowers from GHO only.",
- "Liquidation Fees": "Fees from liquidation penalty and bonuses.",
- "Flashloan Fees": "Flashloan fees paid by flashloan borrowers and executors.",
- "Paraswap Partner Fees": "Swap fees share from Paraswap from users by using Aave frontend."
- },
- "Cost Of Revenue": {
- "Borrow Interest": "Amount of interest distributed to lenders from all markets (excluding GHO).",
- "Liquidation Fees": "Fees from liquidation penalty and bonuses are distributed to lenders."
- },
- "Gross Profit": {
- "Borrow Interest": "A portion of interest paid by borrowers from all markets (excluding GHO).",
- "Borrow Interest GHO": "All 100% interest paid by GHO borrowers.",
- "Liquidation Fees": "A portion of fees from liquidation penalty and bonuses."
- },
- "Token Holder Net Income": {
- "Token Buy Back": "Aave starts buy back AAVE tokens using Aave Treasury after 9th April 2025."
- }
- }
- },
- "methodologyURL": {
- "type": "string",
- "nullable": true,
- "example": "https://github.com/DefiLlama/dimension-adapters/blob/master/fees/aave-v3.ts"
- },
- "tvlCodePath": {
- "type": "string",
- "nullable": true,
- "example": "https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/aave-v3/index.js"
- },
- "hallmarks": {
- "type": "array",
- "nullable": true,
- "description": "Notable events as [timestamp, description] pairs",
- "items": {
- "type": "array",
- "items": {}
- },
- "example": [[1650412800, "Start AVAX Rewards"], [1659571200, "Start OP Rewards"]]
- },
- "linkedProtocols": {
- "type": "array",
- "items": { "type": "string" },
- "example": ["Aave", "Aave V2", "Aave V3"]
- },
- "childProtocols": {
- "type": "array",
- "nullable": true,
- "description": "Child protocol versions with their methodology details. Only present for parent protocols.",
- "items": {
- "type": "object",
- "properties": {
- "name": { "type": "string", "example": "Aave V3" },
- "defillamaId": { "type": "string", "example": "1599" },
- "displayName": { "type": "string" },
- "methodologyURL": { "type": "string", "nullable": true },
- "methodology": {
- "type": "object",
- "additionalProperties": { "type": "string" }
- },
- "breakdownMethodology": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "additionalProperties": { "type": "string" }
- }
- }
- }
- }
- },
- "hasLabelBreakdown": {
- "type": "boolean",
- "example": true
- },
- "defillamaId": {
- "type": "string",
- "example": "1599"
- },
- "displayName": {
- "type": "string",
- "example": "Aave V3"
- },
- "slug": {
- "type": "string",
- "example": "aave-v3"
- },
- "protocolType": {
- "type": "string",
- "example": "protocol"
- },
- "aggregates": {
- "type": "object",
- "description": "Financial data aggregated by time period",
- "properties": {
- "yearly": {
- "type": "object",
- "description": "Keyed by year (e.g. '2024'). Each value is an object of line items.",
- "additionalProperties": {
- "type": "object",
- "description": "Financial line items for a time period. Common line items include Gross Protocol Revenue, Cost Of Revenue, Gross Profit, Token Holder Net Income, Incentives, and Earnings. Each line item has a value and optional by-label breakdown.",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "value": {
- "type": "number",
- "description": "Total USD value for this line item in the period",
- "example": 456472580
- },
- "by-label": {
- "type": "object",
- "description": "Breakdown by label (e.g. Borrow Interest, Liquidation Fees, Flash Loans). Not present for all line items.",
- "nullable": true,
- "additionalProperties": { "type": "number" },
- "example": {
- "Borrow Interest": 416862749,
- "Liquidation Fees": 31413361,
- "Flashloan Fees": 1441
- }
- }
- }
- },
- "example": {
- "Gross Protocol Revenue": {
- "value": 456472580,
- "by-label": {
- "Borrow Interest": 416862749,
- "Liquidation Fees": 31413361,
- "Flashloan Fees": 1441
- }
- },
- "Cost Of Revenue": {
- "value": 384670312,
- "by-label": { "Borrow Interest": 356424169, "Liquidation Fees": 28246110 }
- },
- "Gross Profit": { "value": 71802305 },
- "Token Holder Net Income": { "value": 0 },
- "Incentives": {
- "value": 4895806.72,
- "by-label": { "stkAAVE Rewards": 19461161.65, "Lending/Borrowing Rewards": 1197840.72 }
- },
- "Earnings": { "value": 66906498.28 }
- }
- }
- },
- "quarterly": {
- "type": "object",
- "description": "Keyed by quarter (e.g. '2024-Q1'). Each value is an object of line items.",
- "additionalProperties": {
- "type": "object",
- "description": "Financial line items for a time period.",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "value": {
- "type": "number",
- "description": "Total USD value for this line item in the period",
- "example": 456472580
- },
- "by-label": {
- "type": "object",
- "description": "Breakdown by label. Not present for all line items.",
- "nullable": true,
- "additionalProperties": { "type": "number" }
- }
- }
- }
- }
- },
- "monthly": {
- "type": "object",
- "description": "Keyed by month (e.g. '2024-01'). Each value is an object of line items.",
- "additionalProperties": {
- "type": "object",
- "description": "Financial line items for a time period.",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "value": {
- "type": "number",
- "description": "Total USD value for this line item in the period",
- "example": 456472580
- },
- "by-label": {
- "type": "object",
- "description": "Breakdown by label. Not present for all line items.",
- "nullable": true,
- "additionalProperties": { "type": "number" }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "Protocol not found"
- }
- }
- }
- },
- "/stablecoins/stablecoindominance/{chain}": {
- "get": {
- "tags": ["stablecoins"],
- "summary": "Get stablecoin dominance per chain along with the info about the larges coin in a chain",
- "parameters": [
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain slug, you can get these from /chains or the chains property on /protocols",
- "schema": {
- "type": "string",
- "example": "Ethereum"
- }
- },
- {
- "name": "stablecoin",
- "in": "query",
- "required": false,
- "description": "stablecoin ID, you can get these from /stablecoins",
- "schema": {
- "type": "integer",
- "example": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "date": {
- "type": "string",
- "example": "1752796800"
- },
- "totalCirculatingUSD": {
- "type": "object",
- "properties": {
- "peggedUSD": {
- "type": "number",
- "example": 129531632690.44954
- },
- "peggedVAR": {
- "type": "number",
- "example": 100466426.71408615
- },
- "peggedEUR": {
- "type": "number",
- "example": 286714265.91542196
- }
- }
- },
- "greatestMcap": {
- "type": "object",
- "properties": {
- "gecko_id": {
- "type": "string",
- "example": "tether"
- },
- "symbol": {
- "type": "string",
- "example": "USDT"
- },
- "mcap": {
- "type": "number",
- "example": 65836754910.17763
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.stablecoins.getDominance('')"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.stablecoins.getDominance('')"
- }
- ]
- }
- },
- "/yields/v1/pools": {
- "get": {
- "tags": ["yields"],
- "x-api-plan-only": true,
- "summary": "Retrieve the latest data for all pools in the legacy v1 response format",
- "description": "Serves the former `/yields/pools` response format, including the extra fields from `/yields/poolsOld`. Frozen for compatibility: the shape will not change and no new fields will be added - use `/yields/v2/earn` for new integrations.",
- "responses": {
- "200": {
- "description": "Array of all pools in the legacy v1 format",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "example": "success"
- },
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "pool": {
- "type": "string",
- "description": "Pool id (UUID). Same id space as the v2 yields API.",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
- },
- "timestamp": {
- "type": "string",
- "description": "Timestamp of the latest data point.",
- "example": "2026-09-17T14:10:48.521Z"
- },
- "project": {
- "type": "string",
- "example": "lido"
- },
- "chain": {
- "type": "string",
- "example": "Ethereum"
- },
- "symbol": {
- "type": "string",
- "description": "Uppercase symbol.",
- "example": "STETH"
- },
- "poolMeta": {
- "type": ["string", "null"],
- "example": null
- },
- "underlyingTokens": {
- "type": ["array", "null"],
- "description": "Underlying token addresses, lowercase.",
- "items": {
- "type": "string"
- },
- "example": ["0x0000000000000000000000000000000000000000"]
- },
- "rewardTokens": {
- "type": ["array", "null"],
- "description": "Reward token addresses, lowercase; null when no rewards are currently flowing.",
- "items": {
- "type": "string"
- },
- "example": null
- },
- "poolTokenAddress": {
- "type": ["string", "null"],
- "description": "Receipt/pool token address, lowercase.",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
- },
- "tvlUsd": {
- "type": "number",
- "description": "TVL in USD; for lending markets this is available liquidity, not total supplied.",
- "example": 23592091898
- },
- "apy": {
- "type": "number",
- "example": 2.212
- },
- "apyBase": {
- "type": ["number", "null"],
- "example": 2.212
- },
- "apyReward": {
- "type": ["number", "null"],
- "example": null
- },
- "il7d": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "apyBase7d": {
- "type": ["number", "null"],
- "description": "7-day base APY, where the adapter reports one.",
- "example": null
- },
- "volumeUsd1d": {
- "type": ["number", "null"],
- "example": null
- },
- "volumeUsd7d": {
- "type": ["number", "null"],
- "description": "7-day volume in USD.",
- "example": null
- },
- "apyBaseInception": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "url": {
- "type": "string",
- "example": "https://lido.fi/#networks"
- },
- "apyPct1D": {
- "type": ["number", "null"],
- "description": "Absolute APY change vs 1 day ago, in percentage points.",
- "example": -0.02227
- },
- "apyPct7D": {
- "type": ["number", "null"],
- "example": -0.06154
- },
- "apyPct30D": {
- "type": ["number", "null"],
- "example": 0.01517
- },
- "apyMean30d": {
- "type": ["number", "null"],
- "description": "30-day mean APY.",
- "example": 2.21043
- },
- "stablecoin": {
- "type": "boolean",
- "description": "Whether every underlying asset is a stablecoin.",
- "example": false
- },
- "ilRisk": {
+ "type": "object",
+ "properties": {
+ "id": {
"type": "string",
- "example": "no"
+ "description": "Market id (UUID)",
+ "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
},
- "exposure": {
+ "pool_key": {
"type": "string",
- "example": "single"
- },
- "return": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "count": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "apyMeanExpanding": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "apyStdExpanding": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "mu": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "sigma": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "outlier": {
- "type": ["boolean", "null"],
- "description": "True when the pool's APY is a statistical outlier within its cohort.",
- "example": false
- },
- "project_factorized": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "chain_factorized": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
+ "description": "Stable market key.",
+ "example": "0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8-ethereum"
},
- "predictions": {
- "type": "object",
- "description": "Always null; no longer computed.",
+ "pool_token": {
+ "type": ["object", "null"],
+ "description": "Receipt / vault token representing the position; null when the market has no transferable pool token",
"properties": {
- "predictedClass": {
- "type": ["string", "null"],
- "example": null
+ "address": {
+ "type": "string",
+ "example": "0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8"
},
- "predictedProbability": {
- "type": ["number", "null"],
- "example": null
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "aEthWETH"
},
- "binnedConfidence": {
- "type": ["number", "null"],
- "example": null
- }
- }
- },
- "pool_old": {
- "type": "string",
- "description": "The original pool key (usually contains a pool address).",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "/yields/v1/chart/{pool}": {
- "get": {
- "tags": ["yields"],
- "x-api-plan-only": true,
- "summary": "Get historical APY and TVL of a pool in the legacy v1 response format",
- "description": "Daily history in the legacy v1 format. Every value is the day's last observation. Unknown pool ids return an empty `data` array.",
- "parameters": [
- {
- "name": "pool",
- "in": "path",
- "required": true,
- "description": "pool id (UUID), from /yields/v1/pools (property is called pool)",
- "schema": {
- "type": "string",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Historical APY and TVL data for the specified pool",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "example": "success"
- },
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "string",
- "example": "2022-05-03T00:00:00.000Z"
- },
- "tvlUsd": {
- "type": ["number", "null"],
- "description": "The day's last observation.",
- "example": 11074372760
- },
- "apy": {
- "type": ["number", "null"],
- "description": "The day's last observation.",
- "example": 3.6
- },
- "apyBase": {
- "type": ["number", "null"],
- "example": 3.6
- },
- "apyReward": {
- "type": ["number", "null"],
- "example": null
- },
- "il7d": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "apyBase7d": {
- "type": ["number", "null"],
- "description": "7-day base APY, where the adapter reports one.",
- "example": null
- },
- "pricePerShare": {
- "type": ["number", "null"],
- "description": "The day's last observation.",
- "example": null
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "/yields/v1/poolsBorrow": {
- "get": {
- "tags": ["yields"],
- "x-api-plan-only": true,
- "summary": "Borrow costs APY of assets from lending markets in the legacy v1 response format",
- "description": "Serves the former `/yields/poolsBorrow` response format. Markets that cannot currently be borrowed from are not listed. Frozen for compatibility: the shape will not change and no new fields will be added - use `/yields/v2/borrow/markets` for new integrations.",
- "responses": {
- "200": {
- "description": "Array of lending markets in the legacy v1 format",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "example": "success"
- },
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "chain": {
- "type": "string",
- "example": "Ethereum"
+ "name": {
+ "type": ["string", "null"],
+ "example": "Aave Ethereum WETH"
+ }
+ }
},
- "project": {
- "type": "string",
- "example": "aave-v3"
+ "display": {
+ "type": "object",
+ "description": "Display strings for listings",
+ "properties": {
+ "label": {
+ "type": ["string", "null"],
+ "description": "Collateral symbol, or \"COLLATERAL / DEBT\" for isolated pairs",
+ "example": "WETH"
+ },
+ "detail": {
+ "type": ["string", "null"],
+ "example": null
+ }
+ }
},
- "symbol": {
- "type": "string",
- "description": "Uppercase symbol.",
- "example": "WETH"
+ "url": {
+ "type": ["string", "null"],
+ "description": "Market page on the protocol app",
+ "example": "https://app.aave.com/reserve-overview/?underlyingAsset=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&marketName=proto_mainnet_v3"
},
- "tvlUsd": {
- "type": ["number", "null"],
- "description": "TVL in USD; for lending markets this is available liquidity, not total supplied.",
- "example": 727935089
+ "protocol": {
+ "type": "string",
+ "description": "Protocol display name",
+ "example": "Aave V3"
},
- "apyBase": {
- "type": ["number", "null"],
- "example": 1.45716
+ "chain": {
+ "type": "string",
+ "description": "Chain display name",
+ "example": "Ethereum"
},
- "apyReward": {
- "type": ["number", "null"],
- "example": null
+ "collateral_token": {
+ "type": "object",
+ "description": "Token supplied as collateral; null when unknown",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "WETH"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 18
+ }
+ }
},
- "apy": {
- "type": ["number", "null"],
- "example": 1.45716
+ "borrow_token": {
+ "type": "object",
+ "description": "Token borrowed from the market; null when unknown",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "WETH"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 18
+ }
+ }
},
- "rewardTokens": {
- "type": ["array", "null"],
- "description": "Reward token addresses, lowercase; null when no rewards are currently flowing.",
+ "reward_tokens": {
+ "type": "array",
+ "description": "Incentive tokens currently emitted to the market; empty when there are none",
"items": {
- "type": "string"
- },
- "example": null
- },
- "pool": {
- "type": "string",
- "description": "Pool id (UUID). Same id space as the v2 yields API.",
- "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0xd533a949740bb3306d119cc777fa900ba034cd52"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "CRV"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 18
+ }
+ }
+ }
},
- "apyPct1D": {
+ "loan_to_value": {
"type": ["number", "null"],
- "description": "Absolute APY change vs 1 day ago, in percentage points.",
- "example": -0.05531
+ "description": "Maximum loan-to-value as a fraction (0.805 = 80.5%)",
+ "example": 0.805
},
- "apyPct7D": {
+ "total_supply_usd": {
"type": ["number", "null"],
- "example": -0.06874
+ "description": "Total supplied to the market, in USD",
+ "example": 3683494475
},
- "apyPct30D": {
+ "total_borrow_usd": {
"type": ["number", "null"],
- "example": -0.02456
+ "description": "Total borrowed from the market, in USD",
+ "example": 3022727877
},
- "stablecoin": {
- "type": "boolean",
- "description": "Whether every underlying asset is a stablecoin.",
- "example": false
+ "available_borrow_usd": {
+ "type": ["number", "null"],
+ "description": "Liquidity still available to borrow, in USD",
+ "example": 568755149
},
- "ilRisk": {
- "type": "string",
- "example": "no"
+ "supply_apy": {
+ "type": "object",
+ "description": "APY in percent earned by suppliers",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed values",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 1.49954
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 1.49954
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 1.46669
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 1.46669
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 1.40929
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 1.40929
+ }
+ }
+ }
+ }
},
- "exposure": {
- "type": "string",
- "example": "single"
+ "borrow_cost_apy": {
+ "type": "object",
+ "description": "APY in percent paid by borrowers. Reward emissions reduce the cost, so total = base - reward and can be negative",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed values",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.14984
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": 2.14984
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.12582
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": 2.12582
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.08412
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": 2.08412
+ }
+ }
+ }
+ }
},
- "predictions": {
+ "intrinsic": {
"type": "object",
- "description": "Always null; no longer computed.",
+ "description": "Intrinsic yield of yield-bearing tokens on either side of the market",
"properties": {
- "predictedClass": {
- "type": ["string", "null"],
- "example": null
- },
- "predictedProbability": {
- "type": ["number", "null"],
- "example": null
+ "supply": {
+ "type": ["object", "null"],
+ "description": "Intrinsic yield of the supply-side token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
+ "properties": {
+ "apy": {
+ "type": "object",
+ "description": "Intrinsic APY in percent",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed value",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.11
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.05
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.02
+ }
+ }
+ }
+ }
+ },
+ "source_pool": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Earn pool the intrinsic yield is sourced from",
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
+ },
+ "pool_token": {
+ "type": "string",
+ "description": "Address of the yield-bearing token",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "stETH"
+ }
+ }
+ }
+ }
},
- "binnedConfidence": {
- "type": ["number", "null"],
- "example": null
+ "borrow": {
+ "type": ["object", "null"],
+ "description": "Intrinsic yield of the borrowed token. Borrowing a yield-bearing token adds this rate to the effective borrow cost, since the debt appreciates by it. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
+ "properties": {
+ "apy": {
+ "type": "object",
+ "description": "Intrinsic APY in percent",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed value",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.11
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.05
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.02
+ }
+ }
+ }
+ }
+ },
+ "source_pool": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Earn pool the intrinsic yield is sourced from",
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
+ },
+ "pool_token": {
+ "type": "string",
+ "description": "Address of the yield-bearing token",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "stETH"
+ }
+ }
+ }
+ }
}
- }
- },
- "poolMeta": {
- "type": ["string", "null"],
- "example": null
- },
- "mu": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "sigma": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "count": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "outlier": {
- "type": ["boolean", "null"],
- "description": "True when the pool's APY is a statistical outlier within its cohort.",
- "example": false
- },
- "underlyingTokens": {
- "type": ["array", "null"],
- "description": "Underlying token addresses, lowercase.",
- "items": {
- "type": "string"
- },
- "example": ["0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"]
- },
- "il7d": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "apyBase7d": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "apyMean30d": {
- "type": ["number", "null"],
- "description": "30-day mean APY.",
- "example": 1.4662
- },
- "volumeUsd1d": {
- "type": ["number", "null"],
- "example": null
- },
- "volumeUsd7d": {
- "type": ["number", "null"],
- "description": "7-day volume in USD.",
- "example": null
- },
- "apyBaseInception": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
- },
- "apyBaseBorrow": {
- "type": ["number", "null"],
- "example": 2.05028
- },
- "apyRewardBorrow": {
- "type": ["number", "null"],
- "example": null
- },
- "totalSupplyUsd": {
- "type": ["number", "null"],
- "example": 5234129189
- },
- "totalBorrowUsd": {
- "type": ["number", "null"],
- "example": 4376489739
- },
- "debtCeilingUsd": {
- "type": ["number", "null"],
- "example": null
- },
- "ltv": {
- "type": ["number", "null"],
- "example": 0.805
- },
- "borrowable": {
- "type": ["boolean", "null"],
- "example": true
- },
- "mintedCoin": {
- "type": ["string", "null"],
- "description": "The borrowed token's symbol when it differs from the deposited asset (CDP-style markets).",
- "example": null
- },
- "borrowFactor": {
- "type": ["number", "null"],
- "description": "Always null; no longer computed.",
- "example": null
+ }
}
}
}
@@ -9535,76 +5712,173 @@
}
}
},
- "/yields/v1/chartLendBorrow/{pool}": {
+ "/yields/v2/borrow/markets/{id}/history": {
"get": {
"tags": ["yields"],
"x-api-plan-only": true,
- "summary": "Historical borrow cost APY from a pool on a lending market in the legacy v1 response format",
- "description": "Daily borrow-market history in the legacy v1 format. Every value is the day's last observation. Unknown pool ids return an empty `data` array.",
+ "summary": "Retrieve daily borrow-side history for a borrow market",
+ "description": "Daily borrow totals and borrow-cost APY for one market, oldest first. APY carries `avg_1d` (that day), `avg_7d` and `avg_30d` (trailing averages ending that day) windows, each attributed into base/reward/total. Supply-side history for the same id lives at `/yields/v2/earn/{id}/history`.",
"parameters": [
{
- "name": "pool",
+ "name": "id",
"in": "path",
"required": true,
- "description": "pool id (UUID), from /yields/v1/poolsBorrow (property is called pool)",
+ "description": "Borrow market id (UUID)",
"schema": {
"type": "string",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
+ "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
+ }
+ },
+ {
+ "name": "range",
+ "in": "query",
+ "required": false,
+ "description": "History window; defaults to max (the full series)",
+ "schema": {
+ "type": "string",
+ "enum": ["30d", "90d", "max"],
+ "example": "90d"
}
}
],
"responses": {
"200": {
- "description": "Historical lend/borrow data for the specified pool",
+ "description": "Daily history rows, oldest first",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "status": {
- "type": "string",
- "example": "success"
- },
"data": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "timestamp": {
+ "date": {
"type": "string",
- "example": "2023-02-06T23:01:24.670Z"
- },
- "totalSupplyUsd": {
- "type": ["number", "null"],
- "description": "The day's last observation.",
- "example": 60767153
- },
- "totalBorrowUsd": {
- "type": ["number", "null"],
- "description": "The day's last observation.",
- "example": 33150230
- },
- "debtCeilingUsd": {
- "type": ["number", "null"],
- "example": null
+ "description": "Day (UTC)",
+ "example": "2026-08-10"
},
- "apyBase": {
+ "total_borrow_usd": {
"type": ["number", "null"],
- "description": "The day's last observation.",
- "example": 1.66533
+ "description": "Total borrowed from the market, in USD",
+ "example": 3339035741
},
- "apyReward": {
+ "available_borrow_usd": {
"type": ["number", "null"],
- "example": null
+ "description": "Liquidity still available to borrow, in USD",
+ "example": 733495225
},
- "apyBaseBorrow": {
- "type": ["number", "null"],
- "description": "The day's last observation.",
- "example": 3.59132
+ "borrow_cost_apy": {
+ "type": "object",
+ "description": "APY in percent paid by borrowers. Reward emissions reduce the cost, so total = base - reward and can be negative",
+ "properties": {
+ "avg_1d": {
+ "type": "object",
+ "description": "Average over that day",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.09904
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": 2.09904
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.10884
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": 2.10884
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.09608
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": 2.09608
+ }
+ }
+ }
+ }
},
- "apyRewardBorrow": {
- "type": ["number", "null"],
- "example": null
+ "intrinsic": {
+ "type": ["object", "null"],
+ "description": "Intrinsic yield of the borrowed token. Borrowing a yield-bearing token adds this rate to the effective borrow cost, since the debt appreciates by it. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
+ "properties": {
+ "apy": {
+ "type": "object",
+ "description": "Intrinsic APY in percent",
+ "properties": {
+ "avg_1d": {
+ "type": "object",
+ "description": "Average over that day",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 2.76481
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.97675
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 4.99742
+ }
+ }
+ }
+ }
+ }
+ }
}
}
}
@@ -9613,19 +5887,44 @@
}
}
}
+ },
+ "404": {
+ "description": "No borrow market with this id",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "error": {
+ "type": "object",
+ "properties": {
+ "code": {
+ "type": "string",
+ "example": "BORROW_MARKET_NOT_FOUND"
+ },
+ "message": {
+ "type": "string",
+ "example": "borrow market not found"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
}
}
}
},
- "/yields/v2/earn": {
+ "/yields/v2/borrow/routes": {
"get": {
"tags": ["yields"],
"x-api-plan-only": true,
- "summary": "Retrieve the latest data for all earn pools",
- "description": "Returns every tracked earn pool (supply-side yield), sorted by TVL descending. APY values are percentages, attributed into `base` (organic), `reward` (incentive emissions) and `total` (base + reward) over `current`, `avg_7d` and `avg_30d` windows. Pools whose underlying token is itself yield-bearing additionally report that yield under `intrinsic`; it is not included in the pool APY. For a filtered, paginated variant of the same rows use `/yields/v2/earn/query`.",
+ "summary": "Retrieve the latest data for all borrow routes",
+ "description": "Every supported borrowing route: a collateral position paired with a debt market on the same protocol and chain. Each row reports the collateral side (supply APY earned on the collateral), the borrow side (cost APY of the debt token) and `net_apy` (collateral yield minus borrow cost). Negative net APY means the position costs more than the collateral earns.",
"responses": {
"200": {
- "description": "Array of all earn pools",
+ "description": "Array of all borrow routes",
"content": {
"application/json": {
"schema": {
@@ -9636,199 +5935,294 @@
"items": {
"type": "object",
"properties": {
- "id": {
- "type": "string",
- "description": "Pool id (UUID). Same id space as the v1 yields API pool field.",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
- },
- "pool_key": {
- "type": "string",
- "description": "Stable pool key.",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84-ethereum"
- },
- "pool_token": {
- "type": ["object", "null"],
- "description": "Receipt / vault token representing the position; null when the pool has no transferable pool token",
- "properties": {
- "address": {
- "type": "string",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "stETH"
- },
- "name": {
- "type": ["string", "null"],
- "example": "Liquid staked Ether 2.0"
- }
- }
- },
"display": {
"type": "object",
"description": "Display strings for listings",
"properties": {
- "label": {
- "type": ["string", "null"],
- "example": "stETH"
- },
"detail": {
"type": ["string", "null"],
- "example": "Liquid staked Ether 2.0"
- }
- }
- },
- "reference_asset_symbol": {
- "type": ["string", "null"],
- "description": "The asset you provide to enter the pool (e.g. ETH, USDC, BTC)",
- "example": "ETH"
- },
- "url": {
- "type": ["string", "null"],
- "description": "Pool page on the protocol app",
- "example": "https://lido.fi/#networks"
+ "description": "Market variant label; null when there is only one market",
+ "example": "Prime Instance"
+ }
+ }
},
"protocol": {
"type": "string",
"description": "Protocol display name",
- "example": "Lido"
+ "example": "Aave V3"
},
"chain": {
"type": "string",
"description": "Chain display name",
"example": "Ethereum"
},
- "underlying_tokens": {
- "type": "array",
- "description": "Tokens deposited into the pool",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string",
- "example": "0x0000000000000000000000000000000000000000"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "ETH"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 18
- }
- }
- }
- },
- "reward_tokens": {
- "type": "array",
- "description": "Incentive tokens currently emitted to the pool; empty when there are none",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string",
- "example": "0xd533a949740bb3306d119cc777fa900ba034cd52"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "CRV"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 18
- }
- }
- }
- },
- "tvl_usd": {
- "type": ["number", "null"],
- "description": "Total value locked in USD",
- "example": 18050422129
- },
- "apy": {
+ "collateral": {
"type": "object",
- "description": "Supply APY in percent, attributed into base (organic) and reward (incentive emissions) components",
+ "description": "The supplied collateral position",
"properties": {
- "current": {
+ "id": {
+ "type": "string",
+ "description": "Collateral pool id (UUID)",
+ "example": "ef8c5c38-6a41-4383-9dc8-6fb31e69a0c9"
+ },
+ "pool_key": {
+ "type": "string",
+ "description": "Stable pool key of the collateral pool",
+ "example": "0xfa1fdbbd71b0aa16162d76914d69cd8cb3ef92da-lido"
+ },
+ "url": {
+ "type": ["string", "null"],
+ "example": "https://app.aave.com/reserve-overview/?underlyingAsset=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&marketName=proto_lido_v3"
+ },
+ "token": {
"type": "object",
- "description": "Latest observed values",
+ "description": "Token supplied as collateral",
"properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.206
+ "address": {
+ "type": "string",
+ "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
},
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "WETH"
},
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 2.206
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 18
}
}
},
- "avg_7d": {
+ "loan_to_value": {
+ "type": ["number", "null"],
+ "description": "Maximum loan-to-value as a fraction (0.84 = 84%)",
+ "example": 0.84
+ },
+ "total_supply_usd": {
+ "type": ["number", "null"],
+ "description": "Total supplied to the collateral pool, in USD",
+ "example": 35187139
+ },
+ "apy": {
"type": "object",
- "description": "Trailing 7-day average",
+ "description": "Supply APY in percent earned on the collateral",
"properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.18932
+ "current": {
+ "type": "object",
+ "description": "Latest observed values",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 1.56065
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 1.56065
+ }
+ }
},
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 1.48621
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 1.48621
+ }
+ }
},
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 2.18932
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 1.46718
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 1.46718
+ }
+ }
+ }
+ }
+ },
+ "intrinsic": {
+ "type": ["object", "null"],
+ "description": "Intrinsic yield of the collateral token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
+ "properties": {
+ "apy": {
+ "type": "object",
+ "description": "Intrinsic APY in percent",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed value",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.11
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.05
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.02
+ }
+ }
+ }
+ }
+ },
+ "source_pool": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Earn pool the intrinsic yield is sourced from",
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
+ },
+ "pool_token": {
+ "type": "string",
+ "description": "Address of the yield-bearing token",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "stETH"
+ }
+ }
+ }
+ }
+ },
+ "reward_tokens": {
+ "type": "array",
+ "description": "Incentive tokens emitted to the collateral side; empty when there are none",
+ "items": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0xd533a949740bb3306d119cc777fa900ba034cd52"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "CRV"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 18
+ }
}
}
+ }
+ }
+ },
+ "borrow": {
+ "type": "object",
+ "description": "The borrowed debt position",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Debt market id (UUID)",
+ "example": "effcb4a4-4dcb-45e5-935d-f15542c13e6b"
},
- "avg_30d": {
+ "pool_key": {
+ "type": "string",
+ "description": "Stable pool key of the debt market",
+ "example": "0x2a1fbcb52ed4d9b23dad17e1e8aed4bb0e6079b8-lido"
+ },
+ "url": {
+ "type": ["string", "null"],
+ "example": "https://app.aave.com/reserve-overview/?underlyingAsset=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&marketName=proto_lido_v3"
+ },
+ "token": {
"type": "object",
- "description": "Trailing 30-day average",
+ "description": "Token borrowed",
"properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.22409
+ "address": {
+ "type": "string",
+ "example": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
},
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "USDC"
},
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 2.22409
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 6
}
}
- }
- }
- },
- "intrinsic": {
- "type": ["object", "null"],
- "description": "Yield accruing inside a yield-bearing underlying token, e.g. the stETH staking yield inside a wstETH pool. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
- "properties": {
- "apy": {
+ },
+ "total_borrow_usd": {
+ "type": ["number", "null"],
+ "description": "Total borrowed from the market, in USD",
+ "example": 3377912
+ },
+ "available_borrow_usd": {
+ "type": ["number", "null"],
+ "description": "Liquidity still available to borrow, in USD",
+ "example": 1838568
+ },
+ "cost_apy": {
"type": "object",
- "description": "Intrinsic APY in percent",
+ "description": "Borrow cost APY in percent. Reward emissions reduce the cost, so total = base - reward and can be negative",
"properties": {
"current": {
"type": "object",
- "description": "Latest observed value",
+ "description": "Latest observed values",
"properties": {
"base": {
"type": ["number", "null"],
- "example": 3.11
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 3.8712
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": 3.8712
}
}
},
@@ -9838,7 +6232,18 @@
"properties": {
"base": {
"type": ["number", "null"],
- "example": 3.05
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 3.895
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": 3.895
}
}
},
@@ -9848,111 +6253,178 @@
"properties": {
"base": {
"type": ["number", "null"],
- "example": 3.02
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 3.89527
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": 3.89527
}
}
}
}
},
- "source_pool": {
- "type": "object",
+ "intrinsic": {
+ "type": ["object", "null"],
+ "description": "Intrinsic yield of the borrowed token. Borrowing a yield-bearing token adds this rate to the effective borrow cost, since the debt appreciates by it. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
"properties": {
- "id": {
- "type": "string",
- "description": "Earn pool the intrinsic yield is sourced from",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
- },
- "pool_token": {
- "type": "string",
- "description": "Address of the yield-bearing token",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
+ "apy": {
+ "type": "object",
+ "description": "Intrinsic APY in percent",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed value",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.11
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.05
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.02
+ }
+ }
+ }
+ }
},
- "symbol": {
- "type": ["string", "null"],
- "example": "stETH"
+ "source_pool": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Earn pool the intrinsic yield is sourced from",
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
+ },
+ "pool_token": {
+ "type": "string",
+ "description": "Address of the yield-bearing token",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "stETH"
+ }
+ }
}
}
- }
- }
- },
- "stability_30d": {
- "type": "object",
- "description": "Stability score (0 to 1) of the trailing 30-day APY series, computed as 1 / (1 + coefficient of variation); higher is steadier. Keyed by APY composition: read the leaf matching the APY components you consume (base, base + reward, base + intrinsic, base + reward + intrinsic).",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 0.9804
- },
- "base_reward": {
- "type": ["number", "null"],
- "example": 0.9804
- },
- "base_intrinsic": {
- "type": ["number", "null"],
- "example": 0.9804
- },
- "base_reward_intrinsic": {
- "type": ["number", "null"],
- "example": 0.9804
- }
- }
- },
- "price_per_share": {
- "type": ["number", "null"],
- "description": "Pool token price per share for vault-style pools; null otherwise",
- "example": null
- },
- "volume_1d_usd": {
- "type": ["number", "null"],
- "description": "Trailing 24h trading volume in USD for DEX pools; null otherwise",
- "example": null
- },
- "attributes": {
- "type": "object",
- "description": "Boolean attributes, also available as filters on /yields/v2/earn/query",
- "properties": {
- "stablecoin_only": {
- "type": "boolean",
- "description": "All pool assets are stablecoins",
- "example": false
- },
- "single_asset_exposure": {
- "type": "boolean",
- "description": "Position is exposed to a single asset",
- "example": true
},
- "impermanent_loss_risk": {
- "type": "boolean",
- "description": "Position can suffer impermanent loss",
- "example": false
+ "reward_tokens": {
+ "type": "array",
+ "description": "Incentive tokens emitted to the borrow side; empty when there are none",
+ "items": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0xd533a949740bb3306d119cc777fa900ba034cd52"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "CRV"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 18
+ }
+ }
+ }
}
}
},
- "holders": {
+ "net_apy": {
"type": "object",
- "description": "Pool token holder statistics; values are null where holder data is not tracked",
+ "description": "Net APY in percent: collateral supply APY minus borrow cost. Keyed by APY composition: read the leaf matching the APY components you consume (base, base + reward, base + intrinsic, base + reward + intrinsic).",
"properties": {
- "count": {
- "type": ["number", "null"],
- "description": "Number of pool token holders",
- "example": 618311
+ "current": {
+ "type": "object",
+ "description": "Latest observed values",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": -2.31055
+ },
+ "base_reward": {
+ "type": ["number", "null"],
+ "example": -2.31055
+ },
+ "base_intrinsic": {
+ "type": ["number", "null"],
+ "example": -2.31055
+ },
+ "base_reward_intrinsic": {
+ "type": ["number", "null"],
+ "example": -2.31055
+ }
+ }
},
- "avg_position_usd": {
- "type": ["number", "null"],
- "description": "Average position size in USD",
- "example": 29423.56
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": -2.40879
+ },
+ "base_reward": {
+ "type": ["number", "null"],
+ "example": -2.40879
+ },
+ "base_intrinsic": {
+ "type": ["number", "null"],
+ "example": -2.40879
+ },
+ "base_reward_intrinsic": {
+ "type": ["number", "null"],
+ "example": -2.40879
+ }
+ }
},
- "top_10_share_pct": {
- "type": ["number", "null"],
- "description": "Share of supply held by the top 10 holders, in percent",
- "example": 61.97
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": -2.42809
+ },
+ "base_reward": {
+ "type": ["number", "null"],
+ "example": -2.42809
+ },
+ "base_intrinsic": {
+ "type": ["number", "null"],
+ "example": -2.42809
+ },
+ "base_reward_intrinsic": {
+ "type": ["number", "null"],
+ "example": -2.42809
+ }
+ }
}
}
- },
- "available_supply_usd": {
- "type": ["number", "null"],
- "description": "Remaining deposit capacity in USD for lending pools with a supply cap (cap minus TVL, floored at 0); null when the pool has no cap",
- "example": null
}
}
}
@@ -9965,100 +6437,15 @@
}
}
},
- "/yields/v2/earn/query": {
+ "/yields/v2/loops": {
"get": {
"tags": ["yields"],
"x-api-plan-only": true,
- "summary": "Retrieve a filtered, paginated page of earn pools",
- "description": "Same rows as `/yields/v2/earn`, filtered and paginated server-side while keeping the TVL-descending order. All filters combine with AND; `chain` and `protocol` may be repeated to match any of up to 20 values. Unknown query parameters and out-of-range values are rejected with `400 INVALID_QUERY_PARAM`. Without parameters the top 100 pools by TVL are returned.",
- "parameters": [
- {
- "name": "chain",
- "in": "query",
- "required": false,
- "description": "Chain slug (lowercase). Repeat the parameter to match any of several chains, e.g. chain=ethereum&chain=arbitrum (at most 20 values)",
- "schema": {
- "type": "string",
- "example": "ethereum"
- }
- },
- {
- "name": "protocol",
- "in": "query",
- "required": false,
- "description": "Protocol slug (lowercase, e.g. aave-v3). Repeat the parameter to match any of several protocols (at most 20 values)",
- "schema": {
- "type": "string",
- "example": "lido"
- }
- },
- {
- "name": "stablecoin",
- "in": "query",
- "required": false,
- "description": "true keeps only pools whose assets are all stablecoins, false only the rest",
- "schema": {
- "type": "boolean",
- "example": true
- }
- },
- {
- "name": "single_asset_exposure",
- "in": "query",
- "required": false,
- "description": "true keeps only pools exposed to a single asset, false only the rest",
- "schema": {
- "type": "boolean",
- "example": true
- }
- },
- {
- "name": "impermanent_loss_risk",
- "in": "query",
- "required": false,
- "description": "true keeps only pools with impermanent loss risk, false only the rest",
- "schema": {
- "type": "boolean",
- "example": false
- }
- },
- {
- "name": "min_tvl",
- "in": "query",
- "required": false,
- "description": "Minimum pool TVL in USD (inclusive)",
- "schema": {
- "type": "number",
- "example": 1000000
- }
- },
- {
- "name": "page",
- "in": "query",
- "required": false,
- "description": "1-based page number; default 1",
- "schema": {
- "type": "integer",
- "minimum": 1,
- "example": 1
- }
- },
- {
- "name": "limit",
- "in": "query",
- "required": false,
- "description": "Page size between 1 and 300; default 100. Values above 300 are rejected, not clamped",
- "schema": {
- "type": "integer",
- "minimum": 1,
- "maximum": 300,
- "example": 100
- }
- }
- ],
+ "summary": "Retrieve the latest data for all loop strategies",
+ "description": "Leveraged looping opportunities: supply a token, borrow against it and re-supply, repeated `loop_count` times at the market maximum loan-to-value. `loop_apy.total` is the resulting net APY at that leverage; `leverage` reports the accumulated supply and borrow multipliers relative to the initial capital. Borrow reward emissions offset the borrowing cost, so looped APY can exceed the plain supply APY substantially.",
"responses": {
"200": {
- "description": "Page of earn pools matching the filters",
+ "description": "Array of all loop strategies",
"content": {
"application/json": {
"schema": {
@@ -10071,116 +6458,76 @@
"properties": {
"id": {
"type": "string",
- "description": "Pool id (UUID). Same id space as the v1 yields API pool field.",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
- },
- "pool_key": {
- "type": "string",
- "description": "Stable pool key.",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84-ethereum"
- },
- "pool_token": {
- "type": ["object", "null"],
- "description": "Receipt / vault token representing the position; null when the pool has no transferable pool token",
- "properties": {
- "address": {
- "type": "string",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "stETH"
- },
- "name": {
- "type": ["string", "null"],
- "example": "Liquid staked Ether 2.0"
- }
- }
+ "description": "Collateral pool id (UUID)",
+ "example": "f2e554c5-2099-46cf-9fa6-918fb41a3297"
},
"display": {
"type": "object",
"description": "Display strings for listings",
"properties": {
- "label": {
- "type": ["string", "null"],
- "example": "stETH"
- },
"detail": {
"type": ["string", "null"],
- "example": "Liquid staked Ether 2.0"
+ "description": "Market variant label; null when there is only one market",
+ "example": null
}
}
},
- "reference_asset_symbol": {
- "type": ["string", "null"],
- "description": "The asset you provide to enter the pool (e.g. ETH, USDC, BTC)",
- "example": "ETH"
- },
- "url": {
- "type": ["string", "null"],
- "description": "Pool page on the protocol app",
- "example": "https://lido.fi/#networks"
- },
"protocol": {
"type": "string",
"description": "Protocol display name",
- "example": "Lido"
+ "example": "Scallop Lend"
},
"chain": {
"type": "string",
"description": "Chain display name",
- "example": "Ethereum"
+ "example": "Sui"
},
- "underlying_tokens": {
- "type": "array",
- "description": "Tokens deposited into the pool",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string",
- "example": "0x0000000000000000000000000000000000000000"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "ETH"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 18
- }
+ "token": {
+ "type": "object",
+ "description": "Token being looped (supplied and borrowed)",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0x0041f9f9344cac094454cd574e333c4fdb132d7bcc9379bcd4aab485b2a63942::wbtc::wbtc"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "WBTC"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 8
}
}
},
- "reward_tokens": {
- "type": "array",
- "description": "Incentive tokens currently emitted to the pool; empty when there are none",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string",
- "example": "0xd533a949740bb3306d119cc777fa900ba034cd52"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "CRV"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 18
- }
- }
- }
+ "url": {
+ "type": ["string", "null"],
+ "description": "Market page on the protocol app",
+ "example": "https://app.scallop.io/"
},
- "tvl_usd": {
+ "loan_to_value": {
"type": ["number", "null"],
- "description": "Total value locked in USD",
- "example": 18050422129
+ "description": "Maximum loan-to-value as a fraction (0.7 = 70%)",
+ "example": 0.7
},
- "apy": {
+ "total_supply_usd": {
+ "type": ["number", "null"],
+ "description": "Total supplied to the market, in USD",
+ "example": 99384
+ },
+ "total_borrow_usd": {
+ "type": ["number", "null"],
+ "description": "Total borrowed from the market, in USD",
+ "example": 40704
+ },
+ "available_borrow_usd": {
+ "type": ["number", "null"],
+ "description": "Liquidity still available to borrow, in USD",
+ "example": 58680
+ },
+ "supply_apy": {
"type": "object",
- "description": "Supply APY in percent, attributed into base (organic) and reward (incentive emissions) components",
+ "description": "Unlevered supply APY in percent",
"properties": {
"current": {
"type": "object",
@@ -10189,7 +6536,7 @@
"base": {
"type": ["number", "null"],
"description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.206
+ "example": 2.50779
},
"reward": {
"type": ["number", "null"],
@@ -10199,7 +6546,7 @@
"total": {
"type": ["number", "null"],
"description": "base plus reward, in percent",
- "example": 2.206
+ "example": 2.50779
}
}
},
@@ -10210,7 +6557,7 @@
"base": {
"type": ["number", "null"],
"description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.18932
+ "example": 2.38329
},
"reward": {
"type": ["number", "null"],
@@ -10220,1096 +6567,2288 @@
"total": {
"type": ["number", "null"],
"description": "base plus reward, in percent",
- "example": 2.18932
+ "example": 2.38329
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 2.35421
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": null
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base plus reward, in percent",
+ "example": 2.35421
+ }
+ }
+ }
+ }
+ },
+ "borrow_cost_apy": {
+ "type": "object",
+ "description": "Borrow cost APY in percent. Reward emissions reduce the cost, so total = base - reward and can be negative",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed values",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 7.852
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": 21.73055
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": -13.87855
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 7.74822
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": 38.54927
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": -30.80105
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "description": "Organic APY in percent, excluding incentive rewards",
+ "example": 7.70641
+ },
+ "reward": {
+ "type": ["number", "null"],
+ "description": "APY in percent from incentive token emissions; null when there are none",
+ "example": 25.32701
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "base minus reward, in percent; negative means the borrower is net paid",
+ "example": -17.6206
+ }
+ }
+ }
+ }
+ },
+ "loop_apy": {
+ "type": "object",
+ "description": "Looped position APY",
+ "properties": {
+ "loop_count": {
+ "type": ["number", "null"],
+ "description": "Number of borrow/re-supply iterations",
+ "example": 5
+ },
+ "total": {
+ "type": ["number", "null"],
+ "description": "Net APY in percent of the looped position at loop_count iterations",
+ "example": 34.31646
+ }
+ }
+ },
+ "leverage": {
+ "type": "object",
+ "description": "Accumulated leverage after loop_count iterations",
+ "properties": {
+ "supply_multiplier": {
+ "type": ["number", "null"],
+ "description": "Total supplied relative to initial capital",
+ "example": 2.94117
+ },
+ "borrow_multiplier": {
+ "type": ["number", "null"],
+ "description": "Total borrowed relative to initial capital",
+ "example": 1.94117
+ }
+ }
+ },
+ "intrinsic": {
+ "type": ["object", "null"],
+ "description": "Intrinsic yield of the looped token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
+ "properties": {
+ "apy": {
+ "type": "object",
+ "description": "Intrinsic APY in percent",
+ "properties": {
+ "current": {
+ "type": "object",
+ "description": "Latest observed value",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.11
+ }
+ }
+ },
+ "avg_7d": {
+ "type": "object",
+ "description": "Trailing 7-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.05
+ }
+ }
+ },
+ "avg_30d": {
+ "type": "object",
+ "description": "Trailing 30-day average",
+ "properties": {
+ "base": {
+ "type": ["number", "null"],
+ "example": 3.02
+ }
+ }
+ }
+ }
+ },
+ "source_pool": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Earn pool the intrinsic yield is sourced from",
+ "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
+ },
+ "pool_token": {
+ "type": "string",
+ "description": "Address of the yield-bearing token",
+ "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "stETH"
+ }
+ }
+ }
+ }
+ },
+ "reward_tokens": {
+ "type": "object",
+ "description": "Incentive tokens per market side; empty arrays when there are none",
+ "properties": {
+ "supply": {
+ "type": "array",
+ "description": "Incentive tokens emitted to the supply side",
+ "items": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::scallop_sca"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "sSCA"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 9
+ }
}
}
},
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.22409
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 2.22409
+ "borrow": {
+ "type": "array",
+ "description": "Incentive tokens emitted to the borrow side",
+ "items": {
+ "type": "object",
+ "properties": {
+ "address": {
+ "type": "string",
+ "example": "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::scallop_sca"
+ },
+ "symbol": {
+ "type": ["string", "null"],
+ "example": "sSCA"
+ },
+ "decimals": {
+ "type": ["integer", "null"],
+ "example": 9
+ }
}
}
}
}
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/perpFundingRates": {
+ "get": {
+ "tags": ["yields"],
+ "summary": "Funding rates and open interest of perpetual futures",
+ "description": "Latest funding rate, open interest and index price for Binance and OKX perpetual markets, with the 7d and 30d average and sum of settled funding rates.",
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "status": {
+ "type": "string",
+ "example": "success"
+ },
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "perp_id": {
+ "type": "string",
+ "example": "61533906-1626-45fc-b3ed-9a1103705373"
+ },
+ "timestamp": {
+ "type": "string",
+ "example": "2025-07-18T18:01:44.811Z"
+ },
+ "marketplace": {
+ "type": "string",
+ "example": "Binance"
+ },
+ "market": {
+ "type": "string",
+ "example": "1000000BOBUSDT"
+ },
+ "baseAsset": {
+ "type": "string",
+ "example": "1000000BOT"
+ },
+ "fundingRate": {
+ "type": "number",
+ "example": 0.00005
+ },
+ "fundingRatePrevious": {
+ "type": "number",
+ "example": 0.00045224
+ },
+ "fundingTimePrevious": {
+ "type": "number",
+ "example": 1752854400000
+ },
+ "openInterest": {
+ "type": "number",
+ "example": 51144394
+ },
+ "indexPrice": {
+ "type": "number",
+ "example": 0.05108
+ },
+ "fundingRate7dAverage": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "fundingRate7dSum": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "fundingRate30dAverage": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "fundingRate30dSum": {
+ "type": ["number", "null"],
+ "example": null
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-api-plan-only": true,
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.yields.getPerpFundingRates()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.yields.getPerpFundingRates()"
+ }
+ ]
+ }
+ },
+ "/api/lstRates": {
+ "get": {
+ "tags": ["yields"],
+ "summary": "Exchange rates and ETH peg of liquid staking tokens",
+ "description": "Latest expected (contract) redemption rate, executable market rate and resulting ETH peg for major LSTs.",
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "description": "The name of the protocol issuing the LST"
+ },
+ "symbol": {
+ "type": "string",
+ "nullable": true,
+ "description": "The symbol of the LST"
+ },
+ "address": {
+ "type": "string",
+ "description": "The contract address of the LST"
+ },
+ "type": {
+ "type": "string",
+ "nullable": true,
+ "description": "The type of the LST (rebase or accruing)"
+ },
+ "expectedRate": {
+ "type": "number",
+ "nullable": true,
+ "description": "ETH per token owed by the protocol, read from its contract"
+ },
+ "marketRate": {
+ "type": "number",
+ "nullable": true,
+ "description": "Executable market rate in ETH per token; null when no credible market quote exists"
+ },
+ "ethPeg": {
+ "type": "number",
+ "nullable": true,
+ "description": "Percent deviation of the market rate from the expected rate"
+ },
+ "fee": {
+ "type": "number",
+ "nullable": true,
+ "description": "The protocol fee percentage"
+ }
+ }
+ }
+ },
+ "example": [
+ {
+ "name": "Lido",
+ "symbol": "stETH",
+ "address": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
+ "type": "rebase",
+ "expectedRate": 1,
+ "marketRate": 0.9997,
+ "ethPeg": -0.03,
+ "fee": 0.1
+ },
+ {
+ "name": "StakeWise V3",
+ "symbol": "osETH",
+ "address": "0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38",
+ "type": "accruing",
+ "expectedRate": 1.0775,
+ "marketRate": 1.0615,
+ "ethPeg": -1.48,
+ "fee": 0.05
+ },
+ {
+ "name": "Bifrost Liquid Staking",
+ "symbol": "vETH",
+ "address": "0x4Bc3263Eb5bb2Ef7Ad9aB6FB68be80E43b43801F",
+ "type": "accruing",
+ "expectedRate": 1.1353,
+ "marketRate": null,
+ "ethPeg": null,
+ "fee": null
+ }
+ ]
+ }
+ }
+ }
+ },
+ "x-api-plan-only": true,
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.yields.getLstRates()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.yields.getLstRates()"
+ }
+ ]
+ }
+ },
+ "/api/overview/dexs": {
+ "get": {
+ "tags": ["volumes"],
+ "summary": "List all dexs along with summaries of their volumes and dataType history data",
+ "parameters": [
+ {
+ "name": "excludeTotalDataChart",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude aggregated chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "excludeTotalDataChartBreakdown",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude broken down chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Overview of all DEXs with volume data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "protocols": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "Uniswap"
},
- "intrinsic": {
- "type": ["object", "null"],
- "description": "Yield accruing inside a yield-bearing underlying token, e.g. the stETH staking yield inside a wstETH pool. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
- "properties": {
- "apy": {
- "type": "object",
- "description": "Intrinsic APY in percent",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed value",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.11
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.05
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.02
- }
- }
- }
- }
- },
- "source_pool": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Earn pool the intrinsic yield is sourced from",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
- },
- "pool_token": {
- "type": "string",
- "description": "Address of the yield-bearing token",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "stETH"
- }
- }
- }
- }
+ "displayName": {
+ "type": "string",
+ "example": "Uniswap V3"
},
- "stability_30d": {
- "type": "object",
- "description": "Stability score (0 to 1) of the trailing 30-day APY series, computed as 1 / (1 + coefficient of variation); higher is steadier. Keyed by APY composition: read the leaf matching the APY components you consume (base, base + reward, base + intrinsic, base + reward + intrinsic).",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 0.9804
- },
- "base_reward": {
- "type": ["number", "null"],
- "example": 0.9804
- },
- "base_intrinsic": {
- "type": ["number", "null"],
- "example": 0.9804
- },
- "base_reward_intrinsic": {
- "type": ["number", "null"],
- "example": 0.9804
- }
- }
+ "total24h": {
+ "type": "number",
+ "nullable": true,
+ "example": 1500000000
},
- "price_per_share": {
- "type": ["number", "null"],
- "description": "Pool token price per share for vault-style pools; null otherwise",
- "example": null
+ "total7d": {
+ "type": "number",
+ "example": 10000000000
},
- "volume_1d_usd": {
- "type": ["number", "null"],
- "description": "Trailing 24h trading volume in USD for DEX pools; null otherwise",
- "example": null
+ "change_1d": {
+ "type": "number",
+ "example": 5.2
},
- "attributes": {
- "type": "object",
- "description": "Boolean attributes, also available as filters on /yields/v2/earn/query",
- "properties": {
- "stablecoin_only": {
- "type": "boolean",
- "description": "All pool assets are stablecoins",
- "example": false
- },
- "single_asset_exposure": {
- "type": "boolean",
- "description": "Position is exposed to a single asset",
- "example": true
- },
- "impermanent_loss_risk": {
- "type": "boolean",
- "description": "Position can suffer impermanent loss",
- "example": false
- }
+ "change_7d": {
+ "type": "number",
+ "example": -2.1
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Polygon"]
+ }
+ }
+ }
+ },
+ "totalDataChart": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "object"
}
+ ]
+ },
+ "example": [1640995200, 2500000000]
+ }
+ },
+ "allChains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "BSC", "Polygon"]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.volumes.getDexOverview()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.volumes.getDexOverview()"
+ }
+ ]
+ }
+ },
+ "/api/overview/dexs/{chain}": {
+ "get": {
+ "tags": ["volumes"],
+ "summary": "List all dexs along with summaries of their volumes and dataType history data filtering by chain",
+ "parameters": [
+ {
+ "name": "chain",
+ "in": "path",
+ "required": true,
+ "description": "chain name, list of all supported chains can be found under allChains attribute in /overview/dexs response",
+ "schema": {
+ "type": "string",
+ "example": "ethereum"
+ }
+ },
+ {
+ "name": "excludeTotalDataChart",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude aggregated chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "excludeTotalDataChartBreakdown",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude broken down chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Overview of DEXs on specified chain with volume data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "protocols": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "Uniswap"
},
- "holders": {
- "type": "object",
- "description": "Pool token holder statistics; values are null where holder data is not tracked",
- "properties": {
- "count": {
- "type": ["number", "null"],
- "description": "Number of pool token holders",
- "example": 618311
- },
- "avg_position_usd": {
- "type": ["number", "null"],
- "description": "Average position size in USD",
- "example": 29423.56
- },
- "top_10_share_pct": {
- "type": ["number", "null"],
- "description": "Share of supply held by the top 10 holders, in percent",
- "example": 61.97
- }
- }
+ "total24h": {
+ "type": "number",
+ "nullable": true,
+ "example": 800000000
},
- "available_supply_usd": {
- "type": ["number", "null"],
- "description": "Remaining deposit capacity in USD for lending pools with a supply cap (cap minus TVL, floored at 0); null when the pool has no cap",
- "example": null
+ "change_1d": {
+ "type": "number",
+ "example": 3.2
}
}
}
},
- "pagination": {
- "type": "object",
- "properties": {
- "total": {
- "type": "integer",
- "description": "Total number of rows matching the filters, across all pages",
- "example": 4519
- },
- "page": {
- "type": "integer",
- "example": 1
- },
- "limit": {
- "type": "integer",
- "example": 100
- }
+ "totalDataChart": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "example": [1640995200, 1200000000]
}
}
}
}
}
}
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.volumes.getDexOverviewByChain('')"
},
- "400": {
- "description": "Unknown query parameter or invalid value",
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.volumes.getDexOverviewByChain('')"
+ }
+ ]
+ }
+ },
+ "/api/summary/dexs/{protocol}": {
+ "get": {
+ "tags": ["volumes"],
+ "summary": "Get summary of dex volume with historical data",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "uniswap"
+ }
+ },
+ {
+ "name": "excludeTotalDataChart",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude aggregated chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "excludeTotalDataChartBreakdown",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude broken down chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "DEX protocol volume summary with historical data",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "error": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string",
- "example": "INVALID_QUERY_PARAM"
- },
- "message": {
- "type": "string",
- "example": "unknown query parameter: chains"
+ "name": {
+ "type": "string",
+ "example": "Uniswap"
+ },
+ "total24h": {
+ "type": "number",
+ "example": 1500000000
+ },
+ "totalAllTime": {
+ "type": "number",
+ "example": 500000000000
+ },
+ "totalDataChart": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "example": [1640995200, 1500000000]
+ }
+ },
+ "totalDataChartBreakdown": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "example": [
+ 1640995200,
+ {
+ "Uniswap V3": 1200000000,
+ "Uniswap V2": 300000000
+ }
+ ]
+ }
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Polygon"]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.volumes.getDexSummary('')"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.volumes.getDexSummary('')"
+ }
+ ]
+ }
+ },
+ "/api/overview/options": {
+ "get": {
+ "tags": ["volumes"],
+ "summary": "List all options dexs along with summaries of their volumes and dataType history data",
+ "parameters": [
+ {
+ "name": "excludeTotalDataChart",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude aggregated chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "excludeTotalDataChartBreakdown",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude broken down chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Desired data type, dailyNotionalVolume by default.",
+ "schema": {
+ "type": "string",
+ "enum": ["dailyPremiumVolume", "dailyNotionalVolume"],
+ "example": "dailyPremiumVolume"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Overview of all options DEXs with volume data",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "protocols": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "Deribit"
+ },
+ "total24h": {
+ "type": "number",
+ "nullable": true,
+ "example": 500000000
+ },
+ "change_1d": {
+ "type": "number",
+ "example": 8.5
+ }
}
}
+ },
+ "totalDataChart": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "example": [1640995200, 750000000]
+ }
}
}
}
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.volumes.getOptionsOverview()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.volumes.getOptionsOverview()"
+ }
+ ]
}
},
- "/yields/v2/earn/{id}/history": {
+ "/api/overview/options/{chain}": {
"get": {
- "tags": ["yields"],
- "x-api-plan-only": true,
- "summary": "Retrieve daily history for an earn pool",
- "description": "Daily TVL, attributed APY and price per share for one earn pool, oldest first. APY carries `avg_1d` (that day), `avg_7d` and `avg_30d` (trailing averages ending that day) windows, each attributed into base/reward/total.",
+ "tags": ["volumes"],
+ "summary": "List all options dexs along with summaries of their volumes and dataType history data filtering by chain",
"parameters": [
{
- "name": "id",
+ "name": "chain",
"in": "path",
"required": true,
- "description": "Earn pool id (UUID)",
+ "description": "chain name, list of all supported chains can be found under allChains attribute in /overview/options response",
"schema": {
"type": "string",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
+ "example": "ethereum"
}
},
{
- "name": "range",
+ "name": "excludeTotalDataChart",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude aggregated chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "excludeTotalDataChartBreakdown",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude broken down chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "dataType",
"in": "query",
"required": false,
- "description": "History window; defaults to max (the full series)",
+ "description": "Desired data type, dailyNotionalVolume by default.",
"schema": {
"type": "string",
- "enum": ["30d", "90d", "max"],
- "example": "90d"
+ "enum": ["dailyPremiumVolume", "dailyNotionalVolume"],
+ "example": "dailyPremiumVolume"
}
}
],
"responses": {
"200": {
- "description": "Daily history rows, oldest first",
+ "description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "data": {
+ "totalDataChart": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "description": "[timestamp, volume]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ "description": "Historical chart data with timestamps and total volumes"
+ },
+ "totalDataChartBreakdown": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "description": "[timestamp, breakdown]",
+ "items": {
+ "oneOf": [
+ {
+ "type": "integer",
+ "description": "Unix timestamp"
+ },
+ {
+ "type": "object",
+ "additionalProperties": {
+ "type": "number"
+ },
+ "description": "Protocol breakdown with volume values"
+ }
+ ]
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ "description": "Historical chart data broken down by protocol"
+ },
+ "breakdown24h": {
+ "type": "object",
+ "nullable": true,
+ "description": "24-hour breakdown data"
+ },
+ "breakdown30d": {
+ "type": "object",
+ "nullable": true,
+ "description": "30-day breakdown data"
+ },
+ "chain": {
+ "type": "string",
+ "description": "Chain name"
+ },
+ "allChains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "List of all supported chains"
+ },
+ "total24h": {
+ "type": "number",
+ "description": "Total 24-hour volume"
+ },
+ "total48hto24h": {
+ "type": "number",
+ "description": "Total 48-hour to 24-hour volume"
+ },
+ "total7d": {
+ "type": "number",
+ "description": "Total 7-day volume"
+ },
+ "total14dto7d": {
+ "type": "number",
+ "description": "Total 14-day to 7-day volume"
+ },
+ "total60dto30d": {
+ "type": "number",
+ "description": "Total 60-day to 30-day volume"
+ },
+ "total30d": {
+ "type": "number",
+ "description": "Total 30-day volume"
+ },
+ "total1y": {
+ "type": "number",
+ "description": "Total 1-year volume"
+ },
+ "change_1d": {
+ "type": "number",
+ "description": "1-day change percentage"
+ },
+ "change_7d": {
+ "type": "number",
+ "description": "7-day change percentage"
+ },
+ "change_1m": {
+ "type": "number",
+ "description": "1-month change percentage"
+ },
+ "change_7dover7d": {
+ "type": "number",
+ "description": "7-day over 7-day change percentage"
+ },
+ "change_30dover30d": {
+ "type": "number",
+ "description": "30-day over 30-day change percentage"
+ },
+ "total7DaysAgo": {
+ "type": "number",
+ "description": "Total volume 7 days ago"
+ },
+ "total30DaysAgo": {
+ "type": "number",
+ "description": "Total volume 30 days ago"
+ },
+ "totalAllTime": {
+ "type": "number",
+ "description": "Total all-time volume"
+ },
+ "protocols": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "date": {
+ "total24h": {
+ "type": "number",
+ "nullable": true,
+ "description": "24-hour volume"
+ },
+ "total48hto24h": {
+ "type": "number",
+ "nullable": true,
+ "description": "48-hour to 24-hour volume"
+ },
+ "total7d": {
+ "type": "number",
+ "description": "7-day volume"
+ },
+ "total14dto7d": {
+ "type": "number",
+ "description": "14-day to 7-day volume"
+ },
+ "total60dto30d": {
+ "type": "number",
+ "description": "60-day to 30-day volume"
+ },
+ "total30d": {
+ "type": "number",
+ "description": "30-day volume"
+ },
+ "total1y": {
+ "type": "number",
+ "description": "1-year volume"
+ },
+ "totalAllTime": {
+ "type": "number",
+ "description": "All-time volume"
+ },
+ "total7DaysAgo": {
+ "type": "number",
+ "description": "Volume 7 days ago"
+ },
+ "total30DaysAgo": {
+ "type": "number",
+ "description": "Volume 30 days ago"
+ },
+ "average1y": {
+ "type": "number",
+ "description": "Average 1-year volume"
+ },
+ "change_1d": {
+ "type": "number",
+ "description": "1-day change percentage"
+ },
+ "change_7d": {
+ "type": "number",
+ "description": "7-day change percentage"
+ },
+ "change_1m": {
+ "type": "number",
+ "description": "1-month change percentage"
+ },
+ "change_7dover7d": {
+ "type": "number",
+ "description": "7-day over 7-day change percentage"
+ },
+ "change_30dover30d": {
+ "type": "number",
+ "description": "30-day over 30-day change percentage"
+ },
+ "defillamaId": {
"type": "string",
- "description": "Day (UTC)",
- "example": "2026-07-27"
+ "description": "DefiLlama protocol ID"
},
- "tvl_usd": {
- "type": ["number", "null"],
- "description": "Total value locked in USD at that day",
- "example": 18233358161
+ "name": {
+ "type": "string",
+ "description": "Protocol name"
},
- "apy": {
+ "displayName": {
+ "type": "string",
+ "description": "Protocol display name"
+ },
+ "module": {
+ "type": "string",
+ "description": "Protocol module name"
+ },
+ "category": {
+ "type": "string",
+ "description": "Protocol category"
+ },
+ "logo": {
+ "type": "string",
+ "description": "Protocol logo URL"
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Supported chains"
+ },
+ "protocolType": {
+ "type": "string",
+ "description": "Protocol type"
+ },
+ "methodologyURL": {
+ "type": "string",
+ "description": "Methodology documentation URL"
+ },
+ "methodology": {
"type": "object",
- "description": "Supply APY in percent, attributed into base (organic) and reward (incentive emissions) components",
- "properties": {
- "avg_1d": {
- "type": "object",
- "description": "Average over that day",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.26695
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 2.26695
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.18878
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 2.18878
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.22396
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 2.22396
- }
- }
- }
- }
+ "additionalProperties": {
+ "type": "string"
+ },
+ "description": "Protocol methodology details"
},
- "intrinsic": {
- "type": ["object", "null"],
- "description": "Intrinsic yield of a yield-bearing underlying token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
- "properties": {
- "apy": {
- "type": "object",
- "description": "Intrinsic APY in percent",
- "properties": {
- "avg_1d": {
- "type": "object",
- "description": "Average over that day",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.11
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.05
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.02
- }
- }
- }
- }
- }
- }
+ "parentProtocol": {
+ "type": "string",
+ "description": "Parent protocol identifier"
},
- "price_per_share": {
- "type": ["number", "null"],
- "description": "Pool token price per share for vault-style pools; null otherwise",
- "example": null
+ "slug": {
+ "type": "string",
+ "description": "Protocol slug"
+ },
+ "linkedProtocols": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Linked protocol names"
+ },
+ "id": {
+ "type": "string",
+ "description": "Protocol ID"
}
}
+ },
+ "description": "List of protocols with their volume data"
+ }
+ }
+ },
+ "example": {
+ "totalDataChart": [[1656201600, 3947]],
+ "totalDataChartBreakdown": [
+ [
+ 1656201600,
+ {
+ "Premia V2": 3947
+ }
+ ],
+ [
+ 1656288000,
+ {
+ "Premia V2": 4716
+ }
+ ],
+ [
+ 1656374400,
+ {
+ "Premia V2": 4716
}
+ ]
+ ],
+ "breakdown24h": null,
+ "breakdown30d": null,
+ "chain": "Ethereum",
+ "allChains": [
+ "Hyperliquid L1",
+ "Derive Chain",
+ "Arbitrum",
+ "Ethereum",
+ "Base",
+ "Berachain",
+ "Sui",
+ "OP Mainnet",
+ "Polygon",
+ "Fantom",
+ "Sonic",
+ "Blast",
+ "Mantle",
+ "Bitlayer",
+ "BSC",
+ "Sei",
+ "TON"
+ ],
+ "total24h": 38508,
+ "total48hto24h": 57674,
+ "total7d": 244966,
+ "total14dto7d": 181066,
+ "total60dto30d": 1543832,
+ "total30d": 715276,
+ "total1y": 38047667,
+ "change_1d": -33.23,
+ "change_7d": -0.13,
+ "change_1m": 619.37,
+ "change_7dover7d": 35.29,
+ "change_30dover30d": -53.67,
+ "total7DaysAgo": 38559,
+ "total30DaysAgo": 5353,
+ "totalAllTime": 212572409,
+ "protocols": [
+ {
+ "total24h": 0,
+ "total48hto24h": 0,
+ "total7d": 0,
+ "total14dto7d": 0,
+ "total60dto30d": 0,
+ "total30d": 0,
+ "total1y": 0,
+ "totalAllTime": 920677,
+ "total7DaysAgo": 0,
+ "total30DaysAgo": 0,
+ "defillamaId": "381",
+ "name": "Premia V2",
+ "displayName": "Premia V2",
+ "module": "premia-v2",
+ "category": "Options",
+ "logo": "https://icons.llamao.fi/icons/protocols/premia-v2.jpg",
+ "chains": ["Ethereum", "Arbitrum", "Fantom", "OP Mainnet"],
+ "protocolType": "protocol",
+ "methodologyURL": "https://github.com/DefiLlama/dimension-adapters/blob/master/options/premia-v2.ts",
+ "methodology": {
+ "UserFees": "Traders pay taker fees on each trade up to 3% of the option premium.",
+ "Fees": "Fees paid by users",
+ "Revenue": "Treasury and token holders revenue",
+ "ProtocolRevenue": "The protocol collects 20% of the taker fees.",
+ "HoldersRevenue": "vxPREMIA holders collect 80% of the taker fees.",
+ "SupplySideRevenue": "Liquidity providers earn revenue from market-making options."
+ },
+ "latestFetchIsOk": true,
+ "parentProtocol": "parent#premia",
+ "slug": "premia-v2",
+ "linkedProtocols": ["Premia", "Premia V2", "Premia V3"],
+ "id": "381"
}
- }
+ ]
}
}
}
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.volumes.getOptionsOverviewByChain('')"
},
- "404": {
- "description": "No earn pool with this id",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string",
- "example": "POOL_NOT_FOUND"
- },
- "message": {
- "type": "string",
- "example": "earn pool not found"
- }
- }
- }
- }
- }
- }
- }
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.volumes.getOptionsOverviewByChain('')"
}
- }
+ ]
}
},
- "/yields/v2/earn/verified": {
+ "/api/summary/options/{protocol}": {
"get": {
- "tags": ["yields"],
- "x-api-plan-only": true,
- "summary": "Retrieve the latest verified data for all measured earn pools",
- "description": "Measured yield for the `/yields/v2/earn` pools we simulate, sorted by verified TVL descending. Each figure is replayed from a real holder's withdrawal against archive state, so it shows what an exit would have paid rather than what the protocol reports; the two can disagree without either being wrong. `apy` is the base leg, since a withdrawal cannot see reward emissions, and is unclamped, so it can be negative; verified reward APR is served separately in `apy_reward`. A pool appears here only while it is listed on `/yields/v2/earn`, is not withheld for review, and has at least one measured day; join on `id`.",
+ "tags": ["volumes"],
+ "summary": "Get summary of options dex volume with historical data",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "derive"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Desired data type, dailyNotionalVolume by default.",
+ "schema": {
+ "type": "string",
+ "enum": ["dailyPremiumVolume", "dailyNotionalVolume"],
+ "example": "dailyPremiumVolume"
+ }
+ }
+ ],
"responses": {
"200": {
- "description": "Array of all verified earn pools",
+ "description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "data": {
+ "id": {
+ "type": "string",
+ "description": "Protocol ID"
+ },
+ "name": {
+ "type": "string",
+ "description": "Protocol name"
+ },
+ "url": {
+ "type": "string",
+ "description": "Protocol URL"
+ },
+ "description": {
+ "type": "string",
+ "nullable": true,
+ "description": "Protocol description"
+ },
+ "logo": {
+ "type": "string",
+ "description": "Protocol logo URL"
+ },
+ "gecko_id": {
+ "type": "string",
+ "nullable": true,
+ "description": "CoinGecko ID"
+ },
+ "cmcId": {
+ "type": "string",
+ "nullable": true,
+ "description": "CoinMarketCap ID"
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Supported chains"
+ },
+ "twitter": {
+ "type": "string",
+ "description": "Twitter handle"
+ },
+ "governanceID": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ },
+ "description": "Governance IDs"
+ },
+ "github": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ },
+ "description": "GitHub repositories"
+ },
+ "treasury": {
+ "type": "string",
+ "nullable": true,
+ "description": "Treasury address"
+ },
+ "symbol": {
+ "type": "string",
+ "description": "Token symbol"
+ },
+ "address": {
+ "type": "string",
+ "nullable": true,
+ "description": "Protocol address"
+ },
+ "childProtocols": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ },
+ "description": "Child protocols"
+ },
+ "linkedProtocols": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Linked protocols"
+ },
+ "defillamaId": {
+ "type": "string",
+ "description": "DefiLlama protocol ID"
+ },
+ "disabled": {
+ "type": "boolean",
+ "nullable": true,
+ "description": "Whether protocol is disabled"
+ },
+ "displayName": {
+ "type": "string",
+ "description": "Display name"
+ },
+ "module": {
+ "type": "string",
+ "nullable": true,
+ "description": "Module name"
+ },
+ "category": {
+ "type": "string",
+ "nullable": true,
+ "description": "Protocol category"
+ },
+ "methodologyURL": {
+ "type": "string",
+ "nullable": true,
+ "description": "Methodology URL"
+ },
+ "methodology": {
+ "type": "object",
+ "nullable": true,
+ "description": "Methodology details"
+ },
+ "forkedFrom": {
+ "type": "string",
+ "nullable": true,
+ "description": "Forked from protocol"
+ },
+ "audits": {
+ "type": "string",
+ "nullable": true,
+ "description": "Audit information"
+ },
+ "audit_links": {
+ "type": "array",
+ "nullable": true,
+ "description": "Audit links"
+ },
+ "versionKey": {
+ "type": "string",
+ "nullable": true,
+ "description": "Version key"
+ },
+ "parentProtocol": {
+ "type": "string",
+ "nullable": true,
+ "description": "Parent protocol"
+ },
+ "previousNames": {
+ "type": "array",
+ "nullable": true,
+ "description": "Previous names"
+ },
+ "slug": {
+ "type": "string",
+ "description": "Protocol slug"
+ },
+ "protocolType": {
+ "type": "string",
+ "description": "Protocol type"
+ },
+ "total24h": {
+ "type": "number",
+ "nullable": true,
+ "description": "24-hour volume"
+ },
+ "total48hto24h": {
+ "type": "number",
+ "nullable": true,
+ "description": "48-hour to 24-hour volume"
+ },
+ "total7d": {
+ "type": "number",
+ "description": "7-day volume"
+ },
+ "totalAllTime": {
+ "type": "number",
+ "description": "All-time volume"
+ },
+ "totalDataChart": {
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Pool id (UUID); joins to `/yields/v2/earn`",
- "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
- },
- "apy": {
- "type": "object",
- "description": "Measured base APY in percent. Base only, since a withdrawal cannot see reward emissions (verified rewards are `apy_reward`), and unclamped, so it can be negative. All three windows end at `apy_as_of`.",
- "properties": {
- "avg_1d": {
- "type": ["number", "null"],
- "description": "Trailing 1-day average",
- "example": 1.45698
- },
- "avg_7d": {
- "type": ["number", "null"],
- "description": "Trailing 7-day average",
- "example": 1.44895
- },
- "avg_30d": {
- "type": ["number", "null"],
- "description": "Trailing 30-day average",
- "example": 1.47156
- }
- }
- },
- "apy_as_of": {
- "type": ["string", "null"],
- "description": "Timestamp the APY windows end at",
- "example": "2026-09-14T09:19:11.000Z"
- },
- "apy_note": {
- "type": ["string", "null"],
- "description": "Why the APY is absent or qualified. Show it wherever the APY renders blank; null for most pools.",
- "example": null
- },
- "apy_confidence": {
- "type": ["string", "null"],
- "description": "How closely independent holders agreed on the redemption rate. Grades the measurement, not the pool.",
- "enum": ["high", "medium", "low", "conflict", null],
- "example": "high"
- },
- "apy_reward": {
- "type": "object",
- "description": "Verified reward APR in percent: simple, not compounded, from reward claims simulated for real holders (a Merkl leaf proven against the on-chain root, or the protocol's reward index). All three windows end at `apy_reward_as_of`. Null in every window means no verified reading (see `apy_reward_notes`); 0 is a verified reading. One window can be withheld while the others are served.",
- "properties": {
- "avg_1d": {
- "type": ["number", "null"],
- "description": "Trailing 1-day average",
- "example": 2.71
- },
- "avg_7d": {
- "type": ["number", "null"],
- "description": "Trailing 7-day average",
- "example": 2.73
- },
- "avg_30d": {
- "type": ["number", "null"],
- "description": "Trailing 30-day average",
- "example": null
- }
- }
- },
- "apy_reward_as_of": {
- "type": ["string", "null"],
- "description": "End of the newest finished reward day (00:00 UTC the next day). Null when the pool has no reward reading or note.",
- "example": "2026-10-24T00:00:00.000Z"
- },
- "apy_reward_tokens": {
- "type": ["array", "null"],
- "description": "Reward tokens bound to the pool, including any a note names. Null when none are bound.",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string",
- "description": "Reward token address",
- "example": "0x8292bb45bf1ee4d140127049757c2e0ff06317ed"
- },
- "symbol": {
- "type": ["string", "null"],
- "description": "Token symbol; null until its metadata is known",
- "example": "RLUSD"
- },
- "decimals": {
- "type": ["integer", "null"],
- "description": "Token decimals; null until its metadata is known",
- "example": 18
- }
- }
- }
- },
- "apy_reward_sources": {
- "type": ["array", "null"],
- "description": "Where the reward reading was measured, a verified 0 included. Null when there is no reading.",
- "items": {
- "type": "string",
- "enum": [
- "merkl",
- "aave-v3",
- "umbrella",
- "compound",
- "curve-gauge",
- "tokemak",
- "staking-rewards",
- "usual"
- ]
- },
- "example": ["aave-v3", "merkl"]
- },
- "apy_reward_notes": {
- "type": "array",
- "description": "Readable sentences; empty for most pools. Beside a reading, who earns it when not every holder does; with no reading, why it is withheld. Show them wherever the reward renders, or renders blank.",
- "items": {
- "type": "string",
- "example": "Only eligible wallets earn this."
- }
- },
- "exit": {
- "type": "object",
- "description": "Exit health from the most recent simulated withdrawal.",
- "properties": {
- "status": {
- "type": ["string", "null"],
- "description": "What a withdrawal would do today: `instant` all of it leaves now, `queued` accepted but paid later, `partial` bounded by `exit_liquidity`, `depleted` the lane is dust (under 0.1% of TVL and under $10k), `unavailable` nothing was accepted, `blocked` reverted as paused or unrecognized. Null when unclassified.",
- "enum": ["instant", "queued", "partial", "depleted", "unavailable", "blocked", null],
- "example": "instant"
- },
- "eta_seconds": {
- "type": ["number", "null"],
- "description": "Wait before a queued withdrawal can be claimed. Only set while `status` is `queued`.",
- "example": null
- },
- "fee_bps": {
- "type": ["number", "null"],
- "description": "Exit fee in basis points. When the protocol discloses a structured fee, this is that fee, observed with `price_per_share` on `tvl.as_of`; otherwise the median discount against the reported rate over the last 30 discount observations. Null when unknown, never a claimed zero.",
- "example": 0
- },
- "as_of": {
- "type": ["string", "null"],
- "description": "Timestamp of the exit observation",
- "example": "2026-09-14T09:19:11.000Z"
- },
- "fee_flat": {
- "type": "string",
- "description": "Flat exit fee in raw base units of `denomination`, as a decimal string; parse with BigInt, not Number. Present only when the protocol discloses a structured fee, observed with `price_per_share` on `tvl.as_of`. Estimated proceeds: max(0, balance × price_per_share × (1 − fee_bps / 1e4) − fee_flat / 10^denomination.decimals), subject to rounding and later fee changes.",
- "example": "0"
- }
- }
- },
- "exit_liquidity": {
- "type": "object",
- "description": "Funded exit capacity, not backing inventory; for queued pools this is the on-chain funding buffer, not instant liquidity. Null means no on-chain capacity is exposed, not zero.",
- "properties": {
- "amount": {
- "type": ["string", "null"],
- "description": "Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
- "example": "302770028148448411826143"
- },
- "usd": {
- "type": ["number", "null"],
- "description": "Capacity in USD. Null when `denomination` is, since the conversion needs its decimals.",
- "example": 749593682.56
- },
- "slippage_bps": {
- "type": ["number", "null"],
- "description": "Price impact of the simulated exit, in basis points",
- "example": 0
- },
- "as_of": {
- "type": ["string", "null"],
- "description": "Day (UTC) the capacity was measured",
- "example": "2026-09-14"
- }
- }
- },
- "tvl": {
- "type": "object",
- "description": "Receipt supply priced at the rate an exit actually paid, not the reported figure.",
- "properties": {
- "amount": {
- "type": ["string", "null"],
- "description": "Receipt supply at the executed redemption rate. Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
- "example": "2120826166919814406207431"
- },
- "usd": {
- "type": ["number", "null"],
- "description": "Verified TVL in USD. Null when `denomination` is.",
- "example": 5250710931.5
- },
- "as_of": {
- "type": ["string", "null"],
- "description": "Day (UTC) the TVL was measured",
- "example": "2026-09-14"
- }
- }
- },
- "price_per_share": {
- "type": ["number", "null"],
- "description": "Underlying assets per position token, in human units. For rebasing tokens (aTokens, stETH) this is per internal share, so read it as a series normalized to its first point, not as an absolute. Null for LP pools (`denomination.kind` is `lp_unit`): their unit is √(x·y) of the reserves, so a price per share would read as a token price.",
- "example": 1.0706808832358203
- },
- "denomination": {
- "description": "Asset an exit pays out, and the decimals its raw amounts use. A token for most pools; for LP pools (`kind` is `lp_unit`) a synthetic unit, √(x·y) of the pool's reserves, labelled with its LP token and coins. Null when it could not be pinned; the USD fields go null with it, and you must not assume 18.",
- "oneOf": [
- {
- "type": "object",
- "title": "Token",
- "required": ["address", "decimals"],
- "properties": {
- "address": {
- "type": "string",
- "description": "Payout token address",
- "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
- },
- "decimals": {
- "type": ["integer", "null"],
- "description": "Decimals of the payout token",
- "example": 18
- }
- }
- },
- {
+ "type": "array",
+ "description": "[timestamp, volume]",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ "description": "Historical chart data with timestamps and volumes"
+ },
+ "totalDataChartBreakdown": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "description": "[timestamp, breakdown]",
+ "items": {
+ "oneOf": [
+ {
+ "type": "integer",
+ "description": "Unix timestamp"
+ },
+ {
+ "type": "object",
+ "additionalProperties": {
"type": "object",
- "title": "LP unit",
- "required": ["kind", "lp_token", "decimals", "coins"],
- "properties": {
- "kind": {
- "type": "string",
- "enum": ["lp_unit"],
- "description": "Marks an LP pool's synthetic unit",
- "example": "lp_unit"
- },
- "lp_token": {
- "type": "string",
- "description": "Address of the LP token the unit belongs to",
- "example": "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc"
- },
- "decimals": {
- "type": ["integer", "null"],
- "description": "Decimals of the raw amounts",
- "example": 18
- },
- "coins": {
- "type": ["array", "null"],
- "description": "The pool's coins, as its underlying tokens",
- "items": {
- "type": "string"
- },
- "example": [
- "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
- "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
- ]
- }
+ "additionalProperties": {
+ "type": "number"
}
},
- {
- "type": "null"
- }
- ]
- }
- }
- }
+ "description": "Chain and protocol breakdown with volume values"
+ }
+ ]
+ },
+ "minItems": 2,
+ "maxItems": 2
+ },
+ "description": "Historical chart data broken down by chain and protocol"
+ },
+ "change_1d": {
+ "type": "number",
+ "description": "1-day change percentage"
}
}
+ },
+ "example": {
+ "id": "parent#lyra",
+ "name": "Derive",
+ "url": "https://derive.xyz",
+ "description": "Trade options & perps. Earn yield with restaking derivatives.",
+ "logo": "https://icons.llama.fi/derive.png",
+ "gecko_id": "derive",
+ "cmcId": "35014",
+ "chains": ["OP Mainnet", "Arbitrum", "Derive Chain"],
+ "twitter": "derivexyz",
+ "governanceID": ["snapshot:lyra.eth"],
+ "github": ["lyra-finance"],
+ "treasury": "lyra.js",
+ "symbol": "DRV",
+ "address": "0xb1d1eae60eea9525032a6dcb4c1ce336a1de71be",
+ "childProtocols": [{}, {}],
+ "linkedProtocols": ["Derive", "Derive V2", "Derive Options"],
+ "defillamaId": "parent#lyra",
+ "disabled": null,
+ "displayName": "Derive",
+ "module": null,
+ "category": null,
+ "methodologyURL": null,
+ "methodology": null,
+ "forkedFrom": null,
+ "audits": null,
+ "audit_links": null,
+ "versionKey": null,
+ "parentProtocol": null,
+ "previousNames": null,
+ "latestFetchIsOk": true,
+ "slug": "derive",
+ "protocolType": "protocol",
+ "total24h": 849389,
+ "total48hto24h": 529694,
+ "total7d": 2327481,
+ "totalAllTime": 156317108,
+ "totalDataChart": [[1702684800, 15019], [1702771200, 15019]],
+ "totalDataChartBreakdown": [
+ [
+ 1702684800,
+ {
+ "Ethereum": {
+ "Derive V2": 15019
+ }
+ }
+ ],
+ [
+ 1702771200,
+ {
+ "Derive Chain": {
+ "Derive V2": 15019
+ }
+ }
+ ]
+ ],
+ "change_1d": 60.35
}
}
}
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.volumes.getOptionsSummary('')"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.volumes.getOptionsSummary('')"
+ }
+ ]
+ }
+ },
+ "/api/overview/fees": {
+ "get": {
+ "tags": ["fees and revenue"],
+ "summary": "List all protocols along with summaries of their fees and revenue and dataType history data",
+ "parameters": [
+ {
+ "name": "excludeTotalDataChart",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude aggregated chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
},
- "400": {
- "description": "Unknown query parameter or invalid value",
+ {
+ "name": "excludeTotalDataChartBreakdown",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude broken down chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Desired data type, dailyFees by default.",
+ "schema": {
+ "type": "string",
+ "enum": ["dailyFees", "dailyRevenue", "dailyHoldersRevenue"],
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Overview of all protocols with fees and revenue data",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "error": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string",
- "example": "INVALID_QUERY_PARAM"
- },
- "message": {
- "type": "string",
- "example": "unknown query parameter: chain"
+ "protocols": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "Uniswap"
+ },
+ "total24h": {
+ "type": "number",
+ "nullable": true,
+ "example": 5000000
+ },
+ "change_1d": {
+ "type": "number",
+ "example": 12.5
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Polygon"]
+ }
}
}
+ },
+ "totalDataChart": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "example": [1640995200, 25000000]
+ }
+ },
+ "totalDataChartBreakdown": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "example": [
+ 1640995200,
+ {
+ "Uniswap": 5000000,
+ "Compound": 3000000
+ }
+ ]
+ }
}
}
}
}
}
}
- }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.fees.getOverview()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.fees.getOverview()"
+ }
+ ]
}
},
- "/yields/v2/earn/verified/{id}": {
- "get": {
- "tags": ["yields"],
- "x-api-plan-only": true,
- "summary": "Retrieve the latest verified data for one earn pool",
- "description": "The same row `/yields/v2/earn/verified` serves for this pool, plus `methods`: the on-chain calls the simulation executes, in order.",
+ "/api/overview/fees/{chain}": {
+ "get": {
+ "tags": ["fees and revenue"],
+ "summary": "List all protocols along with summaries of their fees and revenue and dataType history data by chain",
"parameters": [
{
- "name": "id",
+ "name": "chain",
"in": "path",
"required": true,
- "description": "Earn pool id (UUID)",
+ "description": "chain name, list of all supported chains can be found under allChains attribute in /overview/fees response",
"schema": {
"type": "string",
- "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
+ "example": "ethereum"
+ }
+ },
+ {
+ "name": "excludeTotalDataChart",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude aggregated chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "excludeTotalDataChartBreakdown",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude broken down chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Desired data type, dailyFees by default.",
+ "schema": {
+ "type": "string",
+ "enum": ["dailyFees", "dailyRevenue", "dailyHoldersRevenue"],
+ "example": "dailyFees"
}
}
],
"responses": {
"200": {
- "description": "Verified data for the pool",
+ "description": "Overview of all protocols with fees and revenue data",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "data": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Pool id (UUID); joins to `/yields/v2/earn`",
- "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
- },
- "apy": {
- "type": "object",
- "description": "Measured base APY in percent. Base only, since a withdrawal cannot see reward emissions (verified rewards are `apy_reward`), and unclamped, so it can be negative. All three windows end at `apy_as_of`.",
- "properties": {
- "avg_1d": {
- "type": ["number", "null"],
- "description": "Trailing 1-day average",
- "example": 1.45698
- },
- "avg_7d": {
- "type": ["number", "null"],
- "description": "Trailing 7-day average",
- "example": 1.44895
- },
- "avg_30d": {
- "type": ["number", "null"],
- "description": "Trailing 30-day average",
- "example": 1.47156
- }
- }
- },
- "apy_as_of": {
- "type": ["string", "null"],
- "description": "Timestamp the APY windows end at",
- "example": "2026-09-14T09:19:11.000Z"
- },
- "apy_note": {
- "type": ["string", "null"],
- "description": "Why the APY is absent or qualified. Show it wherever the APY renders blank; null for most pools.",
- "example": null
- },
- "apy_confidence": {
- "type": ["string", "null"],
- "description": "How closely independent holders agreed on the redemption rate. Grades the measurement, not the pool.",
- "enum": ["high", "medium", "low", "conflict", null],
- "example": "high"
- },
- "apy_reward": {
- "type": "object",
- "description": "Verified reward APR in percent: simple, not compounded, from reward claims simulated for real holders (a Merkl leaf proven against the on-chain root, or the protocol's reward index). All three windows end at `apy_reward_as_of`. Null in every window means no verified reading (see `apy_reward_notes`); 0 is a verified reading. One window can be withheld while the others are served.",
- "properties": {
- "avg_1d": {
- "type": ["number", "null"],
- "description": "Trailing 1-day average",
- "example": 2.71
- },
- "avg_7d": {
- "type": ["number", "null"],
- "description": "Trailing 7-day average",
- "example": 2.73
- },
- "avg_30d": {
- "type": ["number", "null"],
- "description": "Trailing 30-day average",
- "example": null
- }
- }
- },
- "apy_reward_as_of": {
- "type": ["string", "null"],
- "description": "End of the newest finished reward day (00:00 UTC the next day). Null when the pool has no reward reading or note.",
- "example": "2026-10-24T00:00:00.000Z"
- },
- "apy_reward_tokens": {
- "type": ["array", "null"],
- "description": "Reward tokens bound to the pool, including any a note names. Null when none are bound.",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string",
- "description": "Reward token address",
- "example": "0x8292bb45bf1ee4d140127049757c2e0ff06317ed"
- },
- "symbol": {
- "type": ["string", "null"],
- "description": "Token symbol; null until its metadata is known",
- "example": "RLUSD"
- },
- "decimals": {
- "type": ["integer", "null"],
- "description": "Token decimals; null until its metadata is known",
- "example": 18
- }
- }
- }
- },
- "apy_reward_sources": {
- "type": ["array", "null"],
- "description": "Where the reward reading was measured, a verified 0 included. Null when there is no reading.",
- "items": {
+ "protocols": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
"type": "string",
- "enum": [
- "merkl",
- "aave-v3",
- "umbrella",
- "compound",
- "curve-gauge",
- "tokemak",
- "staking-rewards",
- "usual"
- ]
+ "example": "Uniswap"
},
- "example": ["aave-v3", "merkl"]
- },
- "apy_reward_notes": {
- "type": "array",
- "description": "Readable sentences; empty for most pools. Beside a reading, who earns it when not every holder does; with no reading, why it is withheld. Show them wherever the reward renders, or renders blank.",
- "items": {
- "type": "string",
- "example": "Only eligible wallets earn this."
- }
- },
- "exit": {
- "type": "object",
- "description": "Exit health from the most recent simulated withdrawal.",
- "properties": {
- "status": {
- "type": ["string", "null"],
- "description": "What a withdrawal would do today: `instant` all of it leaves now, `queued` accepted but paid later, `partial` bounded by `exit_liquidity`, `depleted` the lane is dust (under 0.1% of TVL and under $10k), `unavailable` nothing was accepted, `blocked` reverted as paused or unrecognized. Null when unclassified.",
- "enum": ["instant", "queued", "partial", "depleted", "unavailable", "blocked", null],
- "example": "instant"
- },
- "eta_seconds": {
- "type": ["number", "null"],
- "description": "Wait before a queued withdrawal can be claimed. Only set while `status` is `queued`.",
- "example": null
- },
- "fee_bps": {
- "type": ["number", "null"],
- "description": "Exit fee in basis points. When the protocol discloses a structured fee, this is that fee, observed with `price_per_share` on `tvl.as_of`; otherwise the median discount against the reported rate over the last 30 discount observations. Null when unknown, never a claimed zero.",
- "example": 0
- },
- "as_of": {
- "type": ["string", "null"],
- "description": "Timestamp of the exit observation",
- "example": "2026-09-14T09:19:11.000Z"
- },
- "fee_flat": {
- "type": "string",
- "description": "Flat exit fee in raw base units of `denomination`, as a decimal string; parse with BigInt, not Number. Present only when the protocol discloses a structured fee, observed with `price_per_share` on `tvl.as_of`. Estimated proceeds: max(0, balance × price_per_share × (1 − fee_bps / 1e4) − fee_flat / 10^denomination.decimals), subject to rounding and later fee changes.",
- "example": "0"
- }
- }
- },
- "exit_liquidity": {
- "type": "object",
- "description": "Funded exit capacity, not backing inventory; for queued pools this is the on-chain funding buffer, not instant liquidity. Null means no on-chain capacity is exposed, not zero.",
- "properties": {
- "amount": {
- "type": ["string", "null"],
- "description": "Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
- "example": "302770028148448411826143"
- },
- "usd": {
- "type": ["number", "null"],
- "description": "Capacity in USD. Null when `denomination` is, since the conversion needs its decimals.",
- "example": 749593682.56
- },
- "slippage_bps": {
- "type": ["number", "null"],
- "description": "Price impact of the simulated exit, in basis points",
- "example": 0
- },
- "as_of": {
- "type": ["string", "null"],
- "description": "Day (UTC) the capacity was measured",
- "example": "2026-09-14"
- }
- }
- },
- "tvl": {
- "type": "object",
- "description": "Receipt supply priced at the rate an exit actually paid, not the reported figure.",
- "properties": {
- "amount": {
- "type": ["string", "null"],
- "description": "Receipt supply at the executed redemption rate. Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
- "example": "2120826166919814406207431"
- },
- "usd": {
- "type": ["number", "null"],
- "description": "Verified TVL in USD. Null when `denomination` is.",
- "example": 5250710931.5
- },
- "as_of": {
- "type": ["string", "null"],
- "description": "Day (UTC) the TVL was measured",
- "example": "2026-09-14"
- }
+ "total24h": {
+ "type": "number",
+ "nullable": true,
+ "example": 5000000
+ },
+ "change_1d": {
+ "type": "number",
+ "example": 12.5
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Polygon"]
}
+ }
+ }
+ },
+ "totalDataChart": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "example": [1640995200, 25000000]
+ }
+ },
+ "totalDataChartBreakdown": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "example": [
+ 1640995200,
+ {
+ "Uniswap": 5000000,
+ "Compound": 3000000
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.fees.getOverviewByChain('')"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.fees.getOverviewByChain('')"
+ }
+ ]
+ }
+ },
+ "/api/summary/fees/{protocol}": {
+ "get": {
+ "tags": ["fees and revenue"],
+ "summary": "Get summary of protocol fees and revenue with historical data",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "derive"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Desired data type, dailyFees by default.",
+ "schema": {
+ "type": "string",
+ "enum": ["dailyFees", "dailyRevenue", "dailyHoldersRevenue"],
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Protocol ID"
+ },
+ "name": {
+ "type": "string",
+ "description": "Protocol name"
+ },
+ "url": {
+ "type": "string",
+ "description": "Protocol URL"
+ },
+ "referralUrl": {
+ "type": "string",
+ "description": "Referral URL"
+ },
+ "description": {
+ "type": "string",
+ "nullable": true,
+ "description": "Protocol description"
+ },
+ "logo": {
+ "type": "string",
+ "description": "Protocol logo URL"
+ },
+ "gecko_id": {
+ "type": "string",
+ "nullable": true,
+ "description": "CoinGecko ID"
+ },
+ "cmcId": {
+ "type": "string",
+ "nullable": true,
+ "description": "CoinMarketCap ID"
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Supported chains"
+ },
+ "twitter": {
+ "type": "string",
+ "description": "Twitter handle"
+ },
+ "github": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ },
+ "description": "GitHub repositories"
+ },
+ "symbol": {
+ "type": "string",
+ "description": "Token symbol"
+ },
+ "address": {
+ "type": "string",
+ "nullable": true,
+ "description": "Protocol address"
+ },
+ "childProtocols": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ },
+ "description": "Child protocols"
+ },
+ "linkedProtocols": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Linked protocols"
+ },
+ "defillamaId": {
+ "type": "string",
+ "description": "DefiLlama protocol ID"
+ },
+ "disabled": {
+ "type": "boolean",
+ "nullable": true,
+ "description": "Whether protocol is disabled"
+ },
+ "displayName": {
+ "type": "string",
+ "description": "Display name"
+ },
+ "module": {
+ "type": "string",
+ "nullable": true,
+ "description": "Module name"
+ },
+ "category": {
+ "type": "string",
+ "nullable": true,
+ "description": "Protocol category"
+ },
+ "methodologyURL": {
+ "type": "string",
+ "nullable": true,
+ "description": "Methodology URL"
+ },
+ "methodology": {
+ "type": "object",
+ "nullable": true,
+ "description": "Methodology details"
+ },
+ "forkedFrom": {
+ "type": "string",
+ "nullable": true,
+ "description": "Forked from protocol"
+ },
+ "audits": {
+ "type": "string",
+ "nullable": true,
+ "description": "Audit information"
+ },
+ "audit_links": {
+ "type": "array",
+ "nullable": true,
+ "description": "Audit links"
+ },
+ "versionKey": {
+ "type": "string",
+ "nullable": true,
+ "description": "Version key"
+ },
+ "governanceID": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ },
+ "description": "Governance IDs"
+ },
+ "treasury": {
+ "type": "string",
+ "nullable": true,
+ "description": "Treasury address"
+ },
+ "parentProtocol": {
+ "type": "string",
+ "nullable": true,
+ "description": "Parent protocol"
+ },
+ "previousNames": {
+ "type": "array",
+ "nullable": true,
+ "description": "Previous names"
+ },
+ "slug": {
+ "type": "string",
+ "description": "Protocol slug"
+ },
+ "protocolType": {
+ "type": "string",
+ "description": "Protocol type"
+ },
+ "total24h": {
+ "type": "number",
+ "nullable": true,
+ "description": "24 hour fees"
+ },
+ "total48hto24h": {
+ "type": "number",
+ "nullable": true,
+ "description": "48h to 24h fees"
+ },
+ "total7d": {
+ "type": "number",
+ "description": "7 day fees"
+ },
+ "totalAllTime": {
+ "type": "number",
+ "description": "All time fees"
+ },
+ "change_1d": {
+ "type": "number",
+ "description": "1 day change percentage"
+ },
+ "totalDataChart": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "description": "[timestamp, fee value]",
+ "items": {
+ "type": "number"
},
- "price_per_share": {
- "type": ["number", "null"],
- "description": "Underlying assets per position token, in human units. For rebasing tokens (aTokens, stETH) this is per internal share, so read it as a series normalized to its first point, not as an absolute. Null for LP pools (`denomination.kind` is `lp_unit`): their unit is √(x·y) of the reserves, so a price per share would read as a token price.",
- "example": 1.0706808832358203
- },
- "denomination": {
- "description": "Asset an exit pays out, and the decimals its raw amounts use. A token for most pools; for LP pools (`kind` is `lp_unit`) a synthetic unit, √(x·y) of the pool's reserves, labelled with its LP token and coins. Null when it could not be pinned; the USD fields go null with it, and you must not assume 18.",
+ "minItems": 2,
+ "maxItems": 2
+ },
+ "description": "Total data chart with timestamps and fees"
+ },
+ "totalDataChartBreakdown": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "description": "[timestamp, chain and protocol breakdown]",
+ "items": {
"oneOf": [
{
- "type": "object",
- "title": "Token",
- "required": ["address", "decimals"],
- "properties": {
- "address": {
- "type": "string",
- "description": "Payout token address",
- "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
- },
- "decimals": {
- "type": ["integer", "null"],
- "description": "Decimals of the payout token",
- "example": 18
- }
- }
+ "type": "integer",
+ "description": "Timestamp"
},
{
"type": "object",
- "title": "LP unit",
- "required": ["kind", "lp_token", "decimals", "coins"],
- "properties": {
- "kind": {
- "type": "string",
- "enum": ["lp_unit"],
- "description": "Marks an LP pool's synthetic unit",
- "example": "lp_unit"
- },
- "lp_token": {
- "type": "string",
- "description": "Address of the LP token the unit belongs to",
- "example": "0xb4e16d0168e52d35cacd2c6185b44281ec28c9dc"
- },
- "decimals": {
- "type": ["integer", "null"],
- "description": "Decimals of the raw amounts",
- "example": 18
- },
- "coins": {
- "type": ["array", "null"],
- "description": "The pool's coins, as its underlying tokens",
- "items": {
- "type": "string"
- },
- "example": [
- "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
- "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
- ]
- }
- }
- },
- {
- "type": "null"
+ "description": "Chain and protocol breakdown"
}
]
},
- "methods": {
- "type": ["array", "null"],
- "description": "On-chain calls the simulation executes, in order. Null when not recorded.",
- "items": {
- "type": "string",
- "example": "Pool.withdraw(underlying, type(uint256).max, holder) — EXECUTED as the holder; returns underlying actually received"
- }
- }
- }
+ "minItems": 2,
+ "maxItems": 2
+ },
+ "description": "Total data chart breakdown by chain and protocol"
}
}
- }
- }
- }
- },
- "400": {
- "description": "Unknown query parameter or invalid value",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string",
- "example": "INVALID_QUERY_PARAM"
- },
- "message": {
- "type": "string",
- "example": "unknown query parameter: range"
+ },
+ "example": {
+ "id": "parent#hyperliquid",
+ "name": "Hyperliquid",
+ "url": "https://hyperliquid.xyz",
+ "referralUrl": "https://app.hyperliquid.xyz/join/DEFILLAMAO",
+ "description": "Hyperliquid is a decentralized perpetual exchange with best-in-class speed, liquidity, and price",
+ "logo": "https://icons.llama.fi/hyperliquid.png",
+ "gecko_id": "hyperliquid",
+ "cmcId": "32196",
+ "chains": ["Hyperliquid L1"],
+ "twitter": "HyperliquidX",
+ "github": ["hyperliquid-dex"],
+ "symbol": "HYPE",
+ "address": "hyperliquid:0x0d01dc56dcaaca66ad901c959b4011ec",
+ "childProtocols": [{}],
+ "linkedProtocols": ["Hyperliquid", "Hyperliquid Spot Orderbook"],
+ "defillamaId": "parent#hyperliquid",
+ "disabled": null,
+ "displayName": "Hyperliquid",
+ "module": null,
+ "category": null,
+ "methodologyURL": null,
+ "methodology": null,
+ "forkedFrom": null,
+ "audits": null,
+ "audit_links": null,
+ "versionKey": null,
+ "governanceID": null,
+ "treasury": null,
+ "parentProtocol": null,
+ "previousNames": null,
+ "slug": "hyperliquid",
+ "protocolType": "protocol",
+ "total24h": 4890250,
+ "total48hto24h": 4550411,
+ "total7d": 26184696,
+ "totalAllTime": 499292857,
+ "change_1d": 7.47,
+ "totalDataChart": [[1734912000, 1472923]],
+ "totalDataChartBreakdown": [
+ [
+ 1734912000,
+ {
+ "Hyperliquid L1": {
+ "Hyperliquid Spot Orderbook": 1472923
}
}
- }
- }
+ ]
+ ]
}
}
}
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await client.fees.getSummary('')"
},
- "404": {
- "description": "No verified pool with this id",
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.fees.getSummary('')"
+ }
+ ]
+ }
+ },
+ "/api/overview/open-interest": {
+ "get": {
+ "tags": ["perps"],
+ "summary": "List all open interest dex exchanges along with summaries of their open interest",
+ "parameters": [
+ {
+ "name": "excludeTotalDataChart",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude aggregated chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "excludeTotalDataChartBreakdown",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude broken down chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Overview of all open interest DEXs",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "error": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string",
- "example": "VERIFIED_POOL_NOT_FOUND"
- },
- "message": {
- "type": "string",
- "example": "verified pool not found"
+ "protocols": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": {
+ "type": "string",
+ "example": "Hyperliquid Perps"
+ },
+ "displayName": {
+ "type": "string",
+ "example": "Hyperliquid Perps"
+ },
+ "total24h": {
+ "type": "number",
+ "nullable": true,
+ "example": 14304709847
+ },
+ "total7d": {
+ "type": "number",
+ "example": 93112774041
+ },
+ "change_1d": {
+ "type": "number",
+ "example": 3.62
+ },
+ "change_7d": {
+ "type": "number",
+ "example": 12.63
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Hyperliquid L1"]
+ }
}
}
+ },
+ "totalDataChart": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "oneOf": [
+ {
+ "type": "number"
+ },
+ {
+ "type": "object"
+ }
+ ]
+ },
+ "example": [1654819200, 607785941]
+ }
+ },
+ "allChains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Hyperliquid L1", "Off Chain", "zkLighter"]
}
}
}
@@ -11319,681 +8858,1283 @@
}
}
},
- "/yields/v2/earn/verified/{id}/history": {
+ "/api/overview/derivatives": {
"get": {
- "tags": ["yields"],
- "x-api-plan-only": true,
- "summary": "Retrieve daily verified history for an earn pool",
- "description": "Daily measured APY, verified reward APR, share price, verified TVL and exit health for one pool, oldest first. `apy` and `apy_reward` carry `avg_1d` (that day), `avg_7d` and `avg_30d` (trailing averages ending that day). Days the pool was not measured are omitted, so the dates are not contiguous. Every `range` is sliced from the same cached series.",
+ "tags": ["perps"],
+ "summary": "Lists all derivatives along summaries of their volumes filtering by chain",
"parameters": [
{
- "name": "id",
- "in": "path",
+ "name": "excludeTotalDataChart",
+ "in": "query",
"required": true,
- "description": "Earn pool id (UUID)",
+ "description": "true to exclude aggregated chart from response",
"schema": {
- "type": "string",
- "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
+ "type": "boolean",
+ "example": true
}
},
{
- "name": "range",
+ "name": "excludeTotalDataChartBreakdown",
"in": "query",
- "required": false,
- "description": "History window; defaults to max (the full series)",
+ "required": true,
+ "description": "true to exclude broken down chart from response",
"schema": {
- "type": "string",
- "enum": ["30d", "90d", "max"],
- "example": "90d"
+ "type": "boolean",
+ "example": true
}
}
],
"responses": {
"200": {
- "description": "Daily verified history rows, oldest first",
+ "description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "data": {
+ "totalDataChart": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": [
+ {
+ "type": "integer",
+ "description": "Timestamp"
+ },
+ {
+ "type": "number",
+ "description": "Volume value"
+ }
+ ]
+ },
+ "description": "Total data chart with timestamps and volumes"
+ },
+ "totalDataChartBreakdown": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": [
+ {
+ "type": "integer",
+ "description": "Timestamp"
+ },
+ {
+ "type": "object",
+ "description": "Protocol breakdown"
+ }
+ ]
+ },
+ "description": "Total data chart breakdown by protocol"
+ },
+ "breakdown24h": {
+ "type": "object",
+ "nullable": true,
+ "description": "24 hour breakdown"
+ },
+ "breakdown30d": {
+ "type": "object",
+ "nullable": true,
+ "description": "30 day breakdown"
+ },
+ "chain": {
+ "type": "string",
+ "nullable": true,
+ "description": "Chain filter"
+ },
+ "allChains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "All available chains"
+ },
+ "total24h": {
+ "type": "number",
+ "description": "Total 24 hour volume"
+ },
+ "total48hto24h": {
+ "type": "number",
+ "description": "Total 48h to 24h volume"
+ },
+ "total7d": {
+ "type": "number",
+ "description": "Total 7 day volume"
+ },
+ "total14dto7d": {
+ "type": "number",
+ "description": "Total 14d to 7d volume"
+ },
+ "total60dto30d": {
+ "type": "number",
+ "description": "Total 60d to 30d volume"
+ },
+ "total30d": {
+ "type": "number",
+ "description": "Total 30 day volume"
+ },
+ "total1y": {
+ "type": "number",
+ "description": "Total 1 year volume"
+ },
+ "change_1d": {
+ "type": "number",
+ "description": "1 day change percentage"
+ },
+ "change_7d": {
+ "type": "number",
+ "description": "7 day change percentage"
+ },
+ "change_1m": {
+ "type": "number",
+ "description": "1 month change percentage"
+ },
+ "change_7dover7d": {
+ "type": "number",
+ "description": "7d over 7d change percentage"
+ },
+ "change_30dover30d": {
+ "type": "number",
+ "description": "30d over 30d change percentage"
+ },
+ "total7DaysAgo": {
+ "type": "number",
+ "description": "Total volume 7 days ago"
+ },
+ "total30DaysAgo": {
+ "type": "number",
+ "description": "Total volume 30 days ago"
+ },
+ "totalAllTime": {
+ "type": "number",
+ "description": "Total all time volume"
+ },
+ "protocols": {
"type": "array",
"items": {
"type": "object",
"properties": {
- "date": {
- "type": "string",
- "description": "Day (UTC)",
- "example": "2026-09-14"
+ "total24h": {
+ "type": "number",
+ "description": "Protocol 24 hour volume"
},
- "outcome": {
- "type": ["string", "null"],
- "description": "Raw measurement outcome for that day, the uninterpreted form of `exit.status`. The `reverted_*` values are days a real withdrawal would have failed.",
- "enum": [
- "ok_full",
- "ok_partial",
- "delayed",
- "no_exit_primary",
- "reverted_liquidity",
- "reverted_paused",
- "reverted_unknown",
- "error_rpc",
- null
- ],
- "example": "ok_full"
+ "total48hto24h": {
+ "type": "number",
+ "description": "Protocol 48h to 24h volume"
},
- "eta_seconds": {
- "type": ["number", "null"],
- "description": "Wait before that day's queued withdrawal could be claimed. Only set when `outcome` is `delayed`.",
- "example": null
+ "total7d": {
+ "type": "number",
+ "description": "Protocol 7 day volume"
},
- "confidence": {
- "type": ["string", "null"],
- "description": "Holder-consensus confidence in that day's measurement",
- "enum": ["high", "medium", "low", "conflict", null],
- "example": "high"
+ "total14dto7d": {
+ "type": "number",
+ "description": "Protocol 14d to 7d volume"
+ },
+ "total60dto30d": {
+ "type": "number",
+ "description": "Protocol 60d to 30d volume"
+ },
+ "total30d": {
+ "type": "number",
+ "description": "Protocol 30 day volume"
+ },
+ "total1y": {
+ "type": "number",
+ "description": "Protocol 1 year volume"
+ },
+ "totalAllTime": {
+ "type": "number",
+ "description": "Protocol all time volume"
+ },
+ "average1y": {
+ "type": "number",
+ "description": "Protocol average 1 year volume"
+ },
+ "change_1d": {
+ "type": "number",
+ "description": "Protocol 1 day change percentage"
+ },
+ "change_7d": {
+ "type": "number",
+ "description": "Protocol 7 day change percentage"
+ },
+ "change_1m": {
+ "type": "number",
+ "description": "Protocol 1 month change percentage"
+ },
+ "change_7dover7d": {
+ "type": "number",
+ "description": "Protocol 7d over 7d change percentage"
},
- "apy": {
+ "change_30dover30d": {
+ "type": "number",
+ "description": "Protocol 30d over 30d change percentage"
+ },
+ "breakdown24h": {
"type": "object",
- "description": "Measured base APY in percent. Base only, since a withdrawal cannot see reward emissions (verified rewards are `apy_reward`), and unclamped, so it can be negative.",
- "properties": {
- "avg_1d": {
- "type": ["number", "null"],
- "description": "Average over that day",
- "example": 1.45698
- },
- "avg_7d": {
- "type": ["number", "null"],
- "description": "Trailing 7-day average ending that day",
- "example": 1.44895
- },
- "avg_30d": {
- "type": ["number", "null"],
- "description": "Trailing 30-day average ending that day",
- "example": 1.47156
- }
- }
+ "description": "Protocol 24 hour breakdown"
},
- "apy_reward": {
+ "breakdown30d": {
"type": "object",
- "description": "Verified reward APR in percent, simple, not compounded. Null in every window means no verified reading that day; 0 is a verified reading.",
- "properties": {
- "avg_1d": {
- "type": ["number", "null"],
- "description": "That day's reward APR",
- "example": 2.71
- },
- "avg_7d": {
- "type": ["number", "null"],
- "description": "Trailing 7-day average ending that day",
- "example": 2.73
- },
- "avg_30d": {
- "type": ["number", "null"],
- "description": "Trailing 30-day average ending that day",
- "example": null
- }
- }
+ "description": "Protocol 30 day breakdown"
},
- "apy_reward_notes": {
+ "total7DaysAgo": {
+ "type": "number",
+ "description": "Protocol volume 7 days ago"
+ },
+ "total30DaysAgo": {
+ "type": "number",
+ "description": "Protocol volume 30 days ago"
+ },
+ "defillamaId": {
+ "type": "string",
+ "description": "DefiLlama protocol ID"
+ },
+ "name": {
+ "type": "string",
+ "description": "Protocol name"
+ },
+ "displayName": {
+ "type": "string",
+ "description": "Protocol display name"
+ },
+ "module": {
+ "type": "string",
+ "description": "Protocol module"
+ },
+ "category": {
+ "type": "string",
+ "description": "Protocol category"
+ },
+ "logo": {
+ "type": "string",
+ "description": "Protocol logo URL"
+ },
+ "chains": {
"type": "array",
- "description": "That day's reward notes: who earns the reading, or why it is withheld. Empty for most days.",
"items": {
- "type": "string",
- "example": "Only eligible wallets earn this."
- }
- },
- "price_per_share": {
- "type": ["number", "null"],
- "description": "Underlying assets per position token, in human units. For rebasing tokens (aTokens, stETH) this is per internal share, so read it as a series normalized to its first point, not as an absolute. Null for LP pools (`denomination.kind` is `lp_unit`): their unit is √(x·y) of the reserves, so a price per share would read as a token price.",
- "example": 1.0706808832358203
+ "type": "string"
+ },
+ "description": "Protocol chains"
},
- "price_per_share_quoted": {
- "type": ["number", "null"],
- "description": "The pool's reported price, for days the executed exit could not price one. A quote, not a measurement, so mark it differently in a chart. Null unless corroborated, and always for LP pools.",
- "example": 1.0706808832358203
+ "protocolType": {
+ "type": "string",
+ "description": "Protocol type"
},
- "reason": {
- "type": ["string", "null"],
- "description": "Why `price_per_share` is null on a day that was otherwise measured; null when it is present.",
- "enum": ["rate_quality_floor", "nav_quote_no_exit_path", "no_executed_exit_path", null],
- "example": null
+ "methodologyURL": {
+ "type": "string",
+ "description": "Methodology URL"
},
- "exit_liquidity": {
+ "methodology": {
"type": "object",
- "description": "Funded exit capacity, not backing inventory; for queued pools this is the on-chain funding buffer, not instant liquidity. Null means no on-chain capacity is exposed, not zero.",
- "properties": {
- "amount": {
- "type": ["string", "null"],
- "description": "Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
- "example": "302770028148448411826143"
- },
- "usd": {
- "type": ["number", "null"],
- "description": "Capacity in USD. Null when `denomination` is, since the conversion needs its decimals.",
- "example": 749593682.56
- },
- "slippage_bps": {
- "type": ["number", "null"],
- "description": "Price impact of the simulated exit, in basis points",
- "example": 0
- }
- }
+ "description": "Methodology details"
},
- "tvl": {
- "type": "object",
- "description": "Receipt supply priced at the rate an exit actually paid, not the reported figure.",
- "properties": {
- "amount": {
- "type": ["string", "null"],
- "description": "Receipt supply at the executed redemption rate. Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
- "example": "2120826166919814406207431"
- },
- "usd": {
- "type": ["number", "null"],
- "description": "Verified TVL in USD. Null when `denomination` is.",
- "example": 5250710931.5
- }
- }
+ "latestFetchIsOk": {
+ "type": "boolean",
+ "description": "Latest fetch status"
},
- "tvl_quoted": {
- "type": "object",
- "description": "Supply valued at the reported rate, for the days `tvl` is null. A valuation, not an exit measure.",
- "properties": {
- "amount": {
- "type": ["string", "null"],
- "description": "Raw base units of `denomination`, as a decimal string; parse with BigInt, not Number.",
- "example": "2120826166919814406207431"
- },
- "usd": {
- "type": ["number", "null"],
- "description": "Quoted valuation in USD",
- "example": 5250710931.5
- }
- }
+ "parentProtocol": {
+ "type": "string",
+ "description": "Parent protocol"
+ },
+ "slug": {
+ "type": "string",
+ "description": "Protocol slug"
+ },
+ "linkedProtocols": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Linked protocols"
+ },
+ "id": {
+ "type": "string",
+ "description": "Protocol ID"
}
}
- }
+ },
+ "description": "List of protocols"
}
}
- }
- }
- }
- },
- "400": {
- "description": "Unknown query parameter or invalid value",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string",
- "example": "INVALID_QUERY_PARAM"
- },
- "message": {
- "type": "string",
- "example": "range must be one of: 30d, 90d, max"
+ },
+ "example": {
+ "totalDataChart": [[1614211200, 24949], [1614297600, 103833], [1614384000, 49317]],
+ "totalDataChartBreakdown": [
+ [
+ 1614211200,
+ {
+ "dYdX V3": 24949
+ }
+ ],
+ [
+ 1614297600,
+ {
+ "dYdX V3": 103833
+ }
+ ]
+ ],
+ "breakdown24h": null,
+ "breakdown30d": null,
+ "chain": null,
+ "allChains": ["Hyperliquid L1", "Solana", "Ethereum", "Arbitrum"],
+ "total24h": 23537303133,
+ "total48hto24h": 20741840211,
+ "total7d": 125290755214,
+ "total14dto7d": 71055642206,
+ "total60dto30d": 397917690387,
+ "total30d": 383278222548,
+ "total1y": 3515064792266,
+ "change_1d": 13.48,
+ "change_7d": 40.49,
+ "change_1m": 35.06,
+ "change_7dover7d": 76.33,
+ "change_30dover30d": -3.68,
+ "total7DaysAgo": 16753244737,
+ "total30DaysAgo": 17427351125,
+ "totalAllTime": 6567303144819,
+ "protocols": [
+ {
+ "total24h": 8479946,
+ "total48hto24h": 3440780,
+ "total7d": 78424631,
+ "total14dto7d": 60033358,
+ "total60dto30d": 92505218,
+ "total30d": 166435382,
+ "total1y": 9698297388,
+ "totalAllTime": 55654843707,
+ "average1y": 26865089.717451524,
+ "change_1d": 146.45,
+ "change_7d": -55.7,
+ "change_1m": 1226.98,
+ "change_7dover7d": 30.64,
+ "change_30dover30d": 79.92,
+ "breakdown24h": {
+ "optimism": {
+ "Synthetix v1+v2": 3547540
}
- }
- }
- }
- }
- }
- }
- },
- "404": {
- "description": "No verified pool with this id",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "error": {
- "type": "object",
- "properties": {
- "code": {
- "type": "string",
- "example": "VERIFIED_POOL_NOT_FOUND"
- },
- "message": {
- "type": "string",
- "example": "verified pool not found"
+ },
+ "breakdown30d": {
+ "optimism": {
+ "Synthetix v1+v2": 166435382
}
- }
+ },
+ "total7DaysAgo": 19143749,
+ "total30DaysAgo": 639043,
+ "defillamaId": "115",
+ "name": "Synthetix v1+v2",
+ "displayName": "Synthetix v1+v2",
+ "module": "synthetix",
+ "category": "Synthetics",
+ "logo": "https://icons.llamao.fi/icons/protocols/synthetix.png",
+ "chains": ["OP Mainnet"],
+ "protocolType": "protocol",
+ "methodologyURL": "https://github.com/DefiLlama/dimension-adapters/blob/master/dexs/synthetix",
+ "methodology": {
+ "UserFees": "Fees paid by users",
+ "Fees": "Fees paid by users",
+ "Revenue": "Fees paid by users",
+ "ProtocolRevenue": "Percentage of fees going to treasury",
+ "SupplySideRevenue": "LPs revenue"
+ },
+ "latestFetchIsOk": true,
+ "parentProtocol": "parent#synthetix",
+ "slug": "synthetix-v1+v2",
+ "linkedProtocols": ["Synthetix", "Synthetix v1+v2", "Synthetix V3"],
+ "id": "115"
}
- }
+ ]
}
}
}
}
- }
+ },
+ "x-api-plan-only": true,
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.volumes.getDerivativesOverview()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.volumes.getDerivativesOverview()"
+ }
+ ]
}
},
- "/yields/v2/borrow/markets": {
+ "/api/summary/derivatives/{protocol}": {
"get": {
- "tags": ["yields"],
- "x-api-plan-only": true,
- "summary": "Retrieve the latest data for all borrow markets",
- "description": "One row per borrow market: collateral and debt token, maximum loan-to-value, USD supply/borrow totals and attributed APY for both sides over `current`, `avg_7d` and `avg_30d` windows. Reward emissions offset borrowing costs, so `borrow_cost_apy` totals can be negative (the borrower is net paid).",
+ "tags": ["perps"],
+ "summary": "Volume Details about a specific perp protocol",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "hyperliquid"
+ }
+ },
+ {
+ "name": "excludeTotalDataChart",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude aggregated chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ },
+ {
+ "name": "excludeTotalDataChartBreakdown",
+ "in": "query",
+ "required": true,
+ "description": "true to exclude broken down chart from response",
+ "schema": {
+ "type": "boolean",
+ "example": true
+ }
+ }
+ ],
"responses": {
"200": {
- "description": "Array of all borrow markets",
+ "description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "data": {
+ "id": {
+ "type": "string",
+ "description": "Protocol ID"
+ },
+ "name": {
+ "type": "string",
+ "description": "Protocol name"
+ },
+ "url": {
+ "type": "string",
+ "description": "Protocol URL"
+ },
+ "referralUrl": {
+ "type": "string",
+ "description": "Referral URL"
+ },
+ "description": {
+ "type": "string",
+ "description": "Protocol description"
+ },
+ "logo": {
+ "type": "string",
+ "description": "Protocol logo URL"
+ },
+ "gecko_id": {
+ "type": "string",
+ "description": "CoinGecko ID"
+ },
+ "cmcId": {
+ "type": "string",
+ "description": "CoinMarketCap ID"
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Supported chains"
+ },
+ "twitter": {
+ "type": "string",
+ "description": "Twitter handle"
+ },
+ "github": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "GitHub repositories"
+ },
+ "symbol": {
+ "type": "string",
+ "description": "Token symbol"
+ },
+ "address": {
+ "type": "string",
+ "description": "Protocol address"
+ },
+ "childProtocols": {
+ "type": "array",
+ "items": {
+ "type": "object"
+ },
+ "description": "Child protocols"
+ },
+ "linkedProtocols": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Linked protocols"
+ },
+ "defillamaId": {
+ "type": "string",
+ "description": "DefiLlama protocol ID"
+ },
+ "disabled": {
+ "type": "boolean",
+ "nullable": true,
+ "description": "Whether protocol is disabled"
+ },
+ "displayName": {
+ "type": "string",
+ "description": "Display name"
+ },
+ "module": {
+ "type": "string",
+ "nullable": true,
+ "description": "Module name"
+ },
+ "category": {
+ "type": "string",
+ "nullable": true,
+ "description": "Protocol category"
+ },
+ "methodologyURL": {
+ "type": "string",
+ "nullable": true,
+ "description": "Methodology URL"
+ },
+ "methodology": {
+ "type": "object",
+ "nullable": true,
+ "description": "Methodology details"
+ },
+ "forkedFrom": {
+ "type": "string",
+ "nullable": true,
+ "description": "Forked from protocol"
+ },
+ "audits": {
+ "type": "array",
+ "nullable": true,
+ "description": "Audit information"
+ },
+ "audit_links": {
+ "type": "array",
+ "nullable": true,
+ "description": "Audit links"
+ },
+ "versionKey": {
+ "type": "string",
+ "nullable": true,
+ "description": "Version key"
+ },
+ "governanceID": {
+ "type": "string",
+ "nullable": true,
+ "description": "Governance ID"
+ },
+ "treasury": {
+ "type": "string",
+ "nullable": true,
+ "description": "Treasury address"
+ },
+ "parentProtocol": {
+ "type": "string",
+ "nullable": true,
+ "description": "Parent protocol"
+ },
+ "previousNames": {
+ "type": "array",
+ "nullable": true,
+ "description": "Previous names"
+ },
+ "latestFetchIsOk": {
+ "type": "boolean",
+ "description": "Latest fetch status"
+ },
+ "slug": {
+ "type": "string",
+ "description": "Protocol slug"
+ },
+ "protocolType": {
+ "type": "string",
+ "description": "Protocol type"
+ },
+ "total24h": {
+ "type": "number",
+ "description": "24 hour volume"
+ },
+ "total48hto24h": {
+ "type": "number",
+ "description": "48h to 24h volume"
+ },
+ "total7d": {
+ "type": "number",
+ "description": "7 day volume"
+ },
+ "totalAllTime": {
+ "type": "number",
+ "description": "All time volume"
+ },
+ "totalDataChart": {
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Market id (UUID)",
- "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
- },
- "pool_key": {
- "type": "string",
- "description": "Stable market key.",
- "example": "0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8-ethereum"
- },
- "pool_token": {
- "type": ["object", "null"],
- "description": "Receipt / vault token representing the position; null when the market has no transferable pool token",
- "properties": {
- "address": {
- "type": "string",
- "example": "0x4d5f47fa6a74757f35c14fd3a6ef8e3c9bc514e8"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "aEthWETH"
- },
- "name": {
- "type": ["string", "null"],
- "example": "Aave Ethereum WETH"
- }
- }
- },
- "display": {
- "type": "object",
- "description": "Display strings for listings",
- "properties": {
- "label": {
- "type": ["string", "null"],
- "description": "Collateral symbol, or \"COLLATERAL / DEBT\" for isolated pairs",
- "example": "WETH"
- },
- "detail": {
- "type": ["string", "null"],
- "example": null
- }
- }
- },
- "url": {
- "type": ["string", "null"],
- "description": "Market page on the protocol app",
- "example": "https://app.aave.com/reserve-overview/?underlyingAsset=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&marketName=proto_mainnet_v3"
- },
- "protocol": {
- "type": "string",
- "description": "Protocol display name",
- "example": "Aave V3"
- },
- "chain": {
- "type": "string",
- "description": "Chain display name",
- "example": "Ethereum"
- },
- "collateral_token": {
- "type": "object",
- "description": "Token supplied as collateral; null when unknown",
- "properties": {
- "address": {
- "type": "string",
- "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "WETH"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 18
- }
- }
- },
- "borrow_token": {
- "type": "object",
- "description": "Token borrowed from the market; null when unknown",
- "properties": {
- "address": {
- "type": "string",
- "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "WETH"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 18
- }
- }
- },
- "reward_tokens": {
- "type": "array",
- "description": "Incentive tokens currently emitted to the market; empty when there are none",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string",
- "example": "0xd533a949740bb3306d119cc777fa900ba034cd52"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "CRV"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 18
- }
- }
- }
- },
- "loan_to_value": {
- "type": ["number", "null"],
- "description": "Maximum loan-to-value as a fraction (0.805 = 80.5%)",
- "example": 0.805
- },
- "total_supply_usd": {
- "type": ["number", "null"],
- "description": "Total supplied to the market, in USD",
- "example": 3683494475
- },
- "total_borrow_usd": {
- "type": ["number", "null"],
- "description": "Total borrowed from the market, in USD",
- "example": 3022727877
+ "type": "array",
+ "items": [
+ {
+ "type": "integer",
+ "description": "Timestamp"
},
- "available_borrow_usd": {
- "type": ["number", "null"],
- "description": "Liquidity still available to borrow, in USD",
- "example": 568755149
+ {
+ "type": "number",
+ "description": "Volume value"
+ }
+ ]
+ },
+ "description": "Total data chart with timestamps and volumes"
+ },
+ "totalDataChartBreakdown": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": [
+ {
+ "type": "integer",
+ "description": "Timestamp"
},
- "supply_apy": {
+ {
"type": "object",
- "description": "APY in percent earned by suppliers",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed values",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 1.49954
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 1.49954
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 1.46669
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 1.46669
- }
- }
+ "description": "Chain and protocol breakdown"
+ }
+ ]
+ },
+ "description": "Total data chart breakdown by chain and protocol"
+ },
+ "change_1d": {
+ "type": "number",
+ "description": "1 day change percentage"
+ }
+ }
+ },
+ "example": {
+ "id": "parent#hyperliquid",
+ "name": "Hyperliquid",
+ "url": "https://hyperliquid.xyz",
+ "referralUrl": "https://app.hyperliquid.xyz/join/DEFILLAMAO",
+ "description": "Hyperliquid is a decentralized perpetual exchange with best-in-class speed, liquidity, and price",
+ "logo": "https://icons.llama.fi/hyperliquid.png",
+ "gecko_id": "hyperliquid",
+ "cmcId": "32196",
+ "chains": ["Hyperliquid L1"],
+ "twitter": "HyperliquidX",
+ "github": ["hyperliquid-dex"],
+ "symbol": "HYPE",
+ "address": "hyperliquid:0x0d01dc56dcaaca66ad901c959b4011ec",
+ "childProtocols": [{}],
+ "linkedProtocols": ["Hyperliquid", "Hyperliquid Perps"],
+ "defillamaId": "parent#hyperliquid",
+ "disabled": null,
+ "displayName": "Hyperliquid",
+ "module": null,
+ "category": null,
+ "methodologyURL": null,
+ "methodology": null,
+ "forkedFrom": null,
+ "audits": null,
+ "audit_links": null,
+ "versionKey": null,
+ "governanceID": null,
+ "treasury": null,
+ "parentProtocol": null,
+ "previousNames": null,
+ "latestFetchIsOk": true,
+ "slug": "hyperliquid",
+ "protocolType": "protocol",
+ "total24h": 16946528076,
+ "total48hto24h": 14792562336,
+ "total7d": 86747987334,
+ "totalAllTime": 2003035982525,
+ "totalDataChart": [[1752710400, 16946528076], [1752796800, 21220070880]],
+ "totalDataChartBreakdown": [
+ [
+ 1752710400,
+ {
+ "Hyperliquid L1": {
+ "Hyperliquid Perps": 16946528076
+ }
+ }
+ ],
+ [
+ 1752796800,
+ {
+ "Hyperliquid L1": {
+ "Hyperliquid Perps": 21220070880
+ }
+ }
+ ]
+ ],
+ "change_1d": 14.56
+ }
+ }
+ }
+ }
+ },
+ "x-api-plan-only": true,
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.volumes.getDerivativesSummary('')"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.volumes.getDerivativesSummary('')"
+ }
+ ]
+ }
+ },
+ "/api/emissions": {
+ "get": {
+ "tags": ["Unlocks"],
+ "summary": "List of all tokens along with basic info for each",
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "token": {
+ "type": "string",
+ "example": "coingecko:whitebit"
+ },
+ "sources": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["https://cdn.whitebit.com/wbt/whitepaper-en.pdf"]
+ },
+ "protocolId": {
+ "type": "string",
+ "example": "6143"
+ },
+ "name": {
+ "type": "string",
+ "example": "WhiteBIT"
+ },
+ "circSupply": {
+ "type": "number",
+ "example": 293500000
+ },
+ "circSupply30d": {
+ "type": "number",
+ "example": 293500000
+ },
+ "totalLocked": {
+ "type": "number",
+ "example": 81500000
+ },
+ "maxSupply": {
+ "type": "number",
+ "example": 375000000
+ },
+ "gecko_id": {
+ "type": "string",
+ "example": "whitebit"
+ },
+ "events": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "description": {
+ "type": "string",
+ "example": "A cliff of {tokens[0]} tokens was unlocked from Funds 1 on {timestamp}"
+ },
+ "timestamp": {
+ "type": "number",
+ "example": 1659657600
+ },
+ "noOfTokens": {
+ "type": "array",
+ "items": {
+ "type": "number"
},
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 1.40929
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 1.40929
- }
- }
- }
+ "example": [120000000]
+ },
+ "category": {
+ "type": "string",
+ "example": "noncirculating"
+ },
+ "unlockType": {
+ "type": "string",
+ "example": "cliff"
}
+ }
+ }
+ },
+ "nextEvent": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "number",
+ "example": 1773360001
},
- "borrow_cost_apy": {
- "type": "object",
- "description": "APY in percent paid by borrowers. Reward emissions reduce the cost, so total = base - reward and can be negative",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed values",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.14984
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": 2.14984
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.12582
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": 2.12582
- }
- }
- },
- "avg_30d": {
+ "toUnlock": {
+ "type": "number",
+ "example": 81500000
+ }
+ }
+ },
+ "unlocksPerDay": {
+ "type": "number",
+ "example": 0
+ },
+ "mcap": {
+ "type": "number",
+ "example": 6577845629.249915
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-api-plan-only": true,
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.emissions.getAll()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.emissions.getAll()"
+ }
+ ]
+ }
+ },
+ "/api/emission/{protocol}": {
+ "get": {
+ "tags": ["Unlocks"],
+ "summary": "Unlocks data for a given token/protocol. You can find a list of available slugs to query by querying /emissions and then extracting the key `gecko_id`",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "description": "protocol slug",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "hyperliquid"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "body": {
+ "type": "object",
+ "properties": {
+ "documentedData": {
+ "type": "object",
+ "properties": {
+ "data": {
+ "type": "array",
+ "items": {
"type": "object",
- "description": "Trailing 30-day average",
"properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.08412
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
+ "label": {
+ "type": "string",
+ "example": "Hyper Foundation Budget"
},
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": 2.08412
- }
- }
- }
- }
- },
- "intrinsic": {
- "type": "object",
- "description": "Intrinsic yield of yield-bearing tokens on either side of the market",
- "properties": {
- "supply": {
- "type": ["object", "null"],
- "description": "Intrinsic yield of the supply-side token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
- "properties": {
- "apy": {
- "type": "object",
- "description": "Intrinsic APY in percent",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed value",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.11
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.05
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.02
- }
+ "data": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number",
+ "example": 1732838400
+ },
+ "unlocked": {
+ "type": "number",
+ "example": 60000000
+ },
+ "rawEmission": {
+ "type": "number",
+ "example": 60000000
+ },
+ "burned": {
+ "type": "number",
+ "example": 0
}
}
}
- },
- "source_pool": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Earn pool the intrinsic yield is sourced from",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
- },
- "pool_token": {
- "type": "string",
- "description": "Address of the yield-bearing token",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "stETH"
- }
- }
}
}
- },
- "borrow": {
- "type": ["object", "null"],
- "description": "Intrinsic yield of the borrowed token. Borrowing a yield-bearing token adds this rate to the effective borrow cost, since the debt appreciates by it. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
- "properties": {
- "apy": {
- "type": "object",
- "description": "Intrinsic APY in percent",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed value",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.11
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.05
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.02
- }
- }
- }
+ }
+ },
+ "tokenAllocation": {
+ "type": "object",
+ "properties": {
+ "current": {
+ "type": "object",
+ "properties": {
+ "insiders": {
+ "type": "number",
+ "example": 16
+ },
+ "noncirculating": {
+ "type": "number",
+ "example": 0.8
+ },
+ "publicSale": {
+ "type": "number",
+ "example": 0
+ },
+ "airdrop": {
+ "type": "number",
+ "example": 82.5
+ },
+ "farming": {
+ "type": "number",
+ "example": 0.7
}
- },
- "source_pool": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Earn pool the intrinsic yield is sourced from",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
- },
- "pool_token": {
- "type": "string",
- "description": "Address of the yield-bearing token",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "stETH"
- }
+ }
+ },
+ "final": {
+ "type": "object",
+ "properties": {
+ "insiders": {
+ "type": "number",
+ "example": 45.8
+ },
+ "noncirculating": {
+ "type": "number",
+ "example": 0.5
+ },
+ "publicSale": {
+ "type": "number",
+ "example": 0
+ },
+ "airdrop": {
+ "type": "number",
+ "example": 47.7
+ },
+ "farming": {
+ "type": "number",
+ "example": 6
+ }
+ }
+ },
+ "progress": {
+ "type": "object",
+ "properties": {
+ "insiders": {
+ "type": "number",
+ "example": 20.1
+ },
+ "noncirculating": {
+ "type": "number",
+ "example": 100
+ },
+ "publicSale": {
+ "type": "number",
+ "example": 100
+ },
+ "airdrop": {
+ "type": "number",
+ "example": 100
+ },
+ "farming": {
+ "type": "number",
+ "example": 6.5
}
}
}
}
}
}
+ },
+ "metadata": {
+ "type": "object",
+ "properties": {
+ "notes": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": [
+ "The Community Rewards schedule has been linearly extrapolated using the rate of unlocks as of 4 March 2025.",
+ "The remaining allocation, not shown on the chart, belongs to Community Rewards. It has been excluded here to avoid obscuring the remaining data.",
+ "Most vesting schedules will complete between 2027–2028; some will continue after 2028. Here we have used an end date of end of 2027.",
+ "Although the full allocations for Hyper Foundation Budget and Community Grants were unlocked at TGE it is unclear what their spend rate is."
+ ]
+ },
+ "token": {
+ "type": "string",
+ "example": "coingecko:hyperliquid"
+ },
+ "sources": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["https://hyperfnd.medium.com/hype-genesis-1830a4dc2e3f"]
+ },
+ "protocolIds": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["4481", "5448", "5507", "5761"]
+ },
+ "total": {
+ "type": "number",
+ "example": 1000000000
+ },
+ "chain": {
+ "type": "string",
+ "example": "hyperliquid"
+ },
+ "name": {
+ "type": "string",
+ "example": "Hyperliquid"
+ },
+ "gecko_id": {
+ "type": "string",
+ "example": "hyperliquid"
+ },
+ "defillamaIds": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["4481"]
+ },
+ "categories": {
+ "type": "object",
+ "properties": {
+ "insiders": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Core Contributors", "Hyper Foundation Budget"]
+ },
+ "noncirculating": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Community Grants"]
+ },
+ "publicSale": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["HIP-2"]
+ },
+ "airdrop": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Genesis Distribution"]
+ },
+ "farming": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Community Rewards"]
+ }
+ }
+ },
+ "protocolCategory": {
+ "type": "string",
+ "example": "Bridge"
+ },
+ "chainName": {
+ "type": "string",
+ "example": "Hyperliquid L1"
+ },
+ "pId": {
+ "type": "string",
+ "example": "4481"
+ }
+ }
+ }
+ }
+ },
+ "lastModified": {
+ "type": "string",
+ "example": "2025-07-18T13:30:56.000Z"
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-api-plan-only": true,
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.emissions.getByProtocol('')"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.emissions.getByProtocol('')"
+ }
+ ]
+ }
+ },
+ "/api/categories": {
+ "get": {
+ "tags": ["main page"],
+ "summary": "Overview of all categories accross all protocols",
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "chart": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "tvl": {
+ "type": "number",
+ "example": 45997965191.323425
+ },
+ "staking": {
+ "type": "number",
+ "example": 117946591.34734812
+ },
+ "pool2": {
+ "type": "number",
+ "example": 4467.975298299099
+ },
+ "doublecounted": {
+ "type": "number",
+ "example": 1259137973.0377812
+ },
+ "borrowed": {
+ "type": "number",
+ "example": 714082.8186222482
+ },
+ "offers": {
+ "type": "number",
+ "example": 0
+ },
+ "vesting": {
+ "type": "number",
+ "example": 0.0009596433739281769
+ },
+ "treasury": {
+ "type": "number",
+ "example": 11142.746348986766
+ },
+ "liquidstaking": {
+ "type": "number",
+ "example": 20838772668.74201
+ },
+ "dcAndLsOverlap": {
+ "type": "number",
+ "example": 24954437702.556156
+ }
+ }
+ }
+ },
+ "example": {
+ "1747440000": {
+ "Bridge": {
+ "tvl": 45997965191.323425,
+ "staking": 117946591.34734812,
+ "pool2": 4467.975298299099,
+ "doublecounted": 1259137973.0377812,
+ "borrowed": 714082.8186222482,
+ "offers": 0,
+ "vesting": 0.0009596433739281769
+ }
+ }
+ }
+ },
+ "categories": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "string"
}
+ },
+ "example": {
+ "Bridge": [
+ "WBTC",
+ "RenVM",
+ "The Tokenized Bitcoin",
+ "hBTC",
+ "Rhino.fi",
+ "Strudel Finance",
+ "Connext",
+ "Injective Bridge",
+ "pNetwork",
+ "Allbridge Classic",
+ "Multichain"
+ ],
+ "Risk Curators": [
+ "9Summits",
+ "Alphaping",
+ "Apostro",
+ "B.Protocol Curator",
+ "Block Analitica",
+ "Clearstar",
+ "Euler DAO",
+ "Fence Finance",
+ "Gauntlet",
+ "Hakutora",
+ "Hyperithm",
+ "K3 Capital",
+ "LlamaRisk",
+ "M11 Credit",
+ "MEV Capital",
+ "Ouroboros Capital",
+ "Re7 Labs",
+ "Relend Network",
+ "Steakhouse Financial",
+ "Tulipa Capital",
+ "Alterscope",
+ "Yearn Curating",
+ "CIAN Curating",
+ "Vault Bridge"
+ ],
+ "DAO Service Provider": ["CreateDAO"]
}
}
}
@@ -12001,1423 +10142,3109 @@
}
}
}
- }
- }
- },
- "/yields/v2/borrow/markets/{id}/history": {
- "get": {
- "tags": ["yields"],
+ },
"x-api-plan-only": true,
- "summary": "Retrieve daily borrow-side history for a borrow market",
- "description": "Daily borrow totals and borrow-cost APY for one market, oldest first. APY carries `avg_1d` (that day), `avg_7d` and `avg_30d` (trailing averages ending that day) windows, each attributed into base/reward/total. Supply-side history for the same id lives at `/yields/v2/earn/{id}/history`.",
- "parameters": [
+ "x-codeSamples": [
{
- "name": "id",
- "in": "path",
- "required": true,
- "description": "Borrow market id (UUID)",
- "schema": {
- "type": "string",
- "example": "e880e828-ca59-4ec6-8d4f-27182a4dc23d"
- }
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.ecosystem.getCategories()"
},
{
- "name": "range",
- "in": "query",
- "required": false,
- "description": "History window; defaults to max (the full series)",
- "schema": {
- "type": "string",
- "enum": ["30d", "90d", "max"],
- "example": "90d"
- }
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.ecosystem.getCategories()"
}
- ],
+ ]
+ }
+ },
+ "/api/forks": {
+ "get": {
+ "tags": ["main page"],
+ "x-api-plan-only": true,
+ "summary": "Overview of all forks accross all protocols",
"responses": {
"200": {
- "description": "Daily history rows, oldest first",
+ "description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "data": {
- "type": "array",
- "items": {
+ "chart": {
+ "type": "object",
+ "additionalProperties": {
"type": "object",
- "properties": {
- "date": {
- "type": "string",
- "description": "Day (UTC)",
- "example": "2026-08-10"
- },
- "total_borrow_usd": {
- "type": ["number", "null"],
- "description": "Total borrowed from the market, in USD",
- "example": 3339035741
- },
- "available_borrow_usd": {
- "type": ["number", "null"],
- "description": "Liquidity still available to borrow, in USD",
- "example": 733495225
- },
- "borrow_cost_apy": {
- "type": "object",
- "description": "APY in percent paid by borrowers. Reward emissions reduce the cost, so total = base - reward and can be negative",
- "properties": {
- "avg_1d": {
- "type": "object",
- "description": "Average over that day",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.09904
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": 2.09904
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.10884
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": 2.10884
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.09608
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": 2.09608
- }
- }
- }
- }
- },
- "intrinsic": {
- "type": ["object", "null"],
- "description": "Intrinsic yield of the borrowed token. Borrowing a yield-bearing token adds this rate to the effective borrow cost, since the debt appreciates by it. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
- "properties": {
- "apy": {
- "type": "object",
- "description": "Intrinsic APY in percent",
- "properties": {
- "avg_1d": {
- "type": "object",
- "description": "Average over that day",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 2.76481
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.97675
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 4.99742
- }
- }
- }
- }
- }
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "staking": {
+ "type": "number",
+ "example": 712008453.6943725
+ },
+ "tvl": {
+ "type": "number",
+ "example": 2580053162.908216
+ },
+ "pool2": {
+ "type": "number",
+ "example": 146782.46894897142
+ },
+ "doublecounted": {
+ "type": "number",
+ "example": 3013724.782369083
+ },
+ "borrowed": {
+ "type": "number",
+ "example": 925950.5791909688
+ },
+ "vesting": {
+ "type": "number",
+ "example": 0.0033932788318303733
+ },
+ "liquidstaking": {
+ "type": "number",
+ "example": 1184348.1365500058
+ },
+ "dcAndLsOverlap": {
+ "type": "number",
+ "example": 1184348.1365500058
}
}
}
+ },
+ "example": {
+ "1752624000": {
+ "Uniswap V2": {
+ "staking": 712008453.6943725,
+ "tvl": 2580053162.908216,
+ "pool2": 146782.46894897142,
+ "doublecounted": 3013724.782369083,
+ "borrowed": 925950.5791909688,
+ "vesting": 0.0033932788318303733
+ }
+ }
+ }
+ },
+ "forks": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "Uniswap V2": [
+ "SushiSwap",
+ "Varen",
+ "PancakeSwap AMM",
+ "Defi Swap",
+ "Energiswap",
+ "Pangolin",
+ "Cometh",
+ "Honeyswap",
+ "0.exchange",
+ "YetiSwap",
+ "Swapr V2",
+ "Lydia",
+ "Levinswap",
+ "SpookySwap V2",
+ "Quickswap Dex",
+ "SpiritSwap AMM",
+ "ViperSwap",
+ "HyperJump",
+ "Dfyn Network",
+ "Unicly"
+ ]
}
}
}
}
}
}
+ }
+ },
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.ecosystem.getForks()"
},
- "404": {
- "description": "No borrow market with this id",
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.ecosystem.getForks()"
+ }
+ ]
+ }
+ },
+ "/api/oracles": {
+ "get": {
+ "tags": ["main page"],
+ "summary": "Overview of all oracles accross all protocols",
+ "responses": {
+ "200": {
+ "description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
"properties": {
- "error": {
+ "chart": {
"type": "object",
- "properties": {
- "code": {
- "type": "string",
- "example": "BORROW_MARKET_NOT_FOUND"
- },
- "message": {
- "type": "string",
- "example": "borrow market not found"
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "tvl": {
+ "type": "number",
+ "example": 48896114862.57202
+ },
+ "staking": {
+ "type": "number",
+ "example": 1564643922.8114228
+ },
+ "pool2": {
+ "type": "number",
+ "example": 107245076.47312777
+ },
+ "borrowed": {
+ "type": "number",
+ "example": 25132031822.258495
+ },
+ "treasury": {
+ "type": "number",
+ "example": 52.078623852211784
+ },
+ "vesting": {
+ "type": "number",
+ "example": 3347.9893057455306
+ }
+ }
+ }
+ },
+ "example": {
+ "1752624000": {
+ "Chainlink": {
+ "tvl": 48896114862.57202,
+ "staking": 1564643922.8114228,
+ "pool2": 107245076.47312777,
+ "borrowed": 25132031822.258495,
+ "treasury": 52.078623852211784,
+ "vesting": 3347.9893057455306
+ }
}
}
+ },
+ "oracles": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "Chainlink": ["AAVE V2", "Compound V2", "Synthetix v1+v2", "CREAM Lending"]
+ }
+ },
+ "chainsByOracle": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "Chainlink": [
+ "Ethereum",
+ "Arbitrum",
+ "BSC",
+ "Avalanche",
+ "Base",
+ "Solana",
+ "Polygon",
+ "OP Mainnet",
+ "Linea"
+ ]
+ }
}
}
}
}
}
}
- }
+ },
+ "x-api-plan-only": true,
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.ecosystem.getOracles()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.ecosystem.getOracles()"
+ }
+ ]
}
},
- "/yields/v2/borrow/routes": {
+ "/api/hacks": {
"get": {
- "tags": ["yields"],
+ "tags": ["main page"],
+ "summary": "Overview of all hacks on our Hacks dashboard",
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "number",
+ "example": 1711065600
+ },
+ "name": {
+ "type": "string",
+ "example": "Super Sushi Samurai"
+ },
+ "classification": {
+ "type": "string",
+ "example": "Protocol Logic"
+ },
+ "technique": {
+ "type": "string",
+ "example": "Infinite Mint and Dump"
+ },
+ "amount": {
+ "type": "number",
+ "example": 4800000
+ },
+ "chain": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Blast"]
+ },
+ "bridgeHack": {
+ "type": "boolean",
+ "example": false
+ },
+ "targetType": {
+ "type": "string",
+ "example": "Gaming"
+ },
+ "source": {
+ "type": "string",
+ "example": "https://rekt.news/sss-rekt/"
+ },
+ "returnedFunds": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "defillamaId": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "language": {
+ "type": ["string", "null"],
+ "example": "Solidity"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
"x-api-plan-only": true,
- "summary": "Retrieve the latest data for all borrow routes",
- "description": "Every supported borrowing route: a collateral position paired with a debt market on the same protocol and chain. Each row reports the collateral side (supply APY earned on the collateral), the borrow side (cost APY of the debt token) and `net_apy` (collateral yield minus borrow cost). Negative net APY means the position costs more than the collateral earns.",
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.ecosystem.getHacks()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.ecosystem.getHacks()"
+ }
+ ]
+ }
+ },
+ "/api/raises": {
+ "get": {
+ "tags": ["main page"],
+ "summary": "Overview of all raises on our Raises dashboard",
"responses": {
"200": {
- "description": "Array of all borrow routes",
+ "description": "successful operation",
"content": {
"application/json": {
"schema": {
"type": "object",
- "properties": {
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "display": {
- "type": "object",
- "description": "Display strings for listings",
- "properties": {
- "detail": {
- "type": ["string", "null"],
- "description": "Market variant label; null when there is only one market",
- "example": "Prime Instance"
- }
- }
+ "properties": {
+ "raises": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "number",
+ "example": 1740528000
},
- "protocol": {
+ "name": {
"type": "string",
- "description": "Protocol display name",
- "example": "Aave V3"
+ "example": "Ethena Labs"
},
- "chain": {
+ "round": {
"type": "string",
- "description": "Chain display name",
- "example": "Ethereum"
+ "example": "Strategic"
},
- "collateral": {
- "type": "object",
- "description": "The supplied collateral position",
- "properties": {
- "id": {
- "type": "string",
- "description": "Collateral pool id (UUID)",
- "example": "ef8c5c38-6a41-4383-9dc8-6fb31e69a0c9"
- },
- "pool_key": {
- "type": "string",
- "description": "Stable pool key of the collateral pool",
- "example": "0xfa1fdbbd71b0aa16162d76914d69cd8cb3ef92da-lido"
- },
- "url": {
- "type": ["string", "null"],
- "example": "https://app.aave.com/reserve-overview/?underlyingAsset=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&marketName=proto_lido_v3"
- },
- "token": {
- "type": "object",
- "description": "Token supplied as collateral",
- "properties": {
- "address": {
- "type": "string",
- "example": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "WETH"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 18
- }
- }
- },
- "loan_to_value": {
- "type": ["number", "null"],
- "description": "Maximum loan-to-value as a fraction (0.84 = 84%)",
- "example": 0.84
- },
- "total_supply_usd": {
- "type": ["number", "null"],
- "description": "Total supplied to the collateral pool, in USD",
- "example": 35187139
- },
- "apy": {
- "type": "object",
- "description": "Supply APY in percent earned on the collateral",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed values",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 1.56065
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 1.56065
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 1.48621
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 1.48621
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 1.46718
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 1.46718
- }
- }
- }
- }
- },
- "intrinsic": {
- "type": ["object", "null"],
- "description": "Intrinsic yield of the collateral token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
- "properties": {
- "apy": {
- "type": "object",
- "description": "Intrinsic APY in percent",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed value",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.11
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.05
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.02
- }
- }
- }
- }
- },
- "source_pool": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Earn pool the intrinsic yield is sourced from",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
- },
- "pool_token": {
- "type": "string",
- "description": "Address of the yield-bearing token",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "stETH"
- }
- }
- }
- }
- },
- "reward_tokens": {
- "type": "array",
- "description": "Incentive tokens emitted to the collateral side; empty when there are none",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string",
- "example": "0xd533a949740bb3306d119cc777fa900ba034cd52"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "CRV"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 18
- }
- }
- }
- }
- }
+ "amount": {
+ "type": "number",
+ "example": 16
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum"]
+ },
+ "sector": {
+ "type": "string",
+ "example": "Ethena is a synthetic dollar protocol built on Ethereum"
+ },
+ "category": {
+ "type": "string",
+ "example": "DeFi"
+ },
+ "categoryGroup": {
+ "type": "string",
+ "example": "DeFi & CeFi"
+ },
+ "source": {
+ "type": "string",
+ "example": "https://www.benzinga.com/pressreleases/25/02/g43966782/mexc-invests-20-million-in-usde-to-drive-stablecoin-adoption-launches-1-000-000-reward-event"
+ },
+ "leadInvestors": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["MEXC Ventures"]
+ },
+ "otherInvestors": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": []
},
- "borrow": {
- "type": "object",
- "description": "The borrowed debt position",
- "properties": {
- "id": {
- "type": "string",
- "description": "Debt market id (UUID)",
- "example": "effcb4a4-4dcb-45e5-935d-f15542c13e6b"
- },
- "pool_key": {
- "type": "string",
- "description": "Stable pool key of the debt market",
- "example": "0x2a1fbcb52ed4d9b23dad17e1e8aed4bb0e6079b8-lido"
- },
- "url": {
- "type": ["string", "null"],
- "example": "https://app.aave.com/reserve-overview/?underlyingAsset=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48&marketName=proto_lido_v3"
- },
- "token": {
- "type": "object",
- "description": "Token borrowed",
- "properties": {
- "address": {
- "type": "string",
- "example": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "USDC"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 6
- }
- }
- },
- "total_borrow_usd": {
- "type": ["number", "null"],
- "description": "Total borrowed from the market, in USD",
- "example": 3377912
- },
- "available_borrow_usd": {
- "type": ["number", "null"],
- "description": "Liquidity still available to borrow, in USD",
- "example": 1838568
- },
- "cost_apy": {
- "type": "object",
- "description": "Borrow cost APY in percent. Reward emissions reduce the cost, so total = base - reward and can be negative",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed values",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 3.8712
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": 3.8712
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 3.895
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": 3.895
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 3.89527
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": 3.89527
- }
- }
- }
- }
- },
- "intrinsic": {
- "type": ["object", "null"],
- "description": "Intrinsic yield of the borrowed token. Borrowing a yield-bearing token adds this rate to the effective borrow cost, since the debt appreciates by it. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
- "properties": {
- "apy": {
- "type": "object",
- "description": "Intrinsic APY in percent",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed value",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.11
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.05
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.02
- }
- }
- }
- }
- },
- "source_pool": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Earn pool the intrinsic yield is sourced from",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
- },
- "pool_token": {
- "type": "string",
- "description": "Address of the yield-bearing token",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "stETH"
- }
- }
- }
- }
- },
- "reward_tokens": {
- "type": "array",
- "description": "Incentive tokens emitted to the borrow side; empty when there are none",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string",
- "example": "0xd533a949740bb3306d119cc777fa900ba034cd52"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "CRV"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 18
- }
- }
- }
- }
- }
+ "valuation": {
+ "type": ["number", "null"],
+ "example": null
+ },
+ "defillamaId": {
+ "type": "string",
+ "example": "parent#ethena"
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-api-plan-only": true,
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.ecosystem.getRaises()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.ecosystem.getRaises()"
+ }
+ ]
+ }
+ },
+ "/api/treasuries": {
+ "get": {
+ "tags": ["main page"],
+ "summary": "List all protocols on our Treasuries dashboard",
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "example": "6355-treasury"
+ },
+ "name": {
+ "type": "string",
+ "example": "SharpLink Gaming (treasury)"
+ },
+ "address": {
+ "type": ["string", "null"],
+ "example": null
+ },
+ "symbol": {
+ "type": "string",
+ "example": "-"
+ },
+ "url": {
+ "type": "string",
+ "example": "https://www.sharplink.com/"
+ },
+ "description": {
+ "type": "string",
+ "example": "SharpLink is one of the first Nasdaq-listed companies to develop a treasury strategy centered on ETH"
+ },
+ "chain": {
+ "type": "string",
+ "example": "Ethereum"
+ },
+ "logo": {
+ "type": "string",
+ "example": "https://icons.llama.fi/sharplink-gaming.jpg"
+ },
+ "audits": {
+ "type": "string",
+ "example": "0"
+ },
+ "audit_note": {
+ "type": ["string", "null"],
+ "example": null
+ },
+ "gecko_id": {
+ "type": ["string", "null"],
+ "example": null
+ },
+ "cmcId": {
+ "type": ["string", "null"],
+ "example": null
+ },
+ "category": {
+ "type": "string",
+ "example": "Treasury Manager"
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum"]
+ },
+ "module": {
+ "type": "string",
+ "example": "treasury/sharplink-gaming.js"
+ },
+ "treasury": {
+ "type": "string",
+ "example": "sharplink-gaming.js"
+ },
+ "forkedFromIds": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": []
+ },
+ "twitter": {
+ "type": "string",
+ "example": "SharpLinkGaming"
+ },
+ "slug": {
+ "type": "string",
+ "example": "sharplink-gaming-(treasury)"
+ },
+ "tvl": {
+ "type": "number",
+ "example": 976150507.157045
+ },
+ "chainTvls": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "number"
+ },
+ "example": {
+ "Ethereum": 976150507.157045
+ }
+ },
+ "change_1h": {
+ "type": "number",
+ "example": -1.1231970563777622
+ },
+ "change_1d": {
+ "type": "number",
+ "example": 15.845546813803097
+ },
+ "change_7d": {
+ "type": "number",
+ "example": 75.57040101595928
+ },
+ "tokenBreakdowns": {
+ "type": "object",
+ "properties": {
+ "ownTokens": {
+ "type": "number",
+ "example": 0
},
- "net_apy": {
- "type": "object",
- "description": "Net APY in percent: collateral supply APY minus borrow cost. Keyed by APY composition: read the leaf matching the APY components you consume (base, base + reward, base + intrinsic, base + reward + intrinsic).",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed values",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": -2.31055
- },
- "base_reward": {
- "type": ["number", "null"],
- "example": -2.31055
- },
- "base_intrinsic": {
- "type": ["number", "null"],
- "example": -2.31055
- },
- "base_reward_intrinsic": {
- "type": ["number", "null"],
- "example": -2.31055
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": -2.40879
- },
- "base_reward": {
- "type": ["number", "null"],
- "example": -2.40879
- },
- "base_intrinsic": {
- "type": ["number", "null"],
- "example": -2.40879
- },
- "base_reward_intrinsic": {
- "type": ["number", "null"],
- "example": -2.40879
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": -2.42809
- },
- "base_reward": {
- "type": ["number", "null"],
- "example": -2.42809
- },
- "base_intrinsic": {
- "type": ["number", "null"],
- "example": -2.42809
- },
- "base_reward_intrinsic": {
- "type": ["number", "null"],
- "example": -2.42809
- }
- }
- }
- }
+ "stablecoins": {
+ "type": "number",
+ "example": 0.003
+ },
+ "majors": {
+ "type": "number",
+ "example": 67481592.5634468
+ },
+ "others": {
+ "type": "number",
+ "example": 908668914.5905982
+ }
+ }
+ },
+ "mcap": {
+ "type": ["number", "null"],
+ "example": null
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-api-plan-only": true,
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.ecosystem.getTreasuries()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.ecosystem.getTreasuries()"
+ }
+ ]
+ }
+ },
+ "/api/entities": {
+ "get": {
+ "tags": ["main page"],
+ "summary": "List all entities",
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "example": "entity-8"
+ },
+ "name": {
+ "type": "string",
+ "example": "Blockchain Capital"
+ },
+ "url": {
+ "type": "string",
+ "example": "https://blockchain.capital"
+ },
+ "description": {
+ "type": "string",
+ "example": "Blockchain Capital is a leading venture firm in the blockchain industry. In the last 9 years we have made over 160 investments in companies and protocols in the sector, across different stages, geographies and asset types."
+ },
+ "logo": {
+ "type": "string",
+ "example": "https://icons.llama.fi/blockchain-capital.jpg"
+ },
+ "category": {
+ "type": "string",
+ "example": "VC"
+ },
+ "module": {
+ "type": "string",
+ "example": "entities/blockchain-capital.js"
+ },
+ "twitter": {
+ "type": "string",
+ "example": "blockchaincap"
+ },
+ "symbol": {
+ "type": "string",
+ "example": ""
+ },
+ "chain": {
+ "type": "string",
+ "example": "Ethereum"
+ },
+ "gecko_id": {
+ "type": ["string", "null"],
+ "example": null
+ },
+ "cmcId": {
+ "type": ["string", "null"],
+ "example": null
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum"]
+ },
+ "slug": {
+ "type": "string",
+ "example": "blockchain-capital"
+ },
+ "tvl": {
+ "type": "number",
+ "example": 131402986.1539898
+ },
+ "chainTvls": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "number"
+ },
+ "example": {
+ "Ethereum": 131402986.1539898
+ }
+ },
+ "change_1h": {
+ "type": "number",
+ "example": 0.5368786705972184
+ },
+ "change_1d": {
+ "type": "number",
+ "example": 5.632604890674784
+ },
+ "change_7d": {
+ "type": "number",
+ "example": 11.27548502629729
+ },
+ "tokenBreakdowns": {
+ "type": "object",
+ "properties": {
+ "ownTokens": {
+ "type": "number",
+ "example": 0
+ },
+ "stablecoins": {
+ "type": "number",
+ "example": 0.06493662312
+ },
+ "majors": {
+ "type": "number",
+ "example": 29628575.4114822
+ },
+ "others": {
+ "type": "number",
+ "example": 101774410.67757098
}
}
+ },
+ "mcap": {
+ "type": ["number", "null"],
+ "example": null
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "x-api-plan-only": true,
+ "x-codeSamples": [
+ {
+ "lang": "javascript",
+ "label": "JavaScript SDK",
+ "source": "const result = await proClient.ecosystem.getEntities()"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = pro_client.ecosystem.getEntities()"
+ }
+ ]
+ }
+ },
+ "/api/historicalLiquidity/{token}": {
+ "get": {
+ "tags": ["token liquidity"],
+ "summary": "Provides the name of contracts on a determined chain",
+ "parameters": [
+ {
+ "name": "token",
+ "in": "path",
+ "description": "token slug",
+ "required": true,
+ "schema": {
+ "type": "string",
+ "example": "usdt"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "successful operation"
+ }
+ },
+ "x-api-plan-only": true
+ }
+ },
+ "/api/v2/metrics/treasury/protocol/{protocol}": {
+ "get": {
+ "tags": ["Treasury"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get aggregate treasury metrics for a protocol",
+ "description": "Returns protocol metadata along with current treasury figures and chain breakdowns.",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "aave"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Protocol treasury metrics",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "example": "parent#aave"
+ },
+ "name": {
+ "type": "string",
+ "example": "Aave"
+ },
+ "address": {
+ "type": "string",
+ "nullable": true,
+ "example": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
+ },
+ "symbol": {
+ "type": "string",
+ "nullable": true,
+ "example": "AAVE"
+ },
+ "url": {
+ "type": "string",
+ "example": "https://aave.com"
+ },
+ "referralUrl": {
+ "type": "string",
+ "nullable": true
+ },
+ "description": {
+ "type": "string",
+ "example": "Aave is an Open Source and Non-Custodial protocol to earn interest on deposits & borrow assets"
+ },
+ "chain": {
+ "type": "string",
+ "example": "Multi-Chain"
+ },
+ "logo": {
+ "type": "string",
+ "example": "https://icons.llama.fi/aave.png"
+ },
+ "audits": {
+ "type": "string",
+ "nullable": true
+ },
+ "audit_note": {
+ "type": "string",
+ "nullable": true
+ },
+ "gecko_id": {
+ "type": "string",
+ "nullable": true,
+ "example": "aave"
+ },
+ "cmcId": {
+ "type": "string",
+ "nullable": true,
+ "example": "7278"
+ },
+ "category": {
+ "type": "string",
+ "example": "Lending"
+ },
+ "tags": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Polygon", "Avalanche"]
+ },
+ "module": {
+ "type": "string",
+ "nullable": true
+ },
+ "treasury": {
+ "type": "string",
+ "nullable": true
+ },
+ "twitter": {
+ "type": "string",
+ "example": "AaveAave"
+ },
+ "audit_links": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "openSource": {
+ "type": "boolean"
+ },
+ "forkedFrom": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "oraclesByChain": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "Ethereum": ["Chainlink"],
+ "Polygon": ["Chainlink"]
}
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "/yields/v2/loops": {
- "get": {
- "tags": ["yields"],
- "x-api-plan-only": true,
- "summary": "Retrieve the latest data for all loop strategies",
- "description": "Leveraged looping opportunities: supply a token, borrow against it and re-supply, repeated `loop_count` times at the market maximum loan-to-value. `loop_apy.total` is the resulting net APY at that leverage; `leverage` reports the accumulated supply and borrow multipliers relative to the initial capital. Borrow reward emissions offset the borrowing cost, so looped APY can exceed the plain supply APY substantially.",
- "responses": {
- "200": {
- "description": "Array of all loop strategies",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "data": {
+ },
+ "parentProtocol": {
+ "type": "string"
+ },
+ "governanceID": {
"type": "array",
"items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Collateral pool id (UUID)",
- "example": "f2e554c5-2099-46cf-9fa6-918fb41a3297"
- },
- "display": {
- "type": "object",
- "description": "Display strings for listings",
- "properties": {
- "detail": {
- "type": ["string", "null"],
- "description": "Market variant label; null when there is only one market",
- "example": null
- }
- }
- },
- "protocol": {
- "type": "string",
- "description": "Protocol display name",
- "example": "Scallop Lend"
- },
- "chain": {
- "type": "string",
- "description": "Chain display name",
- "example": "Sui"
- },
- "token": {
- "type": "object",
- "description": "Token being looped (supplied and borrowed)",
- "properties": {
- "address": {
- "type": "string",
- "example": "0x0041f9f9344cac094454cd574e333c4fdb132d7bcc9379bcd4aab485b2a63942::wbtc::wbtc"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "WBTC"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 8
- }
- }
- },
- "url": {
- "type": ["string", "null"],
- "description": "Market page on the protocol app",
- "example": "https://app.scallop.io/"
- },
- "loan_to_value": {
- "type": ["number", "null"],
- "description": "Maximum loan-to-value as a fraction (0.7 = 70%)",
- "example": 0.7
- },
- "total_supply_usd": {
- "type": ["number", "null"],
- "description": "Total supplied to the market, in USD",
- "example": 99384
- },
- "total_borrow_usd": {
- "type": ["number", "null"],
- "description": "Total borrowed from the market, in USD",
- "example": 40704
- },
- "available_borrow_usd": {
- "type": ["number", "null"],
- "description": "Liquidity still available to borrow, in USD",
- "example": 58680
- },
- "supply_apy": {
- "type": "object",
- "description": "Unlevered supply APY in percent",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed values",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.50779
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 2.50779
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.38329
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 2.38329
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 2.35421
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": null
- },
- "total": {
- "type": ["number", "null"],
- "description": "base plus reward, in percent",
- "example": 2.35421
- }
- }
- }
- }
- },
- "borrow_cost_apy": {
- "type": "object",
- "description": "Borrow cost APY in percent. Reward emissions reduce the cost, so total = base - reward and can be negative",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed values",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 7.852
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": 21.73055
- },
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": -13.87855
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 7.74822
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": 38.54927
- },
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": -30.80105
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "description": "Organic APY in percent, excluding incentive rewards",
- "example": 7.70641
- },
- "reward": {
- "type": ["number", "null"],
- "description": "APY in percent from incentive token emissions; null when there are none",
- "example": 25.32701
- },
- "total": {
- "type": ["number", "null"],
- "description": "base minus reward, in percent; negative means the borrower is net paid",
- "example": -17.6206
- }
- }
- }
- }
+ "type": "string"
+ }
+ },
+ "github": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "currentChainTvls": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "number"
+ },
+ "example": {
+ "Ethereum": 80000000,
+ "Polygon": 20000000
+ }
+ },
+ "isParentProtocol": {
+ "type": "boolean"
+ },
+ "mcap": {
+ "type": "number",
+ "nullable": true,
+ "example": 2400000000
+ },
+ "methodology": {
+ "type": "string",
+ "nullable": true
+ },
+ "raises": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "round": {
+ "type": "string",
+ "example": "Series A"
},
- "loop_apy": {
- "type": "object",
- "description": "Looped position APY",
- "properties": {
- "loop_count": {
- "type": ["number", "null"],
- "description": "Number of borrow/re-supply iterations",
- "example": 5
- },
- "total": {
- "type": ["number", "null"],
- "description": "Net APY in percent of the looped position at loop_count iterations",
- "example": 34.31646
- }
- }
+ "amount": {
+ "type": "number",
+ "example": 25000000
},
- "leverage": {
- "type": "object",
- "description": "Accumulated leverage after loop_count iterations",
- "properties": {
- "supply_multiplier": {
- "type": ["number", "null"],
- "description": "Total supplied relative to initial capital",
- "example": 2.94117
- },
- "borrow_multiplier": {
- "type": ["number", "null"],
- "description": "Total borrowed relative to initial capital",
- "example": 1.94117
- }
+ "valuation": {
+ "type": "string"
+ },
+ "source": {
+ "type": "string"
+ },
+ "date": {
+ "type": "number",
+ "example": 1601510400
+ },
+ "defillamaId": {
+ "type": "string"
+ },
+ "leadInvestors": {
+ "type": "array",
+ "items": {
+ "type": "string"
}
},
- "intrinsic": {
- "type": ["object", "null"],
- "description": "Intrinsic yield of the looped token. Intrinsic yield is reported separately and is NOT included in the base/reward/total APY. Null when there is no intrinsic yield source.",
- "properties": {
- "apy": {
- "type": "object",
- "description": "Intrinsic APY in percent",
- "properties": {
- "current": {
- "type": "object",
- "description": "Latest observed value",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.11
- }
- }
- },
- "avg_7d": {
- "type": "object",
- "description": "Trailing 7-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.05
- }
- }
- },
- "avg_30d": {
- "type": "object",
- "description": "Trailing 30-day average",
- "properties": {
- "base": {
- "type": ["number", "null"],
- "example": 3.02
- }
- }
- }
- }
- },
- "source_pool": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "description": "Earn pool the intrinsic yield is sourced from",
- "example": "747c1d2a-c668-4682-b9f9-296708a3dd90"
- },
- "pool_token": {
- "type": "string",
- "description": "Address of the yield-bearing token",
- "example": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "stETH"
- }
- }
- }
+ "otherInvestors": {
+ "type": "array",
+ "items": {
+ "type": "string"
}
},
- "reward_tokens": {
- "type": "object",
- "description": "Incentive tokens per market side; empty arrays when there are none",
- "properties": {
- "supply": {
- "type": "array",
- "description": "Incentive tokens emitted to the supply side",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string",
- "example": "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::scallop_sca"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "sSCA"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 9
- }
- }
- }
- },
- "borrow": {
- "type": "array",
- "description": "Incentive tokens emitted to the borrow side",
- "items": {
- "type": "object",
- "properties": {
- "address": {
- "type": "string",
- "example": "0x5ca17430c1d046fae9edeaa8fd76c7b4193a00d764a0ecfa9418d733ad27bc1e::scallop_sca::scallop_sca"
- },
- "symbol": {
- "type": ["string", "null"],
- "example": "sSCA"
- },
- "decimals": {
- "type": ["integer", "null"],
- "example": 9
- }
- }
- }
- }
+ "investors": {
+ "type": "array",
+ "items": {
+ "type": "string"
}
}
}
}
+ },
+ "otherProtocols": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "hallmarks": {
+ "type": "array",
+ "description": "Notable events in the protocol's history as [timestamp, description] pairs",
+ "items": {
+ "type": "array"
+ }
+ },
+ "stablecoins": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "misrepresentedTokens": {
+ "type": "boolean"
+ },
+ "deprecated": {
+ "type": "boolean"
+ },
+ "rugged": {
+ "type": "boolean"
+ },
+ "deadUrl": {
+ "type": "boolean"
+ },
+ "warningBanners": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "message": {
+ "type": "string"
+ },
+ "until": {
+ "type": "string",
+ "nullable": true
+ },
+ "level": {
+ "type": "string",
+ "enum": ["low", "alert", "rug"]
+ }
+ }
+ }
+ },
+ "tokenRights": {
+ "type": "object",
+ "description": "Token governance and value accrual rights"
+ },
+ "wrongLiquidity": {
+ "type": "boolean"
+ },
+ "tvlCodePath": {
+ "type": "string",
+ "description": "Path to the TVL adapter source code"
+ }
+ },
+ "example": {
+ "id": "parent#aave-treasury",
+ "name": "Aave (treasury)",
+ "url": "https://aave.com",
+ "description": "Aave is an Open Source and Non-Custodial protocol to earn interest on deposits and borrow assets",
+ "logo": "https://icons.llama.fi/aave.png",
+ "chains": ["Ethereum", "Arbitrum", "OP Mainnet", "Avalanche", "Fantom", "Polygon"],
+ "gecko_id": "aave",
+ "cmcId": "7278",
+ "treasury": "aave.js",
+ "twitter": "aave",
+ "governanceID": ["snapshot:aave.eth", "eip155:1:0xEC568fffba86c094cf06b22134B23074DFE2252c"],
+ "wrongLiquidity": true,
+ "github": ["aave", "bgd-labs"],
+ "stablecoins": ["gho"],
+ "tokenRights": {
+ "rights": [
+ {
+ "label": "Governance",
+ "hasRight": true,
+ "details": "AAVE"
+ },
+ {
+ "label": "Treasury",
+ "hasRight": true,
+ "details": "AAVE"
+ },
+ {
+ "label": "Revenue",
+ "hasRight": true,
+ "details": "AAVE"
+ }
+ ],
+ "governanceData": {
+ "rights": "LIMITED",
+ "details": "Governance includes protocol parameters, treasury management, upgrades & onchain revenue",
+ "feeSwitchStatus": "ON",
+ "feeSwitchDetails": "$50m annual budget for token buybacks"
+ },
+ "holdersRevenueAndValueAccrual": {
+ "buybacks": "ACTIVE",
+ "dividends": "NONE",
+ "burns": "NONE",
+ "primaryValueAccrual": "Buybacks - $50M yearly budget for buybacks"
+ },
+ "tokenAlignment": {
+ "fundraising": "TOKEN",
+ "raiseDetailsLink": {
+ "label": "Strategic Round (Decrypt)",
+ "url": "https://decrypt.co/44653/aave-raises-25-million-to-bring-defi-to-institutions"
+ },
+ "associatedEntities": ["DAO", "Labs", "Parent / Holdings Co"],
+ "equityRevenueCapture": "PARTIAL",
+ "equityStatement": "Labs owns the interface and offchain revenue"
+ }
+ },
+ "symbol": "AAVE",
+ "address": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9",
+ "module": "treasury/aave.js",
+ "category": "Treasury",
+ "tvlCodePath": "https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/treasury/aave.js",
+ "currentChainTvls": {
+ "Ethereum-OwnTokens": 51486143.11756,
+ "Arbitrum-OwnTokens": 108.33167,
+ "OP Mainnet-OwnTokens": 339.41814,
+ "Avalanche-OwnTokens": 200.26047,
+ "Fantom-OwnTokens": 0,
+ "Fantom": 5317.95627,
+ "Polygon-OwnTokens": 0.49868,
+ "Arbitrum": 7665284.15367,
+ "Avalanche": 12653199.04222,
+ "OP Mainnet": 266147.25573,
+ "Ethereum": 50207476.33278,
+ "Polygon": 774382.58832,
+ "OwnTokens": 51486791.62651
+ },
+ "raises": [],
+ "mcap": 1775192426.0010407
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Protocol not found"
+ }
+ }
+ }
+ },
+ "/api/v2/chart/treasury/protocol/{protocol}": {
+ "get": {
+ "tags": ["Treasury"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get historical treasury chart for a protocol",
+ "description": "Returns an array of [timestamp, value] pairs representing the protocol's treasury value over time. By default excludes the protocol's own tokens (OwnTokens).",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "uniswap"
+ }
+ },
+ {
+ "name": "key",
+ "in": "query",
+ "required": false,
+ "description": "Token filter. Omit to exclude OwnTokens (default). Use \"OwnTokens\" to return only the protocol's own tokens, or \"all\" for the sum of all tokens including OwnTokens.",
+ "schema": {
+ "type": "string",
+ "enum": ["OwnTokens", "all"],
+ "example": "all"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, value] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2,
+ "example": [1609459200, 120000000]
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Protocol not found"
+ }
+ }
+ }
+ },
+ "/api/v2/chart/treasury/protocol/{protocol}/chain-breakdown": {
+ "get": {
+ "tags": ["Treasury"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get historical treasury chart for a protocol broken down by chain",
+ "description": "Returns an array of [timestamp, { chain: value }] pairs showing treasury value per chain over time. By default excludes the protocol's own tokens.",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "aave"
+ }
+ },
+ {
+ "name": "key",
+ "in": "query",
+ "required": false,
+ "description": "Token filter. Omit to exclude OwnTokens (default). Use \"OwnTokens\" to return only the protocol's own tokens, or \"all\" for the sum of all tokens including OwnTokens.",
+ "schema": {
+ "type": "string",
+ "enum": ["OwnTokens", "all"],
+ "example": "OwnTokens"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, chainBreakdown] pairs. Each entry is a two-element array: first element is a unix timestamp, second is an object mapping chain names to treasury values.",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "example": [
+ [
+ 1609459200,
+ {
+ "Ethereum": 80000000,
+ "Polygon": 20000000
+ }
+ ],
+ [
+ 1609545600,
+ {
+ "Ethereum": 81000000,
+ "Polygon": 20500000
+ }
+ ]
+ ]
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Protocol not found"
+ }
+ }
+ }
+ },
+ "/api/v2/chart/treasury/protocol/{protocol}/token-breakdown": {
+ "get": {
+ "tags": ["Treasury"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get historical treasury chart for a protocol broken down by token",
+ "description": "Returns an array of [timestamp, { token: value }] pairs showing treasury value per token over time. By default excludes OwnTokens and values are in USD. Use key and currency params to customize.",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "aave"
+ }
+ },
+ {
+ "name": "key",
+ "in": "query",
+ "required": false,
+ "description": "Token filter. Omit to exclude OwnTokens (default). Use \"OwnTokens\" to return only the protocol's own tokens, or \"all\" for the sum of all tokens including OwnTokens.",
+ "schema": {
+ "type": "string",
+ "enum": ["OwnTokens", "all"],
+ "example": "OwnTokens"
+ }
+ },
+ {
+ "name": "currency",
+ "in": "query",
+ "required": false,
+ "description": "Set to \"tokens\" to return values denominated in raw token amounts instead of USD",
+ "schema": {
+ "type": "string",
+ "enum": ["usd", "token", "raw"],
+ "example": "usd"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, tokenBreakdown] pairs. Each entry is a two-element array: first element is a unix timestamp, second is an object mapping token names to treasury values (USD by default, raw token amounts if currency=tokens).",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "example": [
+ [
+ 1609459200,
+ {
+ "AAVE": 50000000,
+ "USDC": 30000000,
+ "WETH": 20000000
+ }
+ ],
+ [
+ 1609545600,
+ {
+ "AAVE": 51000000,
+ "USDC": 30500000,
+ "WETH": 20500000
+ }
+ ]
+ ]
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Protocol not found"
+ }
+ }
+ }
+ },
+ "/api/v2/metrics/oracle": {
+ "get": {
+ "tags": ["Oracles"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get oracle data overview",
+ "description": "Returns an object mapping oracle names to arrays of protocol names that use each oracle.",
+ "responses": {
+ "200": {
+ "description": "Oracle data overview",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "oracles": {
+ "type": "object",
+ "description": "Mapping of oracle names to arrays of protocol names using that oracle",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "Chainlink": ["Aave V2", "Compound V2", "Synthetix v1+v2"],
+ "Band": ["Mirror", "Anchor"],
+ "TWAP": ["Uniswap V3"]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v2/chart/oracle": {
+ "get": {
+ "tags": ["Oracles"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get timeseries chart data for all oracles",
+ "description": "Returns an array of [timestamp, value] pairs representing total TVL across all oracles over time.",
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, value] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2,
+ "example": [1546560000, 273845651.27]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v2/chart/oracle/chain-breakdown": {
+ "get": {
+ "tags": ["Oracles"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get timeseries chart data breakdown by chain",
+ "description": "Returns an array of objects with a timestamp and TVL values broken down by chain.",
+ "responses": {
+ "200": {
+ "description": "Array of timestamped chain breakdowns",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number",
+ "description": "Unix timestamp",
+ "example": 1546560000
+ }
+ },
+ "additionalProperties": {
+ "type": "number"
+ }
+ },
+ "example": [
+ {
+ "timestamp": 1546560000,
+ "Ethereum": 273845651.27
+ },
+ {
+ "timestamp": 1546646400,
+ "Ethereum": 288674544.41
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v2/chart/oracle/protocol-breakdown": {
+ "get": {
+ "tags": ["Oracles"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get timeseries chart data breakdown by protocol",
+ "description": "Returns an array of objects with a timestamp and TVL values broken down by oracle/protocol.",
+ "responses": {
+ "200": {
+ "description": "Array of timestamped protocol breakdowns",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number",
+ "description": "Unix timestamp",
+ "example": 1546560000
+ }
+ },
+ "additionalProperties": {
+ "type": "number"
+ }
+ },
+ "example": [
+ {
+ "timestamp": 1546560000,
+ "Chronicle": 273845651.27
+ },
+ {
+ "timestamp": 1546646400,
+ "Chronicle": 288674544.41
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v2/chart/oracle/protocol/{protocol}": {
+ "get": {
+ "tags": ["Oracles"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get timeseries chart data by protocol/oracle",
+ "description": "Returns an array of [timestamp, value] pairs representing TVL over time for a specific oracle/protocol.",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "oracle/protocol name",
+ "schema": {
+ "type": "string",
+ "example": "Chainlink"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, value] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2,
+ "example": [1557273600, 9546.16]
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Protocol not found"
+ }
+ }
+ }
+ },
+ "/api/v2/chart/oracle/protocol/{protocol}/chain-breakdown": {
+ "get": {
+ "tags": ["Oracles"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get chain breakdown timeseries chart data by protocol/oracle",
+ "description": "Returns an array of objects with a timestamp and TVL values broken down by chain for a specific oracle/protocol.",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "oracle/protocol name",
+ "schema": {
+ "type": "string",
+ "example": "Chainlink"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of timestamped chain breakdowns",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number",
+ "description": "Unix timestamp",
+ "example": 1557273600
+ }
+ },
+ "additionalProperties": {
+ "type": "number"
+ }
+ },
+ "example": [
+ {
+ "timestamp": 1557273600,
+ "Ethereum": 9546.16
+ },
+ {
+ "timestamp": 1557360000,
+ "Ethereum": 10826.13
+ }
+ ]
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Protocol not found"
+ }
+ }
+ }
+ },
+ "/api/v2/chart/oracle/chain/{chain}": {
+ "get": {
+ "tags": ["Oracles"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get timeseries chart data by chain",
+ "description": "Returns an array of [timestamp, value] pairs representing oracle TVL over time for a specific chain.",
+ "parameters": [
+ {
+ "name": "chain",
+ "in": "path",
+ "required": true,
+ "description": "chain name",
+ "schema": {
+ "type": "string",
+ "example": "Ethereum"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, value] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2,
+ "example": [1546560000, 273845651.27]
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Chain not found"
+ }
+ }
+ }
+ },
+ "/api/v2/chart/oracle/chain/{chain}/protocol-breakdown": {
+ "get": {
+ "tags": ["Oracles"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get protocol breakdown timeseries chart data by chain",
+ "description": "Returns an array of objects with a timestamp and TVL values broken down by oracle/protocol for a specific chain.",
+ "parameters": [
+ {
+ "name": "chain",
+ "in": "path",
+ "required": true,
+ "description": "chain name",
+ "schema": {
+ "type": "string",
+ "example": "Ethereum"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of timestamped protocol breakdowns",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number",
+ "description": "Unix timestamp",
+ "example": 1546560000
+ }
+ },
+ "additionalProperties": {
+ "type": "number"
+ }
+ },
+ "example": [
+ {
+ "timestamp": 1546560000,
+ "Chronicle": 273845651.27
+ },
+ {
+ "timestamp": 1546646400,
+ "Chronicle": 288674544.41
+ }
+ ]
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Chain not found"
+ }
+ }
+ }
+ },
+ "/api/v2/metrics/fork": {
+ "get": {
+ "tags": ["Forks"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get fork data overview",
+ "description": "Returns an object mapping fork names to arrays of protocol names that are forks of each protocol.",
+ "responses": {
+ "200": {
+ "description": "Fork data overview",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ }
+ },
+ "example": {
+ "Uniswap V2": ["SushiSwap", "PancakeSwap AMM", "QuickSwap Dex"],
+ "Aave V2": ["Geist Finance", "Hundred Finance"]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v2/chart/fork/protocol-breakdown": {
+ "get": {
+ "tags": ["Forks"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get timeseries chart data breakdown by protocol",
+ "description": "Returns an array of objects with a timestamp and TVL values broken down by fork protocol.",
+ "responses": {
+ "200": {
+ "description": "Array of timestamped protocol breakdowns",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "timestamp": {
+ "type": "number",
+ "description": "Unix timestamp",
+ "example": 1599264000
+ }
+ },
+ "additionalProperties": {
+ "type": "number"
+ }
+ },
+ "example": [
+ {
+ "timestamp": 1599696000,
+ "Uniswap V2": 1082367977.05
+ },
+ {
+ "timestamp": 1599868800,
+ "Uniswap V2": 1456479137.61,
+ "Saddle Finance": 41.34
+ }
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v2/chart/fork/protocol/{protocol}": {
+ "get": {
+ "tags": ["Forks"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get timeseries chart data by protocol",
+ "description": "Returns an array of [timestamp, value] pairs representing TVL over time for all forks of a specific protocol.",
+ "parameters": [
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug",
+ "schema": {
+ "type": "string",
+ "example": "aave-v3"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, value] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2,
+ "example": [1682899200, 31.73]
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Protocol not found"
+ }
+ }
+ }
+ },
+ "/api/v2/metrics/{metric}": {
+ "get": {
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get dimension data overview",
+ "description": "Returns aggregate metrics for the specified dimension including totals and percentage changes across different time periods.",
+ "parameters": [
+ {
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume",
+ "active-users"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n- **active-users**: dailyActiveUsers (default), dailyTransactionCount, dailyGasUsed\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Dimension metrics overview",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "allChains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Solana", "BSC", "Base"]
+ },
+ "total24h": {
+ "type": "number",
+ "example": 42000000
+ },
+ "total48hto24h": {
+ "type": "number",
+ "example": 38000000
+ },
+ "total7d": {
+ "type": "number",
+ "example": 280000000
+ },
+ "total14dto7d": {
+ "type": "number",
+ "example": 260000000
+ },
+ "total60dto30d": {
+ "type": "number",
+ "example": 1100000000
+ },
+ "total30d": {
+ "type": "number",
+ "example": 1200000000
+ },
+ "total1y": {
+ "type": "number",
+ "example": 15000000000
+ },
+ "change_1d": {
+ "type": "number",
+ "example": 10.5
+ },
+ "change_7d": {
+ "type": "number",
+ "example": 7.8
+ },
+ "change_1m": {
+ "type": "number",
+ "example": 9.1
+ },
+ "change_7dover7d": {
+ "type": "number",
+ "example": 5.2
+ },
+ "change_30dover30d": {
+ "type": "number",
+ "example": 8.3
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v2/chart/{metric}": {
+ "get": {
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get historical timeseries chart data",
+ "description": "Returns an array of [timestamp, value] pairs representing the total metric value over time.",
+ "parameters": [
+ {
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume",
+ "active-users"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n- **active-users**: dailyActiveUsers (default), dailyTransactionCount, dailyGasUsed\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, value] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2,
+ "example": [1534550400, 42000000]
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v2/chart/{metric}/chain-breakdown": {
+ "get": {
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get historical timeseries chart data breakdown by chain",
+ "description": "Returns an array of [timestamp, {chain: value}] pairs showing the metric broken down by chain over time. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
+ "parameters": [
+ {
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume",
+ "active-users"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n- **active-users**: dailyActiveUsers (default), dailyTransactionCount, dailyGasUsed\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, chainBreakdown] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "example": [
+ [
+ 1534550400,
+ {
+ "Ethereum": 30000000,
+ "Solana": 12000000
+ }
+ ],
+ [
+ 1534636800,
+ {
+ "Ethereum": 31000000,
+ "Solana": 12500000
+ }
+ ]
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v2/chart/{metric}/protocol-breakdown": {
+ "get": {
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get historical timeseries chart data breakdown by protocol",
+ "description": "Returns an array of [timestamp, {protocol: value}] pairs showing the metric broken down by protocol over time.",
+ "parameters": [
+ {
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, protocolBreakdown] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "example": [
+ [
+ 1534550400,
+ {
+ "Uniswap V3": 15000000,
+ "Aave": 8000000
+ }
+ ],
+ [
+ 1534636800,
+ {
+ "Uniswap V3": 15500000,
+ "Aave": 8200000
+ }
+ ]
+ ]
+ }
+ }
+ }
+ }
+ }
+ }
+ },
+ "/api/v2/metrics/{metric}/chain/{chain}": {
+ "get": {
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get chain dimension data overview",
+ "description": "Returns aggregate metrics for the specified dimension filtered by a specific chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
+ "parameters": [
+ {
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "chain",
+ "in": "path",
+ "required": true,
+ "description": "chain name",
+ "schema": {
+ "type": "string",
+ "example": "Ethereum"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Chain dimension metrics overview",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "allChains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Solana", "BSC", "Base"]
+ },
+ "total24h": {
+ "type": "number",
+ "example": 42000000
+ },
+ "total48hto24h": {
+ "type": "number",
+ "example": 38000000
+ },
+ "total7d": {
+ "type": "number",
+ "example": 280000000
+ },
+ "total14dto7d": {
+ "type": "number",
+ "example": 260000000
+ },
+ "total60dto30d": {
+ "type": "number",
+ "example": 1100000000
+ },
+ "total30d": {
+ "type": "number",
+ "example": 1200000000
+ },
+ "total1y": {
+ "type": "number",
+ "example": 15000000000
+ },
+ "change_1d": {
+ "type": "number",
+ "example": 10.5
+ },
+ "change_7d": {
+ "type": "number",
+ "example": 7.8
+ },
+ "change_1m": {
+ "type": "number",
+ "example": 9.1
+ },
+ "change_7dover7d": {
+ "type": "number",
+ "example": 5.2
+ },
+ "change_30dover30d": {
+ "type": "number",
+ "example": 8.3
+ },
+ "chain": {
+ "type": "string",
+ "example": "Ethereum"
+ }
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found"
+ }
+ }
+ }
+ },
+ "/api/v2/chart/{metric}/chain/{chain}": {
+ "get": {
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get chain historical timeseries chart data",
+ "description": "Returns an array of [timestamp, value] pairs for the metric filtered by a specific chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
+ "parameters": [
+ {
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "chain",
+ "in": "path",
+ "required": true,
+ "description": "chain name",
+ "schema": {
+ "type": "string",
+ "example": "Ethereum"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, value] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2,
+ "example": [1534550400, 42000000]
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found"
+ }
+ }
+ }
+ },
+ "/api/v2/chart/{metric}/chain/{chain}/protocol-breakdown": {
+ "get": {
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get chain timeseries chart data breakdown by protocol",
+ "description": "Returns an array of [timestamp, {protocol: value}] pairs showing the metric on a specific chain broken down by protocol. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
+ "parameters": [
+ {
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "chain",
+ "in": "path",
+ "required": true,
+ "description": "chain name",
+ "schema": {
+ "type": "string",
+ "example": "Ethereum"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, protocolBreakdown] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "example": [
+ [
+ 1534550400,
+ {
+ "Uniswap V3": 15000000,
+ "Aave": 8000000
+ }
+ ],
+ [
+ 1534636800,
+ {
+ "Uniswap V3": 15500000,
+ "Aave": 8200000
+ }
+ ]
+ ]
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found"
+ }
+ }
+ }
+ },
+ "/api/v2/metrics/{metric}/protocol/{protocol}": {
+ "get": {
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get protocol dimension data overview",
+ "description": "Returns protocol metadata along with aggregate metrics for the specified dimension.",
+ "parameters": [
+ {
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug (slugified protocol name)",
+ "schema": {
+ "type": "string",
+ "example": "aave"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Protocol dimension metrics overview",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "example": "2196"
+ },
+ "name": {
+ "type": "string",
+ "example": "Aave"
+ },
+ "url": {
+ "type": "string",
+ "example": "https://aave.com"
+ },
+ "description": {
+ "type": "string"
+ },
+ "logo": {
+ "type": "string",
+ "example": "https://icons.llama.fi/aave.png"
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "Polygon", "Avalanche"]
+ },
+ "gecko_id": {
+ "type": "string",
+ "nullable": true,
+ "example": "aave"
+ },
+ "cmcId": {
+ "type": "string",
+ "nullable": true,
+ "example": "7278"
+ },
+ "symbol": {
+ "type": "string",
+ "nullable": true,
+ "example": "AAVE"
+ },
+ "twitter": {
+ "type": "string",
+ "nullable": true
+ },
+ "github": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ },
+ "treasury": {
+ "type": "string",
+ "nullable": true
+ },
+ "governanceID": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ },
+ "wrongLiquidity": {
+ "type": "boolean",
+ "nullable": true
+ },
+ "stablecoins": {
+ "type": "array",
+ "nullable": true,
+ "items": {
+ "type": "string"
+ }
+ },
+ "total24h": {
+ "type": "number",
+ "example": 1200000
+ },
+ "total48hto24h": {
+ "type": "number",
+ "example": 1100000
+ },
+ "total7d": {
+ "type": "number",
+ "example": 8000000
+ },
+ "total30d": {
+ "type": "number",
+ "example": 35000000
+ },
+ "total1y": {
+ "type": "number",
+ "example": 400000000
+ },
+ "change_1d": {
+ "type": "number",
+ "example": 9.1
+ },
+ "change_7d": {
+ "type": "number",
+ "example": 5.3
+ },
+ "change_1m": {
+ "type": "number",
+ "example": 12.4
}
}
}
}
}
+ },
+ "404": {
+ "description": "Not found"
+ }
+ }
+ }
+ },
+ "/api/v2/chart/{metric}/protocol/{protocol}": {
+ "get": {
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get protocol historical timeseries chart data",
+ "description": "Returns an array of [timestamp, value] pairs for the metric of a specific protocol.",
+ "parameters": [
+ {
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug (slugified protocol name)",
+ "schema": {
+ "type": "string",
+ "example": "aave"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, value] pairs",
+ "content": {
+ "application/json": {
+ "examples": {
+ "dailyAggregatedVolume": {
+ "summary": "Bridge dailyAggregatedVolume",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyAggregatedVolume. Historical example for 2022-10-17 UTC.",
+ "value": [[1665964800, 834139]]
+ },
+ "dailyOutgoingVolume": {
+ "summary": "Bridge dailyOutgoingVolume",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyOutgoingVolume. Historical example for 2022-10-17 UTC.",
+ "value": [[1665964800, 834139]]
+ },
+ "dailyIncomingVolume": {
+ "summary": "Bridge dailyIncomingVolume",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyIncomingVolume. Historical example for 2022-10-17 UTC.",
+ "value": [[1665964800, 834139]]
+ },
+ "dailyTxCount": {
+ "summary": "Bridge dailyTxCount",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyTxCount. Historical example for 2022-10-17 UTC.",
+ "value": [[1665964800, 33]]
+ },
+ "dailyOutgoingTxCount": {
+ "summary": "Bridge dailyOutgoingTxCount",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyOutgoingTxCount. Historical example for 2022-10-17 UTC.",
+ "value": [[1665964800, 33]]
+ },
+ "dailyIncomingTxCount": {
+ "summary": "Bridge dailyIncomingTxCount",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyIncomingTxCount. Historical example for 2022-10-17 UTC.",
+ "value": [[1665964800, 33]]
+ }
+ },
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2,
+ "example": [1534550400, 42000000]
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found"
+ }
+ }
+ }
+ },
+ "/api/v2/chart/{metric}/protocol/{protocol}/chain-breakdown": {
+ "get": {
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get protocol timeseries chart data breakdown by chain",
+ "description": "Returns an array of [timestamp, {chain: value}] pairs showing the metric for a specific protocol broken down by chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
+ "parameters": [
+ {
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug (slugified protocol name)",
+ "schema": {
+ "type": "string",
+ "example": "aave"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, chainBreakdown] pairs",
+ "content": {
+ "application/json": {
+ "examples": {
+ "dailyAggregatedVolume": {
+ "summary": "Bridge dailyAggregatedVolume",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyAggregatedVolume. Historical example for 2022-10-17 UTC.",
+ "value": [
+ [
+ 1665964800,
+ {
+ "Ethereum": 834139,
+ "OP Mainnet": 834139
+ }
+ ]
+ ]
+ },
+ "dailyOutgoingVolume": {
+ "summary": "Bridge dailyOutgoingVolume",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyOutgoingVolume. Historical example for 2022-10-17 UTC.",
+ "value": [
+ [
+ 1665964800,
+ {
+ "Ethereum": 811248,
+ "OP Mainnet": 22891
+ }
+ ]
+ ]
+ },
+ "dailyIncomingVolume": {
+ "summary": "Bridge dailyIncomingVolume",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyIncomingVolume. Historical example for 2022-10-17 UTC.",
+ "value": [
+ [
+ 1665964800,
+ {
+ "Ethereum": 22891,
+ "OP Mainnet": 811248
+ }
+ ]
+ ]
+ },
+ "dailyTxCount": {
+ "summary": "Bridge dailyTxCount",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyTxCount. Historical example for 2022-10-17 UTC.",
+ "value": [
+ [
+ 1665964800,
+ {
+ "Ethereum": 33,
+ "OP Mainnet": 33
+ }
+ ]
+ ]
+ },
+ "dailyOutgoingTxCount": {
+ "summary": "Bridge dailyOutgoingTxCount",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyOutgoingTxCount. Historical example for 2022-10-17 UTC.",
+ "value": [
+ [
+ 1665964800,
+ {
+ "Ethereum": 28,
+ "OP Mainnet": 5
+ }
+ ]
+ ]
+ },
+ "dailyIncomingTxCount": {
+ "summary": "Bridge dailyIncomingTxCount",
+ "description": "metric=bridges, protocol=optimism-bridge, dataType=dailyIncomingTxCount. Historical example for 2022-10-17 UTC.",
+ "value": [
+ [
+ 1665964800,
+ {
+ "Ethereum": 5,
+ "OP Mainnet": 28
+ }
+ ]
+ ]
+ }
+ },
+ "schema": {
+ "type": "array",
+ "example": [
+ [
+ 1534550400,
+ {
+ "Ethereum": 30000000,
+ "Solana": 12000000
+ }
+ ],
+ [
+ 1534636800,
+ {
+ "Ethereum": 31000000,
+ "Solana": 12500000
+ }
+ ]
+ ]
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Not found"
}
}
}
},
- "/api/perpFundingRates": {
+ "/api/v2/chart/{metric}/protocol/{protocol}/version-breakdown": {
"get": {
- "tags": ["yields"],
- "summary": "Funding rates and open interest of perpetual futures",
- "description": "Latest funding rate, open interest and index price for Binance and OKX perpetual markets, with the 7d and 30d average and sum of settled funding rates.",
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "status": {
- "type": "string",
- "example": "success"
- },
- "data": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "perp_id": {
- "type": "string",
- "example": "61533906-1626-45fc-b3ed-9a1103705373"
- },
- "timestamp": {
- "type": "string",
- "example": "2025-07-18T18:01:44.811Z"
- },
- "marketplace": {
- "type": "string",
- "example": "Binance"
- },
- "market": {
- "type": "string",
- "example": "1000000BOBUSDT"
- },
- "baseAsset": {
- "type": "string",
- "example": "1000000BOT"
- },
- "fundingRate": {
- "type": "number",
- "example": 0.00005
- },
- "fundingRatePrevious": {
- "type": "number",
- "example": 0.00045224
- },
- "fundingTimePrevious": {
- "type": "number",
- "example": 1752854400000
- },
- "openInterest": {
- "type": "number",
- "example": 51144394
- },
- "indexPrice": {
- "type": "number",
- "example": 0.05108
- },
- "fundingRate7dAverage": {
- "type": ["number", "null"],
- "example": null
- },
- "fundingRate7dSum": {
- "type": ["number", "null"],
- "example": null
- },
- "fundingRate30dAverage": {
- "type": ["number", "null"],
- "example": null
- },
- "fundingRate30dSum": {
- "type": ["number", "null"],
- "example": null
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
+ "tags": ["Dimensions"],
"x-api-plan-only": true,
- "x-codeSamples": [
+ "x-api-beta": true,
+ "summary": "Get protocol timeseries chart data breakdown by version",
+ "description": "Returns an array of [timestamp, {version: value}] pairs showing the metric for a specific protocol broken down by version (e.g. Aave V2, Aave V3). For bridges, version values sum chain activity and can exceed the protocol total for dailyAggregatedVolume and dailyTxCount. Use /api/v2/chart/bridges/protocol/{protocol} for the protocol total.",
+ "parameters": [
{
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.yields.getPerpFundingRates()"
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
},
{
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.yields.getPerpFundingRates()"
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug (slugified protocol name)",
+ "schema": {
+ "type": "string",
+ "example": "aave"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
}
- ]
- }
- },
- "/api/lstRates": {
- "get": {
- "tags": ["yields"],
- "summary": "Exchange rates and ETH peg of liquid staking tokens",
- "description": "Latest expected (contract) redemption rate, executable market rate and resulting ETH peg for major LSTs.",
+ ],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Array of [timestamp, versionBreakdown] pairs",
"content": {
"application/json": {
"schema": {
"type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "description": "The name of the protocol issuing the LST"
- },
- "symbol": {
- "type": "string",
- "nullable": true,
- "description": "The symbol of the LST"
- },
- "address": {
- "type": "string",
- "description": "The contract address of the LST"
- },
- "type": {
- "type": "string",
- "nullable": true,
- "description": "The type of the LST (rebase or accruing)"
- },
- "expectedRate": {
- "type": "number",
- "nullable": true,
- "description": "ETH per token owed by the protocol, read from its contract"
- },
- "marketRate": {
- "type": "number",
- "nullable": true,
- "description": "Executable market rate in ETH per token; null when no credible market quote exists"
- },
- "ethPeg": {
- "type": "number",
- "nullable": true,
- "description": "Percent deviation of the market rate from the expected rate"
- },
- "fee": {
- "type": "number",
- "nullable": true,
- "description": "The protocol fee percentage"
+ "example": [
+ [
+ 1607040000,
+ {
+ "Aave V2": 131
}
- }
- }
- },
- "example": [
- {
- "name": "Lido",
- "symbol": "stETH",
- "address": "0xae7ab96520de3a18e5e111b5eaab095312d7fe84",
- "type": "rebase",
- "expectedRate": 1,
- "marketRate": 0.9997,
- "ethPeg": -0.03,
- "fee": 0.1
- },
- {
- "name": "StakeWise V3",
- "symbol": "osETH",
- "address": "0xf1C9acDc66974dFB6dEcB12aA385b9cD01190E38",
- "type": "accruing",
- "expectedRate": 1.0775,
- "marketRate": 1.0615,
- "ethPeg": -1.48,
- "fee": 0.05
- },
- {
- "name": "Bifrost Liquid Staking",
- "symbol": "vETH",
- "address": "0x4Bc3263Eb5bb2Ef7Ad9aB6FB68be80E43b43801F",
- "type": "accruing",
- "expectedRate": 1.1353,
- "marketRate": null,
- "ethPeg": null,
- "fee": null
- }
- ]
+ ],
+ [
+ 1607126400,
+ {
+ "Aave V2": 334,
+ "Aave V3": 500
+ }
+ ]
+ ]
+ }
}
}
+ },
+ "404": {
+ "description": "Not found"
}
- },
+ }
+ }
+ },
+ "/api/v2/chart/{metric}/protocol/{protocol}/label-breakdown": {
+ "get": {
+ "tags": ["Dimensions"],
"x-api-plan-only": true,
- "x-codeSamples": [
+ "x-api-beta": true,
+ "summary": "Get protocol timeseries chart data breakdown by label",
+ "description": "Returns an array of [timestamp, {label: value}] pairs showing the metric for a specific protocol broken down by label (e.g. Borrow Interest, Flash Loans). Currently only supported for metric=fees.",
+ "parameters": [
{
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.yields.getLstRates()"
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
},
{
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.yields.getLstRates()"
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug (slugified protocol name)",
+ "schema": {
+ "type": "string",
+ "example": "aave"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
}
- ]
- }
- },
- "/etfs/snapshot": {
- "get": {
- "tags": ["ETFs"],
- "summary": "Get ETFs and their metrics (aum, flows, fees...)",
+ ],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Array of [timestamp, labelBreakdown] pairs",
"content": {
"application/json": {
"schema": {
"type": "array",
- "items": {
- "type": "object",
- "properties": {
- "ticker": {
- "type": "string",
- "description": "ETF ticker symbol"
- },
- "timestamp": {
- "type": "integer",
- "description": "Current timestamp"
- },
- "asset": {
- "type": "string",
- "description": "Asset name"
- },
- "issuer": {
- "type": "string",
- "description": "ETF issuer name"
- },
- "etf_name": {
- "type": "string",
- "description": "Full ETF name"
- },
- "custodian": {
- "type": "string",
- "description": "Custodian name"
- },
- "pct_fee": {
- "type": "number",
- "description": "Percentage fee"
- },
- "url": {
- "type": "string",
- "description": "ETF URL"
- },
- "flows": {
- "type": "number",
- "description": "Net flows"
- },
- "aum": {
- "type": "number",
- "description": "Assets under management"
- },
- "volume": {
- "type": "number",
- "description": "Trading volume"
+ "example": [
+ [
+ 1607040000,
+ {
+ "Borrow Interest": 131
}
- }
- }
- },
- "example": [
- {
- "ticker": "IBIT",
- "timestamp": 1755612389,
- "asset": "bitcoin",
- "issuer": "Blackrock",
- "etf_name": "iShares Bitcoin Trust",
- "custodian": "Coinbase",
- "pct_fee": 0.25,
- "url": "https://www.blackrock.com/us/individual/products/333011/ishares-bitcoin-trust",
- "flows": -68700000,
- "aum": 87276718199,
- "volume": 453293317.84999996
- }
- ]
+ ],
+ [
+ 1607126400,
+ {
+ "Borrow Interest": 334,
+ "Flash Loans": 50
+ }
+ ]
+ ]
+ }
}
}
+ },
+ "404": {
+ "description": "Not found"
}
- },
+ }
+ }
+ },
+ "/api/v2/metrics/{metric}/categories": {
+ "get": {
+ "tags": ["Dimensions"],
"x-api-plan-only": true,
- "x-codeSamples": [
+ "x-api-beta": true,
+ "summary": "Get categories available for a dimension",
+ "description": "Returns the categories that have data for the selected metric and dataType, with aggregate totals and active chain names. Use category names in slug form for category routes, for example canonical-bridge for Canonical Bridge. For bridges, totals are in USD for volume dataTypes and transfer counts for TxCount dataTypes.",
+ "parameters": [
{
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.etfs.getOverview()"
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume",
+ "active-users"
+ ],
+ "example": "fees"
+ }
},
{
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.etfs.getOverview()"
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n- **active-users**: dailyActiveUsers (default), dailyTransactionCount, dailyGasUsed\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
}
- ]
- }
- },
- "/etfs/flows": {
- "get": {
- "tags": ["ETFs"],
- "summary": "Historical Flows at the Asset Level",
+ ],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Categories with data for the selected dimension and dataType",
"content": {
"application/json": {
"schema": {
@@ -13425,1402 +13252,1203 @@
"items": {
"type": "object",
"properties": {
- "gecko_id": {
+ "category": {
"type": "string",
- "description": "CoinGecko ID"
+ "example": "Canonical Bridge"
},
- "day": {
- "type": "string",
- "description": "Day"
+ "total24h": {
+ "type": "number",
+ "nullable": true
},
- "total_flow_usd": {
+ "total7d": {
"type": "number",
- "description": "Sum of all USD flows per asset"
+ "nullable": true
+ },
+ "total30d": {
+ "type": "number",
+ "nullable": true
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "example": ["Ethereum", "OP Mainnet"]
}
}
}
- },
- "example": [
- {
- "gecko_id": "bitcoin",
- "day": "2024-01-11T00:00:00.000Z",
- "total_flow_usd": 655300000
- }
- ]
+ }
}
- }
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.etfs.getHistory()"
+ }
},
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.etfs.getHistory()"
+ "500": {
+ "description": "Category data not available"
}
- ]
+ }
}
},
- "/fdv/performance/{period}": {
+ "/api/v2/metrics/{metric}/category/{category}": {
"get": {
- "tags": ["narratives"],
- "summary": "Get chart of narratives based on category performance (with individual coins weighted by mcap)",
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get category dimension data overview",
+ "description": "Returns aggregate metrics for the specified dimension filtered by a specific category.",
"parameters": [
{
- "name": "period",
+ "name": "metric",
"in": "path",
"required": true,
- "description": "One of ['7', '30', 'ytd', '365']",
+ "description": "The dimension metric type",
"schema": {
"type": "string",
- "example": "30"
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "category",
+ "in": "path",
+ "required": true,
+ "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
+ "schema": {
+ "type": "string",
+ "example": "dexs"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
}
}
],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Category dimension metrics overview",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "date": {
- "type": "integer",
- "description": "Date timestamp"
- },
- "Analytics": {
- "type": "number",
- "description": "Analytics category performance"
- },
- "Artificial Intelligence (AI)": {
- "type": "number",
- "description": "AI category performance"
- },
- "Bitcoin": {
- "type": "number",
- "description": "Bitcoin category performance"
- },
- "Bridge Governance Tokens": {
- "type": "number",
- "description": "Bridge governance tokens category performance"
- },
- "Centralized Exchange (CEX) Token": {
- "type": "number",
- "description": "CEX token category performance"
- },
- "Data Availability": {
- "type": "number",
- "description": "Data availability category performance"
- },
- "Decentralized Finance (DeFi)": {
- "type": "number",
- "description": "DeFi category performance"
- },
- "Decentralized Identifier (DID)": {
- "type": "number",
- "description": "DID category performance"
- },
- "DePIN": {
- "type": "number",
- "description": "DePIN category performance"
- },
- "Ethereum": {
- "type": "number",
- "description": "Ethereum category performance"
- },
- "Gaming (GameFi)": {
- "type": "number",
- "description": "Gaming category performance"
- },
- "Liquid Staking Governance Tokens": {
- "type": "number",
- "description": "Liquid staking governance tokens category performance"
- },
- "Meme": {
- "type": "number",
- "description": "Meme category performance"
- },
- "NFT Marketplace": {
- "type": "number",
- "description": "NFT marketplace category performance"
- },
- "Oracle": {
- "type": "number",
- "description": "Oracle category performance"
- },
- "PolitiFi": {
- "type": "number",
- "description": "PolitiFi category performance"
- },
- "Prediction Markets": {
- "type": "number",
- "description": "Prediction markets category performance"
- },
- "Real World Assets (RWA)": {
- "type": "number",
- "description": "RWA category performance"
- },
- "Rollup": {
- "type": "number",
- "description": "Rollup category performance"
- },
- "Smart Contract Platform": {
- "type": "number",
- "description": "Smart contract platform category performance"
+ "type": "object",
+ "properties": {
+ "allChains": {
+ "type": "array",
+ "items": {
+ "type": "string"
},
- "SocialFi": {
- "type": "number",
- "description": "SocialFi category performance"
+ "example": ["Ethereum", "Solana", "BSC", "Base"]
+ },
+ "total24h": {
+ "type": "number",
+ "example": 42000000
+ },
+ "total48hto24h": {
+ "type": "number",
+ "example": 38000000
+ },
+ "total7d": {
+ "type": "number",
+ "example": 280000000
+ },
+ "total14dto7d": {
+ "type": "number",
+ "example": 260000000
+ },
+ "total60dto30d": {
+ "type": "number",
+ "example": 1100000000
+ },
+ "total30d": {
+ "type": "number",
+ "example": 1200000000
+ },
+ "total1y": {
+ "type": "number",
+ "example": 15000000000
+ },
+ "change_1d": {
+ "type": "number",
+ "example": 10.5
+ },
+ "change_7d": {
+ "type": "number",
+ "example": 7.8
+ },
+ "change_1m": {
+ "type": "number",
+ "example": 9.1
+ },
+ "change_7dover7d": {
+ "type": "number",
+ "example": 5.2
+ },
+ "change_30dover30d": {
+ "type": "number",
+ "example": 8.3
+ },
+ "category": {
+ "type": "string",
+ "example": "Dexs"
+ },
+ "allCategories": {
+ "type": "array",
+ "items": {
+ "type": "string"
},
- "Solana": {
- "type": "number",
- "description": "Solana category performance"
- }
- }
- }
- },
- "example": [
- {
- "date": 1751846400,
- "Analytics": 0,
- "Artificial Intelligence (AI)": 0,
- "Bitcoin": 0,
- "Bridge Governance Tokens": 0,
- "Centralized Exchange (CEX) Token": 0,
- "Data Availability": 0,
- "Decentralized Finance (DeFi)": 0,
- "Decentralized Identifier (DID)": 0,
- "DePIN": 0,
- "Ethereum": 0,
- "Gaming (GameFi)": 0,
- "Liquid Staking Governance Tokens": 0,
- "Meme": 0,
- "NFT Marketplace": 0,
- "Oracle": 0,
- "PolitiFi": 0,
- "Prediction Markets": 0,
- "Real World Assets (RWA)": 0,
- "Rollup": 0,
- "Smart Contract Platform": 0,
- "SocialFi": 0,
- "Solana": 0
- }
- ]
- }
- }
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await proClient.etfs.getFdvPerformance('30')"
+ "example": ["Dexs", "Lending", "Bridge", "Derivatives"]
+ }
+ }
+ }
+ }
+ }
},
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = pro_client.etfs.getFdvPerformance('30')"
+ "404": {
+ "description": "Not found"
}
- ]
+ }
}
},
- "/bridges/bridges": {
+ "/api/v2/chart/{metric}/category/{category}": {
"get": {
- "tags": ["bridges"],
- "summary": "List all bridges along with summaries of recent bridge volumes.",
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get category historical timeseries chart data",
+ "description": "Returns an array of [timestamp, value] pairs for the metric filtered by a specific category.",
"parameters": [
{
- "name": "includeChains",
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "category",
+ "in": "path",
+ "required": true,
+ "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
+ "schema": {
+ "type": "string",
+ "example": "dexs"
+ }
+ },
+ {
+ "name": "dataType",
"in": "query",
"required": false,
- "description": "set whether to include current previous day volume breakdown by chain",
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
"schema": {
- "type": "boolean",
- "example": true
+ "type": "string",
+ "example": "dailyFees"
}
}
],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Array of [timestamp, value] pairs",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "bridges": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "description": "Bridge ID"
- },
- "name": {
- "type": "string",
- "description": "Bridge name"
- },
- "displayName": {
- "type": "string",
- "description": "Bridge display name"
- },
- "icon": {
- "type": "string",
- "description": "Bridge icon"
- },
- "volumePrevDay": {
- "type": "number",
- "description": "Previous day volume"
- },
- "volumePrev2Day": {
- "type": "number",
- "description": "Previous 2 days volume"
- },
- "lastHourlyVolume": {
- "type": "number",
- "description": "Last hourly volume"
- },
- "last24hVolume": {
- "type": "number",
- "description": "Last 24 hours volume"
- },
- "lastDailyVolume": {
- "type": "number",
- "description": "Last daily volume"
- },
- "dayBeforeLastVolume": {
- "type": "number",
- "description": "Day before last volume"
- },
- "weeklyVolume": {
- "type": "number",
- "description": "Weekly volume"
- },
- "monthlyVolume": {
- "type": "number",
- "description": "Monthly volume"
- },
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "description": "Supported chains"
- },
- "destinationChain": {
- "type": "string",
- "description": "Destination chain"
- },
- "url": {
- "type": "string",
- "description": "Bridge URL"
- },
- "slug": {
- "type": "string",
- "description": "Bridge slug"
- }
- }
- },
- "description": "List of bridges"
- }
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "number"
+ },
+ "minItems": 2,
+ "maxItems": 2,
+ "example": [1534550400, 42000000]
}
- },
- "example": {
- "bridges": [
- {
- "id": 80,
- "name": "hyperliquid",
- "displayName": "Hyperliquid",
- "icon": "icons:hyperliquid",
- "volumePrevDay": 245562283.16810948,
- "volumePrev2Day": 205702464.62591228,
- "lastHourlyVolume": 0,
- "last24hVolume": 245562283.16810948,
- "lastDailyVolume": 245562283.16810948,
- "dayBeforeLastVolume": 205702464.62591228,
- "weeklyVolume": 1700279485.290507,
- "monthlyVolume": 3986810177.448681,
- "chains": ["Arbitrum", "Hyperliquid"],
- "destinationChain": "Hyperliquid",
- "url": "https://app.hyperliquid.xyz/trade",
- "slug": "hyperliquid-bridge"
- }
- ]
}
}
}
+ },
+ "404": {
+ "description": "Not found"
}
- },
+ }
+ }
+ },
+ "/api/v2/chart/{metric}/category/{category}/chain-breakdown": {
+ "get": {
+ "tags": ["Dimensions"],
"x-api-plan-only": true,
- "x-codeSamples": [
+ "x-api-beta": true,
+ "summary": "Get category timeseries chart data breakdown by chain",
+ "description": "Returns an array of [timestamp, {chain: value}] pairs showing the metric for a specific category broken down by chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
+ "parameters": [
{
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.bridges.getAll()"
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "category",
+ "in": "path",
+ "required": true,
+ "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
+ "schema": {
+ "type": "string",
+ "example": "dexs"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, chainBreakdown] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "example": [
+ [
+ 1534550400,
+ {
+ "Ethereum": 30000000,
+ "Solana": 12000000
+ }
+ ],
+ [
+ 1534636800,
+ {
+ "Ethereum": 31000000,
+ "Solana": 12500000
+ }
+ ]
+ ]
+ }
+ }
+ }
},
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.bridges.getAll()"
+ "404": {
+ "description": "Not found"
}
- ]
+ }
}
},
- "/bridges/bridge/{id}": {
+ "/api/v2/chart/{metric}/category/{category}/protocol-breakdown": {
"get": {
- "tags": ["bridges"],
- "summary": "Get summary of bridge volume and volume breakdown by chain",
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get category timeseries chart data breakdown by protocol",
+ "description": "Returns an array of [timestamp, {protocol: value}] pairs showing the metric for a specific category broken down by protocol.",
"parameters": [
{
- "name": "id",
+ "name": "metric",
"in": "path",
"required": true,
- "description": "bridge ID, you can get these from /bridges",
+ "description": "The dimension metric type",
"schema": {
- "type": "integer",
- "example": 1
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
}
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "integer",
- "description": "Bridge ID"
- },
- "name": {
- "type": "string",
- "description": "Bridge name"
- },
- "displayName": {
- "type": "string",
- "description": "Bridge display name"
- },
- "lastHourlyVolume": {
- "type": "number",
- "description": "Last hourly volume"
- },
- "currentDayVolume": {
- "type": "number",
- "description": "Current day volume"
- },
- "lastDailyVolume": {
- "type": "number",
- "description": "Last daily volume"
- },
- "dayBeforeLastVolume": {
- "type": "number",
- "description": "Day before last volume"
- },
- "weeklyVolume": {
- "type": "number",
- "description": "Weekly volume"
- },
- "monthlyVolume": {
- "type": "number",
- "description": "Monthly volume"
- },
- "lastHourlyTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposits"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawals"
- }
- },
- "description": "Last hourly transactions"
- },
- "currentDayTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposits"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawals"
- }
- },
- "description": "Current day transactions"
- },
- "prevDayTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposits"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawals"
- }
- },
- "description": "Previous day transactions"
- },
- "dayBeforeLastTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposits"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawals"
- }
- },
- "description": "Day before last transactions"
- },
- "weeklyTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposits"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawals"
- }
- },
- "description": "Weekly transactions"
- },
- "monthlyTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposits"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawals"
- }
- },
- "description": "Monthly transactions"
- },
- "chainBreakdown": {
- "type": "object",
- "description": "Volume breakdown by chain"
- },
- "destinationChain": {
- "type": "string",
- "description": "Destination chain"
- }
- }
- },
- "example": {
- "id": 1,
- "name": "polygon",
- "displayName": "Polygon PoS Bridge",
- "lastHourlyVolume": 118020.67633222912,
- "currentDayVolume": 0,
- "lastDailyVolume": 28740605.36474136,
- "dayBeforeLastVolume": 17294645.046479236,
- "weeklyVolume": 71188570.7201651,
- "monthlyVolume": 490635601.59313035,
- "lastHourlyTxs": {
- "deposits": 10,
- "withdrawals": 5
- },
- "currentDayTxs": {
- "deposits": 0,
- "withdrawals": 0
- },
- "prevDayTxs": {
- "deposits": 153,
- "withdrawals": 150
- },
- "dayBeforeLastTxs": {
- "deposits": 173,
- "withdrawals": 195
- },
- "weeklyTxs": {
- "deposits": 2095,
- "withdrawals": 1752
- },
- "monthlyTxs": {
- "deposits": 6945,
- "withdrawals": 5537
- },
- "chainBreakdown": {
- "Polygon": {
- "lastHourlyVolume": 118020.67633222912,
- "currentDayVolume": 0,
- "lastDailyVolume": 28740605.36474136,
- "dayBeforeLastVolume": 17294645.046479236,
- "weeklyVolume": 71188570.7201651,
- "monthlyVolume": 490635601.59313035,
- "last24hVolume": 34766385.06231544,
- "lastHourlyTxs": {
- "deposits": 10,
- "withdrawals": 5
- },
- "currentDayTxs": {
- "deposits": 0,
- "withdrawals": 0
- },
- "prevDayTxs": {
- "deposits": 153,
- "withdrawals": 150
- },
- "dayBeforeLastTxs": {
- "deposits": 173,
- "withdrawals": 195
- },
- "weeklyTxs": {
- "deposits": 2095,
- "withdrawals": 1752
- },
- "monthlyTxs": {
- "deposits": 6945,
- "withdrawals": 5537
+ },
+ {
+ "name": "category",
+ "in": "path",
+ "required": true,
+ "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
+ "schema": {
+ "type": "string",
+ "example": "dexs"
+ }
+ },
+ {
+ "name": "dataType",
+ "in": "query",
+ "required": false,
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
+ "schema": {
+ "type": "string",
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, protocolBreakdown] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "example": [
+ [
+ 1534550400,
+ {
+ "Uniswap V3": 15000000,
+ "Aave": 8000000
}
- },
- "Ethereum": {
- "lastHourlyVolume": 118020.67633222912,
- "currentDayVolume": 0,
- "lastDailyVolume": 28740605.36474136,
- "dayBeforeLastVolume": 17294645.046479236,
- "weeklyVolume": 71188570.7201651,
- "monthlyVolume": 490635601.59313035,
- "last24hVolume": 34766385.06231544,
- "lastHourlyTxs": {
- "deposits": 10,
- "withdrawals": 5
- },
- "currentDayTxs": {
- "deposits": 0,
- "withdrawals": 0
- },
- "prevDayTxs": {
- "deposits": 153,
- "withdrawals": 150
- },
- "dayBeforeLastTxs": {
- "deposits": 173,
- "withdrawals": 195
- },
- "weeklyTxs": {
- "deposits": 2095,
- "withdrawals": 1752
- },
- "monthlyTxs": {
- "deposits": 6945,
- "withdrawals": 5537
+ ],
+ [
+ 1534636800,
+ {
+ "Uniswap V3": 15500000,
+ "Aave": 8200000
}
- }
- },
- "destinationChain": "Polygon"
+ ]
+ ]
}
}
}
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.bridges.getById(1)"
},
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.bridges.getById('')"
+ "404": {
+ "description": "Not found"
}
- ]
+ }
}
},
- "/bridges/bridgevolume/{chain}": {
+ "/api/v2/metrics/{metric}/category/{category}/chain/{chain}": {
"get": {
- "tags": ["bridges"],
- "summary": "Get historical volumes for a bridge, chain, or bridge on a particular chain",
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get category chain dimension data overview",
+ "description": "Returns aggregate metrics for the specified dimension filtered by both category and chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
"parameters": [
+ {
+ "name": "metric",
+ "in": "path",
+ "required": true,
+ "description": "The dimension metric type",
+ "schema": {
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "category",
+ "in": "path",
+ "required": true,
+ "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
+ "schema": {
+ "type": "string",
+ "example": "dexs"
+ }
+ },
{
"name": "chain",
"in": "path",
"required": true,
- "description": "chain slug, you can get these from /chains. Call also use 'all' for volume on all chains.",
+ "description": "chain name",
"schema": {
"type": "string",
"example": "Ethereum"
}
},
{
- "name": "id",
+ "name": "dataType",
"in": "query",
"required": false,
- "description": "bridge ID, you can get these from /bridges",
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
"schema": {
- "type": "integer",
- "example": 2
+ "type": "string",
+ "example": "dailyFees"
}
}
],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Category chain dimension metrics overview",
"content": {
"application/json": {
"schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "date": {
- "type": "string",
- "description": "Date timestamp"
- },
- "depositUSD": {
- "type": "number",
- "description": "Deposit volume in USD"
- },
- "withdrawUSD": {
- "type": "number",
- "description": "Withdrawal volume in USD"
+ "type": "object",
+ "properties": {
+ "allChains": {
+ "type": "array",
+ "items": {
+ "type": "string"
},
- "depositTxs": {
- "type": "integer",
- "description": "Number of deposit transactions"
+ "example": ["Ethereum", "Solana", "BSC", "Base"]
+ },
+ "total24h": {
+ "type": "number",
+ "example": 42000000
+ },
+ "total48hto24h": {
+ "type": "number",
+ "example": 38000000
+ },
+ "total7d": {
+ "type": "number",
+ "example": 280000000
+ },
+ "total14dto7d": {
+ "type": "number",
+ "example": 260000000
+ },
+ "total60dto30d": {
+ "type": "number",
+ "example": 1100000000
+ },
+ "total30d": {
+ "type": "number",
+ "example": 1200000000
+ },
+ "total1y": {
+ "type": "number",
+ "example": 15000000000
+ },
+ "change_1d": {
+ "type": "number",
+ "example": 10.5
+ },
+ "change_7d": {
+ "type": "number",
+ "example": 7.8
+ },
+ "change_1m": {
+ "type": "number",
+ "example": 9.1
+ },
+ "change_7dover7d": {
+ "type": "number",
+ "example": 5.2
+ },
+ "change_30dover30d": {
+ "type": "number",
+ "example": 8.3
+ },
+ "category": {
+ "type": "string",
+ "example": "Dexs"
+ },
+ "allCategories": {
+ "type": "array",
+ "items": {
+ "type": "string"
},
- "withdrawTxs": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
- }
- }
- }
- },
- "example": [
- {
- "date": "1665964800",
- "depositUSD": 11121806.082658675,
- "withdrawUSD": 13970177.335270314,
- "depositTxs": 218,
- "withdrawTxs": 56
- },
- {
- "date": "1666051200",
- "depositUSD": 32940139.204768553,
- "withdrawUSD": 157541586.9492474,
- "depositTxs": 2042,
- "withdrawTxs": 708
- }
- ]
- }
- }
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.bridges.getVolumeByChain('')"
+ "example": ["Dexs", "Lending", "Bridge", "Derivatives"]
+ },
+ "chain": {
+ "type": "string",
+ "example": "Ethereum"
+ }
+ }
+ }
+ }
+ }
},
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.bridges.getVolumeByChain('')"
+ "404": {
+ "description": "Not found"
}
- ]
+ }
}
},
- "/bridges/bridgedaystats/{timestamp}/{chain}": {
+ "/api/v2/chart/{metric}/category/{category}/chain/{chain}": {
"get": {
- "tags": ["bridges"],
- "summary": "Get a 24hr token and address volume breakdown for a bridge",
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get category chain historical timeseries chart data",
+ "description": "Returns an array of [timestamp, value] pairs for the metric filtered by both category and chain. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
"parameters": [
{
- "name": "timestamp",
+ "name": "metric",
"in": "path",
"required": true,
- "description": "Unix timestamp. Data returned will be for the 24hr period starting at 00:00 UTC that the timestamp lands in.",
+ "description": "The dimension metric type",
"schema": {
- "type": "integer",
- "example": 1755561600
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
+ }
+ },
+ {
+ "name": "category",
+ "in": "path",
+ "required": true,
+ "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
+ "schema": {
+ "type": "string",
+ "example": "dexs"
}
},
{
"name": "chain",
"in": "path",
"required": true,
- "description": "chain slug, you can get these from /chains.",
+ "description": "chain name",
"schema": {
"type": "string",
"example": "Ethereum"
}
},
{
- "name": "id",
+ "name": "dataType",
"in": "query",
"required": false,
- "description": "bridge ID, you can get these from /bridges",
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
"schema": {
- "type": "integer",
- "example": 2
+ "type": "string",
+ "example": "dailyFees"
}
}
],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Array of [timestamp, value] pairs",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "date": {
- "type": "integer",
- "description": "Date timestamp"
- },
- "totalTokensDeposited": {
- "type": "object",
- "description": "Total tokens deposited with their details",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "usdValue": {
- "type": "number",
- "description": "USD value of the token"
- },
- "amount": {
- "type": "string",
- "description": "Token amount as string"
- },
- "symbol": {
- "type": "string",
- "description": "Token symbol"
- },
- "decimals": {
- "type": "integer",
- "description": "Token decimals"
- }
- }
- }
- },
- "totalTokensWithdrawn": {
- "type": "object",
- "description": "Total tokens withdrawn with their details",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "usdValue": {
- "type": "number",
- "description": "USD value of the token"
- },
- "amount": {
- "type": "string",
- "description": "Token amount as string"
- },
- "symbol": {
- "type": "string",
- "description": "Token symbol"
- },
- "decimals": {
- "type": "integer",
- "description": "Token decimals"
- }
- }
- }
- },
- "totalAddressDeposited": {
- "type": "object",
- "description": "Total addresses that deposited with their details",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "usdValue": {
- "type": "number",
- "description": "Total USD value deposited by this address"
- },
- "txs": {
- "type": "integer",
- "description": "Number of transactions from this address"
- }
- }
- }
- },
- "totalAddressWithdrawn": {
- "type": "object",
- "description": "Total addresses that withdrew with their details",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "usdValue": {
- "type": "number",
- "description": "Total USD value withdrawn by this address"
- },
- "txs": {
- "type": "integer",
- "description": "Number of transactions from this address"
- }
- }
- }
- }
- }
- },
- "example": {
- "date": 1752796800,
- "totalTokensDeposited": {
- "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": {
- "usdValue": 8538374.477027368,
- "amount": "17379331182",
- "symbol": "USDC",
- "decimals": 6
- },
- "ethereum:0x6De037ef9aD2725EB40118Bb1702EBb27e4Aeb24": {
- "usdValue": 2123785.5869,
- "amount": "2123785.5869",
- "symbol": "RNDR",
- "decimals": 18
- }
- },
- "totalTokensWithdrawn": {
- "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": {
- "usdValue": 3020623.745962119,
- "amount": "14680842655",
- "symbol": "USDC",
- "decimals": 6
- },
- "ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": {
- "usdValue": 2214456.1061736266,
- "amount": "28501633217143430245",
- "symbol": "WETH",
- "decimals": 18
- }
- },
- "totalAddressDeposited": {
- "ethereum:0x3a23F943181408EAC424116Af7b7790c94Cb97a5": {
- "usdValue": 2447787.602843585,
- "txs": 13
- },
- "ethereum:0x348C31025754113F599ccEa72747A726a133799b": {
- "usdValue": 2115000,
- "txs": 1
- }
- },
- "totalAddressWithdrawn": {
- "ethereum:0xb60d0C2E8309518373b40f8Eaa2CAd0d1De3deCb": {
- "usdValue": 1196415.6440843595,
- "txs": 2
+ "type": "array",
+ "items": {
+ "type": "array",
+ "items": {
+ "type": "number"
},
- "ethereum:0x49c3FeaFDdaefC3Bed06F4ff87CE86610C2c1076": {
- "usdValue": 565794.5181076665,
- "txs": 1
- }
+ "minItems": 2,
+ "maxItems": 2,
+ "example": [1534550400, 42000000]
}
}
}
}
- }
- },
- "x-api-plan-only": true,
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.bridges.getDayStats(1704067200, '')"
},
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.bridges.getDayStats(1704067200, '')"
+ "404": {
+ "description": "Not found"
}
- ]
+ }
}
},
- "/bridges/transactions/{id}": {
+ "/api/v2/chart/{metric}/category/{category}/chain/{chain}/protocol-breakdown": {
"get": {
- "tags": ["bridges"],
- "summary": "Get all transactions for a bridge within a date range",
+ "tags": ["Dimensions"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get category chain timeseries chart data breakdown by protocol",
+ "description": "Returns an array of [timestamp, {protocol: value}] pairs showing the metric filtered by both category and chain, broken down by protocol. For bridges, dailyAggregatedVolume and dailyTxCount include incoming plus outgoing activity on each chain; summing chains can count a transfer twice.",
"parameters": [
{
- "name": "id",
+ "name": "metric",
"in": "path",
"required": true,
- "description": "bridge ID, you can get these from /bridges",
- "schema": {
- "type": "integer",
- "example": 1
- }
- },
- {
- "name": "starttimestamp",
- "in": "query",
- "required": false,
- "description": "start timestamp (Unix Timestamp) for date range",
+ "description": "The dimension metric type",
"schema": {
- "type": "integer",
- "example": 1667260800
+ "type": "string",
+ "enum": [
+ "fees",
+ "liquidations",
+ "dexs",
+ "derivatives",
+ "options",
+ "aggregators",
+ "bridge-aggregators",
+ "bridges",
+ "open-interest",
+ "normalized-volume"
+ ],
+ "example": "fees"
}
},
{
- "name": "endtimestamp",
- "in": "query",
- "required": false,
- "description": "end timestamp (Unix timestamp) for date range",
+ "name": "category",
+ "in": "path",
+ "required": true,
+ "description": "category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options')",
"schema": {
- "type": "integer",
- "example": 1667347200
+ "type": "string",
+ "example": "dexs"
}
},
{
- "name": "sourcechain",
- "in": "query",
- "required": false,
- "description": "Returns only transactions that are bridging from the specified source chain.",
+ "name": "chain",
+ "in": "path",
+ "required": true,
+ "description": "chain name",
"schema": {
"type": "string",
- "example": "Polygon"
+ "example": "Ethereum"
}
},
{
- "name": "address",
+ "name": "dataType",
"in": "query",
"required": false,
- "description": "Returns only transactions with specified address as \"from\" or \"to\". Addresses are quried in the form {chain}:{address}, where chain is an identifier such as ethereum, bsc, polygon, avax... .",
+ "description": "Metric-specific data type to return. Supported values per metric:\n- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue\n- **liquidations**: dailyLiquidationsVolume (default), dailyCollateralLiquidated\n- **dexs**: dailyVolume (default), dailyNotionalVolume\n- **derivatives**: dailyVolume (default), dailyNotionalVolume\n- **options**: dailyNotionalVolume (default), dailyPremiumVolume\n- **aggregators**: dailyVolume (default)\n- **bridge-aggregators**: dailyBridgeVolume (default)\n- **bridges**: dailyAggregatedVolume (default), dailyOutgoingVolume, dailyIncomingVolume, dailyTxCount, dailyOutgoingTxCount, dailyIncomingTxCount\n- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd\n- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity\n\nFor bridges, volume values are in USD and TxCount values count transfers. Protocol dailyAggregatedVolume and dailyTxCount use outgoing totals; per-chain values add incoming and outgoing activity. Direction is relative to the chain.",
"schema": {
"type": "string",
- "example": "ethereum:0x69b4B4390Bd1f0aE84E090Fe8af7AbAd2d95Cc8E"
+ "example": "dailyFees"
+ }
+ }
+ ],
+ "responses": {
+ "200": {
+ "description": "Array of [timestamp, protocolBreakdown] pairs",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "example": [
+ [
+ 1534550400,
+ {
+ "Uniswap V3": 15000000,
+ "Aave": 8000000
+ }
+ ],
+ [
+ 1534636800,
+ {
+ "Uniswap V3": 15500000,
+ "Aave": 8200000
+ }
+ ]
+ ]
+ }
+ }
}
},
+ "404": {
+ "description": "Not found"
+ }
+ }
+ }
+ },
+ "/api/v2/metrics/financial-statement/protocol/{protocol}": {
+ "get": {
+ "tags": ["Financial Statements"],
+ "x-api-plan-only": true,
+ "x-api-beta": true,
+ "summary": "Get protocol income statement report",
+ "description": "Returns protocol metadata, methodology details, and aggregated financial statement data (yearly, quarterly, monthly). Each period contains line items such as Gross Protocol Revenue, Cost Of Revenue, Gross Profit, Token Holder Net Income, Incentives, and Earnings, with values and optional label breakdowns.\n\nWhen querying a parent protocol (e.g. `aave`), the response includes a `childProtocols` array with per-version methodology. When querying a child protocol (e.g. `aave-v3`), methodology and breakdownMethodology are at the top level.",
+ "parameters": [
{
- "name": "limit",
- "in": "query",
- "required": false,
- "description": "limit to number of transactions returned, maximum is 6000",
+ "name": "protocol",
+ "in": "path",
+ "required": true,
+ "description": "protocol slug (e.g. aave-v3, hyperliquid)",
"schema": {
- "type": "integer",
- "example": 200
+ "type": "string",
+ "example": "aave-v3"
}
}
],
"responses": {
"200": {
- "description": "successful operation",
+ "description": "Protocol income statement report",
"content": {
"application/json": {
"schema": {
- "oneOf": [
- {
- "type": "object",
- "description": "Bridge information (returned when no query parameters provided)",
- "properties": {
- "id": {
- "type": "integer",
- "description": "Bridge ID"
- },
- "name": {
- "type": "string",
- "description": "Bridge name"
- },
- "displayName": {
- "type": "string",
- "description": "Bridge display name"
- },
- "lastHourlyVolume": {
- "type": "number",
- "description": "Last hourly volume"
- },
- "currentDayVolume": {
- "type": "number",
- "description": "Current day volume"
- },
- "lastDailyVolume": {
- "type": "number",
- "description": "Last daily volume"
- },
- "dayBeforeLastVolume": {
- "type": "number",
- "description": "Day before last volume"
- },
- "weeklyVolume": {
- "type": "number",
- "description": "Weekly volume"
- },
- "monthlyVolume": {
- "type": "number",
- "description": "Monthly volume"
- },
- "lastHourlyTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
- }
- }
- },
- "currentDayTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
- }
- }
- },
- "prevDayTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "string",
+ "description": "Protocol ID. Parent protocols use 'parent#slug' format.",
+ "example": "1599"
+ },
+ "name": {
+ "type": "string",
+ "example": "Aave V3"
+ },
+ "address": {
+ "type": "string",
+ "nullable": true,
+ "example": "0x7fc66500c84a76ad7e9c93437bfc5ac33e2ddae9"
+ },
+ "symbol": {
+ "type": "string",
+ "nullable": true,
+ "example": "AAVE"
+ },
+ "url": {
+ "type": "string",
+ "example": "https://aave.com"
+ },
+ "description": {
+ "type": "string",
+ "example": "Earn interest, borrow assets, and build applications"
+ },
+ "chain": {
+ "type": "string",
+ "nullable": true,
+ "description": "Primary chain (present for child protocols)",
+ "example": "Optimism"
+ },
+ "logo": {
+ "type": "string",
+ "example": "https://icons.llamao.fi/icons/protocols/aave-v3.png"
+ },
+ "audits": {
+ "type": "string",
+ "nullable": true,
+ "example": "2"
+ },
+ "audit_links": {
+ "type": "array",
+ "nullable": true,
+ "items": { "type": "string" },
+ "example": ["https://aave.com/security"]
+ },
+ "category": {
+ "type": "string",
+ "nullable": true,
+ "description": "Protocol category (present for child protocols)",
+ "example": "Lending"
+ },
+ "chains": {
+ "type": "array",
+ "items": { "type": "string" },
+ "example": ["Polygon", "Arbitrum", "Avalanche", "OP Mainnet", "Ethereum", "Base"]
+ },
+ "oraclesBreakdown": {
+ "type": "array",
+ "nullable": true,
+ "description": "Oracles used by the protocol",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string", "example": "Chainlink" },
+ "type": { "type": "string", "example": "Primary" },
+ "proof": { "type": "array", "items": { "type": "string" } }
+ }
+ }
+ },
+ "module": {
+ "type": "string",
+ "nullable": true,
+ "example": "aave-v3"
+ },
+ "twitter": {
+ "type": "string",
+ "nullable": true,
+ "example": "aave"
+ },
+ "github": {
+ "type": "array",
+ "nullable": true,
+ "items": { "type": "string" }
+ },
+ "listedAt": {
+ "type": "integer",
+ "nullable": true,
+ "description": "Unix timestamp when protocol was listed",
+ "example": 1648776877
+ },
+ "parentProtocol": {
+ "type": "string",
+ "nullable": true,
+ "description": "Parent protocol ID (present for child protocols)",
+ "example": "parent#aave"
+ },
+ "dimensions": {
+ "type": "object",
+ "nullable": true,
+ "description": "Available dimension adapters for this protocol",
+ "additionalProperties": {
+ "oneOf": [
+ { "type": "string", "example": "aave-v3" },
+ {
+ "type": "object",
+ "properties": {
+ "adapter": { "type": "string" },
+ "genuineSpikes": { "type": "array" }
}
}
+ ]
+ },
+ "example": {
+ "fees": { "genuineSpikes": [["2024-08-05", "-"]], "adapter": "aave-v3" },
+ "liquidations": "aave-v3"
+ }
+ },
+ "methodology": {
+ "type": "object",
+ "nullable": true,
+ "description": "Maps line item names to descriptions. Present at top level for child protocols, inside childProtocols for parent protocols.",
+ "additionalProperties": { "type": "string" },
+ "example": {
+ "Gross Protocol Revenue": "Include borrow interest, flashloan fee, liquidation fee, penalty paid by borrowers and swap fees from Paraswap.",
+ "Cost Of Revenue": "Amount of fees distributed to suppliers.",
+ "Gross Profit": "Amount of fees go to Aave treasury.",
+ "Token Holder Net Income": "Aave starts buy back AAVE tokens using Aave Treasury after 9th April 2025."
+ }
+ },
+ "breakdownMethodology": {
+ "type": "object",
+ "nullable": true,
+ "description": "Maps line item names to objects mapping label names to descriptions. Present at top level for child protocols, inside childProtocols for parent protocols.",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": { "type": "string" }
+ },
+ "example": {
+ "Gross Protocol Revenue": {
+ "Borrow Interest": "All interest paid by borrowers from all markets (excluding GHO).",
+ "Borrow Interest GHO": "All interest paid by borrowers from GHO only.",
+ "Liquidation Fees": "Fees from liquidation penalty and bonuses.",
+ "Flashloan Fees": "Flashloan fees paid by flashloan borrowers and executors.",
+ "Paraswap Partner Fees": "Swap fees share from Paraswap from users by using Aave frontend."
},
- "dayBeforeLastTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
- }
- }
+ "Cost Of Revenue": {
+ "Borrow Interest": "Amount of interest distributed to lenders from all markets (excluding GHO).",
+ "Liquidation Fees": "Fees from liquidation penalty and bonuses are distributed to lenders."
},
- "weeklyTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
- }
- }
+ "Gross Profit": {
+ "Borrow Interest": "A portion of interest paid by borrowers from all markets (excluding GHO).",
+ "Borrow Interest GHO": "All 100% interest paid by GHO borrowers.",
+ "Liquidation Fees": "A portion of fees from liquidation penalty and bonuses."
},
- "monthlyTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
+ "Token Holder Net Income": {
+ "Token Buy Back": "Aave starts buy back AAVE tokens using Aave Treasury after 9th April 2025."
+ }
+ }
+ },
+ "methodologyURL": {
+ "type": "string",
+ "nullable": true,
+ "example": "https://github.com/DefiLlama/dimension-adapters/blob/master/fees/aave-v3.ts"
+ },
+ "tvlCodePath": {
+ "type": "string",
+ "nullable": true,
+ "example": "https://github.com/DefiLlama/DefiLlama-Adapters/blob/main/projects/aave-v3/index.js"
+ },
+ "hallmarks": {
+ "type": "array",
+ "nullable": true,
+ "description": "Notable events as [timestamp, description] pairs",
+ "items": {
+ "type": "array",
+ "items": {}
+ },
+ "example": [[1650412800, "Start AVAX Rewards"], [1659571200, "Start OP Rewards"]]
+ },
+ "linkedProtocols": {
+ "type": "array",
+ "items": { "type": "string" },
+ "example": ["Aave", "Aave V2", "Aave V3"]
+ },
+ "childProtocols": {
+ "type": "array",
+ "nullable": true,
+ "description": "Child protocol versions with their methodology details. Only present for parent protocols.",
+ "items": {
+ "type": "object",
+ "properties": {
+ "name": { "type": "string", "example": "Aave V3" },
+ "defillamaId": { "type": "string", "example": "1599" },
+ "displayName": { "type": "string" },
+ "methodologyURL": { "type": "string", "nullable": true },
+ "methodology": {
+ "type": "object",
+ "additionalProperties": { "type": "string" }
+ },
+ "breakdownMethodology": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "additionalProperties": { "type": "string" }
}
}
- },
- "chainBreakdown": {
+ }
+ }
+ },
+ "hasLabelBreakdown": {
+ "type": "boolean",
+ "example": true
+ },
+ "defillamaId": {
+ "type": "string",
+ "example": "1599"
+ },
+ "displayName": {
+ "type": "string",
+ "example": "Aave V3"
+ },
+ "slug": {
+ "type": "string",
+ "example": "aave-v3"
+ },
+ "protocolType": {
+ "type": "string",
+ "example": "protocol"
+ },
+ "aggregates": {
+ "type": "object",
+ "description": "Financial data aggregated by time period",
+ "properties": {
+ "yearly": {
"type": "object",
+ "description": "Keyed by year (e.g. '2024'). Each value is an object of line items.",
"additionalProperties": {
"type": "object",
- "properties": {
- "lastHourlyVolume": {
- "type": "number",
- "description": "Last hourly volume"
- },
- "currentDayVolume": {
- "type": "number",
- "description": "Current day volume"
- },
- "lastDailyVolume": {
- "type": "number",
- "description": "Last daily volume"
- },
- "dayBeforeLastVolume": {
- "type": "number",
- "description": "Day before last volume"
- },
- "weeklyVolume": {
- "type": "number",
- "description": "Weekly volume"
- },
- "monthlyVolume": {
- "type": "number",
- "description": "Monthly volume"
- },
- "last24hVolume": {
- "type": "number",
- "description": "Last 24 hour volume"
- },
- "lastHourlyTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
- }
- }
- },
- "currentDayTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
+ "description": "Financial line items for a time period. Common line items include Gross Protocol Revenue, Cost Of Revenue, Gross Profit, Token Holder Net Income, Incentives, and Earnings. Each line item has a value and optional by-label breakdown.",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "number",
+ "description": "Total USD value for this line item in the period",
+ "example": 456472580
+ },
+ "by-label": {
+ "type": "object",
+ "description": "Breakdown by label (e.g. Borrow Interest, Liquidation Fees, Flash Loans). Not present for all line items.",
+ "nullable": true,
+ "additionalProperties": { "type": "number" },
+ "example": {
+ "Borrow Interest": 416862749,
+ "Liquidation Fees": 31413361,
+ "Flashloan Fees": 1441
}
}
- },
- "prevDayTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
- }
+ }
+ },
+ "example": {
+ "Gross Protocol Revenue": {
+ "value": 456472580,
+ "by-label": {
+ "Borrow Interest": 416862749,
+ "Liquidation Fees": 31413361,
+ "Flashloan Fees": 1441
}
},
- "dayBeforeLastTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
- }
- }
+ "Cost Of Revenue": {
+ "value": 384670312,
+ "by-label": { "Borrow Interest": 356424169, "Liquidation Fees": 28246110 }
},
- "weeklyTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
- }
- }
+ "Gross Profit": { "value": 71802305 },
+ "Token Holder Net Income": { "value": 0 },
+ "Incentives": {
+ "value": 4895806.72,
+ "by-label": { "stkAAVE Rewards": 19461161.65, "Lending/Borrowing Rewards": 1197840.72 }
},
- "monthlyTxs": {
- "type": "object",
- "properties": {
- "deposits": {
- "type": "integer",
- "description": "Number of deposit transactions"
- },
- "withdrawals": {
- "type": "integer",
- "description": "Number of withdrawal transactions"
- }
+ "Earnings": { "value": 66906498.28 }
+ }
+ }
+ },
+ "quarterly": {
+ "type": "object",
+ "description": "Keyed by quarter (e.g. '2024-Q1'). Each value is an object of line items.",
+ "additionalProperties": {
+ "type": "object",
+ "description": "Financial line items for a time period.",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "number",
+ "description": "Total USD value for this line item in the period",
+ "example": 456472580
+ },
+ "by-label": {
+ "type": "object",
+ "description": "Breakdown by label. Not present for all line items.",
+ "nullable": true,
+ "additionalProperties": { "type": "number" }
}
}
}
}
},
- "destinationChain": {
- "type": "string",
- "description": "Destination chain"
- }
- }
- },
- {
- "type": "array",
- "description": "Transaction list (returned when query parameters provided)",
- "items": {
- "type": "object",
- "properties": {
- "tx_hash": {
- "type": "string",
- "description": "Transaction hash"
- },
- "ts": {
- "type": "string",
- "description": "Timestamp in ISO format"
- },
- "tx_block": {
- "type": "integer",
- "description": "Block number"
- },
- "tx_from": {
- "type": "string",
- "description": "From address"
- },
- "tx_to": {
- "type": "string",
- "description": "To address"
- },
- "token": {
- "type": "string",
- "description": "Token contract address"
- },
- "amount": {
- "type": "string",
- "description": "Transaction amount"
- },
- "chain": {
- "type": "string",
- "description": "Blockchain name"
- },
- "bridge_name": {
- "type": "string",
- "description": "Bridge name"
- },
- "usd_value": {
- "type": ["number", "null"],
- "description": "USD value of transaction"
- },
- "sourceChain": {
- "type": "string",
- "description": "Source chain name"
+ "monthly": {
+ "type": "object",
+ "description": "Keyed by month (e.g. '2024-01'). Each value is an object of line items.",
+ "additionalProperties": {
+ "type": "object",
+ "description": "Financial line items for a time period.",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "value": {
+ "type": "number",
+ "description": "Total USD value for this line item in the period",
+ "example": 456472580
+ },
+ "by-label": {
+ "type": "object",
+ "description": "Breakdown by label. Not present for all line items.",
+ "nullable": true,
+ "additionalProperties": { "type": "number" }
+ }
+ }
+ }
}
}
}
}
- ]
- },
- "example": {
- "id": 1,
- "name": "polygon",
- "displayName": "Polygon PoS Bridge",
- "lastHourlyVolume": 118020.67633222912,
- "currentDayVolume": 0,
- "lastDailyVolume": 28740605.36474136,
- "dayBeforeLastVolume": 17294645.046479236,
- "weeklyVolume": 71188570.7201651,
- "monthlyVolume": 490635601.59313035,
- "lastHourlyTxs": {
- "deposits": 10,
- "withdrawals": 5
- },
- "currentDayTxs": {
- "deposits": 0,
- "withdrawals": 0
- },
- "prevDayTxs": {
- "deposits": 153,
- "withdrawals": 150
- },
- "dayBeforeLastTxs": {
- "deposits": 173,
- "withdrawals": 195
- },
- "weeklyTxs": {
- "deposits": 2095,
- "withdrawals": 1752
- },
- "monthlyTxs": {
- "deposits": 6945,
- "withdrawals": 5537
- },
- "chainBreakdown": {
- "Polygon": {
- "lastHourlyVolume": 118020.67633222912,
- "currentDayVolume": 0,
- "lastDailyVolume": 28740605.36474136,
- "dayBeforeLastVolume": 17294645.046479236,
- "weeklyVolume": 71188570.7201651,
- "monthlyVolume": 490635601.59313035,
- "last24hVolume": 34766385.06231544,
- "lastHourlyTxs": {
- "deposits": 10,
- "withdrawals": 5
- },
- "currentDayTxs": {
- "deposits": 0,
- "withdrawals": 0
+ }
+ }
+ }
+ }
+ },
+ "404": {
+ "description": "Protocol not found"
+ }
+ }
+ }
+ },
+ "/etfs/snapshot": {
+ "get": {
+ "tags": ["ETFs"],
+ "summary": "Get ETFs and their metrics (aum, flows, fees...)",
+ "responses": {
+ "200": {
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "ticker": {
+ "type": "string",
+ "description": "ETF ticker symbol"
},
- "prevDayTxs": {
- "deposits": 153,
- "withdrawals": 150
+ "timestamp": {
+ "type": "integer",
+ "description": "Current timestamp"
},
- "dayBeforeLastTxs": {
- "deposits": 173,
- "withdrawals": 195
+ "asset": {
+ "type": "string",
+ "description": "Asset name"
},
- "weeklyTxs": {
- "deposits": 2095,
- "withdrawals": 1752
+ "issuer": {
+ "type": "string",
+ "description": "ETF issuer name"
},
- "monthlyTxs": {
- "deposits": 6945,
- "withdrawals": 5537
- }
- },
- "Ethereum": {
- "lastHourlyVolume": 118020.67633222912,
- "currentDayVolume": 0,
- "lastDailyVolume": 28740605.36474136,
- "dayBeforeLastVolume": 17294645.046479236,
- "weeklyVolume": 71188570.7201651,
- "monthlyVolume": 490635601.59313035,
- "last24hVolume": 34766385.06231544,
- "lastHourlyTxs": {
- "deposits": 10,
- "withdrawals": 5
+ "etf_name": {
+ "type": "string",
+ "description": "Full ETF name"
},
- "currentDayTxs": {
- "deposits": 0,
- "withdrawals": 0
+ "custodian": {
+ "type": "string",
+ "description": "Custodian name"
},
- "prevDayTxs": {
- "deposits": 153,
- "withdrawals": 150
+ "pct_fee": {
+ "type": "number",
+ "description": "Percentage fee"
},
- "dayBeforeLastTxs": {
- "deposits": 173,
- "withdrawals": 195
+ "url": {
+ "type": "string",
+ "description": "ETF URL"
},
- "weeklyTxs": {
- "deposits": 2095,
- "withdrawals": 1752
+ "flows": {
+ "type": "number",
+ "description": "Net flows"
},
- "monthlyTxs": {
- "deposits": 6945,
- "withdrawals": 5537
+ "aum": {
+ "type": "number",
+ "description": "Assets under management"
+ },
+ "volume": {
+ "type": "number",
+ "description": "Trading volume"
}
}
- },
- "destinationChain": "Polygon"
- }
+ }
+ },
+ "example": [
+ {
+ "ticker": "IBIT",
+ "timestamp": 1755612389,
+ "asset": "bitcoin",
+ "issuer": "Blackrock",
+ "etf_name": "iShares Bitcoin Trust",
+ "custodian": "Coinbase",
+ "pct_fee": 0.25,
+ "url": "https://www.blackrock.com/us/individual/products/333011/ishares-bitcoin-trust",
+ "flows": -68700000,
+ "aum": 87276718199,
+ "volume": 453293317.84999996
+ }
+ ]
}
}
}
@@ -14830,39 +14458,54 @@
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.bridges.getTransactions(1)"
+ "source": "const result = await proClient.etfs.getOverview()"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.bridges.getTransactions('')"
+ "source": "result = pro_client.etfs.getOverview()"
}
]
}
},
- "/usage/{YOUR_API_KEY}": {
+ "/etfs/flows": {
"get": {
- "tags": ["meta"],
- "summary": "Get amount of credits left in the api key, these reset on the 1st of each month",
- "servers": [
- {
- "url": "https://pro-api.llama.fi"
- }
- ],
- "parameters": [
- {
- "name": "YOUR_API_KEY",
- "in": "path",
- "required": true,
- "description": "Your DefiLlama API plan key. For this endpoint only, the key goes at the end of the path.",
- "schema": {
- "type": "string"
- }
- }
- ],
+ "tags": ["ETFs"],
+ "summary": "Historical Flows at the Asset Level",
"responses": {
"200": {
- "description": "credits left"
+ "description": "successful operation",
+ "content": {
+ "application/json": {
+ "schema": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "gecko_id": {
+ "type": "string",
+ "description": "CoinGecko ID"
+ },
+ "day": {
+ "type": "string",
+ "description": "Day"
+ },
+ "total_flow_usd": {
+ "type": "number",
+ "description": "Sum of all USD flows per asset"
+ }
+ }
+ }
+ },
+ "example": [
+ {
+ "gecko_id": "bitcoin",
+ "day": "2024-01-11T00:00:00.000Z",
+ "total_flow_usd": 655300000
+ }
+ ]
+ }
+ }
}
},
"x-api-plan-only": true,
@@ -14870,30 +14513,29 @@
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await proClient.account.getUsage()"
+ "source": "const result = await proClient.etfs.getHistory()"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = pro_client.account.getUsage()"
+ "source": "result = pro_client.etfs.getHistory()"
}
]
}
},
- "/coins/prices/current/{coins}": {
+ "/fdv/performance/{period}": {
"get": {
- "tags": ["coins"],
- "summary": "Get current prices of tokens by contract address",
- "description": "The goal of this API is to price as many tokens as possible, including exotic ones that never get traded, which makes them impossible to price by looking at markets.\n\nThe base of our data are prices pulled from coingecko, which is then extended through multiple means:\n- We price all bridged tokens by using the price of the token in it's original chain, so we fetch all bridged versions of USDC on arbitrum, fantom, avax... and price all them using the price for the token on Ethereum, which we know. Right now we support 10 different bridging protocols.\n- We have multiple adapters to price specialized sets of tokens by running custom code:\n - We price yearn's yToken LPs by checking how much underlying token can be withdrawn for each LP\n - Aave, compound and euler LP tokens are also priced based on their relationship against underlying tokens\n - Uniswap, curve, balancer and stargate LPs are priced using the underlying tokens in each pair\n - GMX's GLP token is priced based on the value of tokens given on withdrawal (which includes calculations based on trader's PnL)\n \n - Synthetix tokens are priced using forex prices of the coin they are pegged to\n- For tokens that we haven't been able to price in any other way, we find the pool with most liquidity for each on uniswap, curve and serum and then use the prices provided on those exchanges.\n \n Unlike all the other tokens, we can't confirm that these prices are correct, so we only ingest the ones that have sufficient liquidity and, even in that case, we attach a `confidence` value to them that is related to the depth of liquidity and which represents our confidence in the quality of each price. API consumers can choose to filter out prices with low confidence values.\n \n Our API server is fully open source and we are constantly adding more pricing adapters, extending the amount of tokens we support.\n \nTokens are queried using {chain}:{address}, where chain is an identifier such as ethereum, bsc, polygon, avax... You can also get tokens by coingecko id by setting `coingecko` as the chain, eg: coingecko:ethereum, coingecko:bitcoin. Examples:\n - ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1\n - bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878\n - coingecko:ethereum\n - arbitrum:0x4277f8f2c384827b5273592ff7cebd9f2c1ac258\n",
+ "tags": ["narratives"],
+ "summary": "Get chart of narratives based on category performance (with individual coins weighted by mcap)",
"parameters": [
{
- "name": "coins",
+ "name": "period",
"in": "path",
"required": true,
- "description": "set of comma-separated tokens defined as {chain}:{address}",
+ "description": "One of ['7', '30', 'ytd', '365']",
"schema": {
"type": "string",
- "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
+ "example": "30"
}
}
],
@@ -14903,168 +14545,164 @@
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "coins": {
- "type": "object",
- "properties": {
- "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
- "type": "object",
- "required": ["price", "symbol", "timestamp"],
- "properties": {
- "decimals": {
- "type": "number",
- "description": "Token decimals. Omitted for coingecko-native assets (e.g. coingecko:ethereum).",
- "example": 8
- },
- "price": {
- "type": "number",
- "example": 0.022053735051098835
- },
- "symbol": {
- "type": "string",
- "example": "cDAI"
- },
- "timestamp": {
- "type": "number",
- "example": 0.99
- },
- "confidence": {
- "type": "number",
- "description": "Confidence score between 0 and 1 indicating the reliability of the price.",
- "example": 0.99
- }
- }
- }
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "integer",
+ "description": "Date timestamp"
+ },
+ "Analytics": {
+ "type": "number",
+ "description": "Analytics category performance"
+ },
+ "Artificial Intelligence (AI)": {
+ "type": "number",
+ "description": "AI category performance"
+ },
+ "Bitcoin": {
+ "type": "number",
+ "description": "Bitcoin category performance"
+ },
+ "Bridge Governance Tokens": {
+ "type": "number",
+ "description": "Bridge governance tokens category performance"
+ },
+ "Centralized Exchange (CEX) Token": {
+ "type": "number",
+ "description": "CEX token category performance"
+ },
+ "Data Availability": {
+ "type": "number",
+ "description": "Data availability category performance"
+ },
+ "Decentralized Finance (DeFi)": {
+ "type": "number",
+ "description": "DeFi category performance"
+ },
+ "Decentralized Identifier (DID)": {
+ "type": "number",
+ "description": "DID category performance"
+ },
+ "DePIN": {
+ "type": "number",
+ "description": "DePIN category performance"
+ },
+ "Ethereum": {
+ "type": "number",
+ "description": "Ethereum category performance"
+ },
+ "Gaming (GameFi)": {
+ "type": "number",
+ "description": "Gaming category performance"
+ },
+ "Liquid Staking Governance Tokens": {
+ "type": "number",
+ "description": "Liquid staking governance tokens category performance"
+ },
+ "Meme": {
+ "type": "number",
+ "description": "Meme category performance"
+ },
+ "NFT Marketplace": {
+ "type": "number",
+ "description": "NFT marketplace category performance"
+ },
+ "Oracle": {
+ "type": "number",
+ "description": "Oracle category performance"
+ },
+ "PolitiFi": {
+ "type": "number",
+ "description": "PolitiFi category performance"
+ },
+ "Prediction Markets": {
+ "type": "number",
+ "description": "Prediction markets category performance"
+ },
+ "Real World Assets (RWA)": {
+ "type": "number",
+ "description": "RWA category performance"
+ },
+ "Rollup": {
+ "type": "number",
+ "description": "Rollup category performance"
+ },
+ "Smart Contract Platform": {
+ "type": "number",
+ "description": "Smart contract platform category performance"
+ },
+ "SocialFi": {
+ "type": "number",
+ "description": "SocialFi category performance"
+ },
+ "Solana": {
+ "type": "number",
+ "description": "Solana category performance"
}
}
}
- }
- }
- }
- },
- "502": {
- "description": "Internal error"
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.prices.getCurrentPrices([''])"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.prices.getCurrentPrices([''])"
- }
- ]
- }
- },
- "/coins/prices/historical/{timestamp}/{coins}": {
- "get": {
- "tags": ["coins"],
- "summary": "Get historical prices of tokens by contract address",
- "description": "See /prices/current for explanation on how prices are sourced.",
- "parameters": [
- {
- "name": "coins",
- "in": "path",
- "required": true,
- "description": "set of comma-separated tokens defined as {chain}:{address}",
- "schema": {
- "type": "string",
- "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
- }
- },
- {
- "name": "timestamp",
- "in": "path",
- "required": true,
- "description": "UNIX timestamp of time when you want historical prices",
- "schema": {
- "type": "number",
- "example": 1648680149
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "coins": {
- "type": "object",
- "properties": {
- "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
- "type": "object",
- "required": ["price", "symbol", "timestamp"],
- "properties": {
- "decimals": {
- "type": "number",
- "description": "Token decimals. Omitted for coingecko-native assets (e.g. coingecko:ethereum).",
- "example": 8
- },
- "price": {
- "type": "number",
- "example": 0.022053735051098835
- },
- "symbol": {
- "type": "string",
- "example": "cDAI"
- },
- "timestamp": {
- "type": "number",
- "example": 1648680149
- },
- "confidence": {
- "type": "number",
- "description": "Confidence score between 0 and 1 indicating the reliability of the price.",
- "example": 0.99
- }
- }
- }
- }
- }
+ },
+ "example": [
+ {
+ "date": 1751846400,
+ "Analytics": 0,
+ "Artificial Intelligence (AI)": 0,
+ "Bitcoin": 0,
+ "Bridge Governance Tokens": 0,
+ "Centralized Exchange (CEX) Token": 0,
+ "Data Availability": 0,
+ "Decentralized Finance (DeFi)": 0,
+ "Decentralized Identifier (DID)": 0,
+ "DePIN": 0,
+ "Ethereum": 0,
+ "Gaming (GameFi)": 0,
+ "Liquid Staking Governance Tokens": 0,
+ "Meme": 0,
+ "NFT Marketplace": 0,
+ "Oracle": 0,
+ "PolitiFi": 0,
+ "Prediction Markets": 0,
+ "Real World Assets (RWA)": 0,
+ "Rollup": 0,
+ "Smart Contract Platform": 0,
+ "SocialFi": 0,
+ "Solana": 0
}
- }
+ ]
}
}
- },
- "502": {
- "description": "Internal error"
}
},
+ "x-api-plan-only": true,
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.prices.getHistoricalPrices(1704067200, [''])"
+ "source": "const result = await proClient.etfs.getFdvPerformance('30')"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.prices.getHistoricalPrices(1704067200, [''])"
+ "source": "result = pro_client.etfs.getFdvPerformance('30')"
}
]
}
},
- "/coins/batchHistorical": {
+ "/bridges/bridges": {
"get": {
- "tags": ["coins"],
- "summary": "Get historical prices for multiple tokens at multiple different timestamps",
+ "tags": ["bridges"],
+ "summary": "List all bridges along with summaries of recent bridge volumes.",
"parameters": [
{
- "name": "coins",
+ "name": "includeChains",
"in": "query",
- "required": true,
- "description": "object where keys are coins in the form {chain}:{address}, and values are arrays of requested timestamps",
+ "required": false,
+ "description": "set whether to include current previous day volume breakdown by chain",
"schema": {
- "type": "string",
- "example": "{\"avax:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e\": [1666876743, 1666862343], \"coingecko:ethereum\": [1666869543, 1666862343]}\n"
+ "type": "boolean",
+ "example": true
}
}
],
@@ -15076,117 +14714,138 @@
"schema": {
"type": "object",
"properties": {
- "coins": {
- "type": "object",
- "properties": {
- "avax:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e": {
- "type": "object",
- "properties": {
- "symbol": {
- "type": "string",
- "example": "USDC"
- },
- "prices": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number",
- "example": 1666876674
- },
- "price": {
- "type": "number",
- "example": 0.999436
- },
- "confidence": {
- "type": "number",
- "example": 0.99
- }
- }
- }
- }
+ "bridges": {
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Bridge ID"
+ },
+ "name": {
+ "type": "string",
+ "description": "Bridge name"
+ },
+ "displayName": {
+ "type": "string",
+ "description": "Bridge display name"
+ },
+ "icon": {
+ "type": "string",
+ "description": "Bridge icon"
+ },
+ "volumePrevDay": {
+ "type": "number",
+ "description": "Previous day volume"
+ },
+ "volumePrev2Day": {
+ "type": "number",
+ "description": "Previous 2 days volume"
+ },
+ "lastHourlyVolume": {
+ "type": "number",
+ "description": "Last hourly volume"
+ },
+ "last24hVolume": {
+ "type": "number",
+ "description": "Last 24 hours volume"
+ },
+ "lastDailyVolume": {
+ "type": "number",
+ "description": "Last daily volume"
+ },
+ "dayBeforeLastVolume": {
+ "type": "number",
+ "description": "Day before last volume"
+ },
+ "weeklyVolume": {
+ "type": "number",
+ "description": "Weekly volume"
+ },
+ "monthlyVolume": {
+ "type": "number",
+ "description": "Monthly volume"
+ },
+ "chains": {
+ "type": "array",
+ "items": {
+ "type": "string"
+ },
+ "description": "Supported chains"
+ },
+ "destinationChain": {
+ "type": "string",
+ "description": "Destination chain"
+ },
+ "url": {
+ "type": "string",
+ "description": "Bridge URL"
+ },
+ "slug": {
+ "type": "string",
+ "description": "Bridge slug"
}
}
- }
+ },
+ "description": "List of bridges"
}
}
+ },
+ "example": {
+ "bridges": [
+ {
+ "id": 80,
+ "name": "hyperliquid",
+ "displayName": "Hyperliquid",
+ "icon": "icons:hyperliquid",
+ "volumePrevDay": 245562283.16810948,
+ "volumePrev2Day": 205702464.62591228,
+ "lastHourlyVolume": 0,
+ "last24hVolume": 245562283.16810948,
+ "lastDailyVolume": 245562283.16810948,
+ "dayBeforeLastVolume": 205702464.62591228,
+ "weeklyVolume": 1700279485.290507,
+ "monthlyVolume": 3986810177.448681,
+ "chains": ["Arbitrum", "Hyperliquid"],
+ "destinationChain": "Hyperliquid",
+ "url": "https://app.hyperliquid.xyz/trade",
+ "slug": "hyperliquid-bridge"
+ }
+ ]
}
}
}
- },
- "502": {
- "description": "Internal error"
}
},
+ "x-api-plan-only": true,
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.prices.getBatchHistoricalPrices({ '': [1704067200] })"
+ "source": "const result = await client.bridges.getAll()"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.prices.getBatchHistoricalPrices([''], '')"
+ "source": "result = client.bridges.getAll()"
}
]
}
},
- "/coins/chart/{coins}": {
+ "/bridges/bridge/{id}": {
"get": {
- "tags": ["coins"],
- "summary": "Get token prices at regular time intervals",
- "description": "Strings accepted by period:\nCan use regular chart candle notion like '4h' etc where:\nW = week, D = day, H = hour, M = minute (not case sensitive)\n",
+ "tags": ["bridges"],
+ "summary": "Get summary of bridge volume and volume breakdown by chain",
"parameters": [
{
- "name": "coins",
+ "name": "id",
"in": "path",
"required": true,
- "description": "set of comma-separated tokens defined as {chain}:{address}",
- "schema": {
- "type": "string",
- "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
- }
- },
- {
- "name": "start",
- "in": "query",
- "required": false,
- "description": "unix timestamp of earliest data point requested",
- "schema": {
- "type": "number",
- "example": 1664364537
- }
- },
- {
- "name": "end",
- "in": "query",
- "required": false,
- "description": "unix timestamp of latest data point requested",
- "schema": {
- "type": "number",
- "example": null
- }
- },
- {
- "name": "span",
- "in": "query",
- "required": false,
- "description": "number of data points returned, defaults to 0",
- "schema": {
- "type": "number",
- "example": 10
- }
- },
- {
- "name": "period",
- "in": "query",
- "required": false,
- "description": "duration between data points, defaults to 24 hours",
+ "description": "bridge ID, you can get these from /bridges",
"schema": {
- "type": "string",
- "example": "2d"
+ "type": "integer",
+ "example": 1
}
}
],
@@ -15198,170 +14857,282 @@
"schema": {
"type": "object",
"properties": {
- "coins": {
+ "id": {
+ "type": "integer",
+ "description": "Bridge ID"
+ },
+ "name": {
+ "type": "string",
+ "description": "Bridge name"
+ },
+ "displayName": {
+ "type": "string",
+ "description": "Bridge display name"
+ },
+ "lastHourlyVolume": {
+ "type": "number",
+ "description": "Last hourly volume"
+ },
+ "currentDayVolume": {
+ "type": "number",
+ "description": "Current day volume"
+ },
+ "lastDailyVolume": {
+ "type": "number",
+ "description": "Last daily volume"
+ },
+ "dayBeforeLastVolume": {
+ "type": "number",
+ "description": "Day before last volume"
+ },
+ "weeklyVolume": {
+ "type": "number",
+ "description": "Weekly volume"
+ },
+ "monthlyVolume": {
+ "type": "number",
+ "description": "Monthly volume"
+ },
+ "lastHourlyTxs": {
"type": "object",
"properties": {
- "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
- "type": "object",
- "required": ["confidence", "prices", "symbol"],
- "properties": {
- "decimals": {
- "type": "number",
- "description": "Token decimals. Omitted for coingecko-native assets (e.g. coingecko:ethereum).",
- "example": 8
- },
- "confidence": {
- "type": "number",
- "description": "Confidence score between 0 and 1 indicating the reliability of the price.",
- "example": 0.99
- },
- "prices": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "timestamp": {
- "type": "number",
- "example": 1666790570
- },
- "price": {
- "type": "number",
- "example": 0.984519
- }
- }
- }
- },
- "symbol": {
- "type": "string",
- "example": "HUSD"
- }
- }
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposits"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawals"
}
- }
+ },
+ "description": "Last hourly transactions"
+ },
+ "currentDayTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposits"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawals"
+ }
+ },
+ "description": "Current day transactions"
+ },
+ "prevDayTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposits"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawals"
+ }
+ },
+ "description": "Previous day transactions"
+ },
+ "dayBeforeLastTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposits"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawals"
+ }
+ },
+ "description": "Day before last transactions"
+ },
+ "weeklyTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposits"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawals"
+ }
+ },
+ "description": "Weekly transactions"
+ },
+ "monthlyTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposits"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawals"
+ }
+ },
+ "description": "Monthly transactions"
+ },
+ "chainBreakdown": {
+ "type": "object",
+ "description": "Volume breakdown by chain"
+ },
+ "destinationChain": {
+ "type": "string",
+ "description": "Destination chain"
}
}
+ },
+ "example": {
+ "id": 1,
+ "name": "polygon",
+ "displayName": "Polygon PoS Bridge",
+ "lastHourlyVolume": 118020.67633222912,
+ "currentDayVolume": 0,
+ "lastDailyVolume": 28740605.36474136,
+ "dayBeforeLastVolume": 17294645.046479236,
+ "weeklyVolume": 71188570.7201651,
+ "monthlyVolume": 490635601.59313035,
+ "lastHourlyTxs": {
+ "deposits": 10,
+ "withdrawals": 5
+ },
+ "currentDayTxs": {
+ "deposits": 0,
+ "withdrawals": 0
+ },
+ "prevDayTxs": {
+ "deposits": 153,
+ "withdrawals": 150
+ },
+ "dayBeforeLastTxs": {
+ "deposits": 173,
+ "withdrawals": 195
+ },
+ "weeklyTxs": {
+ "deposits": 2095,
+ "withdrawals": 1752
+ },
+ "monthlyTxs": {
+ "deposits": 6945,
+ "withdrawals": 5537
+ },
+ "chainBreakdown": {
+ "Polygon": {
+ "lastHourlyVolume": 118020.67633222912,
+ "currentDayVolume": 0,
+ "lastDailyVolume": 28740605.36474136,
+ "dayBeforeLastVolume": 17294645.046479236,
+ "weeklyVolume": 71188570.7201651,
+ "monthlyVolume": 490635601.59313035,
+ "last24hVolume": 34766385.06231544,
+ "lastHourlyTxs": {
+ "deposits": 10,
+ "withdrawals": 5
+ },
+ "currentDayTxs": {
+ "deposits": 0,
+ "withdrawals": 0
+ },
+ "prevDayTxs": {
+ "deposits": 153,
+ "withdrawals": 150
+ },
+ "dayBeforeLastTxs": {
+ "deposits": 173,
+ "withdrawals": 195
+ },
+ "weeklyTxs": {
+ "deposits": 2095,
+ "withdrawals": 1752
+ },
+ "monthlyTxs": {
+ "deposits": 6945,
+ "withdrawals": 5537
+ }
+ },
+ "Ethereum": {
+ "lastHourlyVolume": 118020.67633222912,
+ "currentDayVolume": 0,
+ "lastDailyVolume": 28740605.36474136,
+ "dayBeforeLastVolume": 17294645.046479236,
+ "weeklyVolume": 71188570.7201651,
+ "monthlyVolume": 490635601.59313035,
+ "last24hVolume": 34766385.06231544,
+ "lastHourlyTxs": {
+ "deposits": 10,
+ "withdrawals": 5
+ },
+ "currentDayTxs": {
+ "deposits": 0,
+ "withdrawals": 0
+ },
+ "prevDayTxs": {
+ "deposits": 153,
+ "withdrawals": 150
+ },
+ "dayBeforeLastTxs": {
+ "deposits": 173,
+ "withdrawals": 195
+ },
+ "weeklyTxs": {
+ "deposits": 2095,
+ "withdrawals": 1752
+ },
+ "monthlyTxs": {
+ "deposits": 6945,
+ "withdrawals": 5537
+ }
+ }
+ },
+ "destinationChain": "Polygon"
}
}
}
- },
- "502": {
- "description": "Internal error"
}
},
+ "x-api-plan-only": true,
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.prices.getChart([''])"
+ "source": "const result = await client.bridges.getById(1)"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.prices.getChart([''])"
+ "source": "result = client.bridges.getById('')"
}
]
}
},
- "/coins/percentage/{coins}": {
+ "/bridges/bridgevolume/{chain}": {
"get": {
- "tags": ["coins"],
- "summary": "Get percentage change in price over time",
- "description": "Strings accepted by period:\nCan use regular chart candle notion like '4h' etc where:\nW = week, D = day, H = hour, M = minute (not case sensitive)\n",
+ "tags": ["bridges"],
+ "summary": "Get historical volumes for a bridge, chain, or bridge on a particular chain",
"parameters": [
{
- "name": "coins",
+ "name": "chain",
"in": "path",
"required": true,
- "description": "set of comma-separated tokens defined as {chain}:{address}",
+ "description": "chain slug, you can get these from /chains. Call also use 'all' for volume on all chains.",
"schema": {
"type": "string",
- "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
- }
- },
- {
- "name": "timestamp",
- "in": "query",
- "required": false,
- "description": "timestamp of data point requested, defaults to time now",
- "schema": {
- "type": "number",
- "example": 1664364537
- }
- },
- {
- "name": "lookForward",
- "in": "query",
- "required": false,
- "description": "whether you want the duration after your given timestamp or not, defaults to false (looking back)",
- "schema": {
- "type": "boolean",
- "example": false
+ "example": "Ethereum"
}
},
{
- "name": "period",
+ "name": "id",
"in": "query",
"required": false,
- "description": "duration between data points, defaults to 24 hours",
- "schema": {
- "type": "string",
- "example": "3w"
- }
- }
- ],
- "responses": {
- "200": {
- "description": "successful operation",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "coins": {
- "type": "object",
- "properties": {
- "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
- "type": "number",
- "example": -2.3009954568977147
- }
- }
- }
- }
- }
- }
- }
- },
- "502": {
- "description": "Internal error"
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.prices.getPercentageChange([''])"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.prices.getPercentageChange([''])"
- }
- ]
- }
- },
- "/coins/prices/first/{coins}": {
- "get": {
- "tags": ["coins"],
- "summary": "Get earliest timestamp price record for coins",
- "parameters": [
- {
- "name": "coins",
- "in": "path",
- "required": true,
- "description": "set of comma-separated tokens defined as {chain}:{address}",
+ "description": "bridge ID, you can get these from /bridges",
"schema": {
- "type": "string",
- "example": "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8"
+ "type": "integer",
+ "example": 2
}
}
],
@@ -15371,77 +15142,101 @@
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "coins": {
- "type": "object",
- "properties": {
- "ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1": {
- "type": "object",
- "properties": {
- "price": {
- "type": "number",
- "example": 0.9992047673109988
- },
- "symbol": {
- "type": "string",
- "example": "HUSD"
- },
- "timestamp": {
- "type": "number",
- "example": 1568883821
- }
- }
- }
+ "type": "array",
+ "items": {
+ "type": "object",
+ "properties": {
+ "date": {
+ "type": "string",
+ "description": "Date timestamp"
+ },
+ "depositUSD": {
+ "type": "number",
+ "description": "Deposit volume in USD"
+ },
+ "withdrawUSD": {
+ "type": "number",
+ "description": "Withdrawal volume in USD"
+ },
+ "depositTxs": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawTxs": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
}
}
}
- }
+ },
+ "example": [
+ {
+ "date": "1665964800",
+ "depositUSD": 11121806.082658675,
+ "withdrawUSD": 13970177.335270314,
+ "depositTxs": 218,
+ "withdrawTxs": 56
+ },
+ {
+ "date": "1666051200",
+ "depositUSD": 32940139.204768553,
+ "withdrawUSD": 157541586.9492474,
+ "depositTxs": 2042,
+ "withdrawTxs": 708
+ }
+ ]
}
}
- },
- "502": {
- "description": "Internal error"
}
},
+ "x-api-plan-only": true,
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.prices.getFirstPrices([''])"
+ "source": "const result = await client.bridges.getVolumeByChain('')"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.prices.getFirstPrices([''])"
+ "source": "result = client.bridges.getVolumeByChain('')"
}
]
}
},
- "/coins/block/{chain}/{timestamp}": {
+ "/bridges/bridgedaystats/{timestamp}/{chain}": {
"get": {
- "tags": ["coins"],
- "summary": "Get the closest block to a timestamp",
- "description": "Runs binary search over a blockchain's blocks to get the closest one to a timestamp.\nEvery time this is run we add new data to our database, so each query permanently speeds up future queries.\n",
+ "tags": ["bridges"],
+ "summary": "Get a 24hr token and address volume breakdown for a bridge",
"parameters": [
+ {
+ "name": "timestamp",
+ "in": "path",
+ "required": true,
+ "description": "Unix timestamp. Data returned will be for the 24hr period starting at 00:00 UTC that the timestamp lands in.",
+ "schema": {
+ "type": "integer",
+ "example": 1755561600
+ }
+ },
{
"name": "chain",
"in": "path",
- "description": "Chain which you want to get the block from",
"required": true,
+ "description": "chain slug, you can get these from /chains.",
"schema": {
"type": "string",
"example": "Ethereum"
}
},
{
- "name": "timestamp",
- "in": "path",
- "description": "UNIX timestamp of the block you are searching for",
- "required": true,
+ "name": "id",
+ "in": "query",
+ "required": false,
+ "description": "bridge ID, you can get these from /bridges",
"schema": {
"type": "integer",
- "example": 1603964988
+ "example": 2
}
}
],
@@ -15453,468 +15248,691 @@
"schema": {
"type": "object",
"properties": {
- "height": {
+ "date": {
"type": "integer",
- "format": "uint",
- "example": 11150916
+ "description": "Date timestamp"
},
- "timestamp": {
- "type": "integer",
- "format": "uint",
- "example": 1603964988
+ "totalTokensDeposited": {
+ "type": "object",
+ "description": "Total tokens deposited with their details",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "usdValue": {
+ "type": "number",
+ "description": "USD value of the token"
+ },
+ "amount": {
+ "type": "string",
+ "description": "Token amount as string"
+ },
+ "symbol": {
+ "type": "string",
+ "description": "Token symbol"
+ },
+ "decimals": {
+ "type": "integer",
+ "description": "Token decimals"
+ }
+ }
+ }
+ },
+ "totalTokensWithdrawn": {
+ "type": "object",
+ "description": "Total tokens withdrawn with their details",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "usdValue": {
+ "type": "number",
+ "description": "USD value of the token"
+ },
+ "amount": {
+ "type": "string",
+ "description": "Token amount as string"
+ },
+ "symbol": {
+ "type": "string",
+ "description": "Token symbol"
+ },
+ "decimals": {
+ "type": "integer",
+ "description": "Token decimals"
+ }
+ }
+ }
+ },
+ "totalAddressDeposited": {
+ "type": "object",
+ "description": "Total addresses that deposited with their details",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "usdValue": {
+ "type": "number",
+ "description": "Total USD value deposited by this address"
+ },
+ "txs": {
+ "type": "integer",
+ "description": "Number of transactions from this address"
+ }
+ }
+ }
+ },
+ "totalAddressWithdrawn": {
+ "type": "object",
+ "description": "Total addresses that withdrew with their details",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "usdValue": {
+ "type": "number",
+ "description": "Total USD value withdrawn by this address"
+ },
+ "txs": {
+ "type": "integer",
+ "description": "Number of transactions from this address"
+ }
+ }
+ }
+ }
+ }
+ },
+ "example": {
+ "date": 1752796800,
+ "totalTokensDeposited": {
+ "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": {
+ "usdValue": 8538374.477027368,
+ "amount": "17379331182",
+ "symbol": "USDC",
+ "decimals": 6
+ },
+ "ethereum:0x6De037ef9aD2725EB40118Bb1702EBb27e4Aeb24": {
+ "usdValue": 2123785.5869,
+ "amount": "2123785.5869",
+ "symbol": "RNDR",
+ "decimals": 18
+ }
+ },
+ "totalTokensWithdrawn": {
+ "ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": {
+ "usdValue": 3020623.745962119,
+ "amount": "14680842655",
+ "symbol": "USDC",
+ "decimals": 6
+ },
+ "ethereum:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": {
+ "usdValue": 2214456.1061736266,
+ "amount": "28501633217143430245",
+ "symbol": "WETH",
+ "decimals": 18
+ }
+ },
+ "totalAddressDeposited": {
+ "ethereum:0x3a23F943181408EAC424116Af7b7790c94Cb97a5": {
+ "usdValue": 2447787.602843585,
+ "txs": 13
+ },
+ "ethereum:0x348C31025754113F599ccEa72747A726a133799b": {
+ "usdValue": 2115000,
+ "txs": 1
+ }
+ },
+ "totalAddressWithdrawn": {
+ "ethereum:0xb60d0C2E8309518373b40f8Eaa2CAd0d1De3deCb": {
+ "usdValue": 1196415.6440843595,
+ "txs": 2
+ },
+ "ethereum:0x49c3FeaFDdaefC3Bed06F4ff87CE86610C2c1076": {
+ "usdValue": 565794.5181076665,
+ "txs": 1
}
}
}
}
}
- },
- "400": {
- "description": "Invalid chain or timestamp provided"
}
},
+ "x-api-plan-only": true,
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.prices.getBlockAtTimestamp('', 1704067200)"
+ "source": "const result = await client.bridges.getDayStats(1704067200, '')"
+ },
+ {
+ "lang": "python",
+ "label": "Python SDK",
+ "source": "result = client.bridges.getDayStats(1704067200, '')"
+ }
+ ]
+ }
+ },
+ "/bridges/transactions/{id}": {
+ "get": {
+ "tags": ["bridges"],
+ "summary": "Get all transactions for a bridge within a date range",
+ "parameters": [
+ {
+ "name": "id",
+ "in": "path",
+ "required": true,
+ "description": "bridge ID, you can get these from /bridges",
+ "schema": {
+ "type": "integer",
+ "example": 1
+ }
+ },
+ {
+ "name": "starttimestamp",
+ "in": "query",
+ "required": false,
+ "description": "start timestamp (Unix Timestamp) for date range",
+ "schema": {
+ "type": "integer",
+ "example": 1667260800
+ }
+ },
+ {
+ "name": "endtimestamp",
+ "in": "query",
+ "required": false,
+ "description": "end timestamp (Unix timestamp) for date range",
+ "schema": {
+ "type": "integer",
+ "example": 1667347200
+ }
+ },
+ {
+ "name": "sourcechain",
+ "in": "query",
+ "required": false,
+ "description": "Returns only transactions that are bridging from the specified source chain.",
+ "schema": {
+ "type": "string",
+ "example": "Polygon"
+ }
},
{
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.prices.getBlockAtTimestamp('', 1704067200)"
- }
- ]
- }
- },
- "/stablecoins/stablecoins": {
- "get": {
- "tags": ["stablecoins"],
- "summary": "List all stablecoins along with their circulating amounts",
- "description": "**Response:** `peggedAssets[]`. Each asset's supply is nested in `circulating` under its `pegType`: `circulating.peggedUSD` for USD-pegged coins, `circulating.peggedEUR` for EURC, and so on. Read `circulating[asset.pegType]`. `price` is the USD price of one coin, or `null` when there is no quote (many assets). Compute the USD value as `circulating[asset.pegType] * price` only when `price` is a number. Otherwise the USD value is unavailable, not zero.",
- "parameters": [
+ "name": "address",
+ "in": "query",
+ "required": false,
+ "description": "Returns only transactions with specified address as \"from\" or \"to\". Addresses are quried in the form {chain}:{address}, where chain is an identifier such as ethereum, bsc, polygon, avax... .",
+ "schema": {
+ "type": "string",
+ "example": "ethereum:0x69b4B4390Bd1f0aE84E090Fe8af7AbAd2d95Cc8E"
+ }
+ },
{
- "name": "includePrices",
+ "name": "limit",
"in": "query",
"required": false,
- "description": "set whether to include current stablecoin prices",
+ "description": "limit to number of transactions returned, maximum is 6000",
"schema": {
- "type": "boolean",
- "example": true
+ "type": "integer",
+ "example": 200
}
}
],
"responses": {
"200": {
- "description": "Array of all stablecoins with their circulation data",
+ "description": "successful operation",
"content": {
"application/json": {
"schema": {
- "type": "object",
- "properties": {
- "peggedAssets": {
+ "oneOf": [
+ {
+ "type": "object",
+ "description": "Bridge information (returned when no query parameters provided)",
+ "properties": {
+ "id": {
+ "type": "integer",
+ "description": "Bridge ID"
+ },
+ "name": {
+ "type": "string",
+ "description": "Bridge name"
+ },
+ "displayName": {
+ "type": "string",
+ "description": "Bridge display name"
+ },
+ "lastHourlyVolume": {
+ "type": "number",
+ "description": "Last hourly volume"
+ },
+ "currentDayVolume": {
+ "type": "number",
+ "description": "Current day volume"
+ },
+ "lastDailyVolume": {
+ "type": "number",
+ "description": "Last daily volume"
+ },
+ "dayBeforeLastVolume": {
+ "type": "number",
+ "description": "Day before last volume"
+ },
+ "weeklyVolume": {
+ "type": "number",
+ "description": "Weekly volume"
+ },
+ "monthlyVolume": {
+ "type": "number",
+ "description": "Monthly volume"
+ },
+ "lastHourlyTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ },
+ "currentDayTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ },
+ "prevDayTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ },
+ "dayBeforeLastTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ },
+ "weeklyTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ },
+ "monthlyTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ },
+ "chainBreakdown": {
+ "type": "object",
+ "additionalProperties": {
+ "type": "object",
+ "properties": {
+ "lastHourlyVolume": {
+ "type": "number",
+ "description": "Last hourly volume"
+ },
+ "currentDayVolume": {
+ "type": "number",
+ "description": "Current day volume"
+ },
+ "lastDailyVolume": {
+ "type": "number",
+ "description": "Last daily volume"
+ },
+ "dayBeforeLastVolume": {
+ "type": "number",
+ "description": "Day before last volume"
+ },
+ "weeklyVolume": {
+ "type": "number",
+ "description": "Weekly volume"
+ },
+ "monthlyVolume": {
+ "type": "number",
+ "description": "Monthly volume"
+ },
+ "last24hVolume": {
+ "type": "number",
+ "description": "Last 24 hour volume"
+ },
+ "lastHourlyTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ },
+ "currentDayTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ },
+ "prevDayTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ },
+ "dayBeforeLastTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ },
+ "weeklyTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ },
+ "monthlyTxs": {
+ "type": "object",
+ "properties": {
+ "deposits": {
+ "type": "integer",
+ "description": "Number of deposit transactions"
+ },
+ "withdrawals": {
+ "type": "integer",
+ "description": "Number of withdrawal transactions"
+ }
+ }
+ }
+ }
+ }
+ },
+ "destinationChain": {
+ "type": "string",
+ "description": "Destination chain"
+ }
+ }
+ },
+ {
"type": "array",
+ "description": "Transaction list (returned when query parameters provided)",
"items": {
"type": "object",
"properties": {
- "id": {
+ "tx_hash": {
"type": "string",
- "example": "1"
+ "description": "Transaction hash"
},
- "name": {
+ "ts": {
"type": "string",
- "example": "Tether"
+ "description": "Timestamp in ISO format"
},
- "symbol": {
+ "tx_block": {
+ "type": "integer",
+ "description": "Block number"
+ },
+ "tx_from": {
"type": "string",
- "example": "USDT"
+ "description": "From address"
},
- "pegType": {
+ "tx_to": {
"type": "string",
- "example": "peggedUSD"
+ "description": "To address"
},
- "pegMechanism": {
+ "token": {
"type": "string",
- "example": "fiat-backed"
+ "description": "Token contract address"
},
- "circulating": {
- "type": "object",
- "properties": {
- "peggedUSD": {
- "type": "number",
- "example": 159510682147.76874
- }
- }
+ "amount": {
+ "type": "string",
+ "description": "Transaction amount"
},
- "chains": {
- "type": "array",
- "items": {
- "type": "string"
- },
- "example": ["Ethereum", "Tron", "BSC"]
+ "chain": {
+ "type": "string",
+ "description": "Blockchain name"
},
- "chainCirculating": {
- "type": "object",
- "additionalProperties": {
- "type": "object",
- "properties": {
- "current": {
- "type": "object",
- "properties": {
- "peggedUSD": {
- "type": "number",
- "example": 50000000000
- }
- }
- }
- }
- }
+ "bridge_name": {
+ "type": "string",
+ "description": "Bridge name"
},
- "price": {
- "type": "number",
- "nullable": true,
- "example": 1.001
+ "usd_value": {
+ "type": ["number", "null"],
+ "description": "USD value of transaction"
+ },
+ "sourceChain": {
+ "type": "string",
+ "description": "Source chain name"
}
}
}
}
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.stablecoins.getStablecoins()"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.stablecoins.getStablecoins()"
- }
- ]
- }
- },
- "/stablecoins/stablecoincharts/all": {
- "get": {
- "tags": ["stablecoins"],
- "summary": "Get historical mcap sum of all stablecoins",
- "parameters": [
- {
- "name": "stablecoin",
- "in": "query",
- "required": false,
- "description": "stablecoin ID, you can get these from /stablecoins",
- "schema": {
- "type": "integer",
- "example": 1
- }
- }
- ],
- "responses": {
- "200": {
- "description": "Historical market cap data for all stablecoins",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "date": {
- "type": "string",
- "description": "Unix timestamp in seconds, as a string",
- "example": "1609459200"
+ ]
+ },
+ "example": {
+ "id": 1,
+ "name": "polygon",
+ "displayName": "Polygon PoS Bridge",
+ "lastHourlyVolume": 118020.67633222912,
+ "currentDayVolume": 0,
+ "lastDailyVolume": 28740605.36474136,
+ "dayBeforeLastVolume": 17294645.046479236,
+ "weeklyVolume": 71188570.7201651,
+ "monthlyVolume": 490635601.59313035,
+ "lastHourlyTxs": {
+ "deposits": 10,
+ "withdrawals": 5
+ },
+ "currentDayTxs": {
+ "deposits": 0,
+ "withdrawals": 0
+ },
+ "prevDayTxs": {
+ "deposits": 153,
+ "withdrawals": 150
+ },
+ "dayBeforeLastTxs": {
+ "deposits": 173,
+ "withdrawals": 195
+ },
+ "weeklyTxs": {
+ "deposits": 2095,
+ "withdrawals": 1752
+ },
+ "monthlyTxs": {
+ "deposits": 6945,
+ "withdrawals": 5537
+ },
+ "chainBreakdown": {
+ "Polygon": {
+ "lastHourlyVolume": 118020.67633222912,
+ "currentDayVolume": 0,
+ "lastDailyVolume": 28740605.36474136,
+ "dayBeforeLastVolume": 17294645.046479236,
+ "weeklyVolume": 71188570.7201651,
+ "monthlyVolume": 490635601.59313035,
+ "last24hVolume": 34766385.06231544,
+ "lastHourlyTxs": {
+ "deposits": 10,
+ "withdrawals": 5
},
- "totalCirculating": {
- "type": "object",
- "properties": {
- "peggedUSD": {
- "type": "number",
- "example": 45000000000
- }
- }
+ "currentDayTxs": {
+ "deposits": 0,
+ "withdrawals": 0
+ },
+ "prevDayTxs": {
+ "deposits": 153,
+ "withdrawals": 150
+ },
+ "dayBeforeLastTxs": {
+ "deposits": 173,
+ "withdrawals": 195
+ },
+ "weeklyTxs": {
+ "deposits": 2095,
+ "withdrawals": 1752
+ },
+ "monthlyTxs": {
+ "deposits": 6945,
+ "withdrawals": 5537
+ }
+ },
+ "Ethereum": {
+ "lastHourlyVolume": 118020.67633222912,
+ "currentDayVolume": 0,
+ "lastDailyVolume": 28740605.36474136,
+ "dayBeforeLastVolume": 17294645.046479236,
+ "weeklyVolume": 71188570.7201651,
+ "monthlyVolume": 490635601.59313035,
+ "last24hVolume": 34766385.06231544,
+ "lastHourlyTxs": {
+ "deposits": 10,
+ "withdrawals": 5
+ },
+ "currentDayTxs": {
+ "deposits": 0,
+ "withdrawals": 0
+ },
+ "prevDayTxs": {
+ "deposits": 153,
+ "withdrawals": 150
+ },
+ "dayBeforeLastTxs": {
+ "deposits": 173,
+ "withdrawals": 195
+ },
+ "weeklyTxs": {
+ "deposits": 2095,
+ "withdrawals": 1752
+ },
+ "monthlyTxs": {
+ "deposits": 6945,
+ "withdrawals": 5537
}
}
- }
+ },
+ "destinationChain": "Polygon"
}
}
}
}
},
+ "x-api-plan-only": true,
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.stablecoins.getAllCharts()"
+ "source": "const result = await client.bridges.getTransactions(1)"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.stablecoins.getAllCharts()"
+ "source": "result = client.bridges.getTransactions('')"
}
]
}
},
- "/stablecoins/stablecoincharts/{chain}": {
+ "/usage/{YOUR_API_KEY}": {
"get": {
- "tags": ["stablecoins"],
- "summary": "Get historical mcap sum of all stablecoins in a chain",
- "parameters": [
- {
- "name": "chain",
- "in": "path",
- "required": true,
- "description": "chain slug, you can get these from /chains or the chains property on /protocols",
- "schema": {
- "type": "string",
- "example": "Ethereum"
- }
- },
+ "tags": ["meta"],
+ "summary": "Get amount of credits left in the api key, these reset on the 1st of each month",
+ "servers": [
{
- "name": "stablecoin",
- "in": "query",
- "required": false,
- "description": "stablecoin ID, you can get these from /stablecoins",
- "schema": {
- "type": "integer",
- "example": 1
- }
+ "url": "https://pro-api.llama.fi"
}
],
- "responses": {
- "200": {
- "description": "Historical market cap data for stablecoins on specified chain",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "date": {
- "type": "string",
- "description": "Unix timestamp in seconds, as a string",
- "example": "1609459200"
- },
- "totalCirculating": {
- "type": "object",
- "properties": {
- "peggedUSD": {
- "type": "number",
- "example": 12000000000
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.stablecoins.getChartsByChain('')"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.stablecoins.getChartsByChain('')"
- }
- ]
- }
- },
- "/stablecoins/stablecoin/{asset}": {
- "get": {
- "tags": ["stablecoins"],
- "summary": "Get historical mcap and historical chain distribution of a stablecoin",
"parameters": [
{
- "name": "asset",
+ "name": "YOUR_API_KEY",
"in": "path",
"required": true,
- "description": "stablecoin ID, you can get these from /stablecoins",
+ "description": "Your DefiLlama API plan key. For this endpoint only, the key goes at the end of the path.",
"schema": {
- "type": "integer",
- "example": 1
+ "type": "string"
}
}
],
"responses": {
"200": {
- "description": "Historical market cap and chain distribution for specific stablecoin",
- "content": {
- "application/json": {
- "schema": {
- "type": "object",
- "properties": {
- "id": {
- "type": "string",
- "example": "1"
- },
- "name": {
- "type": "string",
- "example": "Tether"
- },
- "symbol": {
- "type": "string",
- "example": "USDT"
- },
- "totalCirculating": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "date": {
- "type": "number",
- "example": 1609459200
- },
- "totalCirculating": {
- "type": "number",
- "example": 50000000000
- }
- }
- }
- },
- "chainCirculating": {
- "type": "object",
- "additionalProperties": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "date": {
- "type": "number",
- "example": 1609459200
- },
- "circulating": {
- "type": "number",
- "example": 20000000000
- }
- }
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.stablecoins.getStablecoin('')"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.stablecoins.getStablecoin('')"
- }
- ]
- }
- },
- "/stablecoins/stablecoinchains": {
- "get": {
- "tags": ["stablecoins"],
- "summary": "Get current mcap sum of all stablecoins on each chain",
- "responses": {
- "200": {
- "description": "Current market cap of stablecoins by chain",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string",
- "example": "Ethereum"
- },
- "totalCirculatingUSD": {
- "type": "object",
- "description": "Circulating supply in USD, by peg type",
- "additionalProperties": {
- "type": "number"
- },
- "example": {
- "peggedUSD": 75000000000
- }
- }
- }
- }
- }
- }
- }
- }
- },
- "x-codeSamples": [
- {
- "lang": "javascript",
- "label": "JavaScript SDK",
- "source": "const result = await client.stablecoins.getChains()"
- },
- {
- "lang": "python",
- "label": "Python SDK",
- "source": "result = client.stablecoins.getChains()"
- }
- ]
- }
- },
- "/stablecoins/stablecoinprices": {
- "get": {
- "tags": ["stablecoins"],
- "summary": "Get historical prices of all stablecoins",
- "responses": {
- "200": {
- "description": "Historical prices for all stablecoins",
- "content": {
- "application/json": {
- "schema": {
- "type": "array",
- "items": {
- "type": "object",
- "properties": {
- "date": {
- "type": "number",
- "example": 1609459200
- },
- "prices": {
- "type": "object",
- "additionalProperties": {
- "type": "number"
- },
- "example": {
- "USDT": 1.001,
- "USDC": 0.999,
- "DAI": 1.002
- }
- }
- }
- }
- }
- }
- }
+ "description": "credits left"
}
},
+ "x-api-plan-only": true,
"x-codeSamples": [
{
"lang": "javascript",
"label": "JavaScript SDK",
- "source": "const result = await client.stablecoins.getPrices()"
+ "source": "const result = await proClient.account.getUsage()"
},
{
"lang": "python",
"label": "Python SDK",
- "source": "result = client.stablecoins.getPrices()"
+ "source": "result = pro_client.account.getUsage()"
}
]
}
From dbe0489e45a0cd119a3ff09a0df42e64c1520745 Mon Sep 17 00:00:00 2001
From: treeoflife2
Date: Wed, 25 Nov 2026 00:27:47 +0530
Subject: [PATCH 12/12] fix(api-client): open the request modal snippet on the
workspace client
The test-request modal picked the first custom code sample (the
JavaScript SDK) whenever an operation had one, ignoring the workspace
client, which defaults to shell/curl. It now starts on the workspace
client. Custom samples stay in the dropdown and a picked one sticks.
---
.../RequestSection/RequestCodeExample.test.ts | 35 +++++++++++++++++++
.../RequestSection/RequestCodeExample.vue | 21 +++++------
2 files changed, 44 insertions(+), 12 deletions(-)
diff --git a/packages/api-client/src/views/Request/RequestSection/RequestCodeExample.test.ts b/packages/api-client/src/views/Request/RequestSection/RequestCodeExample.test.ts
index afb3fd0934d..6b0ec17ec8c 100644
--- a/packages/api-client/src/views/Request/RequestSection/RequestCodeExample.test.ts
+++ b/packages/api-client/src/views/Request/RequestSection/RequestCodeExample.test.ts
@@ -136,6 +136,41 @@ describe('RequestCodeExample.vue', () => {
wrapper.unmount()
})
+ describe('with custom code samples', () => {
+ const operationWithSamples = operationSchema.parse({
+ uid: 'mockOperationWithSamplesUid',
+ method: 'get',
+ security: [],
+ 'x-codeSamples': [{ lang: 'javascript', label: 'JavaScript SDK', source: 'client.tvl.getProtocols()' }],
+ })
+ const curlWorkspace = workspaceSchema.parse({
+ uid: 'mockWorkspaceUid',
+ selectedHttpClient: { targetKey: 'shell', clientKey: 'curl' },
+ })
+
+ // An SDK sample hides the host and key placement, so the modal must not open on it.
+ it('starts on the workspace client, not the first custom sample', () => {
+ const wrapper = mount(RequestCodeExample, {
+ props: { ...props, operation: operationWithSamples, workspace: curlWorkspace },
+ })
+
+ expect((wrapper.vm as any).localSelectedClient).toEqual({ targetKey: 'shell', clientKey: 'curl' })
+ wrapper.unmount()
+ })
+
+ it('keeps a custom sample once the user picks it', async () => {
+ const wrapper = mount(RequestCodeExample, {
+ props: { ...props, operation: operationWithSamples, workspace: curlWorkspace },
+ })
+
+ await (wrapper.vm as any).selectClient({ id: 'custom,javascript', label: 'JavaScript SDK' })
+
+ expect((wrapper.vm as any).localSelectedClient).toEqual({ targetKey: 'custom', clientKey: 'javascript' })
+ expect(mockWorkspaceMutators.edit).not.toHaveBeenCalled()
+ wrapper.unmount()
+ })
+ })
+
it('filters security schemes correctly', async () => {
const scheme = securitySchemeSchema.parse({
uid: 'authUid',
diff --git a/packages/api-client/src/views/Request/RequestSection/RequestCodeExample.vue b/packages/api-client/src/views/Request/RequestSection/RequestCodeExample.vue
index 9a3519dbe11..bcc6fe77a21 100644
--- a/packages/api-client/src/views/Request/RequestSection/RequestCodeExample.vue
+++ b/packages/api-client/src/views/Request/RequestSection/RequestCodeExample.vue
@@ -63,18 +63,15 @@ const codeSamples = computed(
operation['x-custom-examples'],
)
-// Store the actual selected state
-const localSelectedClientState = ref(
- codeSamples.value?.length
- ? {
- targetKey: 'custom',
- clientKey: codeSamples.value[0]?.lang,
- }
- : {
- targetKey: workspace.selectedHttpClient?.targetKey ?? 'js',
- clientKey: workspace.selectedHttpClient?.clientKey ?? 'fetch',
- },
-)
+/**
+ * Store the actual selected state. Start on the workspace's client (shell/curl by default) even when the
+ * operation has custom code samples: curl shows the full URL with host and key placement, which an SDK
+ * sample hides. The custom samples stay in the dropdown, and picking one sticks (see localSelectedClient).
+ */
+const localSelectedClientState = ref({
+ targetKey: workspace.selectedHttpClient?.targetKey ?? 'js',
+ clientKey: workspace.selectedHttpClient?.clientKey ?? 'fetch',
+})
/**
* Returns selected security schemes for the request