Bithumb exchange plugin for bt_api — Unified REST API for Spot trading with support for KRW, USDT, USD, BTC, and ETH trading pairs.
bt_api_bithumb is a runtime plugin for bt_api that connects to Bithumb exchange. It depends on bt_api_base for core infrastructure.
Bithumb is one of South Korea's largest cryptocurrency exchanges, offering trading in KRW, USDT, USD, BTC, and ETH pairs.
| Resource | Link |
|---|---|
| English Docs | https://bt-api-bithumb.readthedocs.io/ |
| Chinese Docs | https://bt-api-bithumb.readthedocs.io/zh/latest/ |
| GitHub | https://github.com/cloudQuant/bt_api_bithumb |
| PyPI | https://pypi.org/project/bt_api_bithumb/ |
| Issues | https://github.com/cloudQuant/bt_api_bithumb/issues |
| bt_api_base | https://bt-api-base.readthedocs.io/ |
| Main Project | https://github.com/cloudQuant/bt_api_py |
| Asset Type | Code | REST | Description |
|---|---|---|---|
| Spot | BITHUMB___SPOT | ✅ | Spot trading with KRW, USDT, USD, BTC, ETH pairs |
- Market Data — Ticker, order book depth, k-lines, recent trades
- Account — Balance, account info
- Trading — Place orders, cancel orders, query order status, open orders
Auto-registers at import time via ExchangeRegistry. Works seamlessly with BtApi:
frombt_api_pyimportBtApiapi=BtApi(exchange_kwargs={
"BITHUMB___SPOT": {
"api_key": "your_key",
"secret": "your_secret",
}
})
ticker=api.get_tick("BITHUMB___SPOT", "BTCUSDT")
balance=api.get_balance("BITHUMB___SPOT")
order=api.make_order(exchange_name="BITHUMB___SPOT", symbol="BTCUSDT", volume=0.001, price=50000, order_type="limit")All exchange responses normalized to bt_api_base container types:
TickContainer— 24hr rolling tickerOrderBookContainer— Order book depthBarContainer— K-line/candlestickTradeContainer— Individual tradesOrderContainer— Order status and fillsAccountBalanceContainer— Asset balances
pip install bt_api_bithumbgit clone https://github.com/cloudQuant/bt_api_bithumb
cd bt_api_bithumb
pip install -e .- Python
3.9–3.14 bt_api_base >= 0.15httpxfor HTTP client
pip install bt_api_bithumbfrombt_api_pyimportBtApiapi=BtApi()
ticker=api.get_tick("BITHUMB___SPOT", "BTCUSDT")
print(f"BTCUSDT price: {ticker}")frombt_api_pyimportBtApiapi=BtApi(exchange_kwargs={
"BITHUMB___SPOT": {
"api_key": "your_api_key",
"secret": "your_secret",
}
})
order=api.make_order(
exchange_name="BITHUMB___SPOT",
symbol="BTCUSDT",
volume=0.001,
price=50000,
order_type="limit",
)
print(f"Order placed: {order}")frombt_api_pyimportBtApiapi=BtApi(exchange_kwargs={
"BITHUMB___SPOT": {"api_key": "key", "secret": "secret"}
})
# REST callsticker=api.get_tick("BITHUMB___SPOT", "BTCUSDT")
balance=api.get_balance("BITHUMB___SPOT")
order=api.make_order(exchange_name="BITHUMB___SPOT", symbol="BTCUSDT", volume=0.001, price=50000, order_type="limit")bt_api_bithumb/
├── plugin.py # register_plugin() — bt_api plugin entry point
├── registry_registration.py # register_bithumb() — feeds / exchange_data registration
├── exchange_data/
│ └── __init__.py # BithumbExchangeData (base) + BithumbExchangeDataSpot
├── feeds/
│ ├── live_bithumb/
│ │ ├── spot.py # BithumbRequestDataSpot — SPOT feed
│ │ └── request_base.py # BithumbRequestData — base request class
│ └── __init__.py
├── containers/ # Normalized data containers
├── errors/
│ └── __init__.py
└── __init__.py
| Category | Operation | Notes |
|---|---|---|
| Market Data | get_tick | 24hr rolling ticker |
get_depth | Order book depth | |
get_kline | K-line/candlestick | |
get_exchange_info | Exchange configuration | |
| Account | get_balance | Asset balances |
get_account | Full account info | |
| Trading | make_order | LIMIT orders |
cancel_order | Cancel order by ID | |
query_order | Query order status | |
get_open_orders | All open orders |
Bithumb trading pairs are supported in multiple quote currencies:
- USDT pairs:
BTCUSDT,ETHUSDT,SOLUSDT,XRPUSDT... - USD pairs:
BTCUSD,ETHUSD... - BTC pairs:
ETHBTC,XRPBTC... - ETH pairs:
XRPETH... - KRW pairs:
BTCKRW,ETHKRW,SOLKRW...
All Bithumb API errors are translated to bt_api_base ApiError subclasses.
| Doc | Link |
|---|---|
| English | https://bt-api-bithumb.readthedocs.io/ |
| 中文 | https://bt-api-bithumb.readthedocs.io/zh/latest/ |
| bt_api_base | https://bt-api-base.readthedocs.io/ |
| Main Project | https://cloudquant.github.io/bt_api_py/ |
MIT — see LICENSE.
- GitHub Issues — bug reports, feature requests
- Email: yunjinqi@gmail.com
bt_api 的 Bithumb 交易所插件 — 为现货交易提供统一的 REST API,支持 KRW、USDT、USD、BTC 和 ETH 交易对。
bt_api_bithumb 是 bt_api 的运行时插件,连接 Bithumb 交易所。依赖 bt_api_base 提供核心基础设施。
Bithumb 是 韩国最大的加密货币交易所 之一,提供 KRW、USDT、USD、BTC 和 ETH 交易对。
| 资产类型 | 代码 | REST | 说明 |
|---|---|---|---|
| 现货 | BITHUMB___SPOT | ✅ | 现货交易,支持 KRW、USDT、USD、BTC、ETH 交易对 |
- 行情数据 — 行情、订单簿深度、K线、近期成交
- 账户 — 余额、账户信息
- 交易 — 下单、撤单、查询订单状态、挂单列表
通过 ExchangeRegistry 在导入时自动注册,与 BtApi 无缝协作:
frombt_api_pyimportBtApiapi=BtApi(exchange_kwargs={
"BITHUMB___SPOT": {
"api_key": "your_key",
"secret": "your_secret",
}
})
ticker=api.get_tick("BITHUMB___SPOT", "BTCUSDT")
balance=api.get_balance("BITHUMB___SPOT")
order=api.make_order(exchange_name="BITHUMB___SPOT", symbol="BTCUSDT", volume=0.001, price=50000, order_type="limit")所有交易所响应规范化为 bt_api_base 容器类型:
TickContainer— 24小时滚动行情OrderBookContainer— 订单簿深度BarContainer— K线/蜡烛图TradeContainer— 逐笔成交OrderContainer— 订单状态和成交AccountBalanceContainer— 资产余额
pip install bt_api_bithumbgit clone https://github.com/cloudQuant/bt_api_bithumb
cd bt_api_bithumb
pip install -e .- Python
3.9–3.14 bt_api_base >= 0.15httpxHTTP 客户端
pip install bt_api_bithumbfrombt_api_pyimportBtApiapi=BtApi()
ticker=api.get_tick("BITHUMB___SPOT", "BTCUSDT")
print(f"BTCUSDT 价格: {ticker}")frombt_api_pyimportBtApiapi=BtApi(exchange_kwargs={
"BITHUMB___SPOT": {
"api_key": "your_api_key",
"secret": "your_secret",
}
})
order=api.make_order(
exchange_name="BITHUMB___SPOT",
symbol="BTCUSDT",
volume=0.001,
price=50000,
order_type="limit",
)
print(f"订单已下单: {order}")frombt_api_pyimportBtApiapi=BtApi(exchange_kwargs={
"BITHUMB___SPOT": {"api_key": "key", "secret": "secret"}
})
# REST 调用ticker=api.get_tick("BITHUMB___SPOT", "BTCUSDT")
balance=api.get_balance("BITHUMB___SPOT")
order=api.make_order(exchange_name="BITHUMB___SPOT", symbol="BTCUSDT", volume=0.001, price=50000, order_type="limit")bt_api_bithumb/
├── plugin.py # register_plugin() — bt_api 插件入口
├── registry_registration.py # register_bithumb() — feeds / exchange_data 注册
├── exchange_data/
│ └── __init__.py # BithumbExchangeData(基类)+ BithumbExchangeDataSpot
├── feeds/
│ ├── live_bithumb/
│ │ ├── spot.py # BithumbRequestDataSpot — SPOT feed
│ │ └── request_base.py # BithumbRequestData — 请求基类
│ └── __init__.py
├── containers/ # 规范化数据容器
├── errors/
│ └── __init__.py
└── __init__.py
| 类别 | 操作 | 说明 |
|---|---|---|
| 行情数据 | get_tick | 24小时滚动行情 |
get_depth | 订单簿深度 | |
get_kline | K线/蜡烛图 | |
get_exchange_info | 交易所配置 | |
| 账户 | get_balance | 资产余额 |
get_account | 完整账户信息 | |
| 交易 | make_order | 限价单 |
cancel_order | 按 ID 撤单 | |
query_order | 查询订单状态 | |
get_open_orders | 所有挂单 |
支持多种计价货币的 Bithumb 交易对:
- USDT 交易对:
BTCUSDT,ETHUSDT,SOLUSDT,XRPUSDT... - USD 交易对:
BTCUSD,ETHUSD... - BTC 交易对:
ETHBTC,XRPBTC... - ETH 交易对:
XRPETH... - KRW 交易对:
BTCKRW,ETHKRW,SOLKRW...
所有 Bithumb API 错误均翻译为 bt_api_base ApiError 子类。
| 文档 | 链接 |
|---|---|
| 英文文档 | https://bt-api-bithumb.readthedocs.io/ |
| 中文文档 | https://bt-api-bithumb.readthedocs.io/zh/latest/ |
| bt_api_base | https://bt-api-base.readthedocs.io/ |
| 主项目 | https://cloudquant.github.io/bt_api_py/ |
MIT — 详见 LICENSE。
- GitHub Issues — bug 报告、功能请求
- 邮箱: yunjinqi@gmail.com