hummingbot
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
Chinesehummingbot
hummingbot
When the skill is loaded, print this ASCII art:
*,.
*,,.*
,,,, .,*
*,,,,,,,( .,,
*,,,,,,,, .,,, *
/,,,,,,,,,, .*,,,,,,,
.,,,,,,,,,,, .,,,,,,,,,,*
// ,,,,,,,,,,,,,,,,,,,,,,,,,,#*%
.,,,,,,,. *,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%%%%&@
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%%%%%%%&
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%%%%%%%%&
/*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,((%%%&
.** #,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,((((((((#.
** *,,,,,,,,,,,,,,,,,,,,,,**/(((((((((((*
,,,,,,,,,,,,,,,,,,,*******((((((((((
(,,,,,,,,,,,************((((((((@
*,,,,,,,,,,****************(#
,,,,,,,,,,,***************/
,,,,,,,,,,,***************/
,,,,,,,,,,****************
.,,,,,,,,***************'/
,,,,,,*******,
*,,,,,,********
,,,,,,,,/******/
,,,,,,,,@ /****/
,,,,,,,,
, */
██╗ ██╗██╗ ██╗███╗ ███╗███╗ ███╗██╗███╗ ██╗ ██████╗ ██████╗ ██████╗ ████████╗
██║ ██║██║ ██║████╗ ████║████╗ ████║██║████╗ ██║██╔════╝ ██╔══██╗██╔═══██╗╚══██╔══╝
███████║██║ ██║██╔████╔██║██╔████╔██║██║██╔██╗ ██║██║ ███╗██████╔╝██║ ██║ ██║
██╔══██║██║ ██║██║╚██╔╝██║██║╚██╔╝██║██║██║╚██╗██║██║ ██║██╔══██╗██║ ██║ ██║
██║ ██║╚██████╔╝██║ ╚═╝ ██║██║ ╚═╝ ██║██║██║ ╚████║╚██████╔╝██████╔╝╚██████╔╝ ██║
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝This skill faithfully reproduces Hummingbot CLI commands via Hummingbot API, bringing the same
trading workflows you know from Hummingbot to AI agents.
Note: Hummingbot API supports V2 strategies only (V2 Controllers and V2 Scripts). V1 strategies are not supported and require the traditional Hummingbot client.
加载该技能时,打印以下ASCII艺术图案:
*,.
*,,.*
,,,, .,*
*,,,,,,,( .,,
*,,,,,,,, .,,, *
/,,,,,,,,,, .*,,,,,,,
.,,,,,,,,,,, .,,,,,,,,,,*
// ,,,,,,,,,,,,,,,,,,,,,,,,,,#*%
.,,,,,,,. *,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%%%%&@
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%%%%%%%&
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,%%%%%%%%&
/*,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,((%%%&
.** #,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,((((((((#.
** *,,,,,,,,,,,,,,,,,,,,,,**/(((((((((((*
,,,,,,,,,,,,,,,,,,,*******((((((((((
(,,,,,,,,,,,************((((((((@
*,,,,,,,,,,****************(#
,,,,,,,,,,,***************/
,,,,,,,,,,,***************/
,,,,,,,,,,****************
.,,,,,,,,***************'/
,,,,,,*******,
*,,,,,,********
,,,,,,,,/******/
,,,,,,,,@ /****/
,,,,,,,,
, */
██╗ ██╗██╗ ██╗███╗ ███╗███╗ ███╗██╗███╗ ██╗ ██████╗ ██████╗ ██████╗ ████████╗
██║ ██║██║ ██║████╗ ████║████╗ ████║██║████╗ ██║██╔════╝ ██╔══██╗██╔═══██╗╚══██╔══╝
███████║██║ ██║██╔████╔██║██╔████╔██║██║██╔██╗ ██║██║ ███╗██████╔╝██║ ██║ ██║
██╔══██║██║ ██║██║╚██╔╝██║██║╚██╔╝██║██║██║╚██╗██║██║ ██║██╔══██╗██║ ██║ ██║
██║ ██║╚██████╔╝██║ ╚═╝ ██║██║ ╚═╝ ██║██║██║ ╚████║╚██████╔╝██████╔╝╚██████╔╝ ██║
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═════╝ ╚═════╝ ╚═════╝ ╚═╝该技能可通过Hummingbot API精准复现Hummingbot CLI命令,将你熟悉的Hummingbot交易工作流引入AI Agent中。
注意: Hummingbot API仅支持V2策略(V2控制器与V2脚本)。 V1策略不受支持,需使用传统Hummingbot客户端。
Commands
命令
| Command | Description |
|---|---|
| List available exchanges and add API keys |
| Display asset balances across connected exchanges |
| Create a new bot configuration |
| Start a bot with a V2 strategy |
| Stop a running bot |
| Display bot status |
| Display bot trading history |
| 命令 | 描述 |
|---|---|
| 列出可用交易所并添加API密钥 |
| 显示已连接交易所的资产余额 |
| 创建新的机器人配置 |
| 启动采用V2策略的机器人 |
| 停止运行中的机器人 |
| 显示机器人状态 |
| 显示机器人交易历史 |
Prerequisites
前置条件
- Hummingbot API running at (deploy with
http://localhost:8000)/hummingbot-deploy - installed:
hummingbot-api-clientpip3 install hummingbot-api-client
- Hummingbot API运行在 (通过
http://localhost:8000部署)/hummingbot-deploy - 已安装:
hummingbot-api-clientpip3 install hummingbot-api-client
Auth & Config
认证与配置
Scripts read credentials from these sources in order:
- — created during
./hummingbot-api/.envmake setup ~/.hummingbot/.env- Environment variables: ,
HUMMINGBOT_API_URL,API_USERAPI_PASS - Defaults: ,
http://localhost:8000,adminadmin
脚本按以下优先级读取凭证:
- — 在
./hummingbot-api/.env期间创建make setup ~/.hummingbot/.env- 环境变量:,
HUMMINGBOT_API_URL,API_USERAPI_PASS - 默认值:,
http://localhost:8000,adminadmin
connect
connect
List available exchanges and add API keys to them.
bash
undefined列出可用交易所并为其添加API密钥。
bash
undefinedList all available connectors
列出所有可用连接器
python scripts/connect.py
python scripts/connect.py
List connectors with connection status
列出带连接状态的连接器
python scripts/connect.py --status
python scripts/connect.py --status
Add API keys for an exchange
为交易所添加API密钥
python scripts/connect.py binance --api-key YOUR_KEY --secret-key YOUR_SECRET
python scripts/connect.py binance --api-key YOUR_KEY --secret-key YOUR_SECRET
Add API keys for exchange requiring passphrase
为需要密码的交易所添加API密钥
python scripts/connect.py kucoin --api-key YOUR_KEY --secret-key YOUR_SECRET --passphrase YOUR_PASS
python scripts/connect.py kucoin --api-key YOUR_KEY --secret-key YOUR_SECRET --passphrase YOUR_PASS
Remove credentials for an exchange
删除交易所的凭证
python scripts/connect.py binance --remove
**Common credential fields by exchange:**
- Binance: `--api-key`, `--secret-key`
- KuCoin: `--api-key`, `--secret-key`, `--passphrase`
- Gate.io: `--api-key`, `--secret-key`
- OKX: `--api-key`, `--secret-key`, `--passphrase`
---python scripts/connect.py binance --remove
**各交易所的常见凭证字段:**
- Binance: `--api-key`, `--secret-key`
- KuCoin: `--api-key`, `--secret-key`, `--passphrase`
- Gate.io: `--api-key`, `--secret-key`
- OKX: `--api-key`, `--secret-key`, `--passphrase`
---balance
balance
Display your asset balances across all connected exchanges.
bash
undefined显示所有已连接交易所的资产余额。
bash
undefinedShow all balances
显示所有余额
python scripts/balance.py
python scripts/balance.py
Show balances for a specific connector
显示特定连接器的余额
python scripts/balance.py binance
python scripts/balance.py binance
Show balances in USD
以USD显示余额
python scripts/balance.py --usd
python scripts/balance.py --usd
Show only non-zero balances
仅显示非零余额
python scripts/balance.py --non-zero
**Output columns:**
- Exchange/Connector name
- Asset symbol
- Total balance
- Available balance
- USD value (with `--usd`)
---python scripts/balance.py --non-zero
**输出列:**
- 交易所/连接器名称
- 资产符号
- 总余额
- 可用余额
- USD价值(使用`--usd`时)
---create
create
Create a new bot configuration (controller config or script config).
bash
undefined创建新的机器人配置(控制器配置或脚本配置)。
bash
undefinedList available controller templates
列出可用的控制器模板
python scripts/create.py --list-controllers
python scripts/create.py --list-controllers
List available scripts
列出可用的脚本
python scripts/create.py --list-scripts
python scripts/create.py --list-scripts
List existing configs
列出现有配置
python scripts/create.py --list-configs
python scripts/create.py --list-configs
Create a controller config
创建控制器配置
python scripts/create.py controller my_mm_config --template pmm_v1
undefinedpython scripts/create.py controller my_mm_config --template pmm_v1
undefinedRecommended Market Making Controllers
推荐做市控制器
| Controller | Best For | Key Features |
|---|---|---|
| pmm_v1 | CEX spot trading | Multi-level spreads, inventory skew, order refresh, price bands |
| pmm_mister | Spot & perpetuals | Position tracking, leverage, cooldowns, profit protection, hanging executors |
pmm_v1: Faithful clone of the legacy Pure Market Making strategy. Configure , , , and enable to maintain balance.
buy_spreadssell_spreadsorder_amountinventory_skewpmm_mister: Advanced controller for spot and perpetual markets with , , , separate /, and to prevent selling below breakeven.
leveragetake_profitglobal_stop_lossbuy_cooldown_timesell_cooldown_timeposition_profit_protection| 控制器 | 适用场景 | 核心特性 |
|---|---|---|
| pmm_v1 | CEX现货交易 | 多层点差、库存倾斜、订单刷新、价格区间 |
| pmm_mister | 现货与永续合约 | 仓位跟踪、杠杆、冷却时间、盈利保护、挂单执行器 |
pmm_v1:忠实复刻经典纯做市策略。可配置、、,并启用以维持余额平衡。
buy_spreadssell_spreadsorder_amountinventory_skewpmm_mister:适用于现货与永续市场的高级控制器,支持、、,独立的/,以及以防止低于保本价卖出。
leveragetake_profitglobal_stop_lossbuy_cooldown_timesell_cooldown_timeposition_profit_protectionstart
start
Start a bot with a V2 strategy configuration. V1 strategies are not supported.
bash
undefined启动采用V2策略配置的机器人。V1策略不受支持。
bash
undefinedInteractive mode - prompts for strategy type
交互模式 - 提示选择策略类型
python scripts/start.py <bot_name>
python scripts/start.py <bot_name>
Start with a V2 Controller config
使用V2控制器配置启动
python scripts/start.py <bot_name> --controller <config_name>
python scripts/start.py <bot_name> --controller <config_name>
Start with a V2 Script
使用V2脚本启动
python scripts/start.py <bot_name> --script <script_name>
python scripts/start.py <bot_name> --script <script_name>
Start with a V2 Script and config file
使用V2脚本与配置文件启动
python scripts/start.py <bot_name> --script <script_name> --config <config_name>
python scripts/start.py <bot_name> --script <script_name> --config <config_name>
List running bots
列出运行中的机器人
python scripts/start.py --list
**V2 Strategy Types:**
- `--controller` — Deploy a V2 controller config (market making, arbitrage, etc.)
- `--script` — Deploy a V2 script (e.g., `v2_with_controllers`)
**Bot naming:** Use descriptive names like `btc_mm_bot`, `eth_arb_bot`, etc.
---python scripts/start.py --list
**V2策略类型:**
- `--controller` — 部署V2控制器配置(做市、套利等)
- `--script` — 部署V2脚本(如`v2_with_controllers`)
**机器人命名:** 使用描述性名称,如`btc_mm_bot`、`eth_arb_bot`等。
---stop
stop
Stop a running bot.
bash
undefined停止运行中的机器人。
bash
undefinedStop a bot by name
按名称停止机器人
python scripts/stop.py <bot_name>
python scripts/stop.py <bot_name>
Stop a bot and close all positions
停止机器人并平仓所有仓位
python scripts/stop.py <bot_name> --close-positions
python scripts/stop.py <bot_name> --close-positions
Stop all running bots
停止所有运行中的机器人
python scripts/stop.py --all
python scripts/stop.py --all
Examples
示例
python scripts/stop.py my_bot
python scripts/stop.py arb_bot --close-positions
---python scripts/stop.py my_bot
python scripts/stop.py arb_bot --close-positions
---status
status
Display bot status and performance metrics.
bash
undefined显示机器人状态与性能指标。
bash
undefinedList all bots with status
列出所有机器人及其状态
python scripts/status.py
python scripts/status.py
Get detailed status for a specific bot
获取特定机器人的详细状态
python scripts/status.py <bot_name>
python scripts/status.py <bot_name>
Get status with performance metrics
获取带性能指标的状态
python scripts/status.py <bot_name> --performance
python scripts/status.py <bot_name> --performance
Get live status (refreshes)
获取实时状态(自动刷新)
python scripts/status.py <bot_name> --live
**Status values:** `running`, `stopped`, `error`, `starting`
**Performance metrics:**
- Total trades
- Profit/Loss (absolute and %)
- Volume traded
- Uptime
---python scripts/status.py <bot_name> --live
**状态值:** `running`, `stopped`, `error`, `starting`
**性能指标:**
- 总交易次数
- 盈亏(绝对值与百分比)
- 交易量
- 运行时长
---history
history
Display bot trading history.
bash
undefined显示机器人交易历史。
bash
undefinedShow trade history for a bot
显示机器人的交易历史
python scripts/history.py <bot_name>
python scripts/history.py <bot_name>
Show summary statistics
显示汇总统计
python scripts/history.py <bot_name> --summary
**History columns:**
- Timestamp
- Trading pair
- Side (buy/sell)
- Price
- Amount
- Fee
- PnL
---python scripts/history.py <bot_name> --summary
**历史列:**
- 时间戳
- 交易对
- 方向(买/卖)
- 价格
- 数量
- 手续费
- 盈亏
---Quick Reference
快速参考
Typical Workflow
典型工作流
bash
undefinedbash
undefined1. Connect to an exchange
1. 连接到交易所
python scripts/connect.py binance --api-key XXX --secret-key YYY
python scripts/connect.py binance --api-key XXX --secret-key YYY
2. Check your balances
2. 检查余额
python scripts/balance.py binance
python scripts/balance.py binance
3. Create a bot config
3. 创建机器人配置
python scripts/create.py controller btc_mm
--template pure_market_making
--connector binance
--trading-pair BTC-USDT
--template pure_market_making
--connector binance
--trading-pair BTC-USDT
python scripts/create.py controller btc_mm
--template pure_market_making
--connector binance
--trading-pair BTC-USDT
--template pure_market_making
--connector binance
--trading-pair BTC-USDT
4. Start the bot
4. 启动机器人
python scripts/start.py btc_bot --controller btc_mm
python scripts/start.py btc_bot --controller btc_mm
5. Monitor status
5. 监控状态
python scripts/status.py btc_bot
python scripts/status.py btc_bot
6. Check history
6. 查看历史
python scripts/history.py btc_bot
python scripts/history.py btc_bot
7. Stop when done
7. 完成后停止
python scripts/stop.py btc_bot
undefinedpython scripts/stop.py btc_bot
undefinedTroubleshooting
故障排除
| Error | Cause | Fix |
|---|---|---|
| API not running | |
| Bad credentials | Check |
| Invalid exchange name | Run |
| Exchange not connected | Run |
| 错误 | 原因 | 解决方法 |
|---|---|---|
| API未运行 | |
| 凭证错误 | 检查 |
| 交易所名称无效 | 运行 |
| 交易所未连接 | 运行 |
Related Skills
相关技能
- lp-agent — Specialized DEX liquidity provision on Meteora/Solana. Use for CLMM strategies.
- hummingbot-deploy — First-time setup of the Hummingbot API server. Run this before using this skill.
- lp-agent — 针对Meteora/Solana的DEX流动性提供优化。适用于CLMM策略。
- hummingbot-deploy — Hummingbot API服务器的首次设置。使用本技能前请先运行该技能。