# DefiLlama Free API > Free API — no authentication required. All endpoints below use base URL https://api.llama.fi **Base URL for ALL endpoints below:** `https://api.llama.fi` ## TVL ### GET /protocols **Base URL:** `https://api.llama.fi` 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` Get historical TVL of a protocol and breakdowns by token and chain **Parameters:** - `protocol` (path, string, required) — protocol slug Example: `aave` Returns: {id, name, symbol, category, chains, currentChainTvls, chainTvls} ### GET /v2/historicalChainTvl **Base URL:** `https://api.llama.fi` 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` Get historical TVL (excludes liquid staking and double counted tvl) of a chain **Parameters:** - `chain` (path, string, required) — chain slug, you can get these from /chains or the chains property on /protocols Example: `Ethereum` Returns: array of {date, tvl} ### GET /tvl/{protocol} **Base URL:** `https://api.llama.fi` Simplified endpoint to get current TVL of a protocol **Parameters:** - `protocol` (path, string, required) — protocol slug Example: `uniswap` Returns: number ### GET /v2/chains **Base URL:** `https://api.llama.fi` Get current TVL of all chains Returns: array of {gecko_id, tvl, tokenSymbol, cmcId, name, chainId} --- ## Coins & Prices ### GET /prices/current/{coins} **Base URL:** `https://api.llama.fi` Get current prices of tokens by contract address **Parameters:** - `coins` (path, string, required) — set of comma-separated tokens defined as {chain}:{address} Example: `ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8` Returns: {coins} ### GET /prices/historical/{timestamp}/{coins} **Base URL:** `https://api.llama.fi` Get historical prices of tokens by contract address **Parameters:** - `coins` (path, string, required) — set of comma-separated tokens defined as {chain}:{address} Example: `ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8` - `timestamp` (path, number, required) — UNIX timestamp of time when you want historical prices Example: `1648680149` Returns: {coins} ### GET /batchHistorical **Base URL:** `https://api.llama.fi` Get historical prices for multiple tokens at multiple different timestamps **Parameters:** - `coins` (query, string, required) — object where keys are coins in the form {chain}:{address}, and values are arrays of requested timestamps Example: `{"avax:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e": [1666876743, 1666862343], "coingecko:ethereum": [1666869543, 1666862343]} ` Returns: {coins} ### GET /chart/{coins} **Base URL:** `https://api.llama.fi` Get token prices at regular time intervals **Parameters:** - `coins` (path, string, required) — set of comma-separated tokens defined as {chain}:{address} Example: `ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8` - `start` (query, number, optional) — unix timestamp of earliest data point requested Example: `1664364537` - `end` (query, number, optional) — unix timestamp of latest data point requested - `span` (query, number, optional) — number of data points returned, defaults to 0 Example: `10` - `period` (query, string, optional) — duration between data points, defaults to 24 hours Example: `2d` Returns: {coins} ### GET /percentage/{coins} **Base URL:** `https://api.llama.fi` Get percentage change in price over time **Parameters:** - `coins` (path, string, required) — set of comma-separated tokens defined as {chain}:{address} Example: `ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8` - `timestamp` (query, number, optional) — timestamp of data point requested, defaults to time now Example: `1664364537` - `lookForward` (query, boolean, optional) — whether you want the duration after your given timestamp or not, defaults to false (looking back) Example: `false` - `period` (query, string, optional) — duration between data points, defaults to 24 hours Example: `3w` Returns: {coins} ### GET /prices/first/{coins} **Base URL:** `https://api.llama.fi` Get earliest timestamp price record for coins **Parameters:** - `coins` (path, string, required) — set of comma-separated tokens defined as {chain}:{address} Example: `ethereum:0xdF574c24545E5FfEcb9a659c229253D4111d87e1,coingecko:ethereum,bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878,ethereum:0xdB25f211AB05b1c97D595516F45794528a807ad8` Returns: {coins} ### GET /block/{chain}/{timestamp} **Base URL:** `https://api.llama.fi` Get the closest block to a timestamp **Parameters:** - `chain` (path, string, required) — Chain which you want to get the block from Example: `ethereum` - `timestamp` (path, integer, required) — UNIX timestamp of the block you are searching for Example: `1603964988` Returns: {height, timestamp} --- ## Stablecoins ### GET /stablecoins **Base URL:** `https://api.llama.fi` List all stablecoins along with their circulating amounts **Parameters:** - `includePrices` (query, boolean, optional) — set whether to include current stablecoin prices Example: `true` Returns: {peggedAssets} ### GET /stablecoincharts/all **Base URL:** `https://api.llama.fi` Get historical mcap sum of all stablecoins **Parameters:** - `stablecoin` (query, integer, optional) — stablecoin ID, you can get these from /stablecoins Example: `1` Returns: array of {date, totalCirculating} ### GET /stablecoincharts/{chain} **Base URL:** `https://api.llama.fi` Get historical mcap sum of all stablecoins in a chain **Parameters:** - `chain` (path, string, required) — chain slug, you can get these from /chains or the chains property on /protocols Example: `Ethereum` - `stablecoin` (query, integer, optional) — stablecoin ID, you can get these from /stablecoins Example: `1` Returns: array of {date, totalCirculating} ### GET /stablecoin/{asset} **Base URL:** `https://api.llama.fi` Get historical mcap and historical chain distribution of a stablecoin **Parameters:** - `asset` (path, integer, required) — stablecoin ID, you can get these from /stablecoins Example: `1` Returns: {id, name, symbol, totalCirculating, chainCirculating} ### GET /stablecoinchains **Base URL:** `https://api.llama.fi` Get current mcap sum of all stablecoins on each chain Returns: array of {name, totalCirculating} ### GET /stablecoinprices **Base URL:** `https://api.llama.fi` Get historical prices of all stablecoins Returns: array of {date, prices} --- ## Yields & APY ### GET /pools **Base URL:** `https://api.llama.fi` Retrieve the latest data for all pools, including enriched information such as predictions Returns: {status, data} ### GET /chart/{pool} **Base URL:** `https://api.llama.fi` Get historical APY and TVL of a pool **Parameters:** - `pool` (path, string, required) — pool id, can be retrieved from /pools (property is called pool) Example: `747c1d2a-c668-4682-b9f9-296708a3dd90` Returns: {status, data} --- ## DEX Volumes ### GET /overview/dexs **Base URL:** `https://api.llama.fi` List all dexs along with summaries of their volumes and dataType history data **Parameters:** - `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` Returns: {protocols, totalDataChart, allChains} ### GET /overview/dexs/{chain} **Base URL:** `https://api.llama.fi` List all dexs along with summaries of their volumes and dataType history data filtering by chain **Parameters:** - `chain` (path, string, required) — chain name, list of all supported chains can be found under allChains attribute in /overview/dexs response Example: `ethereum` - `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` Returns: {protocols, totalDataChart} ### GET /summary/dexs/{protocol} **Base URL:** `https://api.llama.fi` Get summary of dex volume with historical data **Parameters:** - `protocol` (path, string, required) — protocol slug Example: `uniswap` - `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` Returns: {name, total24h, totalAllTime, totalDataChart, totalDataChartBreakdown, chains} ### GET /overview/options **Base URL:** `https://api.llama.fi` List all options dexs along with summaries of their volumes and dataType history data **Parameters:** - `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: {protocols, totalDataChart} ### GET /overview/options/{chain} **Base URL:** `https://api.llama.fi` List all options dexs along with summaries of their volumes and dataType history data filtering by chain **Parameters:** - `chain` (path, string, required) — chain name, list of all supported chains can be found under allChains attribute in /overview/options response Example: `ethereum` - `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` ### GET /summary/options/{protocol} **Base URL:** `https://api.llama.fi` 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` --- ## Perpetuals & Open Interest ### GET /overview/open-interest **Base URL:** `https://api.llama.fi` List all open interest dex exchanges along with summaries of their open interest **Parameters:** - `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` Returns: {protocols, totalDataChart, allChains} --- ## Fees & Revenue ### GET /overview/fees **Base URL:** `https://api.llama.fi` List all protocols along with summaries of their fees and revenue and dataType history data **Parameters:** - `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, dailyFees by default. (one of: dailyFees, dailyRevenue, dailyHoldersRevenue) Example: `dailyFees` Returns: {protocols, totalDataChart, totalDataChartBreakdown} ### GET /overview/fees/{chain} **Base URL:** `https://api.llama.fi` List all protocols along with summaries of their fees and revenue and dataType history data by chain **Parameters:** - `chain` (path, string, required) — chain name, list of all supported chains can be found under allChains attribute in /overview/fees response Example: `ethereum` - `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, dailyFees by default. (one of: dailyFees, dailyRevenue, dailyHoldersRevenue) Example: `dailyFees` Returns: {protocols, totalDataChart, totalDataChartBreakdown} ### GET /summary/fees/{protocol} **Base URL:** `https://api.llama.fi` 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}