KuCoin Unified API Skill
Use this skill to run KuCoin public market-data operations through uxc + OpenAPI.
Reuse the uxc skill for shared execution, auth, and error-handling guidance.
Prerequisites
- -
uxc is installed and available in PATH. - Network access to
https://api.kucoin.com. - Access to the curated OpenAPI schema URL:
- INLINECODE5
Scope
This skill covers a curated KuCoin public market surface for:
- - symbol discovery
- all tickers
- order book snapshots
- candlestick reads
This skill does not cover:
- - private account or order endpoints in v1
- websocket, margin, or broader platform products
Authentication
Public market endpoints in this skill do not require credentials.
KuCoin private REST auth uses provider-specific headers and signing rules including passphrase handling. Keep this v1 skill public-data-only until a reusable KuCoin signer flow exists in uxc.
Core Workflow
- 1. Use the fixed link command by default:
-
command -v kucoin-openapi-cli
- If missing, create it:
uxc link kucoin-openapi-cli https://api.kucoin.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/kucoin-openapi-skill/references/kucoin-public.openapi.json
- INLINECODE9
- 2. Inspect operation help before execution:
-
kucoin-openapi-cli get:/api/v1/symbols -h
- INLINECODE11
- 3. Prefer narrow symbol reads first:
-
kucoin-openapi-cli get:/api/v1/market/orderbook/level2_20 symbol=BTC-USDT
- INLINECODE13
Operations
- - INLINECODE14
- INLINECODE15
- INLINECODE16
- INLINECODE17
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.
- KuCoin symbols use dash-separated names such as
BTC-USDT. - INLINECODE25 is equivalent to
uxc https://api.kucoin.com --schema-url <kucoin_public_openapi_schema> <operation> ....
References
- - Usage patterns: INLINECODE27
- Curated OpenAPI schema: INLINECODE28
- Official KuCoin auth docs: https://www.kucoin.com/docs-new/authentication
技能名称: kucoin-openapi-skill
详细描述:
KuCoin 统一 API 技能
使用此技能通过 uxc + OpenAPI 运行 KuCoin 公共市场数据操作。
复用 uxc 技能以获取共享的执行、认证和错误处理指导。
前提条件
- - uxc 已安装并可在 PATH 中使用。
- 可访问 https://api.kucoin.com 的网络连接。
- 可访问精选的 OpenAPI 模式 URL:
- https://raw.githubusercontent.com/holon-run/uxc/main/skills/kucoin-openapi-skill/references/kucoin-public.openapi.json
范围
此技能涵盖精选的 KuCoin 公共市场表面,用于:
此技能不涵盖:
- - v1 中的私有账户或订单端点
- WebSocket、保证金或更广泛的平台产品
认证
此技能中的公共市场端点不需要凭证。
KuCoin 私有 REST 认证使用特定于提供商的标头和签名规则,包括密码短语处理。在 uxc 中存在可复用的 KuCoin 签名器流程之前,保持此 v1 技能仅限公共数据。
核心工作流程
- 1. 默认使用固定链接命令:
- command -v kucoin-openapi-cli
- 如果缺失,则创建它:
uxc link kucoin-openapi-cli https://api.kucoin.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/kucoin-openapi-skill/references/kucoin-public.openapi.json
- kucoin-openapi-cli -h
- 2. 在执行前检查操作帮助:
- kucoin-openapi-cli get:/api/v1/symbols -h
- kucoin-openapi-cli get:/api/v1/market/allTickers -h
- 3. 优先进行窄范围交易对读取:
- kucoin-openapi-cli get:/api/v1/market/orderbook/level2_20 symbol=BTC-USDT
- kucoin-openapi-cli get:/api/v1/market/candles symbol=BTC-USDT type=1hour
操作
- - get:/api/v1/symbols
- get:/api/v1/market/allTickers
- get:/api/v1/market/orderbook/level2_20
- get:/api/v1/market/candles
防护措施
- - 保持自动化在 JSON 输出信封上;不要使用 --text。
- 首先解析稳定字段:ok、kind、protocol、data、error。
- 将此 v1 技能视为只读。
- KuCoin 交易对使用短横线分隔的名称,例如 BTC-USDT。
- kucoin-openapi-cli <操作> ... 等同于 uxc https://api.kucoin.com --schema-url publicopenapi_schema> <操作> ...。
参考
- - 使用模式:references/usage-patterns.md
- 精选的 OpenAPI 模式:references/kucoin-public.openapi.json
- 官方 KuCoin 认证文档:https://www.kucoin.com/docs-new/authentication