返回顶部
c

coingecko-openapi-skillCoinGecko数据API

Operate CoinGecko and GeckoTerminal market data APIs through UXC with a curated OpenAPI schema, API-key auth, and read-first guardrails.

作者: admin | 来源: ClawHub
源自
ClawHub
版本
V 1.0.0
安全检测
已通过
205
下载量
免费
免费
0
收藏
概述
安装方式
版本历史

coingecko-openapi-skill

CoinGecko 和 GeckoTerminal 技能

使用此技能通过 uxc + OpenAPI 运行 CoinGecko 市场数据和 GeckoTerminal 链上 DEX 操作。

复用 uxc 技能以获取共享执行、认证和错误处理指南。

前提条件

  • - uxc 已安装并可在 PATH 中使用。
  • 可访问 https://api.coingecko.com/api/v3 网络。
  • 可访问精选的 OpenAPI 模式 URL:
- https://raw.githubusercontent.com/holon-run/uxc/main/skills/coingecko-openapi-skill/references/coingecko-market.openapi.json
  • - 一个 CoinGecko 演示版 API 密钥。

范围

此技能涵盖以读取为主的市场数据面:

  • - API 活跃性检查
  • 现货价格查询
  • 资产 ID 发现
  • 市场筛选器读取
  • 趋势读取
  • GeckoTerminal 网络发现
  • 链上代币价格查询
  • 趋势池读取

此技能涵盖:

  • - 选定 v1 范围之外的付费或企业专属方法系列
  • 历史图表或 OHLC 系列
  • 投资组合、NFT 或链上交易执行
  • 完整的 CoinGecko 或 GeckoTerminal API

认证

默认主机使用带有 x-cg-demo-api-key 的 CoinGecko 演示版认证。

配置一个 API 密钥凭证并将其绑定到 api.coingecko.com/api/v3:

bash
uxc auth credential set coingecko-demo \
--auth-type api_key \
--api-key-header x-cg-demo-api-key \
--secret-env COINGECKODEMOAPI_KEY

uxc auth binding add \
--id coingecko-demo \
--host api.coingecko.com \
--path-prefix /api/v3 \
--scheme https \
--credential coingecko-demo \
--priority 100

当认证出现问题时,验证活动映射:

bash
uxc auth binding match https://api.coingecko.com/api/v3

专业版主机覆盖

如果您拥有专业版计划,请保留相同的精选模式,并创建单独的凭证、绑定和链接:

bash
uxc auth credential set coingecko-pro \
--auth-type api_key \
--api-key-header x-cg-pro-api-key \
--secret-env COINGECKOPROAPI_KEY

uxc auth binding add \
--id coingecko-pro \
--host pro-api.coingecko.com \
--path-prefix /api/v3 \
--scheme https \
--credential coingecko-pro \
--priority 100

uxc link coingecko-pro-openapi-cli https://pro-api.coingecko.com/api/v3 \
--schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/coingecko-openapi-skill/references/coingecko-market.openapi.json

核心工作流程

  1. 1. 默认使用固定链接命令:
- command -v coingecko-openapi-cli - 如果缺失,则创建: uxc link coingecko-openapi-cli https://api.coingecko.com/api/v3 --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/coingecko-openapi-skill/references/coingecko-market.openapi.json - coingecko-openapi-cli -h
  1. 2. 首先检查操作模式:
- coingecko-openapi-cli get:/simple/price -h - coingecko-openapi-cli get:/coins/markets -h - coingecko-openapi-cli get:/onchain/simple/networks/{network}/token_price/{addresses} -h
  1. 3. 在进行更广泛的读取之前,优先进行窄范围读取验证:
- coingecko-openapi-cli get:/ping - coingecko-openapi-cli get:/coins/list include_platform=false - coingecko-openapi-cli get:/onchain/networks
  1. 4. 使用键/值参数执行:
- coingecko-openapi-cli get:/simple/price ids=bitcoin,ethereum vs_currencies=usd - coingecko-openapi-cli get:/coins/markets vscurrency=usd ids=bitcoin,ethereum order=marketcapdesc perpage=10 page=1 - coingecko-openapi-cli get:/onchain/simple/networks/{network}/token_price/{addresses} network=eth addresses=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48

操作组

市场数据

  • - get:/ping
  • get:/simple/price
  • get:/coins/list
  • get:/coins/markets
  • get:/search/trending

GeckoTerminal 链上数据

  • - get:/onchain/networks
  • get:/onchain/simple/networks/{network}/tokenprice/{addresses}
  • get:/onchain/networks/trendingpools

防护措施

  • - 保持自动化在 JSON 输出信封上;不要使用 --text。
  • 首先解析稳定字段:ok、kind、protocol、data、error。
  • 将此 v1 技能视为只读。不要暗示支持钱包、交易或投资组合变更。
  • 演示版和专业版主机使用不同的 API 密钥标头。如果默认的演示版凭证在专业版主机上失败,请创建单独的专业版凭证,而不是重复使用演示版标头名称。
  • 专业版主机需要在 pro-api.coingecko.com/api/v3 上拥有自己的认证绑定;仅创建凭证不足以让链接调用发送 x-cg-pro-api-key。
  • CoinGecko 公共版和演示版的限制比专业版更严格。保持默认示例范围狭窄,避免在没有明确用户意图的情况下进行大型分页循环。
  • 此模式中的 GeckoTerminal 端点与精选的 CoinGecko 主机合约的其余部分共享相同的 API 根和认证流程。
  • coingecko-openapi-cli <操作> ... 等同于 uxc https://api.coingecko.com/api/v3 --schema-url openapischema> <操作> ...。

参考

  • - 使用模式:references/usage-patterns.md
  • 精选的 OpenAPI 模式:references/coingecko-market.openapi.json
  • CoinGecko API 文档:https://docs.coingecko.com/reference/endpoint-overview
  • 认证文档:https://docs.coingecko.com/reference/authentication

标签

skill ai

通过对话安装

该技能支持在以下平台通过对话安装:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 coingecko-openapi-skill-1776063543 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 coingecko-openapi-skill-1776063543 技能

通过命令行安装

skillhub install coingecko-openapi-skill-1776063543

下载

⬇ 下载 coingecko-openapi-skill v1.0.0(免费)

文件大小: 6.41 KB | 发布时间: 2026-4-15 12:14

v1.0.0 最新 2026-4-15 12:14
Initial release of coingecko-openapi-skill.

- Enables CoinGecko and GeckoTerminal market data operations via CLI using a curated OpenAPI schema.
- Supports API-key authentication for both Demo and Pro CoinGecko environments, with step-by-step credential and binding setup.
- Provides read-only endpoints: liveness checks, spot price, asset & onchain token lookup, trending and screener reads.
- Integrates with the UXC CLI for consistent API interaction and error handling.
- Includes detailed guardrails and workflow instructions for safe, narrow, and stable use.

Archiver·手机版·闲社网·闲社论坛·羊毛社区· 多链控股集团有限公司 · 苏ICP备2025199260号-1

Powered by Discuz! X5.0   © 2024-2025 闲社网·线报更新论坛·羊毛分享社区·http://xianshe.com

p2p_official_large
返回顶部