返回顶部
d

defillama-pro-openapi-skillDefiLlama Pro API

Operate DefiLlama Pro analytics APIs through UXC with a curated OpenAPI schema, path-templated API-key auth, and read-first guardrails.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
168
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

defillama-pro-openapi-skill

DefiLlama Pro API 技能

使用此技能通过 uxc + OpenAPI 运行 DefiLlama Pro API 操作。

复用 uxc 技能以获取共享执行、认证和错误处理指南。

先决条件

  • - uxc 已安装并位于 PATH 中。
  • 可访问 https://pro-api.llama.fi 网络。
  • 可访问精选的 OpenAPI 模式 URL:
- https://raw.githubusercontent.com/holon-run/uxc/main/skills/defillama-pro-openapi-skill/references/defillama-pro.openapi.json
  • - 拥有 DefiLlama Pro API 密钥。

范围

此技能涵盖以读取为主的分析功能:

  • - 协议 TVL 列表及每个协议的详细信息
  • 链概览读取
  • 当前代币价格查询
  • 收益池发现
  • 收益图表历史
  • 稳定币主导地位读取

此技能涵盖:

  • - 写入操作或账户管理
  • 公共未认证的主机变体
  • 完整的 DefiLlama Pro 端点功能

认证

DefiLlama Pro 将 API 密钥放置在请求路径中,位于主机和端点路径之间。

使用请求路径前缀模板配置一个 API 密钥凭证:

bash
uxc auth credential set defillama-pro \
--auth-type api_key \
--secret-env DEFILLAMAPROAPI_KEY \
--path-prefix-template /{{secret}}

uxc auth binding add \
--id defillama-pro \
--host pro-api.llama.fi \
--scheme https \
--credential defillama-pro \
--priority 100

当认证出现问题时,验证活动映射:

bash
uxc auth binding match https://pro-api.llama.fi

核心工作流程

  1. 1. 默认使用固定链接命令:
- command -v defillama-pro-openapi-cli - 如果缺失,创建它: uxc link defillama-pro-openapi-cli https://pro-api.llama.fi --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/defillama-pro-openapi-skill/references/defillama-pro.openapi.json - defillama-pro-openapi-cli -h
  1. 2. 首先检查操作模式:
- defillama-pro-openapi-cli get:/api/protocols -h - defillama-pro-openapi-cli get:/coins/prices/current/{coins} -h - defillama-pro-openapi-cli get:/yields/chart/{pool} -h
  1. 3. 在进行更广泛的读取之前,优先进行窄范围读取验证:
- defillama-pro-openapi-cli get:/api/v2/chains - defillama-pro-openapi-cli get:/api/protocol/{protocol} protocol=aave - defillama-pro-openapi-cli get:/yields/pools
  1. 4. 使用键/值参数执行:
- defillama-pro-openapi-cli get:/api/protocol/{protocol} protocol=aave - defillama-pro-openapi-cli get:/coins/prices/current/{coins} coins=ethereum:0x0000000000000000000000000000000000000000 searchWidth=4h - defillama-pro-openapi-cli get:/stablecoins/stablecoindominance/{chain} chain=ethereum

操作组

协议与链分析

  • - get:/api/protocols
  • get:/api/protocol/{protocol}
  • get:/api/v2/chains

价格、收益与稳定币

  • - get:/coins/prices/current/{coins}
  • get:/yields/pools
  • get:/yields/chart/{pool}
  • get:/stablecoins/stablecoindominance/{chain}

防护措施

  • - 保持自动化在 JSON 输出格式上;不要使用 --text。
  • 首先解析稳定字段:ok、kind、protocol、data、error。
  • 将此 v1 技能视为只读。不要暗示支持钱包、交易或管理功能。
  • 此技能假设使用 Pro 主机和密钥路径认证模型。在未先检查上游文档的情况下,不要将同一凭证绑定到不同的路径格式。
  • API 密钥很敏感,因为它们出现在请求路径中。尽可能使用 --secret-env 或 --secret-op,而不是 shell 历史记录中的文字。
  • 在排查此集成问题时,避免共享原始守护进程日志。密钥是请求路径的一部分,因此如果您检查 ~/.uxc/daemon/daemon.log,请在调试后清理、轮换或删除日志,并避免不必要的详细日志记录。
  • defillama-pro-openapi-cli ... 等同于 uxc https://pro-api.llama.fi --schema-url proopenapi_schema> ...。

参考资料

  • - 使用模式:references/usage-patterns.md
  • 精选的 OpenAPI 模式:references/defillama-pro.openapi.json
  • DefiLlama API 文档:https://defillama.com/docs/api
  • DefiLlama Pro 文档:https://defillama.com/pro-api/docs

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 defillama-pro-openapi-skill-1776354243 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 defillama-pro-openapi-skill-1776354243 技能

通过命令行安装

skillhub install defillama-pro-openapi-skill-1776354243

下载

⬇ 下载 defillama-pro-openapi-skill v1.0.0(免费)

文件大小: 5.68 KB | 发布时间: 2026-4-17 14:37

v1.0.0 最新 2026-4-17 14:37
Initial release of the DefiLlama Pro OpenAPI skill.

- Enables read-only access to DefiLlama Pro analytics APIs via UXC and a curated OpenAPI schema.
- Supports protocol TVL, per-protocol, chain, price, yield, and stablecoin dominance queries.
- Implements path-templated API-key authentication.
- Provides setup and workflow guidance for credential management and cli usage.
- Enforces read-first guardrails and operational safety guidance.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部