defillama-yields-openapi-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

DefiLlama Yields API Skill

DefiLlama收益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.
使用此Skill通过
uxc
+ OpenAPI运行DefiLlama公开收益API操作。
复用
uxc
Skill以获取共享的执行、认证和错误处理指引。

Prerequisites

前提条件

  • uxc
    is installed and available in
    PATH
    .
  • Network access to
    https://yields.llama.fi
    .
  • Access to the curated OpenAPI schema URL:
    • https://raw.githubusercontent.com/holon-run/uxc/main/skills/defillama-yields-openapi-skill/references/defillama-yields.openapi.json
  • 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

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
    api.llama.fi
  • price endpoints from
    coins.llama.fi
  • DefiLlama Pro APIs
此Skill覆盖
yields.llama.fi
上的公开只读收益接口:
  • 收益池发现
  • 单池图表历史
此Skill包含:
  • 写入操作
  • api.llama.fi
    中的协议或链概览端点
  • coins.llama.fi
    中的价格端点
  • DefiLlama Pro APIs

Authentication

认证

This public skill does not require authentication.
此公开Skill无需认证。

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
    • defillama-yields-openapi-cli -h
  2. Inspect operation schema first:
    • defillama-yields-openapi-cli get:/pools -h
    • defillama-yields-openapi-cli get:/chart/{pool} -h
  3. Prefer narrow read validation before broader reads:
    • defillama-yields-openapi-cli get:/pools
    • defillama-yields-openapi-cli get:/chart/{pool} pool=747c1d2a-c668-4682-b9f9-296708a3dd90
  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

Operations

操作

  • get:/pools
  • get:/chart/{pool}
  • get:/pools
  • get:/chart/{pool}

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
    .
  • defillama-yields-openapi-cli <operation> ...
    is equivalent to
    uxc https://yields.llama.fi --schema-url <defillama_yields_openapi_schema> <operation> ...
    .
  • 自动化仅针对JSON输出包;请勿使用
    --text
    参数。
  • 优先解析稳定字段:
    ok
    kind
    protocol
    data
    error
  • 将此v1版本Skill视为只读。
  • DefiLlama公开数据分布在多个主机上;此Skill仅有意封装
    yields.llama.fi
  • defillama-yields-openapi-cli <operation> ...
    等同于
    uxc https://yields.llama.fi --schema-url <defillama_yields_openapi_schema> <operation> ...

References

参考资料

  • Usage patterns:
    references/usage-patterns.md
  • Curated OpenAPI schema:
    references/defillama-yields.openapi.json
  • DefiLlama API docs: https://defillama.com/docs/api
  • 使用模式:
    references/usage-patterns.md
  • 精心整理的OpenAPI架构:
    references/defillama-yields.openapi.json
  • DefiLlama API文档:https://defillama.com/docs/api