defillama-prices-openapi-skill

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

DefiLlama Prices API Skill

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

Prerequisites

前提条件

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

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
    api.llama.fi
  • yield endpoints from
    yields.llama.fi
  • DefiLlama Pro APIs
此Skill涵盖
coins.llama.fi
上的一小部分公开只读价格接口:
  • 单种或多种资产的当前价格查询
此Skill涵盖:
  • 写入操作
  • api.llama.fi
    中的协议或链概览端点
  • yields.llama.fi
    中的收益端点
  • DefiLlama Pro API

Authentication

认证方式

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

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
    • defillama-prices-openapi-cli -h
  2. Inspect operation schema first:
    • defillama-prices-openapi-cli get:/prices/current/{coins} -h
  3. Prefer narrow read validation before broader reads:
    • defillama-prices-openapi-cli get:/prices/current/{coins} coins=coingecko:bitcoin searchWidth=4h
  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

Operations

操作

  • get:/prices/current/{coins}
  • get:/prices/current/{coins}

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.
  • defillama-prices-openapi-cli <operation> ...
    is equivalent to
    uxc https://coins.llama.fi --schema-url <defillama_prices_openapi_schema> <operation> ...
    .
  • 自动化操作仅针对JSON输出格式;请勿使用
    --text
    参数。
  • 优先解析稳定字段:
    ok
    kind
    protocol
    data
    error
  • 将此v1版本Skill视为只读。
  • 此Skill仅封装
    coins.llama.fi
    ;对于其他DefiLlama主机,请使用单独的公开分析或收益Skill。
  • defillama-prices-openapi-cli <operation> ...
    等同于
    uxc https://coins.llama.fi --schema-url <defillama_prices_openapi_schema> <operation> ...

References

参考资料

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