Upbit Open API Skill
Use this skill to run Upbit 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 the chosen Upbit regional API host.
- Access to the curated OpenAPI schema URL:
- INLINECODE4
Scope
This skill covers a curated Upbit public surface for:
- - market discovery
- ticker reads
- minute candles
- order book snapshots
This skill does not cover:
- - private account or order endpoints in v1
- region-specific account/trade auth flows
Endpoint
Upbit uses regional hosts. Pick the right one for the market you need before linking.
Examples:
- - INLINECODE5
- INLINECODE6
- INLINECODE7
Authentication
Public market endpoints in this skill do not require credentials.
Upbit private APIs use provider-specific bearer JWT generation with request-specific claims. Keep this v1 skill public-data-only until a reusable Upbit signer flow exists in uxc.
Core Workflow
- 1. Choose the correct regional host for the market you need.
- Use a fixed link command by default:
-
command -v upbit-openapi-cli
- If missing, create it:
uxc link upbit-openapi-cli https://sg-api.upbit.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/upbit-openapi-skill/references/upbit-public.openapi.json
- INLINECODE11
- 3. Inspect operation help before execution:
-
upbit-openapi-cli get:/v1/market/all -h
- INLINECODE13
- 4. Prefer narrow market reads first:
-
upbit-openapi-cli get:/v1/ticker markets=SGD-BTC
- INLINECODE15
Operations
- - INLINECODE16
- INLINECODE17
- INLINECODE18
- INLINECODE19
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.
- Confirm the correct regional host and quote market before execution.
- On regional Upbit hosts, live market codes are quote-first, for example
SGD-BTC and USDT-BTC. - INLINECODE28 is equivalent to
uxc <upbit_region_host> --schema-url <upbit_public_openapi_schema> <operation> ....
References
- - Usage patterns: INLINECODE30
- Curated OpenAPI schema: INLINECODE31
- Official Upbit Open API overview: https://global-docs.upbit.com/reference/api-overview
Upbit Open API 技能
使用此技能通过 uxc + OpenAPI 运行 Upbit 公开市场数据操作。
复用 uxc 技能以获取共享执行、认证和错误处理指导。
前提条件
- - uxc 已安装并可在 PATH 中使用。
- 能够网络访问所选的 Upbit 区域 API 主机。
- 能够访问精选的 OpenAPI 模式 URL:
- https://raw.githubusercontent.com/holon-run/uxc/main/skills/upbit-openapi-skill/references/upbit-public.openapi.json
范围
此技能涵盖精选的 Upbit 公开接口,用于:
此技能不涵盖:
- - v1 中的私有账户或订单端点
- 特定区域的账户/交易认证流程
端点
Upbit 使用区域主机。在链接前,请为所需市场选择正确的主机。
示例:
- - https://sg-api.upbit.com
- https://id-api.upbit.com
- https://th-api.upbit.com
认证
此技能中的公开市场端点无需凭证。
Upbit 私有 API 使用特定于提供商的 Bearer JWT 生成方式,并附带请求特定的声明。在 uxc 中存在可复用的 Upbit 签名器流程之前,请保持此 v1 技能仅处理公开数据。
核心工作流程
- 1. 为所需市场选择正确的区域主机。
- 默认使用固定链接命令:
- command -v upbit-openapi-cli
- 如果缺失,则创建它:
uxc link upbit-openapi-cli https://sg-api.upbit.com --schema-url https://raw.githubusercontent.com/holon-run/uxc/main/skills/upbit-openapi-skill/references/upbit-public.openapi.json
- upbit-openapi-cli -h
- 3. 在执行前检查操作帮助:
- upbit-openapi-cli get:/v1/market/all -h
- upbit-openapi-cli get:/v1/ticker -h
- 4. 优先进行窄范围的市场读取:
- upbit-openapi-cli get:/v1/ticker markets=SGD-BTC
- upbit-openapi-cli get:/v1/orderbook markets=SGD-BTC
操作
- - get:/v1/market/all
- get:/v1/ticker
- get:/v1/candles/minutes/{unit}
- get:/v1/orderbook
安全护栏
- - 保持自动化在 JSON 输出信封上;不要使用 --text。
- 首先解析稳定字段:ok、kind、protocol、data、error。
- 将此 v1 技能视为只读。
- 在执行前确认正确的区域主机和报价市场。
- 在区域 Upbit 主机上,实时市场代码以报价货币开头,例如 SGD-BTC 和 USDT-BTC。
- upbit-openapi-cli <操作> ... 等同于 uxc regionhost> --schema-url publicopenapi_schema> <操作> ...。
参考资料
- - 使用模式:references/usage-patterns.md
- 精选的 OpenAPI 模式:references/upbit-public.openapi.json
- 官方 Upbit Open API 概述:https://global-docs.upbit.com/reference/api-overview