SuperAPI AI 工具集

defillama-pro-openapi-skill

数据与分析

查看项目

更新于 10-15 22:14

技能介绍

用途:通过 uxc + OpenAPI 执行 DefiLlama Pro API 操作,偏只读分析场景,适合查询协议与链数据、代币价格、收益池与稳定币指标。

前提条件:已安装 uxc 并在 PATH 中;可访问 https://pro-api.llama.fi;可访问整理好的 OpenAPI schema 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 端点面。

认证:密钥放在主机与端点路径之间的请求路径中。先配置凭据与路径前缀模板: uxc auth credential set defillama-pro --auth-type api_key --secret-env DEFILLAMA_PRO_API_KEY --path-prefix-template "/{{secret}}" uxc auth binding add --id defillama-pro --host pro-api.llama.fi --scheme https --credential defillama-pro --priority 100 可用 uxc auth binding match https://pro-api.llama.fi 校验映射。

使用方式:默认使用固定链接命令 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 先查操作 schema:defillama-pro-openapi-cli get:/api/protocols -h。可用窄读验证,如 get:/api/v2/chains,再执行带键值参数的调用:defillama-pro-openapi-cli get:/api/protocol/{protocol} protocol=aave;get:/coins/prices/current/{coins} coins=ethereum:0x... searchWidth=4h;get:/stablecoins/stablecoindominance/{chain} chain=ethereum。命令等价于 uxc https://pro-api.llama.fi --schema-url <schema> <operation>。

限制与防护栏:保持 JSON 输出信封,勿用 --text;优先解析稳定字段 ok、kind、protocol、data、error;本 v1 技能视为只读,不暗示钱包、交易或管理支持;假定 Pro 主机与密钥在路径中的认证模型,勿随意绑定到不同路径形态;密钥出现在请求路径中,应使用 --secret-env 或 --secret-op 避免出现在 shell 历史,排障时避免共享原始守护进程日志,必要时脱敏、轮换或删除 ~/.uxc/daemon/daemon.log。参考:references/usage-patterns.md 与 references/defillama-pro.openapi.json,DefiLlama API 文档 https://defillama.com/docs/api 与 Pro 文档 https://defillama.com/pro-api/docs。