coingecko-openapi-skill
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCoinGecko And GeckoTerminal Skill
CoinGecko与GeckoTerminal Skill
Use this skill to run CoinGecko market data and GeckoTerminal onchain DEX operations through + OpenAPI.
uxcReuse the skill for shared execution, auth, and error-handling guidance.
uxc使用本Skill,通过 + OpenAPI调用CoinGecko市场数据和GeckoTerminal链上DEX操作。
uxc复用 Skill以实现共享执行、认证和错误处理机制。
uxcPrerequisites
前提条件
- is installed and available in
uxc.PATH - Network access to .
https://api.coingecko.com/api/v3 - Access to the curated OpenAPI schema URL:
https://raw.githubusercontent.com/holon-run/uxc/main/skills/coingecko-openapi-skill/references/coingecko-market.openapi.json
- A CoinGecko Demo API key.
- 已安装并可在
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密钥。
Scope
适用范围
This skill covers a read-first market data surface:
- API liveness checks
- spot price lookup
- asset ID discovery
- market screener reads
- trending reads
- GeckoTerminal network discovery
- onchain token price lookup
- trending pool reads
This skill does not cover:
- paid or enterprise-only method families beyond the selected v1 scope
- historical chart or OHLC families
- portfolio, NFT, or onchain trade execution
- the full CoinGecko or GeckoTerminal API
本Skill涵盖以下只读优先的市场数据场景:
- API存活状态检查
- 现货价格查询
- 资产ID发现
- 市场筛选器读取
- 热门数据读取
- GeckoTerminal网络发现
- 链上代币价格查询
- 热门资金池读取
本Skill 不涵盖以下内容:
- 超出选定v1范围的付费或企业专属方法组
- 历史图表或OHLC组
- 投资组合、NFT或链上交易执行
- 完整的CoinGecko或GeckoTerminal API
Authentication
认证
The default host uses CoinGecko Demo auth with .
x-cg-demo-api-keyConfigure one API-key credential and bind it to :
api.coingecko.com/api/v3bash
uxc auth credential set coingecko-demo \
--auth-type api_key \
--api-key-header x-cg-demo-api-key \
--secret-env COINGECKO_DEMO_API_KEY
uxc auth binding add \
--id coingecko-demo \
--host api.coingecko.com \
--path-prefix /api/v3 \
--scheme https \
--credential coingecko-demo \
--priority 100Validate the active mapping when auth looks wrong:
bash
uxc auth binding match https://api.coingecko.com/api/v3默认主机使用带有的CoinGecko演示认证。
x-cg-demo-api-key配置一个API密钥凭据并将其绑定到:
api.coingecko.com/api/v3bash
uxc auth credential set coingecko-demo \
--auth-type api_key \
--api-key-header x-cg-demo-api-key \
--secret-env COINGECKO_DEMO_API_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/v3Pro Host Override
Pro主机覆盖配置
If you have a Pro plan, keep the same curated schema and create a separate credential, binding, and link:
bash
uxc auth credential set coingecko-pro \
--auth-type api_key \
--api-key-header x-cg-pro-api-key \
--secret-env COINGECKO_PRO_API_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如果你拥有Pro计划,请保留相同的精选架构,并创建单独的凭据、绑定和链接:
bash
uxc auth credential set coingecko-pro \
--auth-type api_key \
--api-key-header x-cg-pro-api-key \
--secret-env COINGECKO_PRO_API_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.jsonCore Workflow
核心工作流程
-
Use the fixed link command by default:
command -v coingecko-openapi-cli- If missing, create it:
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
-
Inspect operation schema first:
coingecko-openapi-cli get:/simple/price -hcoingecko-openapi-cli get:/coins/markets -hcoingecko-openapi-cli get:/onchain/simple/networks/{network}/token_price/{addresses} -h
-
Prefer narrow read validation before broader reads:
coingecko-openapi-cli get:/pingcoingecko-openapi-cli get:/coins/list include_platform=falsecoingecko-openapi-cli get:/onchain/networks
-
Execute with key/value parameters:
coingecko-openapi-cli get:/simple/price ids=bitcoin,ethereum vs_currencies=usdcoingecko-openapi-cli get:/coins/markets vs_currency=usd ids=bitcoin,ethereum order=market_cap_desc per_page=10 page=1coingecko-openapi-cli get:/onchain/simple/networks/{network}/token_price/{addresses} network=eth addresses=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
-
默认使用固定链接命令:
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
-
先检查操作架构:
coingecko-openapi-cli get:/simple/price -hcoingecko-openapi-cli get:/coins/markets -hcoingecko-openapi-cli get:/onchain/simple/networks/{network}/token_price/{addresses} -h
-
在进行更广泛的读取之前,优先进行窄范围的读取验证:
coingecko-openapi-cli get:/pingcoingecko-openapi-cli get:/coins/list include_platform=falsecoingecko-openapi-cli get:/onchain/networks
-
使用键值参数执行:
coingecko-openapi-cli get:/simple/price ids=bitcoin,ethereum vs_currencies=usdcoingecko-openapi-cli get:/coins/markets vs_currency=usd ids=bitcoin,ethereum order=market_cap_desc per_page=10 page=1coingecko-openapi-cli get:/onchain/simple/networks/{network}/token_price/{addresses} network=eth addresses=0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48
Operation Groups
操作分组
Market Data
市场数据
get:/pingget:/simple/priceget:/coins/listget:/coins/marketsget:/search/trending
get:/pingget:/simple/priceget:/coins/listget:/coins/marketsget:/search/trending
GeckoTerminal Onchain Data
GeckoTerminal链上数据
get:/onchain/networksget:/onchain/simple/networks/{network}/token_price/{addresses}get:/onchain/networks/trending_pools
get:/onchain/networksget:/onchain/simple/networks/{network}/token_price/{addresses}get:/onchain/networks/trending_pools
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. Do not imply wallet, trading, or portfolio mutation support.
- Demo and Pro hosts use different API-key headers. If the default Demo credential fails against the Pro host, create a separate Pro credential rather than reusing the Demo header name.
- The Pro host needs its own auth binding on ; creating only a credential is not enough for linked calls to send
pro-api.coingecko.com/api/v3.x-cg-pro-api-key - CoinGecko public and Demo limits are tighter than Pro. Keep default examples narrow and avoid large paginated loops without explicit user intent.
- The GeckoTerminal endpoints in this schema share the same API root and auth flow as the rest of the curated CoinGecko host contract.
- is equivalent to
coingecko-openapi-cli <operation> ....uxc https://api.coingecko.com/api/v3 --schema-url <coingecko_openapi_schema> <operation> ...
- 保持自动化基于JSON输出包;不要使用参数。
--text - 优先解析稳定字段:、
ok、kind、protocol、data。error - 将此v1版本Skill视为只读。不要暗示支持钱包、交易或投资组合变更操作。
- 演示主机和Pro主机使用不同的API密钥头。如果默认的演示凭据在Pro主机上验证失败,请创建单独的Pro凭据,不要复用演示头名称。
- Pro主机需要在上创建自己的认证绑定;仅创建凭据不足以让链接调用发送
pro-api.coingecko.com/api/v3。x-cg-pro-api-key - CoinGecko公共和演示版本的限制比Pro版本更严格。保持默认示例范围狭窄,除非用户明确要求,否则避免大型分页循环。
- 本架构中的GeckoTerminal端点与精选CoinGecko主机合约的其余部分共享相同的API根路径和认证流程。
- 等效于
coingecko-openapi-cli <operation> ...。uxc https://api.coingecko.com/api/v3 --schema-url <coingecko_openapi_schema> <operation> ...
References
参考资料
- Usage patterns:
references/usage-patterns.md - Curated OpenAPI schema:
references/coingecko-market.openapi.json - CoinGecko API docs: https://docs.coingecko.com/reference/endpoint-overview
- Authentication docs: https://docs.coingecko.com/reference/authentication
- 使用模式:
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