diff --git a/llms-pro.txt b/llms-pro.txt index 1b497cb9ea9..68ff687cd1a 100644 --- a/llms-pro.txt +++ b/llms-pro.txt @@ -68,18 +68,38 @@ Returns: {outflows, oldTokens, currentTokens} Get assets of all chains Returns: {chain, timestamp} ---- +### GET /api/v2/metrics/tvl/protocol/{protocol} +**Base URL:** `https://pro-api.llama.fi` +Get aggregate TVL metrics for a protocol -## Stablecoins +**Parameters:** + - `protocol` (path, string, required) — protocol slug Example: `aave` +Returns: {id, name, address, symbol, url, referralUrl, description, chain, logo, audits, audit_note, gecko_id, cmcId, category, tags, chains, module, treasury, twitter, audit_links, openSource, forkedFrom, oraclesByChain, parentProtocol, governanceID, github, currentChainTvls, isParentProtocol, mcap, methodology, raises, otherProtocols, hallmarks, stablecoins, misrepresentedTokens, deprecated, rugged, deadUrl, warningBanners, tokenRights, wrongLiquidity, tvlCodePath} -### GET /stablecoins/stablecoindominance/{chain} +### GET /api/v2/chart/tvl/protocol/{protocol} **Base URL:** `https://pro-api.llama.fi` -Get stablecoin dominance per chain along with the info about the larges coin in a chain +Get historical TVL chart for a protocol **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, totalCirculatingUSD, greatestMcap} + - `protocol` (path, string, required) — protocol slug Example: `uniswap` + - `key` (query, string, optional) — 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". (one of: all, staking, borrowed, vesting, pool2) Example: `all` + +### GET /api/v2/chart/tvl/protocol/{protocol}/chain-breakdown +**Base URL:** `https://pro-api.llama.fi` +Get historical TVL chart for a protocol broken down by chain + +**Parameters:** + - `protocol` (path, string, required) — protocol slug Example: `euler` + - `key` (query, string, optional) — 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". (one of: all, staking, borrowed, vesting, pool2) Example: `borrowed` + +### GET /api/v2/chart/tvl/protocol/{protocol}/token-breakdown +**Base URL:** `https://pro-api.llama.fi` +Get historical TVL chart for a protocol broken down by token + +**Parameters:** + - `protocol` (path, string, required) — protocol slug Example: `aave` + - `key` (query, string, optional) — 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". (one of: all, staking, borrowed, vesting, pool2) + - `currency` (query, string, optional) — Set to "tokens" to return values denominated in raw token amounts instead of USD (one of: usd, token, raw) Example: `usd` --- @@ -150,64 +170,6 @@ Provides the name of contracts on a determined chain --- -## Yields & APY - -### GET /yields/poolsOld -**Base URL:** `https://pro-api.llama.fi` -Same as /pools but it also includes a new parameter `pool_old` which usually contains pool address (but not guaranteed) -Returns: {status, data} - -### GET /yields/poolsBorrow -**Base URL:** `https://pro-api.llama.fi` -Borrow costs APY of assets from lending markets -Returns: {status, data} - -### GET /yields/chartLendBorrow/{pool} -**Base URL:** `https://pro-api.llama.fi` -Historical borrow cost APY from a pool on a lending market, pool ids should be obtained from /poolsBorrow - -**Parameters:** - - `pool` (path, string, required) — pool id, can be retrieved from /poolsBorrow (property is called pool) Example: `e880e828-ca59-4ec6-8d4f-27182a4dc23d` -Returns: {status, data} - -### GET /yields/perps -**Base URL:** `https://pro-api.llama.fi` -Funding rates and Open Interest of perps across exchanges, including both Decentralized and Centralized -Returns: {status, data} - -### GET /yields/lsdRates -**Base URL:** `https://pro-api.llama.fi` -APY rates of multiple LSDs -Returns: array of {name, symbol, address, type, expectedRate, marketRate, ethPeg, fee} - ---- - -## ETFs - -### GET /etfs/snapshot -**Base URL:** `https://pro-api.llama.fi` -Get ETFs and their metrics (aum, flows, fees...) -Returns: array of {ticker, timestamp, asset, issuer, etf_name, custodian, pct_fee, url, flows, aum, volume} - -### GET /etfs/flows -**Base URL:** `https://pro-api.llama.fi` -Historical Flows at the Asset Level -Returns: array of {gecko_id, day, total_flow_usd} - ---- - -## Narratives - -### GET /fdv/performance/{period} -**Base URL:** `https://pro-api.llama.fi` -Get chart of narratives based on category performance (with individual coins weighted by mcap) - -**Parameters:** - - `period` (path, string, required) — One of ['7', '30', 'ytd', '365'] Example: `30` -Returns: array of {date, Analytics, Artificial Intelligence (AI), Bitcoin, Bridge Governance Tokens, Centralized Exchange (CEX) Token, Data Availability, Decentralized Finance (DeFi), Decentralized Identifier (DID), DePIN, Ethereum, Gaming (GameFi), Liquid Staking Governance Tokens, Meme, NFT Marketplace, Oracle, PolitiFi, Prediction Markets, Real World Assets (RWA), Rollup, Smart Contract Platform, SocialFi, Solana} - ---- - ## Perpetuals & Open Interest ### GET /api/overview/derivatives @@ -231,216 +193,296 @@ Returns: {id, name, url, referralUrl, description, logo, gecko_id, cmcId, chains --- -## Bridges +## Treasury -### GET /bridges/bridges +### GET /api/v2/metrics/treasury/protocol/{protocol} **Base URL:** `https://pro-api.llama.fi` -List all bridges along with summaries of recent bridge volumes. +Get aggregate treasury metrics for a protocol **Parameters:** - - `includeChains` (query, boolean, optional) — set whether to include current previous day volume breakdown by chain Example: `true` -Returns: {bridges} - -### GET /bridges/bridge/{id} -**Base URL:** `https://pro-api.llama.fi` -Get summary of bridge volume and volume breakdown by chain - -**Parameters:** - - `id` (path, integer, required) — bridge ID, you can get these from /bridges Example: `1` -Returns: {id, name, displayName, lastHourlyVolume, currentDayVolume, lastDailyVolume, dayBeforeLastVolume, weeklyVolume, monthlyVolume, lastHourlyTxs, currentDayTxs, prevDayTxs, dayBeforeLastTxs, weeklyTxs, monthlyTxs, chainBreakdown, destinationChain} + - `protocol` (path, string, required) — protocol slug Example: `aave` +Returns: {id, name, address, symbol, url, referralUrl, description, chain, logo, audits, audit_note, gecko_id, cmcId, category, tags, chains, module, treasury, twitter, audit_links, openSource, forkedFrom, oraclesByChain, parentProtocol, governanceID, github, currentChainTvls, isParentProtocol, mcap, methodology, raises, otherProtocols, hallmarks, stablecoins, misrepresentedTokens, deprecated, rugged, deadUrl, warningBanners, tokenRights, wrongLiquidity, tvlCodePath} -### GET /bridges/bridgevolume/{chain} +### GET /api/v2/chart/treasury/protocol/{protocol} **Base URL:** `https://pro-api.llama.fi` -Get historical volumes for a bridge, chain, or bridge on a particular chain +Get historical treasury chart for a protocol **Parameters:** - - `chain` (path, string, required) — chain slug, you can get these from /chains. Call also use 'all' for volume on all chains. Example: `Ethereum` - - `id` (query, integer, optional) — bridge ID, you can get these from /bridges Example: `2` -Returns: array of {date, depositUSD, withdrawUSD, depositTxs, withdrawTxs} + - `protocol` (path, string, required) — protocol slug Example: `uniswap` + - `key` (query, string, optional) — 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. (one of: OwnTokens, all) Example: `all` -### GET /bridges/bridgedaystats/{timestamp}/{chain} +### GET /api/v2/chart/treasury/protocol/{protocol}/chain-breakdown **Base URL:** `https://pro-api.llama.fi` -Get a 24hr token and address volume breakdown for a bridge +Get historical treasury chart for a protocol broken down by chain **Parameters:** - - `timestamp` (path, integer, required) — Unix timestamp. Data returned will be for the 24hr period starting at 00:00 UTC that the timestamp lands in. Example: `1755561600` - - `chain` (path, string, required) — chain slug, you can get these from /chains. Example: `Ethereum` - - `id` (query, integer, optional) — bridge ID, you can get these from /bridges Example: `2` -Returns: {date, totalTokensDeposited, totalTokensWithdrawn, totalAddressDeposited, totalAddressWithdrawn} + - `protocol` (path, string, required) — protocol slug Example: `aave` + - `key` (query, string, optional) — 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. (one of: OwnTokens, all) Example: `OwnTokens` -### GET /bridges/transactions/{id} +### GET /api/v2/chart/treasury/protocol/{protocol}/token-breakdown **Base URL:** `https://pro-api.llama.fi` -Get all transactions for a bridge within a date range +Get historical treasury chart for a protocol broken down by token **Parameters:** - - `id` (path, integer, required) — bridge ID, you can get these from /bridges Example: `1` - - `starttimestamp` (query, integer, optional) — start timestamp (Unix Timestamp) for date range Example: `1667260800` - - `endtimestamp` (query, integer, optional) — end timestamp (Unix timestamp) for date range Example: `1667347200` - - `sourcechain` (query, string, optional) — Returns only transactions that are bridging from the specified source chain. Example: `Polygon` - - `address` (query, string, optional) — 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... . Example: `ethereum:0x69b4B4390Bd1f0aE84E090Fe8af7AbAd2d95Cc8E` - - `limit` (query, integer, optional) — limit to number of transactions returned, maximum is 6000 Example: `200` + - `protocol` (path, string, required) — protocol slug Example: `aave` + - `key` (query, string, optional) — 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. (one of: OwnTokens, all) Example: `OwnTokens` + - `currency` (query, string, optional) — Set to "tokens" to return values denominated in raw token amounts instead of USD (one of: usd, token, raw) Example: `usd` --- -## API Key Management +## Oracles -### GET /usage/APIKEY +### GET /api/v2/metrics/oracle **Base URL:** `https://pro-api.llama.fi` -Get amount of credits left in the api key, these reset on the 1st of each month +Get oracle data overview +Returns: {oracles} ---- +### GET /api/v2/chart/oracle +**Base URL:** `https://pro-api.llama.fi` +Get timeseries chart data for all oracles -## Digital Asset Treasury +### GET /api/v2/chart/oracle/chain-breakdown +**Base URL:** `https://pro-api.llama.fi` +Get timeseries chart data breakdown by chain +Returns: array of {timestamp} -### GET /dat/institutions +### GET /api/v2/chart/oracle/protocol-breakdown **Base URL:** `https://pro-api.llama.fi` -Get list of all institutions with Digital Asset Treasury data -Returns: {institutionMetadata, assetMetadata, institutions, assets, totalCompanies, flows, mNAV, lastUpdated} +Get timeseries chart data breakdown by protocol +Returns: array of {timestamp} -### GET /dat/institutions/{symbol} +### GET /api/v2/chart/oracle/protocol/{protocol} **Base URL:** `https://pro-api.llama.fi` -Get individual institution Digital Asset Treasury details +Get timeseries chart data by protocol/oracle **Parameters:** - - `symbol` (path, string, required) — Institution ticker symbol (e.g., MSTR for MicroStrategy) Example: `MSTR` -Returns: {institutionId, ticker, name, type, rank, price, priceChange24h, volume24h, fd_realized, fd_realistic, fd_max, mcap_realized, mcap_realistic, mcap_max, realized_mNAV, realistic_mNAV, max_mNAV, totalCost, totalUsdValue, assets, assetsMeta, ohlcv, assetValue, stats, transactions, lastUpdated} - ---- - -## Equities - -### GET /equities/v1/companies -**Base URL:** `https://pro-api.llama.fi` -Get list of all tracked public companies -Returns: array of {ticker, name, currentPrice, volume, marketCap, priceChangePercentage1d, trailingPE, dividendYield, priceToBook, lastUpdatedAt, priceChangePercentage7d, priceChangePercentage1m, revenueTTM, grossProfitTTM, totalAssets, earningsTTM, operatingProfitMargin, totalLiabilities} + - `protocol` (path, string, required) — oracle/protocol name Example: `Chainlink` -### GET /equities/v1/statements +### GET /api/v2/chart/oracle/protocol/{protocol}/chain-breakdown **Base URL:** `https://pro-api.llama.fi` -Get financial statements for a company +Get chain breakdown timeseries chart data by protocol/oracle **Parameters:** - - `ticker` (query, string, required) — Stock ticker symbol (case-insensitive) Example: `COIN` -Returns: {incomeStatement, balanceSheet, cashflow} + - `protocol` (path, string, required) — oracle/protocol name Example: `Chainlink` +Returns: array of {timestamp} -### GET /equities/v1/price-history +### GET /api/v2/chart/oracle/chain/{chain} **Base URL:** `https://pro-api.llama.fi` -Get historical price data for a company +Get timeseries chart data by chain **Parameters:** - - `ticker` (query, string, required) — Stock ticker symbol (case-insensitive) Example: `AAPL` - - `timeframe` (query, string, optional) — Optional lookback window (case-insensitive). Omit or empty for full history (`MAX`). (one of: 1W, 1M, 6M, 1Y, 5Y, MAX) Example: `1Y` + - `chain` (path, string, required) — chain name Example: `Ethereum` -### GET /equities/v1/ohlcv +### GET /api/v2/chart/oracle/chain/{chain}/protocol-breakdown **Base URL:** `https://pro-api.llama.fi` -Get OHLCV candle data for a company +Get protocol breakdown timeseries chart data by chain **Parameters:** - - `ticker` (query, string, required) — Stock ticker symbol (case-insensitive) Example: `AAPL` - - `timeframe` (query, string, optional) — Optional lookback window (case-insensitive). Same values as price history. Omit or empty for full history (`MAX`). (one of: 1W, 1M, 6M, 1Y, 5Y, MAX) Example: `6M` + - `chain` (path, string, required) — chain name Example: `Ethereum` +Returns: array of {timestamp} -### GET /equities/v1/summary +--- + +## Forks + +### GET /api/v2/metrics/fork **Base URL:** `https://pro-api.llama.fi` -Get live market summary for a company +Get fork data overview +Returns: object -**Parameters:** - - `ticker` (query, string, required) — Stock ticker symbol (case-insensitive) Example: `AAPL` -Returns: {currentPrice, volume, marketCap, fiftyTwoWeekHigh, fiftyTwoWeekLow, dividendYield, trailingPE, priceChangePercentage1d, priceToBook, updatedAt, priceChangePercentage7d, priceChangePercentage1m, revenueTTM, grossProfitTTM, totalAssets, earningsTTM} +### GET /api/v2/chart/fork/protocol-breakdown +**Base URL:** `https://pro-api.llama.fi` +Get timeseries chart data breakdown by protocol +Returns: array of {timestamp} -### GET /equities/v1/filings +### GET /api/v2/chart/fork/protocol/{protocol} **Base URL:** `https://pro-api.llama.fi` -Get SEC filings for a company +Get timeseries chart data by protocol **Parameters:** - - `ticker` (query, string, required) — Stock ticker symbol (case-insensitive) Example: `COIN` -Returns: array of {filingDate, reportDate, form, primaryDocumentUrl, documentDescription} + - `protocol` (path, string, required) — protocol slug Example: `aave-v3` --- -## Oracles (Beta) +## Dimensions -### GET /api/v2/metrics/oracle +### GET /api/v2/metrics/{metric} **Base URL:** `https://pro-api.llama.fi` -Get oracle data overview. Returns mapping of oracle names to arrays of protocol names using that oracle. -Returns: {oracles: {OracleName: [protocol1, protocol2, ...], ...}} +Get dimension data overview -### GET /api/v2/chart/oracle -**Base URL:** `https://pro-api.llama.fi` -Get timeseries chart data for all oracles. Returns array of [timestamp, value] pairs representing total oracle TVL over time. -Returns: array of [timestamp, value] +**Parameters:** + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` +Returns: {allChains, total24h, total48hto24h, total7d, total14dto7d, total60dto30d, total30d, total1y, change_1d, change_7d, change_1m, change_7dover7d, change_30dover30d} -### GET /api/v2/chart/oracle/chain-breakdown +### GET /api/v2/chart/{metric} **Base URL:** `https://pro-api.llama.fi` -Get timeseries chart data breakdown by chain. Returns array of objects with timestamp and TVL per chain. -Returns: array of {timestamp, Chain1: value, Chain2: value, ...} +Get historical timeseries chart data -### GET /api/v2/chart/oracle/protocol-breakdown -**Base URL:** `https://pro-api.llama.fi` -Get timeseries chart data breakdown by protocol/oracle. Returns array of objects with timestamp and TVL per oracle. -Returns: array of {timestamp, Oracle1: value, Oracle2: value, ...} +**Parameters:** + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -### GET /api/v2/chart/oracle/protocol/{protocol} +### GET /api/v2/chart/{metric}/chain-breakdown **Base URL:** `https://pro-api.llama.fi` -Get timeseries chart data by protocol/oracle. Returns array of [timestamp, value] pairs for a specific oracle. +Get historical timeseries chart data breakdown by chain **Parameters:** - - `protocol` (path, string, required) — oracle/protocol name Example: `Chainlink` -Returns: array of [timestamp, value] + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -### GET /api/v2/chart/oracle/protocol/{protocol}/chain-breakdown +### GET /api/v2/chart/{metric}/protocol-breakdown **Base URL:** `https://pro-api.llama.fi` -Get chain breakdown timeseries chart data by protocol/oracle. Returns array of objects with timestamp and TVL per chain for a specific oracle. +Get historical timeseries chart data breakdown by protocol **Parameters:** - - `protocol` (path, string, required) — oracle/protocol name Example: `Chainlink` -Returns: array of {timestamp, Chain1: value, Chain2: value, ...} + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -### GET /api/v2/chart/oracle/chain/{chain} +### GET /api/v2/metrics/{metric}/chain/{chain} **Base URL:** `https://pro-api.llama.fi` -Get timeseries chart data by chain. Returns array of [timestamp, value] pairs for oracle TVL on a specific chain. +Get chain dimension data overview **Parameters:** + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` - `chain` (path, string, required) — chain name Example: `Ethereum` -Returns: array of [timestamp, value] + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` +Returns: {allChains, total24h, total48hto24h, total7d, total14dto7d, total60dto30d, total30d, total1y, change_1d, change_7d, change_1m, change_7dover7d, change_30dover30d, chain} -### GET /api/v2/chart/oracle/chain/{chain}/protocol-breakdown +### GET /api/v2/chart/{metric}/chain/{chain} **Base URL:** `https://pro-api.llama.fi` -Get protocol breakdown timeseries chart data by chain. Returns array of objects with timestamp and TVL per oracle for a specific chain. +Get chain historical timeseries chart data **Parameters:** + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` - `chain` (path, string, required) — chain name Example: `Ethereum` -Returns: array of {timestamp, Oracle1: value, Oracle2: value, ...} + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` ---- +### GET /api/v2/chart/{metric}/chain/{chain}/protocol-breakdown +**Base URL:** `https://pro-api.llama.fi` +Get chain timeseries chart data breakdown by protocol -## Forks (Beta) +**Parameters:** + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `chain` (path, string, required) — chain name Example: `Ethereum` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -### GET /api/v2/metrics/fork +### GET /api/v2/metrics/{metric}/protocol/{protocol} **Base URL:** `https://pro-api.llama.fi` -Get fork data overview. Returns mapping of fork protocol names to arrays of forked protocol names. -Returns: {ForkName: [protocol1, protocol2, ...], ...} +Get protocol dimension data overview -### GET /api/v2/chart/fork/protocol-breakdown -**Base URL:** `https://pro-api.llama.fi` -Get timeseries chart data breakdown by protocol. Returns array of objects with timestamp and TVL per fork protocol. -Returns: array of {timestamp, Fork1: value, Fork2: value, ...} +**Parameters:** + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `protocol` (path, string, required) — protocol slug (slugified protocol name) Example: `aave` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` +Returns: {id, name, url, description, logo, chains, gecko_id, cmcId, symbol, twitter, github, treasury, governanceID, wrongLiquidity, stablecoins, total24h, total48hto24h, total7d, total30d, total1y, change_1d, change_7d, change_1m} -### GET /api/v2/chart/fork/protocol/{protocol} +### GET /api/v2/chart/{metric}/protocol/{protocol} **Base URL:** `https://pro-api.llama.fi` -Get timeseries chart data by protocol. Returns array of [timestamp, value] pairs for all forks of a specific protocol. +Get protocol historical timeseries chart data **Parameters:** - - `protocol` (path, string, required) — protocol slug Example: `aave-v3` -Returns: array of [timestamp, value] - ---- + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `protocol` (path, string, required) — protocol slug (slugified protocol name) Example: `aave` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -## Dimensions (Beta) +### GET /api/v2/chart/{metric}/protocol/{protocol}/chain-breakdown +**Base URL:** `https://pro-api.llama.fi` +Get protocol timeseries chart data breakdown by chain -Unified dimension endpoints for fees, DEX volumes, derivatives, options, aggregators, bridge aggregators, open interest, and normalized volume. +**Parameters:** + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `protocol` (path, string, required) — protocol slug (slugified protocol name) Example: `aave` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -**`{metric}` values:** fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume +### GET /api/v2/chart/{metric}/protocol/{protocol}/version-breakdown +**Base URL:** `https://pro-api.llama.fi` +Get protocol timeseries chart data breakdown by version -**`dataType` query parameter** (optional, metric-specific): +**Parameters:** + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `protocol` (path, string, required) — protocol slug (slugified protocol name) Example: `aave` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: - **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue - **dexs**: dailyVolume (default), dailyNotionalVolume - **derivatives**: dailyVolume (default), dailyNotionalVolume @@ -448,230 +490,353 @@ Unified dimension endpoints for fees, DEX volumes, derivatives, options, aggrega - **aggregators**: dailyVolume (default) - **bridge-aggregators**: dailyBridgeVolume (default) - **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd -- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -**`{protocol}`** should be slug-formatted (e.g. `aave`, `hyperliquid-perps`, `openocean`, `li.fi-bridge-aggregator`) -**`{category}`** should be slug-formatted (e.g. `dexs`, `prediction-market`, `options`, `dex-aggregator`, `bridge-aggregator`) +### GET /api/v2/chart/{metric}/protocol/{protocol}/label-breakdown +**Base URL:** `https://pro-api.llama.fi` +Get protocol timeseries chart data breakdown by label -### Overview +**Parameters:** + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `protocol` (path, string, required) — protocol slug (slugified protocol name) Example: `aave` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -#### GET /api/v2/metrics/{metric} +### GET /api/v2/metrics/{metric}/category/{category} **Base URL:** `https://pro-api.llama.fi` -Get dimension data overview. Returns aggregate metrics including totals and percentage changes. +Get category dimension data overview **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `dataType` (query, string, optional) — metric-specific data type -Returns: {allChains, total24h, total48hto24h, total7d, total14dto7d, total60dto30d, total30d, total1y, change_1d, change_7d, change_1m, change_7dover7d, change_30dover30d} + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `category` (path, string, required) — category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options') Example: `dexs` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` +Returns: {allChains, total24h, total48hto24h, total7d, total14dto7d, total60dto30d, total30d, total1y, change_1d, change_7d, change_1m, change_7dover7d, change_30dover30d, category, allCategories} -#### GET /api/v2/chart/{metric} +### GET /api/v2/chart/{metric}/category/{category} **Base URL:** `https://pro-api.llama.fi` -Get historical timeseries chart data. +Get category historical timeseries chart data **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, value] + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `category` (path, string, required) — category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options') Example: `dexs` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -#### GET /api/v2/chart/{metric}/chain-breakdown +### GET /api/v2/chart/{metric}/category/{category}/chain-breakdown **Base URL:** `https://pro-api.llama.fi` -Get historical timeseries chart data breakdown by chain. +Get category timeseries chart data breakdown by chain **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, {Chain1: value, Chain2: value, ...}] + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `category` (path, string, required) — category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options') Example: `dexs` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -#### GET /api/v2/chart/{metric}/protocol-breakdown +### GET /api/v2/chart/{metric}/category/{category}/protocol-breakdown **Base URL:** `https://pro-api.llama.fi` -Get historical timeseries chart data breakdown by protocol. +Get category timeseries chart data breakdown by protocol **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, {Protocol1: value, Protocol2: value, ...}] - -### For chains + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `category` (path, string, required) — category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options') Example: `dexs` + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -#### GET /api/v2/metrics/{metric}/chain/{chain} +### GET /api/v2/metrics/{metric}/category/{category}/chain/{chain} **Base URL:** `https://pro-api.llama.fi` -Get chain dimension data overview. +Get category chain dimension data overview **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `category` (path, string, required) — category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options') Example: `dexs` - `chain` (path, string, required) — chain name Example: `Ethereum` - - `dataType` (query, string, optional) — metric-specific data type -Returns: {chain, allChains, total24h, total48hto24h, total7d, total14dto7d, total60dto30d, total30d, total1y, change_1d, change_7d, change_1m, change_7dover7d, change_30dover30d} + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` +Returns: {allChains, total24h, total48hto24h, total7d, total14dto7d, total60dto30d, total30d, total1y, change_1d, change_7d, change_1m, change_7dover7d, change_30dover30d, category, allCategories, chain} -#### GET /api/v2/chart/{metric}/chain/{chain} +### GET /api/v2/chart/{metric}/category/{category}/chain/{chain} **Base URL:** `https://pro-api.llama.fi` -Get chain historical timeseries chart data. +Get category chain historical timeseries chart data **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `category` (path, string, required) — category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options') Example: `dexs` - `chain` (path, string, required) — chain name Example: `Ethereum` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, value] + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -#### GET /api/v2/chart/{metric}/chain/{chain}/protocol-breakdown +### GET /api/v2/chart/{metric}/category/{category}/chain/{chain}/protocol-breakdown **Base URL:** `https://pro-api.llama.fi` -Get chain timeseries chart data breakdown by protocol. +Get category chain timeseries chart data breakdown by protocol **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` + - `metric` (path, string, required) — The dimension metric type (one of: fees, dexs, derivatives, options, aggregators, bridge-aggregators, open-interest, normalized-volume) Example: `fees` + - `category` (path, string, required) — category slug (slugified category name, e.g. 'dexs', 'prediction-market', 'options') Example: `dexs` - `chain` (path, string, required) — chain name Example: `Ethereum` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, {Protocol1: value, Protocol2: value, ...}] + - `dataType` (query, string, optional) — Metric-specific data type to return. Supported values per metric: +- **fees**: dailyFees (default), dailyRevenue, dailySupplySideRevenue, dailyHoldersRevenue, dailyProtocolRevenue +- **dexs**: dailyVolume (default), dailyNotionalVolume +- **derivatives**: dailyVolume (default), dailyNotionalVolume +- **options**: dailyNotionalVolume (default), dailyPremiumVolume +- **aggregators**: dailyVolume (default) +- **bridge-aggregators**: dailyBridgeVolume (default) +- **open-interest**: openInterestAtEnd (default), shortOpenInterestAtEnd, longOpenInterestAtEnd +- **normalized-volume**: dailyNormalizedVolume (default), dailyActiveLiquidity Example: `dailyFees` -### For protocols +--- -#### GET /api/v2/metrics/{metric}/protocol/{protocol} +## Financial Statements + +### GET /api/v2/metrics/financial-statement/protocol/{protocol} **Base URL:** `https://pro-api.llama.fi` -Get protocol dimension data overview. Returns protocol metadata along with aggregate metrics. +Get protocol income statement report **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `protocol` (path, string, required) — protocol slug Example: `aave` - - `dataType` (query, string, optional) — metric-specific data type -Returns: {id, name, url, description, logo, chains, gecko_id, cmcId, symbol, total24h, total48hto24h, total7d, total30d, total1y, change_1d, change_7d, change_1m} + - `protocol` (path, string, required) — protocol slug (e.g. aave-v3, hyperliquid) Example: `aave-v3` +Returns: {id, name, address, symbol, url, description, chain, logo, audits, audit_links, category, chains, oraclesBreakdown, module, twitter, github, listedAt, parentProtocol, dimensions, methodology, breakdownMethodology, methodologyURL, tvlCodePath, hallmarks, linkedProtocols, childProtocols, hasLabelBreakdown, defillamaId, displayName, slug, protocolType, aggregates} -#### GET /api/v2/chart/{metric}/protocol/{protocol} +--- + +## Stablecoins + +### GET /stablecoins/stablecoindominance/{chain} **Base URL:** `https://pro-api.llama.fi` -Get protocol historical timeseries chart data. +Get stablecoin dominance per chain along with the info about the larges coin in a chain **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `protocol` (path, string, required) — protocol slug Example: `aave` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, value] + - `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, totalCirculatingUSD, greatestMcap} + +--- -#### GET /api/v2/chart/{metric}/protocol/{protocol}/chain-breakdown +## Yields & APY + +### GET /yields/poolsOld **Base URL:** `https://pro-api.llama.fi` -Get protocol timeseries chart data breakdown by chain. +Same as /pools but it also includes a new parameter `pool_old` which usually contains pool address (but not guaranteed) +Returns: {status, data} -**Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `protocol` (path, string, required) — protocol slug Example: `aave` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, {Chain1: value, Chain2: value, ...}] +### GET /yields/poolsBorrow +**Base URL:** `https://pro-api.llama.fi` +Borrow costs APY of assets from lending markets +Returns: {status, data} -#### GET /api/v2/chart/{metric}/protocol/{protocol}/version-breakdown +### GET /yields/chartLendBorrow/{pool} **Base URL:** `https://pro-api.llama.fi` -Get protocol timeseries chart data breakdown by version (e.g. Aave V2, Aave V3). +Historical borrow cost APY from a pool on a lending market, pool ids should be obtained from /poolsBorrow **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `protocol` (path, string, required) — protocol slug Example: `aave` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, {Version1: value, Version2: value, ...}] + - `pool` (path, string, required) — pool id, can be retrieved from /poolsBorrow (property is called pool) Example: `e880e828-ca59-4ec6-8d4f-27182a4dc23d` +Returns: {status, data} + +### GET /yields/perps +**Base URL:** `https://pro-api.llama.fi` +Funding rates and Open Interest of perps across exchanges, including both Decentralized and Centralized +Returns: {status, data} -#### GET /api/v2/chart/{metric}/protocol/{protocol}/label-breakdown +### GET /yields/lsdRates **Base URL:** `https://pro-api.llama.fi` -Get protocol timeseries chart data breakdown by label (e.g. Borrow Interest, Flash Loans). Currently only supported for metric=fees. +APY rates of multiple LSDs +Returns: array of {name, symbol, address, type, expectedRate, marketRate, ethPeg, fee} -**Parameters:** - - `metric` (path, string, required) — must be `fees` Example: `fees` - - `protocol` (path, string, required) — protocol slug Example: `aave` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, {Label1: value, Label2: value, ...}] +--- -### For categories +## ETFs -#### GET /api/v2/metrics/{metric}/category/{category} +### GET /etfs/snapshot **Base URL:** `https://pro-api.llama.fi` -Get category dimension data overview. +Get ETFs and their metrics (aum, flows, fees...) +Returns: array of {ticker, timestamp, asset, issuer, etf_name, custodian, pct_fee, url, flows, aum, volume} -**Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `category` (path, string, required) — category slug Example: `dexs` - - `dataType` (query, string, optional) — metric-specific data type -Returns: {category, allCategories, allChains, total24h, total48hto24h, total7d, total14dto7d, total60dto30d, total30d, total1y, change_1d, change_7d, change_1m, change_7dover7d, change_30dover30d} +### GET /etfs/flows +**Base URL:** `https://pro-api.llama.fi` +Historical Flows at the Asset Level +Returns: array of {gecko_id, day, total_flow_usd} + +--- + +## Narratives -#### GET /api/v2/chart/{metric}/category/{category} +### GET /fdv/performance/{period} **Base URL:** `https://pro-api.llama.fi` -Get category historical timeseries chart data. +Get chart of narratives based on category performance (with individual coins weighted by mcap) **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `category` (path, string, required) — category slug Example: `dexs` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, value] + - `period` (path, string, required) — One of ['7', '30', 'ytd', '365'] Example: `30` +Returns: array of {date, Analytics, Artificial Intelligence (AI), Bitcoin, Bridge Governance Tokens, Centralized Exchange (CEX) Token, Data Availability, Decentralized Finance (DeFi), Decentralized Identifier (DID), DePIN, Ethereum, Gaming (GameFi), Liquid Staking Governance Tokens, Meme, NFT Marketplace, Oracle, PolitiFi, Prediction Markets, Real World Assets (RWA), Rollup, Smart Contract Platform, SocialFi, Solana} + +--- -#### GET /api/v2/chart/{metric}/category/{category}/chain-breakdown +## Bridges + +### GET /bridges/bridges **Base URL:** `https://pro-api.llama.fi` -Get category timeseries chart data breakdown by chain. +List all bridges along with summaries of recent bridge volumes. **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `category` (path, string, required) — category slug Example: `dexs` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, {Chain1: value, Chain2: value, ...}] + - `includeChains` (query, boolean, optional) — set whether to include current previous day volume breakdown by chain Example: `true` +Returns: {bridges} -#### GET /api/v2/chart/{metric}/category/{category}/protocol-breakdown +### GET /bridges/bridge/{id} **Base URL:** `https://pro-api.llama.fi` -Get category timeseries chart data breakdown by protocol. +Get summary of bridge volume and volume breakdown by chain **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `category` (path, string, required) — category slug Example: `dexs` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, {Protocol1: value, Protocol2: value, ...}] + - `id` (path, integer, required) — bridge ID, you can get these from /bridges Example: `1` +Returns: {id, name, displayName, lastHourlyVolume, currentDayVolume, lastDailyVolume, dayBeforeLastVolume, weeklyVolume, monthlyVolume, lastHourlyTxs, currentDayTxs, prevDayTxs, dayBeforeLastTxs, weeklyTxs, monthlyTxs, chainBreakdown, destinationChain} + +### GET /bridges/bridgevolume/{chain} +**Base URL:** `https://pro-api.llama.fi` +Get historical volumes for a bridge, chain, or bridge on a particular chain -### For categories and chains +**Parameters:** + - `chain` (path, string, required) — chain slug, you can get these from /chains. Call also use 'all' for volume on all chains. Example: `Ethereum` + - `id` (query, integer, optional) — bridge ID, you can get these from /bridges Example: `2` +Returns: array of {date, depositUSD, withdrawUSD, depositTxs, withdrawTxs} -#### GET /api/v2/metrics/{metric}/category/{category}/chain/{chain} +### GET /bridges/bridgedaystats/{timestamp}/{chain} **Base URL:** `https://pro-api.llama.fi` -Get category chain dimension data overview. +Get a 24hr token and address volume breakdown for a bridge **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `category` (path, string, required) — category slug Example: `dexs` - - `chain` (path, string, required) — chain name Example: `Ethereum` - - `dataType` (query, string, optional) — metric-specific data type -Returns: {category, chain, allCategories, allChains, total24h, total48hto24h, total7d, total14dto7d, total60dto30d, total30d, total1y, change_1d, change_7d, change_1m, change_7dover7d} + - `timestamp` (path, integer, required) — Unix timestamp. Data returned will be for the 24hr period starting at 00:00 UTC that the timestamp lands in. Example: `1755561600` + - `chain` (path, string, required) — chain slug, you can get these from /chains. Example: `Ethereum` + - `id` (query, integer, optional) — bridge ID, you can get these from /bridges Example: `2` +Returns: {date, totalTokensDeposited, totalTokensWithdrawn, totalAddressDeposited, totalAddressWithdrawn} -#### GET /api/v2/chart/{metric}/category/{category}/chain/{chain} +### GET /bridges/transactions/{id} **Base URL:** `https://pro-api.llama.fi` -Get category chain historical timeseries chart data. +Get all transactions for a bridge within a date range **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `category` (path, string, required) — category slug Example: `dexs` - - `chain` (path, string, required) — chain name Example: `Ethereum` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, value] + - `id` (path, integer, required) — bridge ID, you can get these from /bridges Example: `1` + - `starttimestamp` (query, integer, optional) — start timestamp (Unix Timestamp) for date range Example: `1667260800` + - `endtimestamp` (query, integer, optional) — end timestamp (Unix timestamp) for date range Example: `1667347200` + - `sourcechain` (query, string, optional) — Returns only transactions that are bridging from the specified source chain. Example: `Polygon` + - `address` (query, string, optional) — 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... . Example: `ethereum:0x69b4B4390Bd1f0aE84E090Fe8af7AbAd2d95Cc8E` + - `limit` (query, integer, optional) — limit to number of transactions returned, maximum is 6000 Example: `200` + +--- + +## API Key Management + +### GET /usage/APIKEY +**Base URL:** `https://pro-api.llama.fi` +Get amount of credits left in the api key, these reset on the 1st of each month + +--- + +## Digital Asset Treasury -#### GET /api/v2/chart/{metric}/category/{category}/chain/{chain}/protocol-breakdown +### GET /dat/institutions **Base URL:** `https://pro-api.llama.fi` -Get category chain timeseries chart data breakdown by protocol. +Get list of all institutions with Digital Asset Treasury data +Returns: {institutionMetadata, assetMetadata, institutions, assets, totalCompanies, flows, mNAV, lastUpdated} + +### GET /dat/institutions/{symbol} +**Base URL:** `https://pro-api.llama.fi` +Get individual institution Digital Asset Treasury details **Parameters:** - - `metric` (path, string, required) — dimension metric type Example: `fees` - - `category` (path, string, required) — category slug Example: `dexs` - - `chain` (path, string, required) — chain name Example: `Ethereum` - - `dataType` (query, string, optional) — metric-specific data type -Returns: array of [timestamp, {Protocol1: value, Protocol2: value, ...}] + - `symbol` (path, string, required) — Institution ticker symbol (e.g., MSTR for MicroStrategy) Example: `MSTR` +Returns: {institutionId, ticker, name, type, rank, price, priceChange24h, volume24h, fd_realized, fd_realistic, fd_max, mcap_realized, mcap_realistic, mcap_max, realized_mNAV, realistic_mNAV, max_mNAV, totalCost, totalUsdValue, assets, assetsMeta, ohlcv, assetValue, stats, transactions, lastUpdated} --- -## Financial Statements (Beta) +## Equities -### GET /api/v2/metrics/financial-statement/protocol/{protocol} +### GET /equities/v1/companies +**Base URL:** `https://pro-api.llama.fi` +Get list of all tracked public companies +Returns: array of {ticker, name, currentPrice, volume, marketCap, priceChangePercentage1d, trailingPE, dividendYield, priceToBook, lastUpdatedAt, priceChangePercentage7d, priceChangePercentage1m, revenueTTM, grossProfitTTM, totalAssets, earningsTTM, operatingProfitMargin, totalLiabilities} + +### GET /equities/v1/statements +**Base URL:** `https://pro-api.llama.fi` +Get financial statements for a company + +**Parameters:** + - `ticker` (query, string, required) — Stock ticker symbol (case-insensitive) Example: `COIN` +Returns: {incomeStatement, balanceSheet, cashflow} + +### GET /equities/v1/price-history **Base URL:** `https://pro-api.llama.fi` -Get protocol income statement report. Returns protocol metadata, methodology details, and aggregated financial data (yearly, quarterly, monthly). +Get historical price data for a company -When querying a **parent protocol** (e.g. `aave`), the response includes `childProtocols` with per-version methodology. When querying a **child protocol** (e.g. `aave-v3`), `methodology` and `breakdownMethodology` are at the top level. +**Parameters:** + - `ticker` (query, string, required) — Stock ticker symbol (case-insensitive) Example: `AAPL` + - `timeframe` (query, string, optional) — Optional lookback window (case-insensitive). Omit or empty for full history (`MAX`). (one of: 1W, 1M, 6M, 1Y, 5Y, MAX) Example: `1Y` -Each time period contains line items such as: -- **Gross Protocol Revenue** — total fees collected (with label breakdown e.g. Borrow Interest, Liquidation Fees, Flashloan Fees) -- **Cost Of Revenue** — fees distributed to suppliers/LPs -- **Gross Profit** — revenue minus cost of revenue -- **Token Holder Net Income** — value accruing to token holders (e.g. buybacks) -- **Incentives** — token incentives distributed (e.g. staking rewards, lending rewards) -- **Earnings** — net earnings after incentives +### GET /equities/v1/ohlcv +**Base URL:** `https://pro-api.llama.fi` +Get OHLCV candle data for a company -Each line item has a `value` (total USD) and optional `by-label` object breaking down by revenue source. +**Parameters:** + - `ticker` (query, string, required) — Stock ticker symbol (case-insensitive) Example: `AAPL` + - `timeframe` (query, string, optional) — Optional lookback window (case-insensitive). Same values as price history. Omit or empty for full history (`MAX`). (one of: 1W, 1M, 6M, 1Y, 5Y, MAX) Example: `6M` + +### GET /equities/v1/summary +**Base URL:** `https://pro-api.llama.fi` +Get live market summary for a company **Parameters:** - - `protocol` (path, string, required) — protocol slug Example: `aave-v3` -Returns: {id, name, address, symbol, url, description, chain?, logo, audits?, audit_links?, category?, chains, oraclesBreakdown?, module?, twitter, github?, listedAt?, parentProtocol?, dimensions?, methodology?, breakdownMethodology?, methodologyURL?, tvlCodePath?, hallmarks?, linkedProtocols, childProtocols?, hasLabelBreakdown, defillamaId, displayName, slug, protocolType, aggregates: {yearly: {period: {LineItem: {value, by-label?}}}, quarterly: {...}, monthly: {...}}} + - `ticker` (query, string, required) — Stock ticker symbol (case-insensitive) Example: `AAPL` +Returns: {currentPrice, volume, marketCap, fiftyTwoWeekHigh, fiftyTwoWeekLow, dividendYield, trailingPE, priceChangePercentage1d, priceToBook, updatedAt, priceChangePercentage7d, priceChangePercentage1m, revenueTTM, grossProfitTTM, totalAssets, earningsTTM} + +### GET /equities/v1/filings +**Base URL:** `https://pro-api.llama.fi` +Get SEC filings for a company + +**Parameters:** + - `ticker` (query, string, required) — Stock ticker symbol (case-insensitive) Example: `COIN` +Returns: array of {filingDate, reportDate, form, primaryDocumentUrl, documentDescription} diff --git a/llms.txt b/llms.txt index 616c74e054e..616844e0f05 100644 --- a/llms.txt +++ b/llms.txt @@ -11,7 +11,7 @@ The Free API and Pro API are entirely separate services. | Base URL | https://api.llama.fi | 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 | 77 exclusive + 31 free with prefix | Pro API authentication: insert your API key between the base URL and endpoint path: ``` @@ -85,15 +85,20 @@ Full documentation: [llms-pro.txt](/llms-pro.txt) Requires API key. Base URL: `https://pro-api.llama.fi` -- **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}` +- **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}/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/poolsOld`, `/yields/poolsBorrow`, `/yields/chartLendBorrow/{pool}`, `/yields/perps`, `/yields/lsdRates` - **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/APIKEY` - **Digital Asset Treasury**: `/dat/institutions`, `/dat/institutions/{symbol}` @@ -101,5 +106,6 @@ Requires API key. Base URL: `https://pro-api.llama.fi` ## Optional -- [OpenAPI spec (free)](/defillama-openapi-free.json): Full OpenAPI 3.0 specification for free endpoints -- [OpenAPI spec (pro)](/defillama-openapi-pro.json): Full OpenAPI 3.0 specification for pro endpoints +- [OpenAPI spec (free)](https://raw.githubusercontent.com/DefiLlama/api-docs/0bf9c31cf2d4fa2129fb69b377737fa60540eeeb/defillama-openapi-free.json): Full OpenAPI 3.0 specification for free endpoints +- [OpenAPI spec (pro)](https://raw.githubusercontent.com/DefiLlama/api-docs/0bf9c31cf2d4fa2129fb69b377737fa60540eeeb/defillama-openapi-pro.json): Full OpenAPI 3.0 specification for pro endpoints + diff --git a/scripts/generate-llms.ts b/scripts/generate-llms.ts index 900d509a7e2..30255071237 100644 --- a/scripts/generate-llms.ts +++ b/scripts/generate-llms.ts @@ -190,7 +190,7 @@ ${mappingTable} ## Free API Endpoints (api.llama.fi) -Full documentation: [llms-free.txt](/llms-free.txt) +Full documentation: [llms-free.txt](https://raw.githubusercontent.com/DefiLlama/api-docs/0bf9c31cf2d4fa2129fb69b377737fa60540eeeb/llms-free.txt) No authentication required. Base URL: \`https://api.llama.fi\` @@ -200,7 +200,7 @@ ${Array.from(freeGroups.entries()) ## Pro-Only API Endpoints (pro-api.llama.fi) -Full documentation: [llms-pro.txt](/llms-pro.txt) +Full documentation: [llms-pro.txt](https://raw.githubusercontent.com/DefiLlama/api-docs/0bf9c31cf2d4fa2129fb69b377737fa60540eeeb/llms-pro.txt) Requires API key. Base URL: \`https://pro-api.llama.fi\` @@ -210,8 +210,9 @@ ${Array.from(proGroups.entries()) ## Optional -- [OpenAPI spec (free)](/defillama-openapi-free.json): Full OpenAPI 3.0 specification for free endpoints -- [OpenAPI spec (pro)](/defillama-openapi-pro.json): Full OpenAPI 3.0 specification for pro endpoints +- [OpenAPI spec (free)](https://raw.githubusercontent.com/DefiLlama/api-docs/0bf9c31cf2d4fa2129fb69b377737fa60540eeeb/defillama-openapi-free.json): Full OpenAPI 3.0 specification for free endpoints +- [OpenAPI spec (pro)](https://raw.githubusercontent.com/DefiLlama/api-docs/0bf9c31cf2d4fa2129fb69b377737fa60540eeeb/defillama-openapi-pro.json): Full OpenAPI 3.0 specification for pro endpoints + ` }