hummingbot

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

hummingbot

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

命令

CommandDescription
connect
List available exchanges and add API keys
balance
Display asset balances across connected exchanges
create
Create a new bot configuration
start
Start a bot with a V2 strategy
stop
Stop a running bot
status
Display bot status
history
Display bot trading history
命令描述
connect
列出可用交易所并添加API密钥
balance
显示已连接交易所的资产余额
create
创建新的机器人配置
start
启动采用V2策略的机器人
stop
停止运行中的机器人
status
显示机器人状态
history
显示机器人交易历史

Prerequisites

前置条件

  • Hummingbot API running at
    http://localhost:8000
    (deploy with
    /hummingbot-deploy
    )
  • hummingbot-api-client
    installed:
    pip3 install hummingbot-api-client
  • Hummingbot API运行在
    http://localhost:8000
    (通过
    /hummingbot-deploy
    部署)
  • 已安装
    hummingbot-api-client
    pip3 install hummingbot-api-client

Auth & Config

认证与配置

Scripts read credentials from these sources in order:
  1. ./hummingbot-api/.env
    — created during
    make setup
  2. ~/.hummingbot/.env
  3. Environment variables:
    HUMMINGBOT_API_URL
    ,
    API_USER
    ,
    API_PASS
  4. Defaults:
    http://localhost:8000
    ,
    admin
    ,
    admin

脚本按以下优先级读取凭证:
  1. ./hummingbot-api/.env
    — 在
    make setup
    期间创建
  2. ~/.hummingbot/.env
  3. 环境变量:
    HUMMINGBOT_API_URL
    ,
    API_USER
    ,
    API_PASS
  4. 默认值:
    http://localhost:8000
    ,
    admin
    ,
    admin

connect

connect

List available exchanges and add API keys to them.
bash
undefined
列出可用交易所并为其添加API密钥。
bash
undefined

List 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
undefined

Show 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
undefined

List 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
undefined
python scripts/create.py controller my_mm_config --template pmm_v1
undefined

Recommended Market Making Controllers

推荐做市控制器

ControllerBest ForKey Features
pmm_v1CEX spot tradingMulti-level spreads, inventory skew, order refresh, price bands
pmm_misterSpot & perpetualsPosition tracking, leverage, cooldowns, profit protection, hanging executors
pmm_v1: Faithful clone of the legacy Pure Market Making strategy. Configure
buy_spreads
,
sell_spreads
,
order_amount
, and enable
inventory_skew
to maintain balance.
pmm_mister: Advanced controller for spot and perpetual markets with
leverage
,
take_profit
,
global_stop_loss
, separate
buy_cooldown_time
/
sell_cooldown_time
, and
position_profit_protection
to prevent selling below breakeven.

控制器适用场景核心特性
pmm_v1CEX现货交易多层点差、库存倾斜、订单刷新、价格区间
pmm_mister现货与永续合约仓位跟踪、杠杆、冷却时间、盈利保护、挂单执行器
pmm_v1:忠实复刻经典纯做市策略。可配置
buy_spreads
sell_spreads
order_amount
,并启用
inventory_skew
以维持余额平衡。
pmm_mister:适用于现货与永续市场的高级控制器,支持
leverage
take_profit
global_stop_loss
,独立的
buy_cooldown_time
/
sell_cooldown_time
,以及
position_profit_protection
以防止低于保本价卖出。

start

start

Start a bot with a V2 strategy configuration. V1 strategies are not supported.
bash
undefined
启动采用V2策略配置的机器人。V1策略不受支持。
bash
undefined

Interactive 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
undefined

Stop 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
undefined

List 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
undefined

Show 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
undefined
bash
undefined

1. 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
python scripts/create.py controller btc_mm
--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
undefined
python scripts/stop.py btc_bot
undefined

Troubleshooting

故障排除

ErrorCauseFix
Cannot connect to API
API not running
cd ./hummingbot-api && make deploy
401 Unauthorized
Bad credentialsCheck
./hummingbot-api/.env
Connector not found
Invalid exchange nameRun
python scripts/connect.py
to list valid names
No credentials
Exchange not connectedRun
python scripts/connect.py <exchange> --api-key ...

错误原因解决方法
Cannot connect to API
API未运行
cd ./hummingbot-api && make deploy
401 Unauthorized
凭证错误检查
./hummingbot-api/.env
Connector not found
交易所名称无效运行
python scripts/connect.py
查看有效名称
No credentials
交易所未连接运行
python scripts/connect.py <exchange> --api-key ...

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服务器的首次设置。使用本技能前请先运行该技能。