If you want to deploy a crypto-trading backend that supports REST API, dashboard, and even AI-assistant integration, then Hummingbot-API is the official all-in-one solution. Here’s how to get it running in minutes using Docker.
如果你想部署一个包含 REST 接口、Dashboard,甚至 AI 助手集成的加密交易后台,Hummingbot-API 是官方推荐的一体化方案。下面是使用 Docker 几分钟内部署成功的方法。

What Hummingbot-API Provides / Hummingbot-API 提供什么
- REST API backend (port 8000) — 用于程序化访问、自动化下单、数据读取等。
- PostgreSQL database — 用于存储交易数据、账户、策略状态等。
- MQTT / Message Broker (via EMQX) — 支持实时数据流 / Bot 通信机制。
- Swagger UI (http://…/docs) — 在线 API 文档 & 测试界面,非常适合开发者调试。
- Optional Dashboard (port 8501) — 图形界面,方便管理多个 Bot / 账户 / 策略。
🔧 Quick Start with Docker / 使用 Docker 快速启动
1. Clone the repository/克隆项目代码
To begin, clone the official hummingbot-api repository and enter the directory:
首先,从官方仓库克隆 hummingbot-api 项目并进入目录:
git clone https://github.com/hummingbot/hummingbot-api.git
cd hummingbot-api2. Run the setup script/运行 setup 脚本
The setup.sh script automatically configures the environment, prepares Docker Compose files, and guides you through enabling optional services like the dashboard or Gateway.
setup.sh 脚本会自动配置环境,生成 Docker Compose 文件,并引导你是否启用 Dashboard 或 Gateway 等可选组件。
Make the script executable and run it:
给脚本增加权限并运行:
chmod +x setup.sh
./setup.shYou will be asked to set:
你将会看到如下配置步骤:
- Admin username & password(defaut admin/admin)The recommendation remains unchanged./建议不变.
- Whether to enable the dashboard (port 8501)
- Whether to enable Gateway (for DEX support)
3. Start Hummingbot-API with Docker/使用 Docker 启动 Hummingbot-API
Normally, the setup script will start it for us. If you forget to start the Dashboard, you can use docker-compose to start it.
正常来说,设置脚本会帮我们启动的,如果忘记了启动Dashboard,可以用docker-compose启动.
docker compose up -d dashboard或者启动所有没有启动的.
Or start all that are not currently running.
docker compose up -dYou can verify containers with:
你可以通过以下命令验证容器是否运行正常:
docker ps4. Access the API documentation/访问 API 文档
Open your browser and visit:
打开浏览器访问:
http://<your_server_ip>:8000/docsThis loads the interactive Swagger UI where you can test every API endpoint including balances, orders, market data, and more.
这里会显示交互式 Swagger UI,你可以直接测试所有 API,包括余额查询、订单创建、市场数据等。
If you enabled the dashboard, access it via:
如果你启用了 Dashboard,则访问:
http://<your_server_ip>:85015. Stop or restart services/停止或重启服务
To stop Hummingbot-API and its components:
停止服务:
docker compose downTo restart after changing configuration:
修改配置后重启:
docker compose restart