Available Metrics
Revenue distributed to token holders
Perpetuals trading volume
Get current metrics for any protocol or chain.
DEFILLAMA(metric, name, [timeframe])
Parameters:
name: Protocol or chain name
timeframe: 24h (default), 7d, 30d, all (optional) - used for metrics like fees/volume/revenue
Returns: Numeric value
Examples:
DEFILLAMA_HISTORICAL
Get historical data for any metric.
Parameters:
name: Protocol or chain name
startDate: Date format yyyy-mm-dd or numeric date
endDate: Optional, returns array if provided
Returns: Single numeric value or 2-column array (dates, values)
Examples:
Get all available metrics for a protocol or chain.
Parameters:
entity: Protocol or chain name
Returns: 2-column array with metric names and values
Example:
Utility Functions
DEFILLAMA_METRICS
List all available metrics.
Returns: 2-column array with metric names and descriptions
DEFILLAMA_CHAINS
List all supported blockchains.
Returns: 3-column array with chain name, ticker symbol, and TVL
DEFILLAMA_PROTOCOLS
List all tracked protocols.
Returns: 5-column array with protocol name, category, symbol, TVL, and market cap
Yield Functions
DEFILLAMA_YIELD
Filter and find yield pools.
Parameters (all optional):
chain: Blockchain name (e.g., "Ethereum", "Arbitrum")
token: Token symbol (e.g., "USDC", "ETH")
sortBy: apy (default), tvl, apyBase, apyReward
limit: Max results (default: 50)
Returns: Array with pool name, chain, project, TVL, APY, tokens
Examples:
DEFILLAMA_YIELD_POOL
Get detailed information for a specific pool.
Parameters:
poolId: Unique pool identifier
Returns: Array with pool details (name, chain, TVL, APY breakdown, tokens, risk metrics)
Example:
DEFILLAMA_YIELD_TOP_POOLS
Get top performing yield pools.
Parameters:
limit: Number of pools (default: 20)
Returns: Array with top pools sorted by APY
Example:
DEFILLAMA_YIELD_CHAINS
List available chains for yield filtering.
Returns: Array of chain names available in yield pools
Example:
DEFILLAMA_YIELD_PROJECTS
List available projects for yield filtering.
Returns: Array of project names available in yield pools
Stablecoin Functions
DEFILLAMA_STABLECOINS
List all tracked stablecoins.
Returns: Array with stablecoin name, symbol, market cap, price, dominant chain
DEFILLAMA_STABLECOIN_MCAP
Get stablecoin market cap.
Parameters (all optional):
name: Stablecoin name or symbol (default: "all" for total)
chain: Blockchain filter (default: "all" for aggregate)
Returns: Numeric value (market cap in USD)
Examples:
DEFILLAMA_STABLECOIN_HISTORY
Get historical stablecoin data.
Parameters:
name: Stablecoin name, symbol, or "all"
startDate: Date format yyyy-mm-dd or numeric date
endDate: Optional end date (returns array if provided)
chain: Optional blockchain filter (default: "all")
Returns: Single value or 2-column array (dates, market caps)
Examples:
Last updated