upbit
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseUpbit Skill
Upbit 技能
Use the CLI binary for all Upbit REST API interactions.
upbit所有Upbit REST API交互均使用 CLI二进制文件完成。
upbitLanguage Behavior
语言响应规则
Detect the user's language and respond accordingly:
- Korean user: respond in Korean, use Korean terminology from (e.g., 주문, 매수, 잔고, 체결, 호가)
references/glossary.md - English user: respond in English, use English terminology from the same glossary
- Mixed/ambiguous: follow the language of the most recent message
When explaining API fields or command output, always translate field names into the user's language using the glossary. For example, if the user asks in Korean, explain as "매수", as "매도", as "보유 잔고".
bidaskbalanceLoad when translating terminology or explaining response fields.
references/glossary.md检测用户使用的语言并做出对应响应:
- 韩语用户:使用韩语响应,采用中的韩语术语(例如:주문、매수、잔고、체결、호가)
references/glossary.md - 英语用户:使用英语响应,采用同一术语表中的英语术语
- 混合/模糊语言:遵循最近一条消息的语言
解释API字段或命令输出时,务必使用术语表将字段名翻译为用户使用的语言。例如,若用户用韩语提问,需将解释为“매수”,解释为“매도”,解释为“보유 잔고”。
bidaskbalance翻译术语或解释响应字段时,请加载文件。
references/glossary.mdSetup
安装配置
If is not installed or credentials are not configured, load and follow the steps there.
upbitreferences/setup.mdCheck if is available:
upbitbash
upbit --version如果未安装或未配置凭证,请加载并按照其中步骤操作。
upbitreferences/setup.md检查是否可用:
upbitbash
upbit --versionAuthentication
身份验证
Private endpoints require credentials. Configure via the CLI (recommended):
bash
upbit config setCredentials are saved to and automatically used for all CLI commands.
~/.upbit/configAlternatively, set via environment variables:
bash
export UPBIT_ACCESS_KEY=<your-access-key>
export UPBIT_SECRET_KEY=<your-secret-key>Or pass inline per command:
bash
upbit <resource> <command> --access-key <key> --secret-key <secret>Private (require auth): , , , , ,
Public (no auth): , , , , ,
accountsapi-keysorderswithdrawsdepositstravel-ruletickersorderbookstradescandlestrading-pairswallet-status私有接口需要凭证。推荐通过CLI配置:
bash
upbit config set凭证将保存至,并自动用于所有CLI命令。
~/.upbit/config也可通过环境变量设置:
bash
export UPBIT_ACCESS_KEY=<your-access-key>
export UPBIT_SECRET_KEY=<your-secret-key>或在每个命令中直接传入:
bash
upbit <resource> <command> --access-key <key> --secret-key <secret>私有接口(需要验证):、、、、、
公开接口(无需验证):、、、、、
accountsapi-keysorderswithdrawsdepositstravel-ruletickersorderbookstradescandlestrading-pairswallet-statusSafety Rule — Write Operations
安全规则——写入操作
Before executing any write operation, show the full command and ask the user to type .
CONFIRMWrite operations:
- ,
orders create,orders cancel,orders cancel-and-new,orders cancel-by-uuidsorders cancel-open - ,
withdraws create-withdrawal,withdraws create-krw-withdrawalwithdraws cancel-withdrawal - ,
deposits deposit-krwdeposits create-coin-address - ,
travel-rule verify-deposit-by-txidtravel-rule verify-deposit-by-uuid
orders test-create执行任何写入操作前,请展示完整命令并要求用户输入进行确认。
CONFIRM写入操作包括:
- 、
orders create、orders cancel、orders cancel-and-new、orders cancel-by-uuidsorders cancel-open - 、
withdraws create-withdrawal、withdraws create-krw-withdrawalwithdraws cancel-withdrawal - 、
deposits deposit-krwdeposits create-coin-address - 、
travel-rule verify-deposit-by-txidtravel-rule verify-deposit-by-uuid
orders test-createCONFIRMUpbit Domain Concepts
Upbit 核心概念
Market Pair Format
交易对格式
- Field name:
market - Format: — quote currency first, base asset second
{QUOTE}-{BASE} - Delimiter: hyphen (), not slash (
-)/ - Always uppercase
- Quote currencies: ,
KRW,BTCUSDT - Not or
{BASE}-{QUOTE}— Upbit reverses the conventional order used by most exchanges{BASE}/{QUOTE}
| Market | Meaning |
|---|---|
| BTC priced in KRW; Upbit uses |
| ETH priced in KRW |
| XRP priced in KRW |
| ETH priced in BTC |
| XRP priced in USDT |
- 字段名:
market - 格式:——计价货币在前,基础资产在后
{QUOTE}-{BASE} - 分隔符:连字符(),而非斜杠(
-)/ - 需全部大写
- 计价货币:、
KRW、BTCUSDT - 注意:并非或
{BASE}-{QUOTE}——Upbit采用与多数交易所相反的常规顺序{BASE}/{QUOTE}
| 交易对 | 含义 |
|---|---|
| 以KRW计价的BTC;Upbit使用 |
| 以KRW计价的ETH |
| 以KRW计价的XRP |
| 以BTC计价的ETH |
| 以USDT计价的XRP |
Account Balance Fields
账户余额字段
Each entry from :
accounts list| Field | Description |
|---|---|
| Asset code (e.g., |
| Available balance (not in any open order) |
| Balance currently locked in open orders or withdrawals |
| Average purchase price (decimal string) |
| Currency |
Total holdings = +
balancelockedaccounts list| 字段 | 描述 |
|---|---|
| 资产代码(例如: |
| 可用余额(未用于任何未结订单) |
| 当前被未结订单或提现锁定的余额 |
| 平均买入价(十进制字符串) |
| |
总持有量 = +
balancelockedOrder Types (ord_type
)
ord_type订单类型(ord_type
)
ord_type | Description | Required | Must NOT set |
|---|---|---|---|
| Limit order at specified price | | — |
| Market buy — spend a fixed quote amount | | |
| Market sell — sell a fixed base amount | | |
| Best available price (see rules below) | see below | see below |
best- must be
time_in_forceorioc(NOTfok)post_only - If (buy): requires
side=bid, must omitpricevolume - If (sell): requires
side=ask, must omitvolumeprice
post_onlysmp_type | 描述 | 必填参数 | 禁止设置参数 |
|---|---|---|---|
| 指定价格的限价订单 | | — |
| 市价买入——花费固定金额的计价货币 | | |
| 市价卖出——卖出固定数量的基础资产 | | |
| 最优可用价格(见下方规则) | 见下方 | 见下方 |
best- 必须为
time_in_force或ioc(不可为fok)post_only - 若(买入):需设置
side=bid,必须省略pricevolume - 若(卖出):需设置
side=ask,必须省略volumeprice
post_onlysmp_typeSide Values
买卖方向(side
)
side | Meaning |
|---|---|
| Buy |
| Sell |
| 含义 |
|---|---|
| 买入 |
| 卖出 |
Order States
订单状态
| State | Meaning |
|---|---|
| Pending execution |
| Pending reservation (stop order) |
| Fully executed |
| Cancelled |
| 状态 | 含义 |
|---|---|
| 待执行 |
| 待预约(止损订单) |
| 完全成交 |
| 已取消 |
Order Fee Fields
订单手续费字段
| Field | Description |
|---|---|
| Total fee reserved when order was placed |
| Fee already charged (for partial fills) |
| |
| Amount locked for this order (quote currency for buys, base asset for sells) |
| 字段 | 描述 |
|---|---|
| 下单时预留的总手续费 |
| 已收取的手续费(针对部分成交) |
| |
| 此订单锁定的金额(买入为计价货币,卖出为基础资产) |
First-Time Order Placement
首次下单
Before placing an order on an unfamiliar market, run to confirm:
orders retrieve-chance- Minimum order amount (,
bid.min_total)ask.min_total - Supported order types (,
bid_types)ask_types - Fee rates (,
bid_fee,ask_fee,maker_bid_fee)maker_ask_fee
bash
upbit orders retrieve-chance --market "KRW-BTC"在不熟悉的交易对上下单前,请运行确认:
orders retrieve-chance- 最小下单金额(、
bid.min_total)ask.min_total - 支持的订单类型(、
bid_types)ask_types - 手续费率(、
bid_fee、ask_fee、maker_bid_fee)maker_ask_fee
bash
upbit orders retrieve-chance --market "KRW-BTC"Withdrawal — Multi-Chain Assets
提现——多链资产
For assets available on multiple networks (e.g., USDT), is required to specify the blockchain. Use to see supported networks and addresses before withdrawing:
net_typewithdraws list-coin-addressesbash
upbit withdraws list-coin-addresses --currency "USDT"对于支持多网络的资产(例如USDT),需指定来选择区块链。提现前请使用查看支持的网络及地址:
net_typewithdraws list-coin-addressesbash
upbit withdraws list-coin-addresses --currency "USDT"Withdrawal — Secondary Address
提现——二级地址
Some assets require a secondary address (Destination Tag, Memo, etc.) in addition to the main address. Always check the registered address via to see if is present before sending.
withdraws list-coin-addressessecondary_address部分资产除主地址外还需要二级地址(如Destination Tag、Memo等)。发送前请务必通过查看已注册地址是否包含。
withdraws list-coin-addressessecondary_addressWithdrawal — Address Not Registered (withdraw_address_not_registered
)
withdraw_address_not_registered提现——地址未注册(withdraw_address_not_registered
)
withdraw_address_not_registeredWhen returns a 400 error with , the address has not been registered in the Upbit Open API withdrawal allowlist.
withdraws create-withdrawalname: withdraw_address_not_registeredTo register a withdrawal address, visit the allowlist management page for your environment:
After registering, run to confirm the address appears before retrying.
withdraws list-coin-addresses当返回400错误且错误名为时,说明该地址未在Upbit开放API提现白名单中注册。
withdraws create-withdrawalwithdraw_address_not_registered如需注册提现地址,请访问对应环境的白名单管理页面:
注册完成后,请运行确认地址已存在,再重试提现。
withdraws list-coin-addressesDeposit / Withdraw States
充值/提现状态
| State | Meaning |
|---|---|
| In progress |
| Completed |
| Cancelled |
| Rejected |
| Awaiting Travel Rule verification |
| Refund in progress |
| Refund completed |
When a deposit is in state, use commands to verify.
TRAVEL_RULE_SUSPECTEDtravel-rule| 状态 | 含义 |
|---|---|
| 处理中 |
| 已完成 |
| 已取消 |
| 已拒绝 |
| 等待旅行规则验证 |
| 退款中 |
| 退款完成 |
当充值处于状态时,请使用命令进行验证。
TRAVEL_RULE_SUSPECTEDtravel-ruleWallet Status
钱包状态
wallet-status list | Meaning |
|---|---|
| Both deposits and withdrawals available |
| Deposits suspended |
| Withdrawals suspended |
| Both suspended |
| Not supported |
wallet-status list | 含义 |
|---|---|
| 支持充值和提现 |
| 暂停充值 |
| 暂停提现 |
| 暂停充值和提现 |
| 不支持 |
Candle Units & Limits
K线周期与限制
- Minute candles: supported units are only
1, 3, 5, 10, 15, 30, 60, 240 - Second candles: data retention is 3 months maximum (older queries return empty array)
- : default 1, max 200 per request
count
- 分钟K线:仅支持分钟周期
1、3、5、10、15、30、60、240 - 秒K线:数据最长保留3个月(查询更早数据将返回空数组)
- :默认1,单次请求最大200条
count
Trade Pagination
交易记录分页
- : max 500 per request
count - : pass
cursorfrom last result to page forwardsequential_id - : integer 1–7 (UTC-based day offset)
days_ago
- :单次请求最大500条
count - :传入最后一条结果的
cursor以翻页sequential_id - :整数1–7(基于UTC的日期偏移)
days_ago
Ticker Key Fields
行情关键字段
| Field | Description |
|---|---|
| Current (last) price |
| 24-hour accumulated trade value |
| 24-hour accumulated trade volume |
| |
| Signed absolute change (negative if falling) |
| 52-week range |
| 字段 | 描述 |
|---|---|
| 当前(最新)价格 |
| 24小时累计交易额 |
| 24小时累计交易量 |
| 较前一日收盘价的涨跌: |
| 带符号的绝对涨跌幅(下跌为负值) |
| 52周价格区间 |
Price Direction Enum (change
, ask_bid
)
changeask_bid价格方向枚举(change
、ask_bid
)
changeask_bid | Meaning |
|---|---|
| Price higher than previous close |
| Same as previous close |
| Price lower than previous close |
| Meaning |
|---|---|
| Trade initiated by a sell order |
| Trade initiated by a buy order |
| 含义 |
|---|---|
| 价格高于前一日收盘价 |
| 价格与前一日收盘价持平 |
| 价格低于前一日收盘价 |
| 含义 |
|---|---|
| 由卖出订单发起的交易 |
| 由买入订单发起的交易 |
Units & Formats
单位与格式
| Value | Unit | Format |
|---|---|---|
| Base asset quantity | Decimal string (e.g., |
| Per-unit price in quote currency | Decimal string (e.g., |
| Total quote amount to spend | Decimal string (e.g., |
| Fee fields | Quote currency amount | Decimal string |
| Milliseconds since epoch | Integer |
| ISO 8601 with KST offset | String (e.g., |
| UTC date | String |
| UTC time | String |
| Fee rates | Decimal (0.05% = | Decimal string |
Day boundaries (opening_price, acc_trade_price, etc.) are based on UTC 00:00, not KST.
| 值 | 单位 | 格式 |
|---|---|---|
| 基础资产数量 | 十进制字符串(例如: |
| 计价货币计价的单位价格 | 十进制字符串(例如: |
| 要花费的计价货币总金额 | 十进制字符串(例如: |
| 手续费字段 | 计价货币金额 | 十进制字符串 |
| 自纪元以来的毫秒数 | 整数 |
| 带KST偏移的ISO 8601格式 | 字符串(例如: |
| UTC日期 | 字符串 |
| UTC时间 | 字符串 |
| 手续费率 | 小数(0.05% = | 十进制字符串 |
每日边界(开盘价、累计交易额等)基于UTC 00:00,而非KST。
Command Reference
命令参考
When you need detailed flag information for a resource, read the corresponding reference file.
| Resource | Subcommands | Reference |
|---|---|---|
| create, test-create, retrieve, list-open, list-closed, list-by-uuids, cancel, cancel-and-new, cancel-by-uuids, cancel-open, retrieve-chance | |
| list-by-quote-currencies, list-by-trading-pairs | |
| list-minutes, list-days, list-weeks, list-months, list-years, list-seconds | |
| list, list-instruments | |
| list | |
| list | |
| retrieve, list, cancel-withdrawal, create-withdrawal, create-krw-withdrawal, list-coin-addresses, retrieve-chance | |
| retrieve, list, create-coin-address, deposit-krw, list-coin-addresses, retrieve-chance, retrieve-coin-address | |
| list-vasps, verify-deposit-by-txid, verify-deposit-by-uuid | |
| list | |
| Output & Filtering | --format, --transform, GJSON, debug, auto-paging | |
| Korean ↔ English Glossary | Term translations, field name Korean ↔ English mapping | |
| CLI Setup & Credentials | Installation, environment selection, API key setup, config set | |
For flags not listed in reference files, run:
upbit <resource> <command> --help当需要资源的详细参数信息时,请查阅对应的参考文件。
| 资源 | 子命令 | 参考文件 |
|---|---|---|
| create、test-create、retrieve、list-open、list-closed、list-by-uuids、cancel、cancel-and-new、cancel-by-uuids、cancel-open、retrieve-chance | |
| list-by-quote-currencies、list-by-trading-pairs | |
| list-minutes、list-days、list-weeks、list-months、list-years、list-seconds | |
| list、list-instruments | |
| list | |
| list | |
| retrieve、list、cancel-withdrawal、create-withdrawal、create-krw-withdrawal、list-coin-addresses、retrieve-chance | |
| retrieve、list、create-coin-address、deposit-krw、list-coin-addresses、retrieve-chance、retrieve-coin-address | |
| list-vasps、verify-deposit-by-txid、verify-deposit-by-uuid | |
| list | |
| 输出与过滤 | --format、--transform、GJSON、debug、auto-paging | |
| 韩英术语对照表 | 术语翻译、字段名韩英映射 | |
| CLI安装与凭证 | 安装、环境选择、API密钥配置、config set | |
若参考文件中未列出参数,请运行:
upbit <resource> <command> --helpEnvironment
环境切换
bash
upbit accounts list # kr (default)
upbit accounts list --environment sg # sg | id | th
upbit accounts list --base-url <url> # custom base URLbash
upbit accounts list # kr(默认)
upbit accounts list --environment sg # sg | id | th
upbit accounts list --base-url <url> # 自定义基础URL