upbit

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Upbit Skill

Upbit 技能

Use the
upbit
CLI binary for all Upbit REST API interactions.
所有Upbit REST API交互均使用
upbit
CLI二进制文件完成。

Language Behavior

语言响应规则

Detect the user's language and respond accordingly:
  • Korean user: respond in Korean, use Korean terminology from
    references/glossary.md
    (e.g., 주문, 매수, 잔고, 체결, 호가)
  • 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
bid
as "매수",
ask
as "매도",
balance
as "보유 잔고".
Load
references/glossary.md
when translating terminology or explaining response fields.
检测用户使用的语言并做出对应响应:
  • 韩语用户:使用韩语响应,采用
    references/glossary.md
    中的韩语术语(例如:주문、매수、잔고、체결、호가)
  • 英语用户:使用英语响应,采用同一术语表中的英语术语
  • 混合/模糊语言:遵循最近一条消息的语言
解释API字段或命令输出时,务必使用术语表将字段名翻译为用户使用的语言。例如,若用户用韩语提问,需将
bid
解释为“매수”,
ask
解释为“매도”,
balance
解释为“보유 잔고”。
翻译术语或解释响应字段时,请加载
references/glossary.md
文件。

Setup

安装配置

If
upbit
is not installed or credentials are not configured, load
references/setup.md
and follow the steps there.
Check if
upbit
is available:
bash
upbit --version
如果未安装
upbit
或未配置凭证,请加载
references/setup.md
并按照其中步骤操作。
检查
upbit
是否可用:
bash
upbit --version

Authentication

身份验证

Private endpoints require credentials. Configure via the CLI (recommended):
bash
upbit config set
Credentials are saved to
~/.upbit/config
and automatically used for all CLI commands.
Alternatively, 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):
accounts
,
api-keys
,
orders
,
withdraws
,
deposits
,
travel-rule
Public (no auth):
tickers
,
orderbooks
,
trades
,
candles
,
trading-pairs
,
wallet-status
私有接口需要凭证。推荐通过CLI配置:
bash
upbit config set
凭证将保存至
~/.upbit/config
,并自动用于所有CLI命令。
也可通过环境变量设置:
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>
私有接口(需要验证):
accounts
api-keys
orders
withdraws
deposits
travel-rule
公开接口(无需验证):
tickers
orderbooks
trades
candles
trading-pairs
wallet-status

Safety Rule — Write Operations

安全规则——写入操作

Before executing any write operation, show the full command and ask the user to type
CONFIRM
.
Write operations:
  • orders create
    ,
    orders cancel
    ,
    orders cancel-and-new
    ,
    orders cancel-by-uuids
    ,
    orders cancel-open
  • withdraws create-withdrawal
    ,
    withdraws create-krw-withdrawal
    ,
    withdraws cancel-withdrawal
  • deposits deposit-krw
    ,
    deposits create-coin-address
  • travel-rule verify-deposit-by-txid
    ,
    travel-rule verify-deposit-by-uuid
orders test-create
is a dry-run — no CONFIRM needed.
执行任何写入操作前,请展示完整命令并要求用户输入
CONFIRM
进行确认。
写入操作包括:
  • orders create
    orders cancel
    orders cancel-and-new
    orders cancel-by-uuids
    orders cancel-open
  • withdraws create-withdrawal
    withdraws create-krw-withdrawal
    withdraws cancel-withdrawal
  • deposits deposit-krw
    deposits create-coin-address
  • travel-rule verify-deposit-by-txid
    travel-rule verify-deposit-by-uuid
orders test-create
为模拟操作——无需输入
CONFIRM
确认。

Upbit Domain Concepts

Upbit 核心概念

Market Pair Format

交易对格式

  • Field name:
    market
  • Format:
    {QUOTE}-{BASE}
    — quote currency first, base asset second
  • Delimiter: hyphen (
    -
    ), not slash (
    /
    )
  • Always uppercase
  • Quote currencies:
    KRW
    ,
    BTC
    ,
    USDT
  • Not
    {BASE}-{QUOTE}
    or
    {BASE}/{QUOTE}
    — Upbit reverses the conventional order used by most exchanges
MarketMeaning
KRW-BTC
BTC priced in KRW; Upbit uses
KRW-BTC
, not
BTC/KRW
or
BTC-KRW
KRW-ETH
ETH priced in KRW
KRW-XRP
XRP priced in KRW
BTC-ETH
ETH priced in BTC
USDT-XRP
XRP priced in USDT
  • 字段名:
    market
  • 格式:
    {QUOTE}-{BASE}
    ——计价货币在前,基础资产在后
  • 分隔符:连字符(
    -
    ),而非斜杠(
    /
  • 需全部大写
  • 计价货币:
    KRW
    BTC
    USDT
  • 注意:并非
    {BASE}-{QUOTE}
    {BASE}/{QUOTE}
    ——Upbit采用与多数交易所相反的常规顺序
交易对含义
KRW-BTC
以KRW计价的BTC;Upbit使用
KRW-BTC
格式,而非
BTC/KRW
BTC-KRW
KRW-ETH
以KRW计价的ETH
KRW-XRP
以KRW计价的XRP
BTC-ETH
以BTC计价的ETH
USDT-XRP
以USDT计价的XRP

Account Balance Fields

账户余额字段

Each entry from
accounts list
:
FieldDescription
currency
Asset code (e.g.,
KRW
,
BTC
,
ETH
)
balance
Available balance (not in any open order)
locked
Balance currently locked in open orders or withdrawals
avg_buy_price
Average purchase price (decimal string)
unit_currency
Currency
avg_buy_price
is denominated in (e.g.,
KRW
,
BTC
)
Total holdings =
balance
+
locked
accounts list
返回的每一项:
字段描述
currency
资产代码(例如:
KRW
BTC
ETH
balance
可用余额(未用于任何未结订单)
locked
当前被未结订单或提现锁定的余额
avg_buy_price
平均买入价(十进制字符串)
unit_currency
avg_buy_price
的计价货币(例如:
KRW
BTC
总持有量 =
balance
+
locked

Order Types (
ord_type
)

订单类型(
ord_type

ord_type
DescriptionRequiredMust NOT set
limit
Limit order at specified price
price
,
volume
price
Market buy — spend a fixed quote amount
price
volume
market
Market sell — sell a fixed base amount
volume
price
best
Best available price (see rules below)see belowsee below
best
order rules
:
  • time_in_force
    must be
    ioc
    or
    fok
    (NOT
    post_only
    )
  • If
    side=bid
    (buy): requires
    price
    , must omit
    volume
  • If
    side=ask
    (sell): requires
    volume
    , must omit
    price
post_only
+
smp_type
conflict
: these two are mutually exclusive — do not set both.
ord_type
描述必填参数禁止设置参数
limit
指定价格的限价订单
price
volume
price
市价买入——花费固定金额的计价货币
price
volume
market
市价卖出——卖出固定数量的基础资产
volume
price
best
最优可用价格(见下方规则)见下方见下方
best
订单规则
  • time_in_force
    必须为
    ioc
    fok
    (不可为
    post_only
  • side=bid
    (买入):需设置
    price
    ,必须省略
    volume
  • side=ask
    (卖出):需设置
    volume
    ,必须省略
    price
post_only
smp_type
冲突
:二者互斥——不可同时设置。

Side Values

买卖方向(
side

side
Meaning
bid
Buy
ask
Sell
side
含义
bid
买入
ask
卖出

Order States

订单状态

StateMeaning
wait
Pending execution
watch
Pending reservation (stop order)
done
Fully executed
cancel
Cancelled
状态含义
wait
待执行
watch
待预约(止损订单)
done
完全成交
cancel
已取消

Order Fee Fields

订单手续费字段

FieldDescription
reserved_fee
Total fee reserved when order was placed
paid_fee
Fee already charged (for partial fills)
remaining_fee
reserved_fee - paid_fee
locked
Amount locked for this order (quote currency for buys, base asset for sells)
字段描述
reserved_fee
下单时预留的总手续费
paid_fee
已收取的手续费(针对部分成交)
remaining_fee
reserved_fee - paid_fee
locked
此订单锁定的金额(买入为计价货币,卖出为基础资产)

First-Time Order Placement

首次下单

Before placing an order on an unfamiliar market, run
orders retrieve-chance
to confirm:
  • 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),
net_type
is required to specify the blockchain. Use
withdraws list-coin-addresses
to see supported networks and addresses before withdrawing:
bash
upbit withdraws list-coin-addresses --currency "USDT"
对于支持多网络的资产(例如USDT),需指定
net_type
来选择区块链。提现前请使用
withdraws list-coin-addresses
查看支持的网络及地址:
bash
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
withdraws list-coin-addresses
to see if
secondary_address
is present before sending.
部分资产除主地址外还需要二级地址(如Destination Tag、Memo等)。发送前请务必通过
withdraws list-coin-addresses
查看已注册地址是否包含
secondary_address

Withdrawal — Address Not Registered (
withdraw_address_not_registered
)

提现——地址未注册(
withdraw_address_not_registered

When
withdraws create-withdrawal
returns a 400 error with
name: withdraw_address_not_registered
, the address has not been registered in the Upbit Open API withdrawal allowlist.
To register a withdrawal address, visit the allowlist management page for your environment:
After registering, run
withdraws list-coin-addresses
to confirm the address appears before retrying.
withdraws create-withdrawal
返回400错误且错误名为
withdraw_address_not_registered
时,说明该地址未在Upbit开放API提现白名单中注册。
如需注册提现地址,请访问对应环境的白名单管理页面:
注册完成后,请运行
withdraws list-coin-addresses
确认地址已存在,再重试提现。

Deposit / Withdraw States

充值/提现状态

StateMeaning
PROCESSING
In progress
ACCEPTED
Completed
CANCELLED
Cancelled
REJECTED
Rejected
TRAVEL_RULE_SUSPECTED
Awaiting Travel Rule verification
REFUNDING
Refund in progress
REFUNDED
Refund completed
When a deposit is in
TRAVEL_RULE_SUSPECTED
state, use
travel-rule
commands to verify.
状态含义
PROCESSING
处理中
ACCEPTED
已完成
CANCELLED
已取消
REJECTED
已拒绝
TRAVEL_RULE_SUSPECTED
等待旅行规则验证
REFUNDING
退款中
REFUNDED
退款完成
当充值处于
TRAVEL_RULE_SUSPECTED
状态时,请使用
travel-rule
命令进行验证。

Wallet Status

钱包状态

wallet-status list
returns per-asset network status:
wallet_state
Meaning
working
Both deposits and withdrawals available
withdraw_only
Deposits suspended
deposit_only
Withdrawals suspended
paused
Both suspended
unsupported
Not supported
wallet-status list
返回各资产的网络状态:
wallet_state
含义
working
支持充值和提现
withdraw_only
暂停充值
deposit_only
暂停提现
paused
暂停充值和提现
unsupported
不支持

Candle Units & Limits

K线周期与限制

  • Minute candles: supported units are
    1, 3, 5, 10, 15, 30, 60, 240
    only
  • Second candles: data retention is 3 months maximum (older queries return empty array)
  • count
    : default 1, max 200 per request
  • 分钟K线:仅支持
    1、3、5、10、15、30、60、240
    分钟周期
  • 秒K线:数据最长保留3个月(查询更早数据将返回空数组)
  • count
    :默认1,单次请求最大200条

Trade Pagination

交易记录分页

  • count
    : max 500 per request
  • cursor
    : pass
    sequential_id
    from last result to page forward
  • days_ago
    : integer 1–7 (UTC-based day offset)
  • count
    :单次请求最大500条
  • cursor
    :传入最后一条结果的
    sequential_id
    以翻页
  • days_ago
    :整数1–7(基于UTC的日期偏移)

Ticker Key Fields

行情关键字段

FieldDescription
trade_price
Current (last) price
acc_trade_price_24h
24-hour accumulated trade value
acc_trade_volume_24h
24-hour accumulated trade volume
change
RISE
,
EVEN
, or
FALL
vs. previous day close
signed_change_price
Signed absolute change (negative if falling)
highest_52_week_price
/
lowest_52_week_price
52-week range
字段描述
trade_price
当前(最新)价格
acc_trade_price_24h
24小时累计交易额
acc_trade_volume_24h
24小时累计交易量
change
较前一日收盘价的涨跌:
RISE
(上涨)、
EVEN
(持平)、
FALL
(下跌)
signed_change_price
带符号的绝对涨跌幅(下跌为负值)
highest_52_week_price
/
lowest_52_week_price
52周价格区间

Price Direction Enum (
change
,
ask_bid
)

价格方向枚举(
change
ask_bid

change
value
Meaning
RISE
Price higher than previous close
EVEN
Same as previous close
FALL
Price lower than previous close
ask_bid
value
Meaning
ASK
Trade initiated by a sell order
BID
Trade initiated by a buy order
change
含义
RISE
价格高于前一日收盘价
EVEN
价格与前一日收盘价持平
FALL
价格低于前一日收盘价
ask_bid
含义
ASK
由卖出订单发起的交易
BID
由买入订单发起的交易

Units & Formats

单位与格式

ValueUnitFormat
volume
Base asset quantityDecimal string (e.g.,
"0.01"
)
price
(limit)
Per-unit price in quote currencyDecimal string (e.g.,
"140000000"
)
price
(market buy)
Total quote amount to spendDecimal string (e.g.,
"10000"
)
Fee fieldsQuote currency amountDecimal string
timestamp
Milliseconds since epochInteger
created_at
/
done_at
ISO 8601 with KST offsetString (e.g.,
2024-01-01T09:00:00+09:00
)
trade_date
UTC dateString
yyyyMMdd
trade_time
UTC timeString
HHmmss
(24-hour)
Fee ratesDecimal (0.05% =
"0.0005"
)
Decimal string
Day boundaries (opening_price, acc_trade_price, etc.) are based on UTC 00:00, not KST.
单位格式
volume
基础资产数量十进制字符串(例如:
"0.01"
price
(限价)
计价货币计价的单位价格十进制字符串(例如:
"140000000"
price
(市价买入)
要花费的计价货币总金额十进制字符串(例如:
"10000"
手续费字段计价货币金额十进制字符串
timestamp
自纪元以来的毫秒数整数
created_at
/
done_at
带KST偏移的ISO 8601格式字符串(例如:
2024-01-01T09:00:00+09:00
trade_date
UTC日期字符串
yyyyMMdd
trade_time
UTC时间字符串
HHmmss
(24小时制)
手续费率小数(0.05% =
"0.0005"
十进制字符串
每日边界(开盘价、累计交易额等)基于UTC 00:00,而非KST。

Command Reference

命令参考

When you need detailed flag information for a resource, read the corresponding reference file.
ResourceSubcommandsReference
orders
create, test-create, retrieve, list-open, list-closed, list-by-uuids, cancel, cancel-and-new, cancel-by-uuids, cancel-open, retrieve-chance
references/orders.md
tickers
list-by-quote-currencies, list-by-trading-pairs
references/tickers.md
candles
list-minutes, list-days, list-weeks, list-months, list-years, list-seconds
references/candles.md
orderbooks
list, list-instruments
references/orderbooks.md
trades
list
references/trades.md
trading-pairs
list
references/trading-pairs.md
withdraws
retrieve, list, cancel-withdrawal, create-withdrawal, create-krw-withdrawal, list-coin-addresses, retrieve-chance
references/withdraws.md
deposits
retrieve, list, create-coin-address, deposit-krw, list-coin-addresses, retrieve-chance, retrieve-coin-address
references/deposits.md
travel-rule
list-vasps, verify-deposit-by-txid, verify-deposit-by-uuid
references/travel-rule.md
accounts
/
api-keys
/
wallet-status
list
references/account.md
Output & Filtering--format, --transform, GJSON, debug, auto-paging
references/output.md
Korean ↔ English GlossaryTerm translations, field name Korean ↔ English mapping
references/glossary.md
CLI Setup & CredentialsInstallation, environment selection, API key setup, config set
references/setup.md
For flags not listed in reference files, run:
upbit <resource> <command> --help
当需要资源的详细参数信息时,请查阅对应的参考文件。
资源子命令参考文件
orders
create、test-create、retrieve、list-open、list-closed、list-by-uuids、cancel、cancel-and-new、cancel-by-uuids、cancel-open、retrieve-chance
references/orders.md
tickers
list-by-quote-currencies、list-by-trading-pairs
references/tickers.md
candles
list-minutes、list-days、list-weeks、list-months、list-years、list-seconds
references/candles.md
orderbooks
list、list-instruments
references/orderbooks.md
trades
list
references/trades.md
trading-pairs
list
references/trading-pairs.md
withdraws
retrieve、list、cancel-withdrawal、create-withdrawal、create-krw-withdrawal、list-coin-addresses、retrieve-chance
references/withdraws.md
deposits
retrieve、list、create-coin-address、deposit-krw、list-coin-addresses、retrieve-chance、retrieve-coin-address
references/deposits.md
travel-rule
list-vasps、verify-deposit-by-txid、verify-deposit-by-uuid
references/travel-rule.md
accounts
/
api-keys
/
wallet-status
list
references/account.md
输出与过滤--format、--transform、GJSON、debug、auto-paging
references/output.md
韩英术语对照表术语翻译、字段名韩英映射
references/glossary.md
CLI安装与凭证安装、环境选择、API密钥配置、config set
references/setup.md
若参考文件中未列出参数,请运行:
upbit <resource> <command> --help

Environment

环境切换

bash
upbit accounts list                   # kr (default)
upbit accounts list --environment sg  # sg | id | th
upbit accounts list --base-url <url>  # custom base URL
bash
upbit accounts list                   # kr(默认)
upbit accounts list --environment sg  # sg | id | th
upbit accounts list --base-url <url>  # 自定义基础URL