Kraken REST Skill
Use this skill to run Kraken 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.kraken.com. - Access to the curated OpenAPI schema URL:
- INLINECODE5
Scope
This skill covers a curated Kraken public surface for:
- - server time
- asset pair metadata
- ticker reads
- OHLC candles
- order book snapshots
This skill does not cover:
- - private account or trade endpoints in v1
- Kraken FIX
- broader non-core platform products
Authentication
Public market endpoints in this skill do not require credentials.
Kraken private REST endpoints use provider-specific header signing and nonce handling. Keep this v1 skill public-data-only until a reusable Kraken signer flow exists in uxc.
Core Workflow
- 1. Use the fixed link command by default:
-
command -v kraken-openapi-cli
- If missing, create it:
uxc link kraken-openapi-cli https://api.kraken.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/kraken-openapi-skill/references/kraken-public.openapi.json
- INLINECODE9
- 2. Inspect operation help before execution:
-
kraken-openapi-cli get:/0/public/Time -h
- INLINECODE11
- 3. Prefer narrow pair reads first:
-
kraken-openapi-cli get:/0/public/Ticker pair=XBTUSD
- INLINECODE13
Operations
- - INLINECODE14
- INLINECODE15
- INLINECODE16
- INLINECODE17
- INLINECODE18
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.
- Kraken pair naming can differ from other venues. Check
AssetPairs before assuming symbol strings. - INLINECODE26 is equivalent to
uxc https://api.kraken.com --schema-url <kraken_public_openapi_schema> <operation> ....
References
- - Usage patterns: INLINECODE28
- Curated OpenAPI schema: INLINECODE29
- Official Kraken API intro: https://docs.kraken.com/api/docs/guides/global-intro
技能名称: kraken-openapi-skill
详细描述:
Kraken REST 技能
使用此技能通过 uxc + OpenAPI 运行 Kraken 公共市场数据操作。
复用 uxc 技能以获取共享执行、认证和错误处理指导。
前置条件
- - uxc 已安装并可在 PATH 中使用。
- 可访问 https://api.kraken.com 的网络连接。
- 可访问精选的 OpenAPI 模式 URL:
- https://raw.githubusercontent.com/holon-run/uxc/main/skills/kraken-openapi-skill/references/kraken-public.openapi.json
范围
此技能涵盖精选的 Kraken 公共接口,包括:
- - 服务器时间
- 资产对元数据
- 行情数据读取
- OHLC 蜡烛图
- 订单簿快照
此技能不涵盖:
- - v1 中的私有账户或交易端点
- Kraken FIX
- 更广泛的非核心平台产品
认证
此技能中的公共市场端点无需凭证。
Kraken 私有 REST 端点使用特定于提供商的标头签名和随机数处理。在 uxc 中存在可复用的 Kraken 签名器流程之前,请保持此 v1 技能仅处理公共数据。
核心工作流程
- 1. 默认使用固定链接命令:
- command -v kraken-openapi-cli
- 如果缺失,则创建它:
uxc link kraken-openapi-cli https://api.kraken.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/kraken-openapi-skill/references/kraken-public.openapi.json
- kraken-openapi-cli -h
- 2. 在执行前检查操作帮助:
- kraken-openapi-cli get:/0/public/Time -h
- kraken-openapi-cli get:/0/public/Ticker -h
- 3. 优先进行窄范围交易对读取:
- kraken-openapi-cli get:/0/public/Ticker pair=XBTUSD
- kraken-openapi-cli get:/0/public/Depth pair=XBTUSD count=20
操作
- - get:/0/public/Time
- get:/0/public/AssetPairs
- get:/0/public/Ticker
- get:/0/public/OHLC
- get:/0/public/Depth
防护措施
- - 保持自动化处理 JSON 输出格式;不要使用 --text。
- 首先解析稳定字段:ok、kind、protocol、data、error。
- 将此 v1 技能视为只读。
- Kraken 交易对命名可能与其他交易平台不同。在假设符号字符串之前,请检查 AssetPairs。
- kraken-openapi-cli <操作> ... 等同于 uxc https://api.kraken.com --schema-url publicopenapi_schema> <操作> ...。
参考
- - 使用模式:references/usage-patterns.md
- 精选的 OpenAPI 模式:references/kraken-public.openapi.json
- 官方 Kraken API 介绍:https://docs.kraken.com/api/docs/guides/global-intro