defillama
defillama fees
Protocol fees and revenue queries.
defillama fees overview
List protocols ranked by fees and revenue.
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--chain | string | Filter by chain name | |
--limit | number | 20 | Max protocols to display |
--sort | string | total24h | Sort field: total24h, total7d, or change_1d |
--category | string | Filter by category (e.g. Dexs, Lending, Bridge) |
Output
| Field | Type | Required | Description |
|---|---|---|---|
protocols | array | yes | |
protocols[].name | string | yes | |
protocols[].fees_24h | string | yes | |
protocols[].fees_7d | string | yes | |
protocols[].change_1d | string | yes | |
chain | string | no | |
category | string | no | |
total | number | yes |
Examples
# Top 10 protocols by 24h fees
defillama fees overview --limit 10
# Top protocols on Abstract by fees
defillama fees overview --chain abstract --limit 10
# Top 5 by 1-day fee change
defillama fees overview --sort change_1d --limit 5
# Top 10 DEXes by fees
defillama fees overview --category Dexs --limit 10defillama fees protocol
Get detailed fee and revenue data for a specific protocol.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | yes | Protocol slug (e.g. aave, lido) |
Output
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
fees_24h | string | yes | |
fees_7d | string | yes | |
fees_30d | string | yes | |
fees_all_time | string | yes | |
change_1d | string | yes | |
change_7d | string | yes | |
change_1m | string | yes | |
chains | array | yes |
Examples
# Aave fee details
defillama fees protocol aavedefillama prices
Token price queries via coins.llama.fi.
defillama prices chart
Get a price chart over a time range.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
coins | string | yes | Coin identifiers (chainName:0xAddress) |
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--start | string | Start timestamp or ISO date | |
--end | string | End timestamp or ISO date (default: now) | |
--span | number | Number of data points | |
--period | string | Data point period (e.g. 1d, 1h, 4h) | |
--search-width | string | 4h | Timestamp search width (e.g. 4h, 600) |
Output
| Field | Type | Required | Description |
|---|---|---|---|
charts | array | yes | |
charts[].coin | string | yes | |
charts[].symbol | string | yes | |
charts[].prices | array | yes | |
charts[].prices[].date | string | yes | |
charts[].prices[].price | string | yes |
Examples
# USDT daily price chart since 2025-01-01
defillama prices chart ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7 --start 2025-01-01 --period 1ddefillama prices current
Get current prices for one or more tokens.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
coins | string | yes | Coin identifiers (chainName:0xAddress) |
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--search-width | string | 4h | Timestamp search width (e.g. 4h, 6h) |
Output
| Field | Type | Required | Description |
|---|---|---|---|
prices | array | yes | |
prices[].coin | string | yes | |
prices[].symbol | string | yes | |
prices[].price | string | yes | |
prices[].confidence | number | no | |
prices[].timestamp | string | yes |
Examples
# Current price of USDT on Ethereum
defillama prices current ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7defillama prices historical
Get token prices at a specific point in time.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
coins | string | yes | Coin identifiers (chainName:0xAddress) |
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--timestamp | string | Unix timestamp in seconds | |
--date | string | ISO date string (e.g. 2025-01-01) | |
--search-width | string | 4h | Timestamp search width (e.g. 4h, 6h) |
Output
| Field | Type | Required | Description |
|---|---|---|---|
prices | array | yes | |
prices[].coin | string | yes | |
prices[].symbol | string | yes | |
prices[].price | string | yes | |
prices[].timestamp | string | yes |
Examples
# USDT price on 2025-01-01
defillama prices historical ethereum:0xdAC17F958D2ee523a2206206994597C13D831ec7 --date 2025-01-01defillama protocols
Protocol queries (ranked by TVL).
defillama protocols list
List protocols ranked by TVL (alias for tvl protocols).
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--chain | string | Filter protocols by chain name | |
--limit | number | 20 | Max protocols to display |
--sort | string | tvl | Sort field: tvl, change_1d, or change_7d |
Output
| Field | Type | Required | Description |
|---|---|---|---|
protocols | array | yes | |
protocols[].name | string | yes | |
protocols[].tvl | string | yes | |
protocols[].change_1d | string | yes | |
protocols[].change_7d | string | yes | |
protocols[].category | string | yes | |
chain | string | no | |
total | number | yes |
Examples
# Top 10 protocols by TVL
defillama protocols list --limit 10
# Top protocols on Abstract
defillama protocols list --chain abstract --limit 10
# Top 5 by 1-day change
defillama protocols list --sort change_1d --limit 5defillama tvl
Total value locked queries.
defillama tvl chains
List chains ranked by TVL.
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--limit | number | 20 | Max chains to display |
Output
| Field | Type | Required | Description |
|---|---|---|---|
chains | array | yes | |
chains[].name | string | yes | |
chains[].tvl | string | yes | |
total | number | yes |
Examples
# Top 10 chains by TVL
defillama tvl chains --limit 10defillama tvl history
Show historical TVL for a protocol.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | yes | Protocol slug (e.g. aave, uniswap) |
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--days | number | 30 | Number of days of history to display |
--chain | string | Filter to a specific chain |
Output
| Field | Type | Required | Description |
|---|---|---|---|
protocol | string | yes | |
chain | string | no | |
days | number | yes | |
history | array | yes | |
history[].date | string | yes | |
history[].tvl | string | yes |
Examples
# Aave 7-day TVL history
defillama tvl history aave --days 7
# Uniswap Ethereum chain TVL over 14 days
defillama tvl history uniswap --days 14 --chain Ethereumdefillama tvl protocol
Get detailed protocol info with TVL breakdown by chain.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | yes | Protocol slug (e.g. aave, uniswap) |
Output
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
description | string | yes | |
category | string | yes | |
url | string | yes | |
symbol | string | yes | |
tvl | string | yes | |
chains | array | yes | |
chains[].chain | string | yes | |
chains[].tvl | string | yes |
Examples
# Aave protocol details
defillama tvl protocol aavedefillama tvl protocols
List protocols ranked by TVL.
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--chain | string | Filter protocols by chain name | |
--limit | number | 20 | Max protocols to display |
--sort | string | tvl | Sort field: tvl, change_1d, or change_7d |
Output
| Field | Type | Required | Description |
|---|---|---|---|
protocols | array | yes | |
protocols[].name | string | yes | |
protocols[].tvl | string | yes | |
protocols[].change_1d | string | yes | |
protocols[].change_7d | string | yes | |
protocols[].category | string | yes | |
chain | string | no | |
total | number | yes |
Examples
# Top 10 protocols by TVL
defillama tvl protocols --limit 10
# Top protocols on Abstract
defillama tvl protocols --chain abstract --limit 10
# Top 5 by 1-day change
defillama tvl protocols --sort change_1d --limit 5defillama volume
DEX volume queries.
defillama volume aggregators
List DEX aggregators ranked by trading volume.
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--chain | string | Filter by chain name | |
--limit | number | 20 | Max aggregators to display |
Output
| Field | Type | Required | Description |
|---|---|---|---|
protocols | array | yes | |
protocols[].name | string | yes | |
protocols[].volume_24h | string | yes | |
protocols[].volume_7d | string | yes | |
protocols[].change_1d | string | yes | |
chain | string | no | |
total | number | yes |
Examples
# Top 10 DEX aggregators by volume
defillama volume aggregators --limit 10
# Top 5 aggregators on Ethereum
defillama volume aggregators --chain ethereum --limit 5defillama volume dexs
List DEXes ranked by trading volume.
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--chain | string | Filter by chain name | |
--limit | number | 20 | Max protocols to display |
--sort | string | total24h | Sort field: total24h, total7d, or change_1d |
--category | string | Filter by category (e.g. Dexs, Prediction) |
Output
| Field | Type | Required | Description |
|---|---|---|---|
protocols | array | yes | |
protocols[].name | string | yes | |
protocols[].volume_24h | string | yes | |
protocols[].volume_7d | string | yes | |
protocols[].change_1d | string | yes | |
chain | string | no | |
category | string | no | |
total | number | yes |
Examples
# Top 10 DEXes by 24h volume
defillama volume dexs --limit 10
# Top DEXes on Abstract
defillama volume dexs --chain abstract --limit 10
# Top 5 by 1-day volume change
defillama volume dexs --sort change_1d --limit 5
# Top 10 DEXes excluding prediction markets
defillama volume dexs --category Dexs --limit 10defillama volume overview
Overview of DEX trading volume (alias for volume dexs).
Options
| Flag | Type | Default | Description |
|---|---|---|---|
--chain | string | Filter by chain name | |
--limit | number | 20 | Max protocols to display |
--sort | string | total24h | Sort field: total24h, total7d, or change_1d |
--category | string | Filter by category (e.g. Dexs, Prediction) |
Output
| Field | Type | Required | Description |
|---|---|---|---|
protocols | array | yes | |
protocols[].name | string | yes | |
protocols[].volume_24h | string | yes | |
protocols[].volume_7d | string | yes | |
protocols[].change_1d | string | yes | |
chain | string | no | |
category | string | no | |
total | number | yes |
Examples
# Top 10 DEXes by 24h volume
defillama volume overview --limit 10
# Top 5 DEXes on Abstract by volume
defillama volume overview --chain abstract --limit 5defillama volume protocol
Get detailed volume data for a specific protocol.
Arguments
| Name | Type | Required | Description |
|---|---|---|---|
slug | string | yes | Protocol slug (e.g. uniswap, curve-dex) |
Output
| Field | Type | Required | Description |
|---|---|---|---|
name | string | yes | |
volume_24h | string | yes | |
volume_7d | string | yes | |
volume_30d | string | yes | |
volume_all_time | string | yes | |
change_1d | string | yes | |
change_7d | string | yes | |
change_1m | string | yes | |
chains | array | yes |
Examples
# Uniswap volume details
defillama volume protocol uniswap