Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

DefiLlama

Heat integrates DefiLlama for read-only DeFi market data — 27 free commands + 15 pro commands across 9 families.

Command: heat llama (aliases: heat defillama, heat dl)

Free commands (no API key needed)

These work out of the box against DefiLlama's public API:

# Protocol TVL data (3 commands)
heat llama protocols list --sort tvl --limit 10
heat llama protocols get aave
heat llama protocols tvl uniswap
 
# Chain TVL data (2 commands)
heat llama chains list --sort tvl
heat llama chains history Ethereum --limit 30
 
# Token prices (7 commands)
heat llama coins price "coingecko:bitcoin,coingecko:ethereum"
heat llama coins historical 1704067200 "coingecko:bitcoin"
heat llama coins chart "coingecko:bitcoin" --period 30d
heat llama coins change "coingecko:bitcoin"
heat llama coins first "coingecko:bitcoin"
heat llama coins block Ethereum 1704067200
heat llama coins batch-historical ./batch.json  # POST body from file
 
# Stablecoins (5 commands)
heat llama stablecoins list --sort circulating --limit 10
heat llama stablecoins get 1
heat llama stablecoins chains
heat llama stablecoins chart Ethereum
heat llama stablecoins prices
 
# Fees and revenue (4 commands)
heat llama fees overview --chain Ethereum --sort fees
heat llama fees chain Ethereum
heat llama fees protocol aave
heat llama fees history hyperliquid --data-type dailyFees --limit 30
 
# Volumes (11 commands)
heat llama volumes dexs --sort volume --limit 10
heat llama volumes dex uniswap
heat llama volumes dex-history uniswap --limit 30
heat llama volumes options --sort volume
heat llama volumes option derive --data-type dailyPremiumVolume
heat llama volumes option-history derive --data-type dailyPremiumVolume --limit 30
heat llama volumes open-interest --sort volume
heat llama volumes open-interest-history --limit 30
 
# Yields (2 commands)
heat llama yields pools --sort apy --limit 10
heat llama yields chart <pool-id>

Pro commands (require DefiLlama API key)

These require a DefiLlama Pro API key ($300/month). Without a key, they return a clear authentication error.

# Coins (1 command)
heat llama coins liquidity "coingecko:bitcoin"
 
# Stablecoins (1 command)
heat llama stablecoins dominance Ethereum
 
# Bridges (5 commands)
heat llama bridges list --sort volume
heat llama bridges get 1
heat llama bridges volume Ethereum
heat llama bridges daystats 1704067200 Ethereum
heat llama bridges tx 1
 
# Volumes (3 pro commands)
heat llama volumes derivatives --sort volume
heat llama volumes derivative hyperliquid
heat llama volumes derivative-history hyperliquid --limit 30
 
# Yields (5 commands)
heat llama yields pools-old
heat llama yields borrow --sort apy
heat llama yields lend-borrow-chart <pool-id>
heat llama yields perps --sort open_interest
heat llama yields lsd --sort apy
 
# Usage analytics (1 command)
heat llama usage

Setting your API key

# Via environment variable
export HEAT_DEFILLAMA_API_KEY=your-key
 
# Or in Heat config under [protocols.defillama]
# api_key = "your-key"

Command scope

FamilyFreeProTotal
Protocolslist, get, tvl3
Chainslist, history2
Coinsprice, historical, chart, change, first, block, batch-historicalliquidity8
Stablecoinslist, get, chains, chart, pricesdominance6
Bridgeslist, get, volume, daystats, tx5
Feesoverview, chain, protocol, history4
Volumesdexs, dex, dex-history, options, option, option-history, open-interest, open-interest-historyderivatives, derivative, derivative-history11
Yieldspools, chartpools-old, borrow, lend-borrow-chart, perps, lsd7
Usage(top-level)1
32 free16 pro48

All commands are read-only and do not require a signer or account.

Notes

  • Yields commands hit yields.llama.fi instead of the main API base URL.
  • coins batch-historical uses a POST request (accepts many tokens at once).
  • fees history exposes DefiLlama's totalDataChart timeseries from overview/fees/{target} and supports --data-type dailyFees|dailyRevenue|dailyHoldersRevenue.
  • volumes dex-history, option-history, derivative-history, and open-interest-history expose timeseries data from DefiLlama summary/overview endpoints.
  • volumes option and option-history support --data-type dailyPremiumVolume|dailyNotionalVolume.
  • Pro commands use pro-api.llama.fi as their base URL when a key is set.

Output

All commands support Heat's standard output modes:

# Pretty table (TTY default)
heat llama protocols list
 
# JSON (piped default, or explicit)
heat llama protocols list --json | jq '.protocols[:3]'
 
# Quiet — scalar output only (where supported)
TVL=$(heat llama protocols tvl aave -q)

Sorting and filtering

List commands support --sort and --limit. Protocol lists also support --category and --chain filters.

heat llama protocols list --category Lending --chain Ethereum --sort tvl --limit 5
heat llama stablecoins list --sort name
heat llama fees overview --sort change_1d
heat llama yields pools --sort tvl --limit 20