← 返回
开发者工具 Key

DefiLlama API

使用 DefiLlama API/SDK 获取 TVL、stablecoins、coins 价格、yields、volumes、fees、perps、unlocks、bridges、ETFs、narratives、token liquidity、main page、DAT、meta 等数据的 CLI 技能;当需要...
使用 DefiLlama API/SDK 获取 TVL、stablecoins、coins 价格、yields、volumes、fees、perps、unlocks、bridges、ETFs、narratives、token liquidity、main page、DAT、meta 等数据的 CLI 技能;当需要...
poploli2
开发者工具 clawhub v0.1.0 1 版本 100000 Key: 需要
★ 0
Stars
📥 948
下载
💾 19
安装
1
版本
#latest

概述

DefiLlama API

只允许通过 src/run.py 调用,禁止直接运行 src/scripts/ 下的脚本。

安装

cd {baseDir}

环境变量

  • DEFILLAMA_API_KEY:可选,Pro API key。若未提供,Pro 端点会提示 API PLAN REQUIRED

使用方式(必须通过 run.py)

TVL

uv run {baseDir}/src/run.py tvl protocols
uv run {baseDir}/src/run.py tvl protocol --protocol aave
uv run {baseDir}/src/run.py tvl tvl --protocol uniswap
uv run {baseDir}/src/run.py tvl chains
uv run {baseDir}/src/run.py tvl historical-chain-tvl --chain Ethereum

Stablecoins

uv run {baseDir}/src/run.py stablecoins list --include-prices
uv run {baseDir}/src/run.py stablecoins charts-all
uv run {baseDir}/src/run.py stablecoins charts-chain --chain Ethereum
uv run {baseDir}/src/run.py stablecoins detail --asset 1
uv run {baseDir}/src/run.py stablecoins dominance --chain Ethereum --stablecoin-id 1

Coins(价格与链上数据)

uv run {baseDir}/src/run.py coins current --coins coingecko:ethereum,ethereum:0x0000000000000000000000000000000000000000
uv run {baseDir}/src/run.py coins historical --timestamp 1704067200 --coins coingecko:ethereum
uv run {baseDir}/src/run.py coins chart --coins coingecko:ethereum --period 7d

Yields(Pro)

uv run {baseDir}/src/run.py yields pools
uv run {baseDir}/src/run.py yields pool-chart --pool <pool_id>

Volumes

uv run {baseDir}/src/run.py volumes dex-overview
uv run {baseDir}/src/run.py volumes options-overview --data-type dailyPremiumVolume

Fees

uv run {baseDir}/src/run.py fees overview
uv run {baseDir}/src/run.py fees summary --protocol uniswap

Perps

uv run {baseDir}/src/run.py perps open-interest
uv run {baseDir}/src/run.py perps derivatives-overview

Unlocks(Pro)

uv run {baseDir}/src/run.py unlocks all
uv run {baseDir}/src/run.py unlocks protocol --protocol hyperliquid

Main Page(Pro)

uv run {baseDir}/src/run.py main-page categories
uv run {baseDir}/src/run.py main-page raises

Token Liquidity(Pro)

uv run {baseDir}/src/run.py token-liquidity historical --token usdt

ETFs(Pro)

uv run {baseDir}/src/run.py etfs overview
uv run {baseDir}/src/run.py etfs history

Narratives(Pro)

uv run {baseDir}/src/run.py narratives fdv-performance --period 30

Bridges(Pro)

uv run {baseDir}/src/run.py bridges list --include-chains
uv run {baseDir}/src/run.py bridges transactions --id 1 --limit 50

Meta / DAT(Pro)

uv run {baseDir}/src/run.py meta usage
uv run {baseDir}/src/run.py dat institutions

备注

  • Coin 需要使用 chain:addresscoingecko:slug 格式,例如 coingecko:ethereum
  • Pro 端点需要 DEFILLAMA_API_KEY--api-key

常见错误

  • rate limited:放缓速率或提供 API plan key。
  • API PLAN REQUIRED:升级订阅或设置 DEFILLAMA_API_KEY

版本历史

共 1 个版本

  • v0.1.0 当前
    2026-03-29 14:34 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

productivity

Create a coin on trends.fun

poploli2
在 trends.fun 上创建 coin 并部署 Meteora DBC 资金池
★ 0 📥 1,221
developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 668 📥 323,899
developer-tools

CodeConductor.ai

larsonreever
AI驱动平台,提供快速全栈开发、智能体、工作流自动化及低代码AI集成的可扩展产品创建。
★ 66 📥 179,936