The DefiLlama connector lets your AI agent work with DefiLlama. It needs no sign-in. It comes with 25 tools.
- Tools
- 25
- What they doRead · write · destructive
- 25 · 0 · 025 read0 write0 destructive
- Users sign in with
- No sign-in
Setup
Install the SDK
Terminal window npm install @scalekit-sdk/node dotenvTerminal window pip install scalekit-sdk-python python-dotenvSet your credentials
Add your Scalekit credentials to your
.envfile. Find values in app.scalekit.com > Developers > API Credentials..env SCALEKIT_ENVIRONMENT_URL=<your-environment-url>SCALEKIT_CLIENT_ID=<your-client-id>SCALEKIT_CLIENT_SECRET=<your-client-secret>Create the DefiLlama connection
In AgentKit > Connections, create a DefiLlama connection. The name you give it is the
connection_nameyour code passes. See Configure connections.Users don't sign in to DefiLlama, so the connection needs no credentials.
Make your first call
quickstart.mts import { ScalekitClient } from '@scalekit-sdk/node'import 'dotenv/config'const scalekit = new ScalekitClient(process.env.SCALEKIT_ENVIRONMENT_URL,process.env.SCALEKIT_CLIENT_ID,process.env.SCALEKIT_CLIENT_SECRET,)const actions = scalekit.actionsconst connector = 'defillama'const identifier = 'user_123'// Create the user's connected account. No sign-in is needed, so it's active right away.await actions.getAuthorizationLink({ connectionName: connector, identifier })// Make your first callconst result = await actions.executeTool({connector,identifier,toolName: 'defillama_get_dexs_overview',toolInput: {},})console.log(result)Terminal window npx tsx quickstart.mtsquickstart.py import osfrom scalekit import ScalekitClientfrom dotenv import load_dotenvload_dotenv()scalekit_client = ScalekitClient(env_url=os.getenv("SCALEKIT_ENVIRONMENT_URL"),client_id=os.getenv("SCALEKIT_CLIENT_ID"),client_secret=os.getenv("SCALEKIT_CLIENT_SECRET"),)actions = scalekit_client.actionsconnection_name = "defillama"identifier = "user_123"# Create the user's connected account. No sign-in is needed, so it's active right away.actions.get_authorization_link(connection_name=connection_name,identifier=identifier,)# Make your first callresult = actions.execute_tool(tool_input={},tool_name="defillama_get_dexs_overview",connection_name=connection_name,identifier=identifier,)print(result)Terminal window python quickstart.pyRequesting the link creates the user's connected account; there's nothing to open. See Authorize a user for the full flow and statuses.
Tools
Pass the exact name toexecute_tooldefillama_get_batch_historical_pricesGet historical USD prices for several tokens, each at its own list of timestamps, in one call.Read-onlyGet Batch Historical Prices
Get historical USD prices for several tokens, each at its own list of timestamps, in one call. Returns coins, keyed by coin id, each with symbol and a prices array of {timestamp, price, confidence}, one entry per requested timestamp. Use defillama_get_batch_historical_prices when coins need different timestamps. Use defillama_get_historical_prices when every coin shares one timestamp.
Inputs
coinsobjectrequired- JSON object whose keys are coin ids ({chain}:{address} or coingecko:{id}) and whose values are arrays of unix timestamps in seconds. Send it as an object or as the equivalent JSON text. Example: {"coingecko:ethereum": [1666869543, 1666862343], "avax:0xb97ef9ef8734c71904d8002f8b6bc66dd9c48a6e": [1666876743]}.
defillama_get_chain_dexs_overviewGet trading volume for every DEX on one chain.Read-onlyGet Chain DEX Volume Overview
Get trading volume for every DEX on one chain. Returns totals for the last 24 hours, 7 days, 30 days, 1 year and all time (total24h, total7d, total30d, total1y, totalAllTime) with change_1d, change_7d and change_1m, allChains, and protocols: one row per protocol with name, slug, category, chains and the same totals and changes. Volumes count only trades on that chain. Use defillama_get_chain_dexs_overview to rank DEXs on one chain. Use defillama_get_dexs_overview for all chains and defillama_get_dex_summary for one DEX.
Inputs
chainstringrequired- Chain name as DefiLlama lists it, case-insensitive, for example Ethereum, Arbitrum, BSC or Solana. Get valid names from the allChains field of defillama_get_dexs_overview.
exclude_total_data_chartboolean- true (default) leaves out totalDataChart, the daily history of the summed value, and returns only the current totals and the per-protocol rows. Set false to add the daily history.default
true exclude_total_data_chart_breakdownboolean- true (default) leaves out totalDataChartBreakdown, the daily history split by protocol. Setting false can make the response several megabytes, which can exceed Scalekit's response size limit on large chains or on the all-chains overview.default
true
defillama_get_chain_fees_overviewGet fees, revenue or holders revenue for every protocol on one chain.Read-onlyGet Chain Fees Overview
Get fees, revenue or holders revenue for every protocol on one chain. Returns totals for the last 24 hours, 7 days, 30 days, 1 year and all time with change_1d, change_7d and change_1m, allChains, and protocols: one row per protocol with name, slug, category, chains, methodology and the same totals, all in USD for the chosen data_type. Use defillama_get_chain_fees_overview to rank protocols on a chain by fees or revenue and to find protocol slugs. Use defillama_get_fees_summary for one protocol's history.
Inputs
chainstringrequired- Chain name as DefiLlama lists it, case-insensitive, for example Ethereum, Arbitrum, BSC or Solana. Get valid names from the name field of defillama_list_chains.
data_typestring- Which metric to report: dailyFees (all fees users pay, the default), dailyRevenue (the share the protocol keeps), or dailyHoldersRevenue (the share paid to token holders through buybacks, burns or distributions). Omit for dailyFees.one of
dailyFeesdailyRevenuedailyHoldersRevenue exclude_total_data_chartboolean- true (default) leaves out totalDataChart, the daily history of the summed value, and returns only the current totals and the per-protocol rows. Set false to add the daily history.default
true exclude_total_data_chart_breakdownboolean- true (default) leaves out totalDataChartBreakdown, the daily history split by protocol. Setting false can make the response several megabytes, which can exceed Scalekit's response size limit on large chains or on the all-chains overview.default
true
defillama_get_chain_historical_tvlGet the daily total value locked of one blockchain's DeFi protocols.Read-onlyGet Chain Historical TVL
Get the daily total value locked of one blockchain's DeFi protocols. Returns array: {date, tvl} points, date as a unix timestamp and tvl in USD. Liquid staking and double-counted TVL are excluded. Use defillama_get_chain_historical_tvl for one chain's trend. Use defillama_get_historical_tvl for all chains combined, and defillama_list_chains for every chain's current TVL.
Inputs
chainstringrequired- Chain name as DefiLlama lists it, case-insensitive, for example Ethereum, Arbitrum, BSC or Solana. Get valid names from the name field of defillama_list_chains.
defillama_get_chain_options_overviewGet trading volume for every options exchange on one chain.Read-onlyGet Chain Options Volume Overview
Get trading volume for every options exchange on one chain. Returns totals for the last 24 hours, 7 days, 30 days, 1 year and all time (total24h, total7d, total30d, total1y, totalAllTime) with change_1d, change_7d and change_1m, allChains, and protocols: one row per protocol with name, slug, category, chains and the same totals and changes. Values are notional volume unless data_type is dailyPremiumVolume. Use defillama_get_chain_options_overview for one chain. Use defillama_get_options_overview for all chains and defillama_get_options_summary for one venue.
Inputs
chainstringrequired- Chain name as DefiLlama lists it, case-insensitive, for example Ethereum, Arbitrum, BSC or Solana. Get valid names from the allChains field of defillama_get_options_overview.
data_typestring- Which options volume to report: dailyNotionalVolume (value of the underlying assets traded, the default) or dailyPremiumVolume (premiums paid for the options). Omit for dailyNotionalVolume.one of
dailyPremiumVolumedailyNotionalVolume exclude_total_data_chartboolean- true (default) leaves out totalDataChart, the daily history of the summed value, and returns only the current totals and the per-protocol rows. Set false to add the daily history.default
true exclude_total_data_chart_breakdownboolean- true (default) leaves out totalDataChartBreakdown, the daily history split by protocol. Setting false can make the response several megabytes, which can exceed Scalekit's response size limit on large chains or on the all-chains overview.default
true
defillama_get_chain_stablecoin_market_cap_historyGet the daily circulating supply of stablecoins on one chain, for all stablecoins or one.Read-onlyGet Chain Stablecoin Market Cap History
Get the daily circulating supply of stablecoins on one chain, for all stablecoins or one. Returns array: daily points with date (unix timestamp as a string) and totalCirculating, totalCirculatingUSD, totalMintedUSD, and on later points totalBridgedToUSD and totalUnreleased, each keyed by peg type. Use defillama_get_chain_stablecoin_market_cap_history for one chain. Use defillama_get_stablecoin_market_cap_history for all chains combined, and defillama_list_stablecoin_chains for today's totals per chain.
Inputs
chainstringrequired- Chain name as DefiLlama lists it, case-insensitive, for example Ethereum, Arbitrum, BSC or Solana. Get valid names from the name field of defillama_list_stablecoin_chains.
stablecoininteger- Numeric DefiLlama stablecoin id to restrict the history to one stablecoin, for example 1 for USDT or 2 for USDC. Get ids from the id field of defillama_list_stablecoins. Omit to sum every stablecoin.
defillama_get_closest_blockFind the block on a chain whose time is closest to a given unix timestamp.Read-onlyGet Closest Block
Find the block on a chain whose time is closest to a given unix timestamp. Returns height (the block number) and timestamp (that block's unix time). Use defillama_get_closest_block to turn a date into a block number for on-chain queries.
Inputs
chainstringrequired- Chain identifier in lowercase, as used in coin ids, for example ethereum, bsc, polygon, arbitrum, avax or optimism.
timestampintegerrequired- Unix timestamp in seconds to look up, for example 1603964988.
defillama_get_current_pricesGet the current USD price of one or more tokens, by contract address or CoinGecko id.Read-onlyGet Current Prices
Get the current USD price of one or more tokens, by contract address or CoinGecko id. Returns coins, keyed by the coin id you sent, each with price in USD, symbol, decimals (contract tokens only), timestamp of the price and confidence (0 to 1; lower for prices derived from thin on-chain liquidity). Use defillama_get_current_prices for spot prices. Use defillama_get_historical_prices for one past moment, defillama_get_price_chart for a series, and defillama_get_price_percentage_change for a change over a period.
Inputs
coinsstringrequired- Comma-separated list of coins, no spaces. Each coin is {chain}:{token contract address} (for example ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 for USDC on Ethereum, or bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878), or coingecko:{CoinGecko id} for native and well-known assets (for example coingecko:ethereum, coingecko:bitcoin). Example: coingecko:ethereum,ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. A coin DefiLlama cannot price is left out of the response rather than causing an error.
defillama_get_dex_summaryGet one DEX's trading volume totals and daily volume history.Read-onlyGet DEX Volume Summary
Get one DEX's trading volume totals and daily volume history. Returns the protocol's name, slug, category, chains and links, total24h, total48hto24h, total7d, totalAllTime and change_1d, child protocols (versions), and totalDataChart, the daily volume history as [unix timestamp, USD] pairs. Use defillama_get_dex_summary for one DEX. Use defillama_get_dexs_overview or defillama_get_chain_dexs_overview to compare DEXs.
Inputs
protocolstringrequired- DefiLlama protocol slug: lowercase, words joined by hyphens. Find it in the slug field of defillama_get_dexs_overview or defillama_get_chain_dexs_overview. A parent slug such as uniswap sums every version; a version slug such as uniswap-v3 returns one. Example: uniswap. An unknown slug returns HTTP 400.
exclude_total_data_chartboolean- false (default) includes totalDataChart, the protocol's daily history as [unix timestamp, value] pairs. Set true to return only the current totals and metadata.default
false exclude_total_data_chart_breakdownboolean- true (default) leaves out totalDataChartBreakdown, the daily history split by chain and version. Setting false adds it; for large multi-chain protocols this can add over a megabyte.default
true
defillama_get_dexs_overviewGet trading volume for every decentralized exchange (DEX) DefiLlama tracks, across all chains.Read-onlyGet DEX Volume Overview
Get trading volume for every decentralized exchange (DEX) DefiLlama tracks, across all chains. Returns totals for the last 24 hours, 7 days, 30 days, 1 year and all time (total24h, total7d, total30d, total1y, totalAllTime) with change_1d, change_7d and change_1m, allChains, and protocols: one row per protocol with name, slug, category, chains and the same totals and changes. The response is about 2 MB. Use defillama_get_dexs_overview to rank DEXs market-wide and find DEX slugs. Use defillama_get_chain_dexs_overview for one chain and defillama_get_dex_summary for one DEX's history.
Inputs
exclude_total_data_chartboolean- true (default) leaves out totalDataChart, the daily history of the summed value, and returns only the current totals and the per-protocol rows. Set false to add the daily history.default
true exclude_total_data_chart_breakdownboolean- true (default) leaves out totalDataChartBreakdown, the daily history split by protocol. Setting false can make the response several megabytes, which can exceed Scalekit's response size limit on large chains or on the all-chains overview.default
true
defillama_get_fees_summaryGet one protocol's fees, revenue or holders revenue totals and daily history.Read-onlyGet Fees Summary
Get one protocol's fees, revenue or holders revenue totals and daily history. Returns the protocol's name, slug, category, chains, links and methodology, total24h, total48hto24h, total7d, totalAllTime and change_1d, and totalDataChart, the daily history as [unix timestamp, USD] pairs, for the chosen data_type. Use defillama_get_fees_summary for one protocol. Use defillama_get_chain_fees_overview to compare protocols on a chain.
Inputs
protocolstringrequired- DefiLlama protocol slug: lowercase, words joined by hyphens. Find it in the slug field of defillama_get_chain_fees_overview, or the protocol's DefiLlama page URL. A parent slug such as aave sums every version; a version slug such as aave-v3 returns one. Example: aave. An unknown slug returns HTTP 400.
data_typestring- Which metric to report: dailyFees (all fees users pay, the default), dailyRevenue (the share the protocol keeps), or dailyHoldersRevenue (the share paid to token holders through buybacks, burns or distributions). Omit for dailyFees.one of
dailyFeesdailyRevenuedailyHoldersRevenue exclude_total_data_chartboolean- false (default) includes totalDataChart, the protocol's daily history as [unix timestamp, value] pairs. Set true to return only the current totals and metadata.default
false exclude_total_data_chart_breakdownboolean- true (default) leaves out totalDataChartBreakdown, the daily history split by chain and version. Setting false adds it; for large multi-chain protocols this can add over a megabyte.default
true
defillama_get_first_pricesGet the earliest price DefiLlama has recorded for one or more tokens.Read-onlyGet First Prices
Get the earliest price DefiLlama has recorded for one or more tokens. Returns coins, keyed by coin id, each with symbol, the first recorded price in USD and its timestamp. Use defillama_get_first_prices to find when price history starts, for example before calling defillama_get_price_chart with a start time.
Inputs
coinsstringrequired- Comma-separated list of coins, no spaces. Each coin is {chain}:{token contract address} (for example ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 for USDC on Ethereum, or bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878), or coingecko:{CoinGecko id} for native and well-known assets (for example coingecko:ethereum, coingecko:bitcoin). Example: coingecko:ethereum,ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. A coin DefiLlama cannot price is left out of the response rather than causing an error.
defillama_get_historical_pricesGet the USD price of one or more tokens at a single past moment.Read-onlyGet Historical Prices
Get the USD price of one or more tokens at a single past moment. Returns coins, keyed by the coin id you sent, each with price in USD, symbol, decimals (contract tokens only) and the timestamp of the price point used (the nearest one DefiLlama has). Use defillama_get_historical_prices for one timestamp shared by all coins. Use defillama_get_batch_historical_prices for different timestamps per coin, and defillama_get_price_chart for a regular series.
Inputs
coinsstringrequired- Comma-separated list of coins, no spaces. Each coin is {chain}:{token contract address} (for example ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 for USDC on Ethereum, or bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878), or coingecko:{CoinGecko id} for native and well-known assets (for example coingecko:ethereum, coingecko:bitcoin). Example: coingecko:ethereum,ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. A coin DefiLlama cannot price is left out of the response rather than causing an error.
timestampintegerrequired- Unix timestamp in seconds of the moment to price, for example 1648680149 (2022-03-30 22:42 UTC).
defillama_get_historical_tvlGet the daily total value locked across all of DeFi, summed over every chain.Read-onlyGet Historical TVL
Get the daily total value locked across all of DeFi, summed over every chain. Returns array: {date, tvl} points, date as a unix timestamp and tvl in USD, from 2017 to today. Liquid staking and double-counted TVL are excluded. Use defillama_get_historical_tvl for the whole market. Use defillama_get_chain_historical_tvl for a single chain.
Inputs
This tool takes no inputs.
defillama_get_open_interest_overviewGet open interest for every perpetual futures exchange DefiLlama tracks, across all chains.Read-onlyGet Open Interest Overview
Get open interest for every perpetual futures exchange DefiLlama tracks, across all chains. Returns current and past open interest totals (total24h, total7d, total30d and changes), allChains, and protocols: one row per exchange with name, slug, category, chains and its open interest in USD. Use defillama_get_open_interest_overview to rank perpetuals venues by open interest. Use defillama_get_dexs_overview for spot DEX volume.
Inputs
exclude_total_data_chartboolean- true (default) leaves out totalDataChart, the daily history of the summed value, and returns only the current totals and the per-protocol rows. Set false to add the daily history.default
true exclude_total_data_chart_breakdownboolean- true (default) leaves out totalDataChartBreakdown, the daily history split by protocol. Setting false can make the response several megabytes, which can exceed Scalekit's response size limit on large chains or on the all-chains overview.default
true
defillama_get_options_overviewGet trading volume for every on-chain options exchange DefiLlama tracks, across all chains.Read-onlyGet Options Volume Overview
Get trading volume for every on-chain options exchange DefiLlama tracks, across all chains. Returns totals for the last 24 hours, 7 days, 30 days, 1 year and all time (total24h, total7d, total30d, total1y, totalAllTime) with change_1d, change_7d and change_1m, allChains, and protocols: one row per protocol with name, slug, category, chains and the same totals and changes. Values are notional volume unless data_type is dailyPremiumVolume. Use defillama_get_options_overview to rank options venues. Use defillama_get_chain_options_overview for one chain and defillama_get_options_summary for one venue.
Inputs
data_typestring- Which options volume to report: dailyNotionalVolume (value of the underlying assets traded, the default) or dailyPremiumVolume (premiums paid for the options). Omit for dailyNotionalVolume.one of
dailyPremiumVolumedailyNotionalVolume exclude_total_data_chartboolean- true (default) leaves out totalDataChart, the daily history of the summed value, and returns only the current totals and the per-protocol rows. Set false to add the daily history.default
true exclude_total_data_chart_breakdownboolean- true (default) leaves out totalDataChartBreakdown, the daily history split by protocol. Setting false can make the response several megabytes, which can exceed Scalekit's response size limit on large chains or on the all-chains overview.default
true
defillama_get_options_summaryGet one options exchange's volume totals and daily volume history.Read-onlyGet Options Volume Summary
Get one options exchange's volume totals and daily volume history. Returns the protocol's name, slug, chains and links, total24h, total7d, totalAllTime and change_1d, and totalDataChart, the daily history as [unix timestamp, USD] pairs. Values are notional volume unless data_type is dailyPremiumVolume. Use defillama_get_options_summary for one venue. Use defillama_get_options_overview to compare venues.
Inputs
protocolstringrequired- DefiLlama protocol slug: lowercase, words joined by hyphens. Find it in the slug field of defillama_get_options_overview or defillama_get_chain_options_overview. Example: derive. An unknown slug returns HTTP 400.
data_typestring- Which options volume to report: dailyNotionalVolume (value of the underlying assets traded, the default) or dailyPremiumVolume (premiums paid for the options). Omit for dailyNotionalVolume.one of
dailyPremiumVolumedailyNotionalVolume exclude_total_data_chartboolean- false (default) includes totalDataChart, the protocol's daily history as [unix timestamp, value] pairs. Set true to return only the current totals and metadata.default
false exclude_total_data_chart_breakdownboolean- true (default) leaves out totalDataChartBreakdown, the daily history split by chain and version. Setting false adds it; for large multi-chain protocols this can add over a megabyte.default
true
defillama_get_price_chartGet a series of USD prices for one or more tokens at regular intervals.Read-onlyGet Price Chart
Get a series of USD prices for one or more tokens at regular intervals. Returns coins, keyed by coin id, each with symbol, confidence and a prices array of {timestamp, price}. Use defillama_get_price_chart for a price history. Set start or end (not both) and span for the number of points; with neither, only the latest price comes back. Use defillama_get_historical_prices for a single moment.
Inputs
coinsstringrequired- Comma-separated list of coins, no spaces. Each coin is {chain}:{token contract address} (for example ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 for USDC on Ethereum, or bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878), or coingecko:{CoinGecko id} for native and well-known assets (for example coingecko:ethereum, coingecko:bitcoin). Example: coingecko:ethereum,ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. A coin DefiLlama cannot price is left out of the response rather than causing an error.
endinteger- Unix timestamp in seconds of the last point; the series runs backward from here. Do not send together with start (the API returns 400). Omit both start and end to get only the latest price. Example: 1667000000.
periodstring- Spacing between points as a number plus a unit: w (week), d (day), h (hour) or m (minute), not case-sensitive. Examples: 4h, 1d, 2d, 1w. Default 24 hours.
spaninteger- Number of data points to return, for example 10. When omitted, the series has a single point.
startinteger- Unix timestamp in seconds of the first point; the series runs forward from here. Do not send together with end (the API returns 400). Example: 1664364537.
defillama_get_price_percentage_changeGet the percentage price change of one or more tokens over a period.Read-onlyGet Price Percentage Change
Get the percentage price change of one or more tokens over a period. Returns coins, keyed by coin id, each with the percentage change as a number (for example -3.2 for a 3.2% drop). Use defillama_get_price_percentage_change for a single change figure. Use defillama_get_price_chart for the underlying price series.
Inputs
coinsstringrequired- Comma-separated list of coins, no spaces. Each coin is {chain}:{token contract address} (for example ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48 for USDC on Ethereum, or bsc:0x762539b45a1dcce3d36d080f74d1aed37844b878), or coingecko:{CoinGecko id} for native and well-known assets (for example coingecko:ethereum, coingecko:bitcoin). Example: coingecko:ethereum,ethereum:0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48. A coin DefiLlama cannot price is left out of the response rather than causing an error.
look_forwardboolean- false (default) measures the period ending at timestamp, looking back; true measures the period starting at timestamp, looking forward.
periodstring- Length of the period as a number plus a unit: w (week), d (day), h (hour) or m (minute), not case-sensitive. Examples: 1d, 7d, 3w. Default 24 hours.
timestampinteger- Unix timestamp in seconds the period is measured from. Omit to use now. Example: 1664364537.
defillama_get_protocolGet a DeFi protocol's profile and full TVL history, broken down by chain and by token.Read-onlyGet Protocol
Get a DeFi protocol's profile and full TVL history, broken down by chain and by token. Returns the protocol's name, category, chains, links and current TVL per chain (currentChainTvls), then chainTvls with each chain's daily TVL history in USD and per-token amounts, plus tokens and tokensInUsd (TVL by token over time), raises, hacks, audits and, for a parent protocol, otherProtocols listing its versions. Use defillama_get_protocol for a protocol's history and breakdowns. Use defillama_get_protocol_tvl when you only need today's TVL as one number. Large multi-chain protocols such as Aave, Curve, Morpho and Pendle return responses over 4 MB, which exceed Scalekit's response size limit and fail; for those, use defillama_get_protocol_tvl, a version slug (for example uniswap-v3), or defillama_get_fees_summary and defillama_get_dex_summary.
Inputs
protocolstringrequired- DefiLlama protocol slug: lowercase, words joined by hyphens. Find it in the protocol's DefiLlama page URL (defillama.com/protocol/<slug>). A parent slug such as aave covers every version; a version slug such as aave-v3 covers one. Example: lido. An unknown slug returns HTTP 400.
defillama_get_protocol_tvlGet a DeFi protocol's current total value locked (TVL) in USD.Read-onlyGet Protocol TVL
Get a DeFi protocol's current total value locked (TVL) in USD. Returns result: the TVL in USD as a decimal string, for example "2851234567.12". No chain or token breakdown. Use defillama_get_protocol_tvl for a quick current figure. Use defillama_get_protocol for history and per-chain or per-token breakdowns.
Inputs
protocolstringrequired- DefiLlama protocol slug: lowercase, words joined by hyphens. Find it in the protocol's DefiLlama page URL (defillama.com/protocol/<slug>). A parent slug such as aave covers every version; a version slug such as aave-v3 covers one. Example: uniswap. An unknown slug returns HTTP 400.
defillama_get_stablecoin_market_cap_historyGet the daily circulating supply of stablecoins across all chains, for all stablecoins or one.Read-onlyGet Stablecoin Market Cap History
Get the daily circulating supply of stablecoins across all chains, for all stablecoins or one. Returns array: daily points with date (unix timestamp as a string) and totalCirculating and totalCirculatingUSD, plus totalMintedUSD, totalBridgedToUSD and totalUnreleased on points where DefiLlama tracks them, each keyed by peg type (peggedUSD, peggedEUR, ...). Use defillama_get_stablecoin_market_cap_history for the whole market or one stablecoin's history. Use defillama_get_chain_stablecoin_market_cap_history for a single chain.
Inputs
stablecoininteger- Numeric DefiLlama stablecoin id to restrict the history to one stablecoin, for example 1 for USDT or 2 for USDC. Get ids from the id field of defillama_list_stablecoins. Omit to sum every stablecoin.
defillama_list_chainsList every blockchain DefiLlama tracks with its current total value locked.Read-onlyList Chains
List every blockchain DefiLlama tracks with its current total value locked. Returns array: one entry per chain with name, tvl in USD, native tokenSymbol, gecko_id, cmcId and chainId. Use defillama_list_chains to rank chains by TVL or to find the exact chain name other tools take. Use defillama_get_chain_historical_tvl for one chain's history.
Inputs
This tool takes no inputs.
defillama_list_stablecoin_chainsList every chain with the current total circulating supply of stablecoins on it.Read-onlyList Stablecoin Chains
List every chain with the current total circulating supply of stablecoins on it. Returns array: one entry per chain with name and totalCirculatingUSD keyed by peg type (peggedUSD, peggedEUR, ...). Use defillama_list_stablecoin_chains to rank chains by stablecoin supply today. Use defillama_get_chain_stablecoin_market_cap_history for one chain's history.
Inputs
This tool takes no inputs.
defillama_list_stablecoinsList every stablecoin DefiLlama tracks with its circulating supply.Read-onlyList Stablecoins
List every stablecoin DefiLlama tracks with its circulating supply. Returns peggedAssets, each with id, name, symbol, gecko_id, pegType (peggedUSD, peggedEUR, ...), pegMechanism, circulating now and 1 day, 1 week and 1 month ago, per-chain circulating amounts (chainCirculating), chains and current price. Also returns chains with each chain's stablecoin total. Use defillama_list_stablecoins to compare stablecoins or to find the numeric stablecoin id the market cap history tools take. Use defillama_list_stablecoin_chains for totals per chain only.
Inputs
include_pricesboolean- Documented switch for adding each stablecoin's current price in USD. The API currently returns price on every stablecoin whatever this is set to, so it can usually be omitted.
No tools match.