DefiLlama Prices API Skill
Use this skill to run DefiLlama public price 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://coins.llama.fi. - Access to the curated OpenAPI schema URL:
- INLINECODE5
Scope
This skill covers a small public read-only price surface on coins.llama.fi:
- - current price lookups for one or more assets
This skill does not cover:
- - write operations
- protocol or chain overview endpoints from INLINECODE7
- yield 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-prices-openapi-cli
- If missing, create it:
uxc link defillama-prices-openapi-cli https://coins.llama.fi --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/defillama-prices-openapi-skill/references/defillama-prices.openapi.json
- INLINECODE11
- 2. Inspect operation schema first:
- INLINECODE12
- 3. Prefer narrow read validation before broader reads:
- INLINECODE13
Operations
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.
- This skill only wraps
coins.llama.fi; use the separate public analytics or yields skills for other DefiLlama hosts. - INLINECODE22 is equivalent to
uxc https://coins.llama.fi --schema-url <defillama_prices_openapi_schema> <operation> ....
References
- - Usage patterns: INLINECODE24
- Curated OpenAPI schema: INLINECODE25
- DefiLlama API docs: https://defillama.com/docs/api
技能名称: defillama-prices-openapi-skill
详细描述:
DefiLlama 价格 API 技能
使用此技能通过 uxc + OpenAPI 运行 DefiLlama 公共价格 API 操作。
复用 uxc 技能以获取共享执行、认证和错误处理指导。
前提条件
- - uxc 已安装并可在 PATH 中使用。
- 可访问网络 https://coins.llama.fi。
- 可访问精选的 OpenAPI 模式 URL:
- https://raw.githubusercontent.com/holon-run/uxc/main/skills/defillama-prices-openapi-skill/references/defillama-prices.openapi.json
范围
此技能涵盖 coins.llama.fi 上一个小型公共只读价格接口:
此技能不涵盖:
- - 写入操作
- 来自 api.llama.fi 的协议或链概览端点
- 来自 yields.llama.fi 的收益端点
- DefiLlama Pro API
认证
此公共技能不需要认证。
核心工作流程
- 1. 默认使用固定链接命令:
- command -v defillama-prices-openapi-cli
- 如果缺失,则创建它:
uxc link defillama-prices-openapi-cli https://coins.llama.fi --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/defillama-prices-openapi-skill/references/defillama-prices.openapi.json
- defillama-prices-openapi-cli -h
- 2. 首先检查操作模式:
- defillama-prices-openapi-cli get:/prices/current/{coins} -h
- 3. 在进行更广泛的读取之前,优先进行窄范围读取验证:
- defillama-prices-openapi-cli get:/prices/current/{coins} coins=coingecko:bitcoin searchWidth=4h
操作
- - get:/prices/current/{coins}
防护措施
- - 保持自动化在 JSON 输出信封上;不要使用 --text。
- 首先解析稳定字段:ok、kind、protocol、data、error。
- 将此 v1 技能视为只读。
- 此技能仅封装 coins.llama.fi;对于其他 DefiLlama 主机,请使用单独的公共分析或收益技能。
- defillama-prices-openapi-cli <操作> ... 等同于 uxc https://coins.llama.fi --schema-url pricesopenapi_schema> <操作> ...。
参考资料
- - 使用模式:references/usage-patterns.md
- 精选的 OpenAPI 模式:references/defillama-prices.openapi.json
- DefiLlama API 文档:https://defillama.com/docs/api