Defi Dataのロゴ

Defi Data

組織
DefiLlama
defi-data

Core reference for DefiLlama MCP tools. Maps DeFi questions to the correct tool call with proper parameters. Covers entity conventions, metric interpretation, stock vs flow distinctions, percentage formatting, and error recovery. Use whenever querying DeFi data — protocol TVL, token prices, chain metrics, fees, revenue, yields, stablecoins, bridges, ETFs, hacks, raises, treasuries, or institutional holdings.

概要

公開者DefiLlama
リポジトリdefillama-skills
スキル名defi-data
スター
36
フォーク
15
同梱ファイル
指示のみ
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 指示だけで完結

    モデルに必要なものはすべて指示に含まれているため、別途同期するファイルはありません。

  • オープンソース

    DefiLlamaがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキルDefi DataをTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/DefiLlama/defillama-skills/tree/master/defi-data
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/DefiLlama/defillama-skills.git /tmp/defillama-skills
mkdir -p .claude/skills
cp -r /tmp/defillama-skills/defi-data .claude/skills/defi-data
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでDefi Dataを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあると、モデルが自動的にDefi Dataを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Defi Dataは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、未使用のスキルにはコストがかかりません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

DefiLlama MCP Data Reference

Tool Quick Reference

QuestionToolKey Params
Total DeFi TVL, global volumesdefillama:get_market_totalsmetrics (tvl_base, volume_dexs_1d, etc.)
Protocol TVL, fees, revenuedefillama:get_protocol_metricsprotocol, metrics
Chain TVL, gas fees, REVdefillama:get_chain_metricschain, metrics
Token price, mcap, ATHdefillama:get_token_pricestoken
Category rankingsdefillama:get_category_metricscategory
Pool APY, lending ratesdefillama:get_yield_poolstoken, chain, category
Stablecoin supplydefillama:get_stablecoin_supplystablecoin, chain
ETF inflows/outflowsdefillama:get_etf_flowstoken (bitcoin/ethereum)
Bridge volumedefillama:get_bridge_flowsbridge, chain
CEX volumedefillama:get_cex_volumescex
Open interestdefillama:get_open_interestprotocol, chain
Hacks/exploitsdefillama:get_eventsevent_type: "hacks"
Fundraisingdefillama:get_eventsevent_type: "raises"
Protocol eventsdefillama:get_eventsevent_type: "protocol_events"
Protocol treasurydefillama:get_treasurytreasury
Institutional holdingsdefillama:get_dat_holdingsinstitution, token
Token unlocksdefillama:get_token_unlockstoken, query_type (chart, window, day, window_all, ratio, market_window)
Token TVL in protocolsdefillama:get_token_tvltoken, protocol
Oracle coveragedefillama:get_oracle_metricsoracle
User activitydefillama:get_user_activityprotocol, chain
Income statementdefillama:get_income_statementprotocol
Protocol metadata, URLs, auditdefillama:get_protocol_infoprotocol, category, tag, has_token, chain
Chain metadata, type, L2 parentdefillama:get_chain_infochain, chain_type
List valid categoriesdefillama:list_categoriestype (protocol, token, chain)
Unknown entity slugdefillama:resolve_entityname

Entity Conventions

  • Protocols: lowercase-hyphenated slugs (aave, uniswap, compound-v3)
  • Chains: lowercase (ethereum, solana, arbitrum)
  • Tokens: coingecko: prefix (coingecko:ethereum, coingecko:bitcoin, coingecko:usd-coin)
  • CEX: slug includes suffix (binance-cex, coinbase-cex, htx, gate-io)
  • Categories: Title case (Lending, DEX, Derivatives)

Protocol vs Sub-Protocol

Many protocols have multiple versions. The database tracks both:

  • Parent protocol (e.g., aave) — used in get_protocol_metrics, aggregates all versions
  • Sub-protocol (e.g., aave-v3) — individual versions, used in sub_protocol views

resolve_entity returns both slug (sub-protocol) and parent_protocol. Use parent_protocol for get_protocol_metrics. Use slug when you need a specific version.

Example: resolve_entity({name: "compound"}) returns:

  • slug: compound-v2, parent_protocol: compound
  • slug: compound-v3, parent_protocol: compound → Use protocol: "compound" in get_protocol_metrics for the aggregate.

Array Support

All entity params accept single values or arrays for comparison:

  • protocol: "aave" or protocol: ["aave", "lido", "compound"]
  • chain: "ethereum" or chain: ["ethereum", "solana"]
  • token: "coingecko:ethereum" or token: ["coingecko:ethereum", "coingecko:bitcoin"]

Entity Resolution

Try tools directly for well-known entities — works 80%+ of the time. Use defillama:resolve_entity only when:

  • Unsure of exact slug
  • Tool returns 0 rows
  • Need to disambiguate (e.g., "compound" → compound-v2, compound-v3)
  • Need to find the parent_protocol slug

Period Parameter

All tools accept period (NOT time_range):

  • current (default) -- latest snapshot
  • 7d, 30d, 90d, 180d, 365d -- rolling windows

For custom date ranges, use start_date and end_date (YYYY-MM-DD format) instead of period. If start_date is set without end_date, it defaults to today.

Critical Conventions

Stock vs Flow

Different aggregation rules -- getting this wrong produces nonsensical results:

  • Stock (point-in-time snapshots): tvl, price, mcap -- NEVER sum across dates
  • Flow (cumulative over period): fees_1d, revenue_1d, volume -- CAN sum across dates

Percentage Formatting

Two different conventions in the data:

  • *_pct_change columns = decimals (e.g., -0.13 = -13%, 0.35 = +35%). Multiply by 100 for display.
  • apy columns = already percentages (e.g., 2.32 = 2.32%). Do NOT multiply by 100.

TVL Components

Components are mutually exclusive -- never double-add:

  • tvl_base = default TVL (excludes liquid staking and double-counted)
  • tvl_ls_only = liquid staking portion not in tvl_base
  • tvl_dc_only = double-counted portion not in tvl_base
  • tvl_ls_and_dc = both LS and DC
  • Total with LS+DC = tvl_base + tvl_ls_only + tvl_dc_only + tvl_ls_and_dc

Fee and Revenue

  • fees = gross payments by users
  • revenue = protocol's cut (fees - payments to LPs/stakers)
  • holder_revenue = buybacks + dividends to token holders
  • Chain-level: chain_fees (gas), chain_revenue, chain_mev, app_fees (protocol fees on chain), app_revenue

Metric Name Patterns

Protocol metrics follow these patterns:

  • TVL: tvl_base, tvl_staking, tvl_borrowed, tvl_pool2, tvl_treasury, tvl_vesting
  • Flows (with suffixes _1d/_7d/_30d/_90d/_180d/_365d/_ytd/_alltime/_annualised): fees, revenue, holder_revenue, incentive
  • Volume (same suffixes): volume_dexs, volume_aggregators, volume_derivatives, volume_aggr_derivatives, volume_options
  • Market: price, mcap, fdv, fdv_outstanding, token_volume, ps_ratio, pf_ratio
  • pct_change variants only available on _current views

Chain metrics use chain_fees, chain_revenue, chain_mev, app_fees, app_revenue instead of fees, revenue.

Daily views only have the _1d suffix for flows/volumes.

Important Gotchas

  • Category column: get_protocol_metrics has NO category column. Use get_category_metrics for category-level data.
  • FDV: Never sort by FDV -- unreliable total_supply data produces junk rankings. Sort by mcap instead.
  • Valuation: ps_ratio = mcap / annualised revenue. pf_ratio = mcap / annualised fees. Lower = potentially undervalued.
  • Metric validation: Protocol/chain/category metrics are validated against actual DB columns. Invalid metrics return a suggestion for the closest match.
  • NULL values: NULL means data unavailable, NOT $0. Do not report NULL as zero.
  • Params accept string or array: protocol: "aave" or protocol: ["aave", "lido"]. Param names are singular (protocol not protocols).
  • sort_by format: String like "tvl_base desc" or "fees_1d desc".

Examples

Example 1: User: "What is Aave's TVL?" Tool call: defillama:get_protocol_metrics(protocol: "aave", metrics: ["tvl_base"])

Example 2: User: "Top 5 chains by fees" Tool call: defillama:get_chain_metrics(sort_by: "chain_fees_1d desc", limit: 5)

Example 3: User: "ETH price history over 90 days" Tool call: defillama:get_token_prices(token: "coingecko:ethereum", period: "90d")

Example 4: User: "Compare ETH price and Ethereum chain TVL" Tool calls in parallel:

  • defillama:get_token_prices(token: "coingecko:ethereum")
  • defillama:get_chain_metrics(chain: "ethereum")

Example 5: User: "Biggest DeFi hacks this year" Tool call: defillama:get_events(event_type: "hacks", sort_by: "amount desc", limit: 10, period: "365d")

Example 6: User: "Aave TVL from Jan to Mar 2025" Tool call: defillama:get_protocol_metrics(protocol: "aave", metrics: ["tvl_base"], start_date: "2025-01-01", end_date: "2025-03-31")

Error Recovery

  1. 0 rows returned -> call defillama:resolve_entity(name: "...") -> retry with the correct slug
  2. Wrong data -> verify you're using the right tool (protocol vs chain vs category)
  3. Ambiguous entity -> call resolve_entity to see all matching slugs, then pick the right one

よくある質問

AIスキル「Defi Data」では何ができますか?

Core reference for DefiLlama MCP tools. Maps DeFi questions to the correct tool call with proper parameters. Covers entity conventions, metric interpretation, stock vs flow distinctions, percentage formatting, and error recovery. Use whenever querying DeFi data — protocol TVL, token prices, chain metrics, fees, revenue, yields, stablecoins, bridges, ETFs, hacks, raises, treasuries, or institutional holdings.

TypingMindでDefi Dataを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Defi Dataはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにDefi Dataをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/DefiLlama/defillama-skills/tree/master/defi-dataを貼り付けてください。TypingMindがSKILL.mdを読み込み、チャットごとに有効にできるスキルとしてインストールします。

Defi Dataを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストが合致したときにこのスキルを読み込めます。

Defi Dataは何個のAIモデルで使えますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもDefi Dataを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Defi Data」は無料ですか?

DefiLlamaがGitHubで公開しています。ライセンス条件はリポジトリでご確認ください。支払いが必要なのは、利用したトークンに対する、ご自身が契約するAIプロバイダーへの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇