hummingbot-deploy by hummingbot/skills
npx skills add https://github.com/hummingbot/skills --skill hummingbot-deploy部署 Hummingbot 交易基础设施。开始前,向用户解释将要安装的内容:
Hummingbot API (必需):你的个人交易服务器,提供标准化的 REST API,用于跨多个中心化交易所(CEX)和去中心化交易所(DEX)进行交易、获取市场数据以及部署机器人策略。
Hummingbot MCP (可选):MCP 服务器,帮助 AI 智能体(Claude、Gemini、Codex 等)与 Hummingbot API 交互。仅在需要使用 AI 智能体命令行界面时安装。
Condor (可选):基于终端和 Telegram 的 Hummingbot API 用户界面。
| 组件 | 代码仓库 |
|---|---|
| Hummingbot API | hummingbot/hummingbot-api |
| MCP 服务器 | hummingbot/mcp |
| Condor | hummingbot/condor |
只有 Hummingbot API 是必需的。 MCP 和 Condor 是可选的附加组件。
首先,运行环境检查以验证前置条件:
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/check_env.sh)
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
此脚本检查:容器检测、TTY、Docker、Docker Compose、Git、Make。
如果 ./hummingbot-api 目录已存在,通过检查 Docker 日志来验证其是否正在运行:
cd ./hummingbot-api && make deploy && sleep 2 && docker logs hummingbot-api 2>&1 | grep -i "uvicorn running"
如果日志显示 "Uvicorn running",则跳转到 "安装 MCP 服务器"。否则,请重置并重新安装。
全新安装:
git clone https://github.com/hummingbot/hummingbot-api.git ./hummingbot-api
cd ./hummingbot-api
在常规机器上(交互式 TTY - check_env.sh 显示 "Interactive TTY: Yes"):
make setup # 提示输入:API 用户名、密码、配置密码(默认值:admin/admin/admin)
make deploy
在容器内(无 TTY - 使用 [ -t 0 ] && echo "TTY" || echo "No TTY" 检查):
# 设置 USER 环境变量,并在需要时创建 sudo 垫片
export USER=${USER:-root}
[ "$(id -u)" = "0" ] && ! command -v sudo &>/dev/null && echo -e '#!/bin/bash\nwhile [[ "$1" == *=* ]]; do export "$1"; shift; done\nexec "$@"' > /usr/local/bin/sudo && chmod +x /usr/local/bin/sudo
# 手动创建 .env 文件(跳过交互式设置)
# 注意:在容器内,服务通过 Docker 网络通信(使用容器名称,而非 localhost)
cat > .env << EOF
API_USER=admin
API_PASS=admin
CONFIG_API_PASS=admin
DEBUG_MODE=false
BROKER_HOST=hummingbot-broker
BROKER_PORT=1883
BROKER_API_USER=admin
BROKER_PASSWORD=password
DATABASE_URL=postgresql+asyncpg://hbot:hummingbot-api@hummingbot-postgres:5432/hummingbot_api
BOTS_PATH=/hummingbot-api/bots
EOF
# 修补 docker-compose.yml 文件(绑定挂载在 Docker-in-Docker 中无效)
sed -i 's|./bots:/hummingbot-api/bots|hummingbot-bots:/hummingbot-api/bots|g' docker-compose.yml
sed -i '/init-db.sql.*docker-entrypoint/d' docker-compose.yml
# 添加卷定义(检查最后 5 行以避免服务定义导致的误判)
tail -5 docker-compose.yml | grep -q "hummingbot-bots:" || echo " hummingbot-bots: { }" >> docker-compose.yml
touch .setup-complete
make deploy
验证: 等待 2 秒,然后检查日志中是否出现 "Uvicorn running on http://0.0.0.0:8000":
sleep 2 && docker logs hummingbot-api 2>&1 | grep -i "uvicorn running"
使用你 CLI 的原生命令安装 MCP 服务器。使用与 API 设置相同的凭据。
重要: 不要询问用户使用哪个 CLI。你已经知道你使用的是哪个 CLI:
claudegeminicodexbash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/install_mcp.sh) \
--agent <YOUR_CLI> --user <API_USER> --pass <API_PASS>
以 Claude 为例(替换为你实际的 CLI 名称和凭据):
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/install_mcp.sh) \
--agent claude --user admin --pass admin
所有组件安装完成后,告知用户:
npx skills add hummingbot/skills
git clone https://github.com/hummingbot/condor.git ./condor
cd ./condor
bash setup-environment.sh # 提示输入 Telegram 机器人令牌
make deploy
cd ./hummingbot-api && git pull && make deploy
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/verify.sh)
# 查看日志
cd ./hummingbot-api && docker compose logs -f
# 重置
cd ./hummingbot-api && docker compose down -v && rm -rf ./hummingbot-api
每周安装次数
188
代码仓库
GitHub 星标数
24
首次出现
2026年2月3日
安全审计
已安装于
opencode173
gemini-cli171
codex170
github-copilot167
kimi-cli164
cursor163
Deploy the Hummingbot trading infrastructure. Before starting, explain to the user what will be installed:
Hummingbot API (Required): Your personal trading server that exposes a standardized REST API for trading, fetching market data, and deploying bot strategies across many CEXs and DEXs.
Hummingbot MCP (Optional): MCP server that helps AI agents (Claude, Gemini, Codex, etc.) interact with Hummingbot API. Only needed if using AI agent CLIs.
Condor (Optional): Terminal and Telegram-based UI for Hummingbot API.
| Component | Repository |
|---|---|
| Hummingbot API | hummingbot/hummingbot-api |
| MCP Server | hummingbot/mcp |
| Condor | hummingbot/condor |
Only Hummingbot API is required. MCP and Condor are optional add-ons.
First, run the environment check to verify prerequisites:
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/check_env.sh)
This checks: container detection, TTY, Docker, Docker Compose, Git, Make.
If ./hummingbot-api already exists , verify it's running by checking docker logs:
cd ./hummingbot-api && make deploy && sleep 2 && docker logs hummingbot-api 2>&1 | grep -i "uvicorn running"
If logs show "Uvicorn running", skip to "Install MCP Server". Otherwise, reset and reinstall.
Fresh install:
git clone https://github.com/hummingbot/hummingbot-api.git ./hummingbot-api
cd ./hummingbot-api
On regular machines (interactive TTY - check_env.sh shows "Interactive TTY: Yes"):
make setup # Prompts for: API username, password, config password (defaults: admin/admin/admin)
make deploy
In containers (no TTY - check with [ -t 0 ] && echo "TTY" || echo "No TTY"):
# Set USER env var and create sudo shim if needed
export USER=${USER:-root}
[ "$(id -u)" = "0" ] && ! command -v sudo &>/dev/null && echo -e '#!/bin/bash\nwhile [[ "$1" == *=* ]]; do export "$1"; shift; done\nexec "$@"' > /usr/local/bin/sudo && chmod +x /usr/local/bin/sudo
# Create .env manually (skip interactive setup)
# Note: In containers, services communicate via Docker network (use container names, not localhost)
cat > .env << EOF
API_USER=admin
API_PASS=admin
CONFIG_API_PASS=admin
DEBUG_MODE=false
BROKER_HOST=hummingbot-broker
BROKER_PORT=1883
BROKER_API_USER=admin
BROKER_PASSWORD=password
DATABASE_URL=postgresql+asyncpg://hbot:hummingbot-api@hummingbot-postgres:5432/hummingbot_api
BOTS_PATH=/hummingbot-api/bots
EOF
# Patch docker-compose.yml (bind mounts don't work in Docker-in-Docker)
sed -i 's|./bots:/hummingbot-api/bots|hummingbot-bots:/hummingbot-api/bots|g' docker-compose.yml
sed -i '/init-db.sql.*docker-entrypoint/d' docker-compose.yml
# Add volume definition (check last 5 lines to avoid false positive from service definition)
tail -5 docker-compose.yml | grep -q "hummingbot-bots:" || echo " hummingbot-bots: { }" >> docker-compose.yml
touch .setup-complete
make deploy
Verify: Wait 2 seconds then check logs for "Uvicorn running on http://0.0.0.0:8000":
sleep 2 && docker logs hummingbot-api 2>&1 | grep -i "uvicorn running"
Install the MCP server using your CLI's native command. Use the same credentials from API setup.
IMPORTANT: Do NOT ask the user which CLI to use. You already know which CLI you are:
If you are Claude Code, use claude
If you are Gemini CLI, use gemini
If you are Codex CLI, use codex
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/install_mcp.sh)
--agent <YOUR_CLI> --user <API_USER> --pass <API_PASS>
Example for Claude (substitute your actual CLI name and credentials):
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/install_mcp.sh) \
--agent claude --user admin --pass admin
After all components are installed, tell the user:
Restart your AI agent (Claude Code, Gemini CLI, Codex CLI, etc.) to load the MCP server
Install Hummingbot Skills to enable trading capabilities:
npx skills add hummingbot/skills
git clone https://github.com/hummingbot/condor.git ./condor
cd ./condor
bash setup-environment.sh # Prompts for Telegram bot token
make deploy
cd ./hummingbot-api && git pull && make deploy
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/verify.sh)
# View logs
cd ./hummingbot-api && docker compose logs -f
# Reset
cd ./hummingbot-api && docker compose down -v && rm -rf ./hummingbot-api
Weekly Installs
188
Repository
GitHub Stars
24
First Seen
Feb 3, 2026
Security Audits
Gen Agent Trust HubFailSocketFailSnykFail
Installed on
opencode173
gemini-cli171
codex170
github-copilot167
kimi-cli164
cursor163
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
119,800 周安装