شعار 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 يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • مكتفية بذاتها

    كل ما يحتاجه النموذج موجود في التعليمات — لا ملفات إضافية لمزامنتها.

  • مفتوحة المصدر

    نشرها DefiLlama على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Defi Data في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى الإضافات → المهارات.
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/DefiLlama/defillama-skills/tree/master/defi-data
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات → المهارات → إضافة مهارة → من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

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

فعّل Defi Data في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج Defi Data تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Defi Data بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تترتب أي تكلفة على المهارة غير المستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف 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

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي 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.

لماذا تستخدم Defi Data على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Defi Data عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Defi Data في TypingMind؟

افتح الإضافات → المهارات → التثبيت من GitHub في TypingMind والصق https://github.com/DefiLlama/defillama-skills/tree/master/defi-data. يقرأ TypingMind ملف SKILL.md الخاص بها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Defi Data؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Defi Data؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Defi Data معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Defi Data مجانية؟

نشرها DefiLlama على GitHub. راجع المستودع للاطلاع على شروط الترخيص. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا البريدية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇