闲社服务运行正常AI智能体自动化平台
h

部署Hummingbot

技能标识:hummingbot-deploy

Deploy Hummingbot trading infrastructure including API server, MCP server, and Condor Telegram bot. Use this skill when the user wants to install, deploy, set up, or configure Hummingbot.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

部署Hummingbot

hummingbot-deploy

部署 Hummingbot 交易基础设施。开始前,向用户说明将要安装的内容:

您即将安装的内容

  1. 1. Hummingbot API(必需):您的个人交易服务器,提供标准化的 REST API,用于交易、获取市场数据以及在众多中心化交易所和去中心化交易所上部署机器人策略。
  1. 2. Hummingbot MCP(可选):MCP 服务器,帮助 AI 代理(Claude、Gemini、Codex 等)与 Hummingbot API 交互。仅在使用 AI 代理 CLI 时需要。
  1. 3. Condor(可选):基于终端和 Telegram 的 Hummingbot API 用户界面。

组件

组件仓库
Hummingbot APIhummingbot/hummingbot-api
MCP 服务器
hummingbot/mcp | | Condor | hummingbot/condor |

安装前检查

仅 Hummingbot API 是必需的。 MCP 和 Condor 是可选的附加组件。

首先,运行环境检查以验证先决条件:

bash
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/check_env.sh)

此项检查:容器检测、TTY、Docker、Docker Compose、Git、Make。

安装 Hummingbot API

如果 ./hummingbot-api 已存在,通过检查 Docker 日志验证其是否正在运行:
bash
cd ./hummingbot-api && make deploy && sleep 2 && docker logs hummingbot-api 2>&1 | grep -i uvicorn running

如果日志显示 Uvicorn running,跳至安装 MCP 服务器。否则,重置并重新安装。

全新安装:
bash
git clone https://github.com/hummingbot/hummingbot-api.git ./hummingbot-api
cd ./hummingbot-api

在常规机器上(交互式 TTY - check_env.sh 显示 Interactive TTY: Yes):
bash
make setup # 提示输入:API 用户名、密码、配置密码(默认值:admin/admin/admin)
make deploy

在容器中(无 TTY - 使用 [ -t 0 ] && echo TTY || echo No TTY 检查):
bash

设置 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 CONFIGAPIPASS=admin DEBUG_MODE=false BROKER_HOST=hummingbot-broker BROKER_PORT=1883 BROKERAPIUSER=admin BROKER_PASSWORD=password DATABASEURL=postgresql+asyncpg://hbot:hummingbot-api@hummingbot-postgres:5432/hummingbotapi 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:
bash
sleep 2 && docker logs hummingbot-api 2>&1 | grep -i uvicorn running

安装 MCP 服务器

使用您的 CLI 的原生命令安装 MCP 服务器。使用与 API 设置相同的凭据。

重要提示: 不要询问用户使用哪个 CLI。您已经知道自己是什么 CLI:

  • - 如果您是 Claude Code,请使用 claude
  • 如果您是 Gemini CLI,请使用 gemini
  • 如果您是 Codex CLI,请使用 codex

bash
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/install_mcp.sh) \
--agent CLI> --user USER> --pass

Claude 示例(替换为您实际的 CLI 名称和凭据):
bash
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/install_mcp.sh) \
--agent claude --user admin --pass admin

安装完成

所有组件安装完成后,告知用户:

  1. 1. 重启您的 AI 代理(Claude Code、Gemini CLI、Codex CLI 等)以加载 MCP 服务器
  2. 安装 Hummingbot Skills 以启用交易功能:
bash npx skills add hummingbot/skills

安装 Condor(可选)

bash
git clone https://github.com/hummingbot/condor.git ./condor
cd ./condor
bash setup-environment.sh # 提示输入 Telegram 机器人令牌
make deploy

升级

bash
cd ./hummingbot-api && git pull && make deploy

验证安装

bash
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/hummingbot-deploy/scripts/verify.sh)

故障排除

bash

查看日志


cd ./hummingbot-api && docker compose logs -f

重置

cd ./hummingbot-api && docker compose down -v && rm -rf ./hummingbot-api

另请参阅

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 hummingbot-deploy-1776292957 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 hummingbot-deploy-1776292957 技能

通过命令行安装

skillhub install hummingbot-deploy-1776292957

下载

⬇ 下载 hummingbot-deploy v1.0.0(免费)

文件大小: 5.38 KB | 发布时间: 2026-4-16 17:08

v1.0.0 最新 2026-4-16 17:08
- Initial release of the hummingbot-deploy skill.
- Deploys Hummingbot trading infrastructure, including Hummingbot API (required), MCP server (optional), and Condor Telegram bot (optional).
- Provides detailed installation, environment check, configuration, and verification instructions for each component.
- Includes troubleshooting steps and links to official documentation.
- Designed to support both regular machines and containerized environments.
返回顶部