DefiLlama Yields API Skill
Use this skill to run DefiLlama public yield API operations through uxc + OpenAPI.
Reuse the uxc skill for shared execution, auth, and error-handling guidance.
Prerequisites
- -
uxc is installed and available in PATH. - Network access to
https://yields.llama.fi. - Access to the curated OpenAPI schema URL:
- INLINECODE5
Scope
This skill covers a public read-only yield surface on yields.llama.fi:
- - yield pool discovery
- per-pool chart history
This skill does not cover:
- - write operations
- protocol or chain overview endpoints from INLINECODE7
- price endpoints from INLINECODE8
- DefiLlama Pro APIs
Authentication
This public skill does not require authentication.
Core Workflow
- 1. Use the fixed link command by default:
-
command -v defillama-yields-openapi-cli
- If missing, create it:
uxc link defillama-yields-openapi-cli https://yields.llama.fi --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/defillama-yields-openapi-skill/references/defillama-yields.openapi.json
- INLINECODE11
- 2. Inspect operation schema first:
-
defillama-yields-openapi-cli get:/pools -h
- INLINECODE13
- 3. Prefer narrow read validation before broader reads:
-
defillama-yields-openapi-cli get:/pools
- INLINECODE15
Operations
- - INLINECODE16
- INLINECODE17
Guardrails
- - Keep automation on the JSON output envelope; do not use
--text. - Parse stable fields first:
ok, kind, protocol, data, error. - Treat this v1 skill as read-only.
- Public DefiLlama data is split across multiple hosts; this skill intentionally wraps only
yields.llama.fi. - INLINECODE25 is equivalent to
uxc https://yields.llama.fi --schema-url <defillama_yields_openapi_schema> <operation> ....
References
- - Usage patterns: INLINECODE27
- Curated OpenAPI schema: INLINECODE28
- DefiLlama API docs: https://defillama.com/docs/api
DefiLlama 收益 API 技能
使用此技能通过 uxc + OpenAPI 运行 DefiLlama 公共收益 API 操作。
复用 uxc 技能以获取共享执行、认证和错误处理指导。
前置条件
- - uxc 已安装并位于 PATH 环境变量中。
- 可访问 https://yields.llama.fi 的网络连接。
- 可访问精选 OpenAPI 模式 URL:
- https://raw.githubusercontent.com/holon-run/uxc/main/skills/defillama-yields-openapi-skill/references/defillama-yields.openapi.json
范围
此技能涵盖 yields.llama.fi 上的公共只读收益界面:
此技能不涵盖:
- - 写入操作
- 来自 api.llama.fi 的协议或链概览端点
- 来自 coins.llama.fi 的价格端点
- DefiLlama Pro API
认证
此公共技能无需认证。
核心工作流程
- 1. 默认使用固定链接命令:
- command -v defillama-yields-openapi-cli
- 如果缺失,则创建:
uxc link defillama-yields-openapi-cli https://yields.llama.fi --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/defillama-yields-openapi-skill/references/defillama-yields.openapi.json
- defillama-yields-openapi-cli -h
- 2. 首先检查操作模式:
- defillama-yields-openapi-cli get:/pools -h
- defillama-yields-openapi-cli get:/chart/{pool} -h
- 3. 在广泛读取前优先进行窄范围读取验证:
- defillama-yields-openapi-cli get:/pools
- defillama-yields-openapi-cli get:/chart/{pool} pool=747c1d2a-c668-4682-b9f9-296708a3dd90
操作
- - get:/pools
- get:/chart/{pool}
安全护栏
- - 保持自动化在 JSON 输出信封上;不要使用 --text。
- 首先解析稳定字段:ok、kind、protocol、data、error。
- 将此 v1 技能视为只读。
- 公共 DefiLlama 数据分布在多个主机上;此技能仅有意封装 yields.llama.fi。
- defillama-yields-openapi-cli <操作> ... 等同于 uxc https://yields.llama.fi --schema-url yieldsopenapi_schema> <操作> ...。
参考资料
- - 使用模式:references/usage-patterns.md
- 精选 OpenAPI 模式:references/defillama-yields.openapi.json
- DefiLlama API 文档:https://defillama.com/docs/api