SuperAPI AI 工具集

defillama-prices-openapi-skill

数据与分析

查看项目

更新于 10-15 22:14

技能介绍

用途:该技能用于通过 uxc 加 OpenAPI 架构调用 DefiLlama 公共价格接口,属于只读操作,重点覆盖 coins.llama.fi 上单个或多个资产的当前价格查询。前置条件:uxc 已安装并在 PATH 中可用;可访问 https://coins.llama.fi;可访问精选 OpenAPI 架构地址 https://raw.githubusercontent.com/holon-run/uxc/main/skills/defillama-prices-openapi-skill/references/defillama-prices.openapi.json。该公共技能不需要身份验证。

主要能力:提供 get:/prices/current/{coins} 操作,用于当前价格查询。不包含写操作,也不覆盖 api.llama.fi 的协议或链概览接口、yields.llama.fi 的收益接口以及 DefiLlama Pro API;这些应使用单独技能。

使用方式:默认使用固定链接命令,先检查 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,先检查操作架构 defillama-prices-openapi-cli get:/prices/current/{coins} -h,再进行窄范围读取验证,例如 defillama-prices-openapi-cli get:/prices/current/{coins} coins=coingecko:bitcoin searchWidth=4h。

defillama-prices-openapi-cli <operation> ... 等价于 uxc https://coins.llama.fi --schema-url <defillama_prices_openapi_schema> <operation> ...。

限制与防护:自动化应保留 JSON 输出包络,不要使用 --text;优先解析稳定字段 ok、kind、protocol、data、error;该 v1 技能视为只读。使用模式见 references/usage-patterns.md,架构见 references/defillama-prices.openapi.json,API 文档见 https://defillama.com/docs/api。