lp-agent by hummingbot/skills
npx skills add https://github.com/hummingbot/skills --skill lp-agent此技能帮助您使用 Hummingbot API 在集中流动性(CLMM)DEX 上运行自动化流动性提供策略。
命令(以 /lp-agent <命令> 运行):
| 命令 | 描述 |
|---|---|
start | 入门向导 — 检查设置状态并开始使用 |
deploy-hummingbot-api | 部署 Hummingbot API 交易基础设施 |
setup-gateway | 启动 Gateway,配置网络 RPC 端点 |
add-wallet | 添加或导入 Solana 钱包 |
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
explore-pools| 查找和探索 Meteora DLMM 池 |
select-strategy | 选择 LP 执行器或再平衡控制器 |
run-strategy | 运行、监控和管理 LP 策略 |
analyze-performance | 可视化 LP 头寸表现 |
新用户? 运行 /lp-agent start 以检查您的设置并获取引导式入门指南。
典型工作流: start → deploy-hummingbot-api → setup-gateway → add-wallet → explore-pools → select-strategy → run-strategy → analyze-performance
欢迎用户并引导他们完成设置。这是一个对话式入门向导 — 检查基础设施状态,解释结果,并引导他们完成每一步。
自我介绍并解释 lp-agent 的功能:
我是您的 LP 代理 — 我帮助您在 Meteora DLMM 池(Solana)上运行自动化流动性提供策略。我可以:
- 部署基础设施 — 用于 DEX 交易的 Hummingbot API + Gateway
- 管理钱包 — 添加 Solana 钱包,检查余额
- 探索池 — 搜索 Meteora DLMM 池,比较 APR/交易量/TVL
- 运行策略 — 自动再平衡 LP 控制器或单头寸执行器
- 分析表现 — 包含 PnL、费用和头寸历史记录的仪表板
运行这些脚本并解释 JSON 输出:
bash scripts/check_api.sh --json # Hummingbot API 是否在运行?
bash scripts/check_gateway.sh --json # Gateway 是否在运行?
python scripts/add_wallet.py list # 是否有已连接的钱包?
解释结果:
| 脚本 | 成功输出 | 失败输出 |
|---|---|---|
check_api.sh --json | {"running": true, "url": "http://localhost:8000", ...} | {"running": false, ...} 或连接错误 |
check_gateway.sh --json | {"running": true, ...} | {"running": false, ...} |
add_wallet.py list | 显示钱包地址,如 [solana] ABC123... | No wallets found. 或空列表 [] |
根据脚本输出,展示一个显示已完成和待完成事项的清单:
设置进度:
[x] Hummingbot API — 运行于 http://localhost:8000
[x] Gateway — 运行中
[ ] 钱包 — 无已连接的钱包
下一步:添加一个 Solana 钱包以便开始交易。
根据实际状态调整清单。如果所有项都未勾选,则从头开始。如果所有项都已勾选,则跳转到 LP 生命周期概览。
根据第一个未勾选的项,提供帮助:
| 缺失项 | 提示内容 |
|---|---|
| Hummingbot API | "让我们先部署 API — 它是交易后端。需要安装 Docker。需要我运行安装程序吗?" → /lp-agent deploy-hummingbot-api |
| Gateway | "API 正在运行!现在我们需要 Gateway 来实现 DEX 连接。需要我启动它吗?" → /lp-agent setup-gateway |
| 钱包 | 参见下面的添加钱包 |
| 全部就绪 | 转到步骤 5 |
添加钱包:
当钱包是下一步时,告知用户:
基础设施已就绪。您需要一个带有 SOL 的 Solana 钱包来支付交易费用(每个 LP 头寸约 0.06 SOL)。
要添加钱包,请运行:
python scripts/add_wallet.py add系统将提示您粘贴您的私钥(安全,不会保存在 shell 历史记录中)。
解释 add_wallet.py 输出:
| 输出 | 含义 |
|---|---|
✓ Wallet added successfully + 地址 | 成功 — 钱包已连接 |
Enter private key (base58): 然后 ✓ Wallet added | 提示后成功 |
Error: HTTP 400 或验证错误 | 私钥格式无效 |
Error: Cannot connect to API | API 未运行 — 先运行 check_api.sh |
钱包添加后,使用 python scripts/add_wallet.py list 验证 — 应显示新地址。
一旦基础设施就绪(或者如果用户想先了解流程),解释 LP 生命周期:
LP 策略如何工作:
探索池 (
/lp-agent explore-pools) — 找到一个 Meteora DLMM 池。查看交易量、APR 和费用/TVL 比率以选择一个好的池。选择策略 (
/lp-agent select-strategy) — 在以下两者之间选择:
- 再平衡控制器(推荐)— 当价格超出范围时自动重新定位。设置后即可忘记。
- LP 执行器 — 单一固定头寸。您控制何时关闭/重新打开。适用于测试或限价单式 LP。
运行策略 (
/lp-agent run-strategy) — 配置参数(金额、宽度、价格限制)并部署。监控状态并在完成后停止。分析 (
/lp-agent analyze-performance) — 查看 PnL 仪表板、赚取的费用、头寸历史记录。适用于正在运行和已停止的策略。
想探索一些池来开始吗?
部署 Hummingbot API 交易基础设施。这是在使用任何 LP 功能之前的第一步。
Hummingbot API — 一个个人交易服务器,为跨 CEX 和 DEX 的交易、市场数据和部署机器人策略提供 REST API。
# 检查是否已安装
bash scripts/deploy_hummingbot_api.sh status
# 安装(交互式,提示输入凭据)
bash scripts/deploy_hummingbot_api.sh install
# 使用默认值安装(非交互式:admin/admin)
bash scripts/deploy_hummingbot_api.sh install --defaults
# 升级现有安装
bash scripts/deploy_hummingbot_api.sh upgrade
# 查看容器日志
bash scripts/deploy_hummingbot_api.sh logs
# 重置(停止并移除所有内容)
bash scripts/deploy_hummingbot_api.sh reset
| 输出 | 含义 | 下一步 |
|---|---|---|
✓ Hummingbot API deployed successfully | 成功 | 继续执行 setup-gateway |
✓ Already installed and running | 已设置 | 继续执行 setup-gateway |
Error: Docker not found | 未安装 Docker | 先安装 Docker |
Error: Port 8000 already in use | 端口被其他服务占用 | 停止冲突的服务或使用不同的端口 |
一旦 API 运行:
http://localhost:8000/docssetup-gateway 以启用 DEX 交易启动 Gateway 服务,检查其状态,并配置关键网络参数,如 RPC 节点 URL。所有 DEX 上的 LP 操作都需要 Gateway。
先决条件: Hummingbot API 必须正在运行 (deploy-hummingbot-api)。脚本会自动检查这一点。
⚠️ 需要自定义 RPC — 不是可选的。 公共 Solana RPC 有速率限制,会导致交易失败,看起来像"资金不足"或"交易模拟失败"。在部署任何机器人之前,始终配置自定义 RPC。在 https://helius.dev 获取免费密钥。
# 检查 Gateway 状态
bash scripts/setup_gateway.sh --status
# 使用默认值启动 Gateway
bash scripts/setup_gateway.sh
# 使用自定义镜像启动 Gateway(例如,开发构建)
bash scripts/setup_gateway.sh --image hummingbot/gateway:development
# 使用自定义 Solana RPC 启动(推荐以避免速率限制)
bash scripts/setup_gateway.sh --rpc-url https://your-rpc-endpoint.com
# 为不同网络配置 RPC
bash scripts/setup_gateway.sh --network ethereum-mainnet --rpc-url https://your-eth-rpc.com
# 使用自定义密码和端口启动
bash scripts/setup_gateway.sh --passphrase mypassword --port 15888
| 选项 | 默认值 | 描述 |
|---|---|---|
--status | 仅检查 Gateway 状态(不启动) | |
--image IMAGE | hummingbot/gateway:development | 要使用的 Docker 镜像 |
--passphrase TEXT | hummingbot | Gateway 密码 |
--rpc-url URL | 为 --network 指定的自定义 RPC 端点 | |
--network ID | solana-mainnet-beta | 要为其配置 RPC 的网络 |
--port PORT | 15888 | Gateway 端口 |
为了更精细的控制(停止、重启、日志、按网络配置),使用 manage_gateway.py:
python scripts/manage_gateway.py status # 检查状态
python scripts/manage_gateway.py start # 启动 Gateway
python scripts/manage_gateway.py stop # 停止 Gateway
python scripts/manage_gateway.py restart # 重启 Gateway
python scripts/manage_gateway.py logs # 查看日志
python scripts/manage_gateway.py networks # 列出所有网络
python scripts/manage_gateway.py network solana-mainnet-beta # 获取网络配置
python scripts/manage_gateway.py network solana-mainnet-beta --node-url https://... # 设置 RPC 节点
| 输出 | 含义 | 下一步 |
|---|---|---|
✓ Gateway is running 或 ✓ Gateway started | 成功 | 继续执行 add-wallet |
✓ Gateway is already running | 已设置 | 继续执行 add-wallet |
✗ Cannot connect to Hummingbot API | API 未运行 | 先运行 /lp-agent deploy-hummingbot-api |
✗ Failed to start Gateway | Docker 问题 | 检查 Docker 是否运行,检查日志 |
✓ RPC configured + ✓ Gateway restarted | 自定义 RPC 已设置 | 准备就绪 |
Gateway 默认使用公共 RPC 节点,这可能会达到速率限制。为每个网络设置自定义 nodeUrl 以避免此问题。
流行的 Solana RPC 提供商:
添加用于交易的 Solana 钱包。
要求: 先完成 deploy-hummingbot-api 和 setup-gateway。
python scripts/add_wallet.py add
系统将提示您粘贴您的私钥(base58 格式)。密钥安全输入,不会出现在 shell 历史记录中。
解释输出:
| 输出 | 含义 | 下一步 |
|---|---|---|
✓ Wallet added successfully + Address: ABC... | 成功 | 使用 list 命令验证 |
Error: HTTP 400 - Bad Request | 私钥格式无效 | 检查密钥是否为 base58 编码 |
Error: HTTP 503 | Gateway 不可用 | 运行 bash scripts/check_gateway.sh |
Error: Cannot connect to API | API 未运行 | 运行 /lp-agent deploy-hummingbot-api |
python scripts/add_wallet.py list
解释输出:
| 输出 | 含义 |
|---|---|
[solana] ABC123...XYZ | 钱包在 Solana 上已连接 |
No wallets found. | 尚未添加任何钱包 |
空列表 [](使用 --json) | 尚未添加任何钱包 |
# 检查所有余额
python scripts/add_wallet.py balances
# 按账户筛选
python scripts/add_wallet.py balances --account master_account
# 同时显示零余额
python scripts/add_wallet.py balances --all
当使用非标准代币(例如 meme 币)时,先将它们添加到 Gateway:
# 使用池中的确切符号(使用 get_meteora_pool.py 检查)
python scripts/add_wallet.py add-token \
--symbol Percolator \
--address 8PzFWyLpCVEmbZmVJcaRTU5r69XKJx1rd7YGpWvnpump \
--decimals 6
⚠️ 符号必须与池完全匹配。 使用
get_meteora_pool.py查找确切的代币符号。如果池显示Percolator,则使用Percolator— 而不是PRCLT或任何缩写。不匹配会导致机器人尝试获取价格数据时出现"未找到 CLMM 池"错误。
然后重启 Gateway 以使代币被识别。
balances 命令 — SPL 代币账户中的可用金额可能与链上总额不同(多个账户、质押等)在创建 LP 头寸之前查找和探索 Meteora DLMM 池。
注意: 池列表 (list_meteora_pools.py) 无需任何先决条件即可工作 — 它直接查询 Meteora API。池详情 (get_meteora_pool.py) 可选地使用 Gateway 获取实时价格和流动性图表。
按名称、代币或地址搜索和列出池:
# 按 24 小时交易量排名靠前的池
python scripts/list_meteora_pools.py
# 按代币符号搜索
python scripts/list_meteora_pools.py --query SOL
python scripts/list_meteora_pools.py --query USDC
# 按池名称搜索
python scripts/list_meteora_pools.py --query SOL-USDC
# 按不同指标排序
python scripts/list_meteora_pools.py --query SOL --sort tvl
python scripts/list_meteora_pools.py --query SOL --sort apr
python scripts/list_meteora_pools.py --query SOL --sort fees
# 分页
python scripts/list_meteora_pools.py --query SOL --limit 50 --page 2
输出列:
get_meteora_pool.py 获取完整地址)注意: 代币铸币地址有助于在多个代币共享相同名称时识别正确的代币(例如,多个"PERCOLATOR"代币)。
获取特定池的详细信息。从 Meteora API(历史数据)和 Gateway(实时数据)获取:
python scripts/get_meteora_pool.py <池地址>
# 示例
python scripts/get_meteora_pool.py ATrBUW2reZiyftzMQA1hEo8b7w7o8ZLrhPd7M7sPMSms
# 以 JSON 格式输出,用于编程
python scripts/get_meteora_pool.py ATrBUW2reZiyftzMQA1hEo8b7w7o8ZLrhPd7M7sPMSms --json
# 跳过 Gateway(更快,无 bin 分布)
python scripts/get_meteora_pool.py ATrBUW2reZiyftzMQA1hEo8b7w7o8ZLrhPd7M7sPMSms --no-gateway
数据来源:
显示的详情:
选择池时,请考虑:
bin_step=1 → 最大约 0.69% 宽度(窄范围)bin_step=10 → 最大约 6.9% 宽度(中等范围)bin_step=100 → 最大约 69% 宽度(宽范围)帮助用户选择合适的 LP 策略。有关详细指南,请参见 references/。
参考:
references/lp_rebalancer_guide.md
一个自动管理 LP 头寸并带有再平衡逻辑的控制器。
| 功能 | 描述 |
|---|---|
| 自动再平衡 | 当价格超出范围时关闭并重新打开头寸 |
| 价格限制 | 使用锚点配置买入/卖出区域 |
| KEEP 逻辑 | 在处于最优头寸时避免不必要的再平衡 |
| 无需干预 | 设置后即可忘记 — 控制器管理一切 |
最适合: 长期 LP 策略、区间震荡市场、自动化费用收集。
参考:
references/lp_executor_guide.md
创建一个具有固定价格边界的单一流动性头寸。无自动再平衡。
| 功能 | 描述 |
|---|---|
| 固定边界 | 头寸保持在配置的价格范围内 |
| 手动控制 | 用户决定何时关闭/重新打开 |
| 限价单 | 当价格超出范围时可以自动关闭(类似于限价单) |
| 简单 | 直接控制单个头寸 |
最适合: 短期头寸、限价单式 LP、手动管理、测试。
| 方面 | 再平衡控制器 | LP 执行器 |
|---|---|---|
| 再平衡 | 自动 | 手动 |
| 头寸数量 | 一次一个,自动管理 | 一个,固定 |
| 价格限制 | 是(锚点) | 否(但有自动关闭) |
| 复杂性 | 更高(更多配置) | 更低(更简单) |
| 用例 | 设置后即可忘记 | 精确控制 |
运行、监控和管理 LP 策略。
要求: 先完成 deploy-hummingbot-api、setup-gateway 和 add-wallet。
参考: 有关完整配置详情、再平衡逻辑以及 KEEP 与 REBALANCE 场景,请参见
references/lp_rebalancer_guide.md。
当价格超出范围时自动再平衡头寸。最适合无需干预的 LP 管理。
关键概念:
--amount(total_amount_quote) = 报价资产(交易对中的第二个代币)的金额。对于Percolator-SOL→ SOL。对于SOL-USDC→ USDC。始终是报价资产,无论方向如何。- 所有
*_pct参数已经是百分比。position_width_pct: 10= 10% 宽度。请勿传递小数(不是 0.10)。- 价格限制 (
--buy-min/max,--sell-min/max) 默认为null= 无限制。仅在需要止损区域时设置。
# 1. 创建 LP 再平衡器配置(池和交易对是必需的)
python scripts/manage_controller.py create-config my_lp_config \
--pool <池地址> \
--pair SOL-USDC \
--amount 10 \ # 10 USDC(SOL-USDC 的报价资产)
--side 0 \ # 0=双边,1=买入(仅报价资产),2=卖出(仅基础资产)
--width 10 \ # 围绕当前价格 10% 的范围
--offset 1 \ # 范围中心距当前价格偏移 1%
--rebalance-seconds 300 \
--rebalance-threshold 1
# Side=2 示例:仅部署基础代币(例如 110k PRCLT ≈ 1.33 SOL)
python scripts/manage_controller.py create-config percolator_sell \
--pool ATrBUW2reZiyftzMQA1hEo8b7w7o8ZLrhPd7M7sPMSms \
--pair Percolator-SOL \
--amount 1.33 \ # 价值 1.33 SOL(Percolator-SOL 交易对的报价资产)
--side 2
# 2. 使用配置部署机器人
python scripts/manage_controller.py deploy my_lp_bot --configs my_lp_config
# 3. 监控状态
python scripts/manage_controller.py status
关键参数:
| 参数 | 字段 | 默认值 | 描述 |
|---|---|---|---|
--amount | total_amount_quote | 必需 | 报价资产(第二个代币)的金额。对于 X-SOL 交易对是 SOL,对于 X-USDC 交易对是 USDC。 |
--side | side | 0 | 0=双边,1=买入(仅报价资产),2=卖出(仅基础资产) |
--width | position_width_pct | 10 | 范围宽度百分比(例如 10 = 围绕价格 ±10%)。已经是百分比 — 不要使用小数。 |
--offset | position_offset_pct | 0.1 | 范围中心距当前价格的偏移百分比。已经是百分比。 |
--rebalance-seconds | rebalance_seconds | 300 | 超出范围后关闭并重新打开的秒数 |
--rebalance-threshold | rebalance_threshold_pct | 1 | 触发再平衡的最小价格变动百分比。已经是百分比。 |
--sell-max/--sell-min | sell_price_max/min | null | 卖出侧的价格限制(null = 无限制) |
--buy-max/--buy-min | buy_price_max/min | null | 买入侧的价格限制(null = 无限制) |
--strategy-type | strategy_type | 0 | Meteora 形状:0=现货(均匀),1=曲线(中心重),2=买卖价差(边缘重) |
参考: 有关状态机、单边/双边头寸和限价范围订单,请参见
references/lp_executor_guide.md。
创建一个具有固定边界的单一头寸。不自动再平衡。
python scripts/manage_executor.py create \
--pool <池地址> \
--pair SOL-USDC \
--quote-amount 100 \
--lower 180 \
--upper 185 \
--side 1
关键参数:
| 参数 | 描述 |
|---|---|
--connector | 必须包含 /clmm 后缀(默认:meteora/clmm) |
--lower/--upper | 头寸价格边界 |
--base-amount/--quote-amount | 代币金额(单边时将一个设置为 0) |
--side | 0=双边,1=买入,2=卖出 |
--auto-close-above | 当价格高于范围时自动关闭(用于限价单) |
--auto-close-below | 当价格低于范围时自动关闭(用于限价单) |
检查状态:
# 机器人状态
python scripts/manage_controller.py status
# 执行器列表
python scripts/manage_executor.py list --type lp_executor
# 执行器详情
python scripts/manage_executor.py get <执行器_id>
# 执行器摘要
python scripts/manage_executor.py summary
执行器状态:
OPENING - 在链上创建头寸IN_RANGE - 头寸活跃,赚取费用OUT_OF_RANGE - 价格超出头寸边界CLOSING - 移除头寸FAILED - 交易失败停止:
# 停止机器人(停止其所有控制器)
python scripts/manage_controller.py stop my_lp_bot
# 停止单个执行器(关闭头寸)
python scripts/manage_executor.py stop <执行器_id>
# 停止执行器但保留链上头寸
python scripts/manage_executor.py stop <执行器_id> --keep-position
如果用户运行了 LP 执行器(通过 manage_executor.py create 或直接 API),立即提供分析:
您的执行器已停止。需要我生成表现仪表板吗?
然后运行:
python scripts/visualize_lp_executor.py --id <执行器_id>
执行器 ID 在执行器创建时返回(打印为 Executor ID: <id>)。如果用户手头没有,可以从 API 获取:
curl -s -u admin:admin -X POST http://localhost:8000/executors/search \
-H "Content-Type: application/json" \
-d '{"type":"lp_executor"}' | python3 -c "
import json,sys
data=json.load(sys.stdin)
items=data.get('data',data) if isinstance(data,dict) else data
for ex in (items if isinstance(items,list) else [items]):
print(ex.get('executor_id') or ex.get('id'), ex.get('trading_pair'), ex.get('status'))
"
同时将原始数据导出到 CSV:
python scripts/export_lp_executor.py --id <执行器_id>
如果用户运行了再平衡控制器机器人,数据存储在 SQLite 文件中 — 改用基于 SQLite 的脚本的 analyze-performance。
从 LP 头寸事件导出数据并生成可视化仪表板。脚本位于此技能的 scripts/ 目录中。
始终问自己:这个头寸是作为 LP 执行器部署的(通过 manage_executor.py 或直接 API)还是通过再平衡控制器机器人部署的?
| 部署方式 | 使用的脚本 |
|---|---|
LP 执行器 — manage_executor.py create 或直接 POST /executors/ API | visualize_lp_executor.py --id <执行器_id> ✅ |
再平衡控制器 — manage_controller.py deploy(机器人容器,SQLite) | visualize_lp_positions.py --pair <交易对> |
| 不确定? | 运行 curl -s -u admin:admin -X POST http://localhost:8000/executors/search -H "Content-Type: application/json" -d '{"type":"lp_executor"}' — 如果出现执行器 ID,则使用执行器脚本 |
如果用户在此会话中一直在运行 LP 执行器(从上下文中已知执行器 ID),跳过问题并直接转到:
python scripts/visualize_lp_executor.py --id <执行器_id>
| 脚本 | 目的 |
|---|---|
scripts/export_lp_positions.py | 将 LP 头寸事件导出到 CSV(基于 SQLite/机器人容器) |
scripts/visualize_lp_positions.py | 从头寸事件生成 HTML 仪表板(基于 SQLite/机器人容器) |
scripts/export_lp_executor.py | 通过 --id 将单个 LP 执行器导出到 CSV(REST API,无 SQLite) |
scripts/visualize_lp_executor.py | 通过 --id 为单个 LP 执行器生成 HTML 仪表板(REST API) |
显示来自区块链的头寸添加/移除事件。适用于正在运行和已停止的机器人。
# 基本用法(自动检测 data/ 中的数据库)
python scripts/visualize_lp_positions.py --pair SOL-USDC
# 明确指定数据库
python scripts/visualize_lp_positions.py --db data/my_bot.sqlite --pair SOL-USDC
# 按连接器筛选
python scripts/visualize_lp_positions.py --pair SOL-USDC --connector meteora/clmm
# 仅最近 24 小时
python scripts/visualize_lp_positions.py --pair SOL-USDC --hours 24
仪表板功能:
# 导出所有头寸事件
python scripts/export_lp_positions.py --db data/my_bot.sqlite
# 按交易对筛选
python scripts/export_lp_positions.py --pair SOL-USDC --output exports/positions.csv
# 显示摘要而不导出
python scripts/export_lp_positions.py --summary
这些脚本直接从 Hummingbot REST API 工作 — 不需要 SQLite 数据库。当执行器通过 API 直接部署时(例如,通过 manage_executor.py)使用它们,因为这些执行器并不总是像机器人容器那样产生 SQLite 记录。
将单个 LP 执行器导出到 CSV:
python scripts/export_lp_executor.py --id <执行器_id>
python scripts/export_lp_executor.py --id <执行器_id> --output exports/my_run.csv
python scripts/export_lp_executor.py --id <执行器_id> --print # JSON 输出到 stdout
CSV 列(LP 执行器模式):
id, account_name, controller_id, connector_name, trading_pairstatus, close_type, is_active, is_trading, error_countcreated_at, closed_at, close_timestamp, duration_secondsnet_pnl_quote, net_pnl_pct, cum_fees_quote, filled_amount_quotepool_address, lower_price, upper_price, base_amount_config, quote_amount_config, side, position_offset_pct, auto_close_above_range_seconds, auto_close_below_range_seconds, keep_positionstate, position_address, current_price, lower_price_actual, upper_price_actual, base_amount_current, quote_amount_current, base_fee, quote_fee, fees_earned_quote, total_value_quote, unrealized_pnl_quote, position_rent, position_rent_refunded, tx_fee, out_of_range_seconds, max_retries_reached, initial_base_amount, initial_quote_amount可视化单个 LP 执行器(HTML 仪表板):
python scripts/visualize_lp_executor.py --id <执行器_id>
python scripts/visualize_lp_executor.py --id <执行器_id> --output report.html
python scripts/visualize_lp_executor.py --id <执行器_id> --no-open
仪表板面板:
#0d1117 / #161b27),响应式布局,来自 CDN 的 Chart.js.env 或 ~/.hummingbot/.env 或 ~/.env 自动加载身份验证(密钥:HUMMINGBOT_API_URL, API_USER, API_PASS)完整设置(首次):
# 1. 部署 API
bash scripts/deploy_hummingbot_api.sh install
# 2. 启动 Gateway
bash scripts/setup_gateway.sh --rpc-url https://your-rpc-endpoint.com
# 3. 添加钱包
python scripts/add_wallet.py add
# 4. 查找池
python scripts/list_
This skill helps you run automated liquidity provision strategies on concentrated liquidity (CLMM) DEXs using Hummingbot API.
Commands (run as /lp-agent <command>):
| Command | Description |
|---|---|
start | Onboarding wizard — check setup status and get started |
deploy-hummingbot-api | Deploy Hummingbot API trading infrastructure |
setup-gateway | Start Gateway, configure network RPC endpoints |
add-wallet | Add or import a Solana wallet |
explore-pools | Find and explore Meteora DLMM pools |
select-strategy | Choose LP Executor or Rebalancer Controller |
run-strategy | Run, monitor, and manage LP strategies |
analyze-performance | Visualize LP position performance |
New here? Run /lp-agent start to check your setup and get a guided walkthrough.
Typical workflow: start → deploy-hummingbot-api → setup-gateway → add-wallet → explore-pools → select-strategy → run-strategy → analyze-performance
Welcome the user and guide them through setup. This is a conversational onboarding wizard — check infrastructure state, interpret results, and walk them through each step.
Introduce yourself and explain what lp-agent does:
I'm your LP agent — I help you run automated liquidity provision strategies on Meteora DLMM pools (Solana). I can:
- Deploy infrastructure — Hummingbot API + Gateway for DEX trading
- Manage wallets — Add Solana wallets, check balances
- Explore pools — Search Meteora DLMM pools, compare APR/volume/TVL
- Run strategies — Auto-rebalancing LP controller or single-position executor
- Analyze performance — Dashboards with PnL, fees, and position history
Run these scripts and interpret the JSON output:
bash scripts/check_api.sh --json # Is Hummingbot API running?
bash scripts/check_gateway.sh --json # Is Gateway running?
python scripts/add_wallet.py list # Any wallets connected?
Interpreting Results:
| Script | Success Output | Failure Output |
|---|---|---|
check_api.sh --json | {"running": true, "url": "http://localhost:8000", ...} | {"running": false, ...} or connection error |
check_gateway.sh --json | {"running": true, ...} | {"running": false, ...} |
add_wallet.py list |
Present a checklist showing what's done and what's remaining based on the script outputs:
Setup Progress:
[x] Hummingbot API — Running at http://localhost:8000
[x] Gateway — Running
[ ] Wallet — No wallet connected
Next step: Add a Solana wallet so you can start trading.
Adapt the checklist to the actual state. If everything is unchecked, start from the top. If everything is checked, skip to the LP lifecycle overview.
Based on the first unchecked item, offer to help:
| Missing | What to say |
|---|---|
| Hummingbot API | "Let's deploy the API first — it's the trading backend. Need Docker installed. Want me to run the installer?" → /lp-agent deploy-hummingbot-api |
| Gateway | "API is running! Now we need Gateway for DEX connectivity. Want me to start it?" → /lp-agent setup-gateway |
| Wallet | See Adding a Wallet below |
| All ready | Move to Step 5 |
Adding a Wallet:
When wallet is the next step, tell the user:
Infrastructure is ready. You need a Solana wallet with SOL for transaction fees (~0.06 SOL per LP position).
To add a wallet, run:
python scripts/add_wallet.py addYou'll be prompted to paste your private key (secure, not saved in shell history).
Interpreting add_wallet.py output:
| Output | Meaning |
|---|---|
✓ Wallet added successfully + address | Success — wallet is connected |
Enter private key (base58): then ✓ Wallet added | Success after prompt |
Error: HTTP 400 or validation error | Invalid private key format |
Error: Cannot connect to API | API not running — run check_api.sh first |
After wallet is added, verify with python scripts/add_wallet.py list — should show the new address.
Once infrastructure is ready (or if user wants to understand the flow first), explain the LP lifecycle:
How LP strategies work:
Explore pools (
/lp-agent explore-pools) — Find a Meteora DLMM pool. Look at volume, APR, and fee/TVL ratio to pick a good one.Select strategy (
/lp-agent select-strategy) — Choose between:
- Rebalancer Controller (recommended) — Automatically repositions when price moves out of range. Set-and-forget.
- LP Executor — Single fixed position. You control when to close/reopen. Good for testing or limit-order-style LP.
Run strategy (
/lp-agent run-strategy) — Configure parameters (amount, width, price limits) and deploy. Monitor status and stop when done.Analyze (
/lp-agent analyze-performance) — View PnL dashboard, fees earned, position history. Works for both running and stopped strategies.
Want to explore some pools to get started?
Deploy the Hummingbot API trading infrastructure. This is the first step before using any LP features.
Hummingbot API — A personal trading server that exposes a REST API for trading, market data, and deploying bot strategies across CEXs and DEXs.
# Check if already installed
bash scripts/deploy_hummingbot_api.sh status
# Install (interactive, prompts for credentials)
bash scripts/deploy_hummingbot_api.sh install
# Install with defaults (non-interactive: admin/admin)
bash scripts/deploy_hummingbot_api.sh install --defaults
# Upgrade existing installation
bash scripts/deploy_hummingbot_api.sh upgrade
# View container logs
bash scripts/deploy_hummingbot_api.sh logs
# Reset (stop and remove everything)
bash scripts/deploy_hummingbot_api.sh reset
| Output | Meaning | Next Step |
|---|---|---|
✓ Hummingbot API deployed successfully | Success | Proceed to setup-gateway |
✓ Already installed and running | Already set up | Proceed to setup-gateway |
Error: Docker not found | Docker not installed | Install Docker first |
Error: Port 8000 already in use |
Once the API is running:
http://localhost:8000/docssetup-gateway to enable DEX tradingStart the Gateway service, check its status, and configure key network parameters like RPC node URLs. Gateway is required for all LP operations on DEXs.
Prerequisite: Hummingbot API must be running (deploy-hummingbot-api). The script checks this automatically.
⚠️ Custom RPC is required — not optional. The public Solana RPC is rate-limited and will cause transaction failures that look like "Insufficient funds" or "Transaction simulation failed". Always configure a custom RPC before deploying any bot. Get a free key at https://helius.dev.
# Check Gateway status
bash scripts/setup_gateway.sh --status
# Start Gateway with defaults
bash scripts/setup_gateway.sh
# Start Gateway with custom image (e.g., development build)
bash scripts/setup_gateway.sh --image hummingbot/gateway:development
# Start with custom Solana RPC (recommended to avoid rate limits)
bash scripts/setup_gateway.sh --rpc-url https://your-rpc-endpoint.com
# Configure RPC for a different network
bash scripts/setup_gateway.sh --network ethereum-mainnet --rpc-url https://your-eth-rpc.com
# Start with custom passphrase and port
bash scripts/setup_gateway.sh --passphrase mypassword --port 15888
| Option | Default | Description |
|---|---|---|
--status | Check Gateway status only (don't start) | |
--image IMAGE | hummingbot/gateway:development | Docker image to use |
--passphrase TEXT | hummingbot | Gateway passphrase |
--rpc-url URL |
For finer control (stop, restart, logs, per-network config), use manage_gateway.py:
python scripts/manage_gateway.py status # Check status
python scripts/manage_gateway.py start # Start Gateway
python scripts/manage_gateway.py stop # Stop Gateway
python scripts/manage_gateway.py restart # Restart Gateway
python scripts/manage_gateway.py logs # View logs
python scripts/manage_gateway.py networks # List all networks
python scripts/manage_gateway.py network solana-mainnet-beta # Get network config
python scripts/manage_gateway.py network solana-mainnet-beta --node-url https://... # Set RPC node
| Output | Meaning | Next Step |
|---|---|---|
✓ Gateway is running or ✓ Gateway started | Success | Proceed to add-wallet |
✓ Gateway is already running | Already set up | Proceed to add-wallet |
✗ Cannot connect to Hummingbot API | API not running | Run /lp-agent deploy-hummingbot-api first |
Gateway uses public RPC nodes by default, which can hit rate limits. Set a custom nodeUrl per network to avoid this.
Popular Solana RPC providers:
Add a Solana wallet for trading.
Requires: deploy-hummingbot-api and setup-gateway completed first.
python scripts/add_wallet.py add
You'll be prompted to paste your private key (base58 format). The key is entered securely and won't appear in shell history.
Interpreting Output:
| Output | Meaning | Next Step |
|---|---|---|
✓ Wallet added successfully + Address: ABC... | Success | Verify with list command |
Error: HTTP 400 - Bad Request | Invalid private key format | Check key is base58 encoded |
Error: HTTP 503 | Gateway not available | Run bash scripts/check_gateway.sh |
python scripts/add_wallet.py list
Interpreting Output:
| Output | Meaning |
|---|---|
[solana] ABC123...XYZ | Wallet connected on Solana |
No wallets found. | No wallets added yet |
Empty list [] (with --json) | No wallets added yet |
# Check all balances
python scripts/add_wallet.py balances
# Filter by account
python scripts/add_wallet.py balances --account master_account
# Show zero balances too
python scripts/add_wallet.py balances --all
When using non-standard tokens (e.g. memecoins), add them to Gateway first:
# Use exact symbol from the pool (check with get_meteora_pool.py)
python scripts/add_wallet.py add-token \
--symbol Percolator \
--address 8PzFWyLpCVEmbZmVJcaRTU5r69XKJx1rd7YGpWvnpump \
--decimals 6
⚠️ Symbol must match the pool exactly. Use
get_meteora_pool.pyto find the exact token symbol. If the pool showsPercolator, usePercolator— notPRCLTor any abbreviation. A mismatch causes "No CLMM pool found" errors when the bot tries to fetch price data.
Then restart Gateway for the token to be recognized.
balances command — the available amount in the SPL token account may differ from on-chain total (multiple accounts, staked, etc.)Find and explore Meteora DLMM pools before creating LP positions.
Note: Pool listing (list_meteora_pools.py) works without any prerequisites — it queries the Meteora API directly. Pool details (get_meteora_pool.py) optionally uses Gateway for real-time price and liquidity charts.
Search and list pools by name, token, or address:
# Top pools by 24h volume
python scripts/list_meteora_pools.py
# Search by token symbol
python scripts/list_meteora_pools.py --query SOL
python scripts/list_meteora_pools.py --query USDC
# Search by pool name
python scripts/list_meteora_pools.py --query SOL-USDC
# Sort by different metrics
python scripts/list_meteora_pools.py --query SOL --sort tvl
python scripts/list_meteora_pools.py --query SOL --sort apr
python scripts/list_meteora_pools.py --query SOL --sort fees
# Pagination
python scripts/list_meteora_pools.py --query SOL --limit 50 --page 2
Output columns:
get_meteora_pool.py for full address)Note: Token mints help identify the correct token when multiple tokens share the same name (e.g., multiple "PERCOLATOR" tokens).
Get detailed information about a specific pool. Fetches from both Meteora API (historical data) and Gateway (real-time data):
python scripts/get_meteora_pool.py <pool_address>
# Example
python scripts/get_meteora_pool.py ATrBUW2reZiyftzMQA1hEo8b7w7o8ZLrhPd7M7sPMSms
# Output as JSON for programmatic use
python scripts/get_meteora_pool.py ATrBUW2reZiyftzMQA1hEo8b7w7o8ZLrhPd7M7sPMSms --json
# Skip Gateway (faster, no bin distribution)
python scripts/get_meteora_pool.py ATrBUW2reZiyftzMQA1hEo8b7w7o8ZLrhPd7M7sPMSms --no-gateway
Data sources:
Details shown:
When selecting a pool, consider:
bin_step=1 → max ~0.69% width (tight ranges)bin_step=10 → max ~6.9% width (medium ranges)bin_step=100 → max ~69% width (wide ranges)Help the user choose the right LP strategy. See references/ for detailed guides.
Reference:
references/lp_rebalancer_guide.md
A controller that automatically manages LP positions with rebalancing logic.
| Feature | Description |
|---|---|
| Auto-rebalance | Closes and reopens positions when price exits range |
| Price limits | Configure BUY/SELL zones with anchor points |
| KEEP logic | Avoids unnecessary rebalancing when at optimal position |
| Hands-off | Set and forget - controller manages everything |
Best for: Longer-term LP strategies, range-bound markets, automated fee collection.
Reference:
references/lp_executor_guide.md
Creates ONE liquidity position with fixed price bounds. No auto-rebalancing.
| Feature | Description |
|---|---|
| Fixed bounds | Position stays at configured price range |
| Manual control | User decides when to close/reopen |
| Limit orders | Can auto-close when price exits range (like limit orders) |
| Simple | Direct control over single position |
Best for: Short-term positions, limit-order-style LP, manual management, testing.
| Aspect | Rebalancer Controller | LP Executor |
|---|---|---|
| Rebalancing | Automatic | Manual |
| Position count | One at a time, auto-managed | One, fixed |
| Price limits | Yes (anchor points) | No (but has auto-close) |
| Complexity | Higher (more config) | Lower (simpler) |
| Use case | Set-and-forget | Precise control |
Run, monitor, and manage LP strategies.
Requires: deploy-hummingbot-api, setup-gateway, and add-wallet completed first.
Reference: See
references/lp_rebalancer_guide.mdfor full configuration details, rebalancing logic, and KEEP vs REBALANCE scenarios.
Auto-rebalances positions when price moves out of range. Best for hands-off LP management.
Key concepts:
--amount(total_amount_quote) = amount in quote asset (2nd token in pair). ForPercolator-SOL→ SOL. ForSOL-USDC→ USDC. Always quote, regardless of side.- All
*_pctparams are already in percent.position_width_pct: 10= 10% width. Do NOT pass decimals (not 0.10).- Price limits (
--buy-min/max,--sell-min/max) default tonull= no limit. Only set if you want a stop zone.
# 1. Create LP Rebalancer config (pool and pair are required)
python scripts/manage_controller.py create-config my_lp_config \
--pool <pool_address> \
--pair SOL-USDC \
--amount 10 \ # 10 USDC (quote asset for SOL-USDC)
--side 0 \ # 0=BOTH, 1=BUY (quote only), 2=SELL (base only)
--width 10 \ # 10% range around current price
--offset 1 \ # center range 1% from current price
--rebalance-seconds 300 \
--rebalance-threshold 1
# Side=2 example: deploy base token only (e.g. 110k PRCLT ≈ 1.33 SOL)
python scripts/manage_controller.py create-config percolator_sell \
--pool ATrBUW2reZiyftzMQA1hEo8b7w7o8ZLrhPd7M7sPMSms \
--pair Percolator-SOL \
--amount 1.33 \ # 1.33 SOL worth (quote for Percolator-SOL pair)
--side 2
# 2. Deploy bot with the config
python scripts/manage_controller.py deploy my_lp_bot --configs my_lp_config
# 3. Monitor status
python scripts/manage_controller.py status
Key Parameters:
| Parameter | Field | Default | Description |
|---|---|---|---|
--amount | total_amount_quote | required | Amount in quote asset (2nd token). SOL for X-SOL pairs, USDC for X-USDC pairs. |
--side | side | 0 | 0=BOTH, 1=BUY (quote only), =SELL (base only) |
Reference: See
references/lp_executor_guide.mdfor state machine, single/double-sided positions, and limit range orders.
Creates ONE position with fixed bounds. Does NOT auto-rebalance.
python scripts/manage_executor.py create \
--pool <pool_address> \
--pair SOL-USDC \
--quote-amount 100 \
--lower 180 \
--upper 185 \
--side 1
Key Parameters:
| Parameter | Description |
|---|---|
--connector | Must include /clmm suffix (default: meteora/clmm) |
--lower/--upper | Position price bounds |
--base-amount/--quote-amount | Token amounts (set one to 0 for single-sided) |
--side | 0=BOTH, 1=BUY, 2=SELL |
--auto-close-above |
Check Status:
# Bot status
python scripts/manage_controller.py status
# Executor list
python scripts/manage_executor.py list --type lp_executor
# Executor details
python scripts/manage_executor.py get <executor_id>
# Executor summary
python scripts/manage_executor.py summary
Executor States:
OPENING - Creating position on-chainIN_RANGE - Position active, earning feesOUT_OF_RANGE - Price outside position boundsCLOSING - Removing positionFAILED - Transaction failedStop:
# Stop bot (stops all its controllers)
python scripts/manage_controller.py stop my_lp_bot
# Stop individual executor (closes position)
python scripts/manage_executor.py stop <executor_id>
# Stop executor but keep position on-chain
python scripts/manage_executor.py stop <executor_id> --keep-position
If the user ran an LP Executor (via manage_executor.py create or direct API), immediately offer to analyze it:
Your executor has been stopped. Want me to generate a performance dashboard?
Then run:
python scripts/visualize_lp_executor.py --id <executor_id>
The executor ID is returned when the executor is created (printed as Executor ID: <id>). If the user doesn't have it handy, fetch it from the API:
curl -s -u admin:admin -X POST http://localhost:8000/executors/search \
-H "Content-Type: application/json" \
-d '{"type":"lp_executor"}' | python3 -c "
import json,sys
data=json.load(sys.stdin)
items=data.get('data',data) if isinstance(data,dict) else data
for ex in (items if isinstance(items,list) else [items]):
print(ex.get('executor_id') or ex.get('id'), ex.get('trading_pair'), ex.get('status'))
"
To also export the raw data to CSV:
python scripts/export_lp_executor.py --id <executor_id>
If the user ran a Rebalancer Controller bot , the data lives in a SQLite file — use analyze-performance with the SQLite-based scripts instead.
Export data and generate visual dashboards from LP position events. Scripts are in this skill's scripts/ directory.
Always ask yourself: was this position deployed as an LP Executor (viamanage_executor.py or direct API) or via a Rebalancer Controller bot?
| How it was deployed | Script to use |
|---|---|
LP Executor — manage_executor.py create or direct POST /executors/ API | visualize_lp_executor.py --id <executor_id> ✅ |
Rebalancer Controller — manage_controller.py deploy (bot container, SQLite) | visualize_lp_positions.py --pair <pair> |
| Not sure? | Run curl -s -u admin:admin -X POST http://localhost:8000/executors/search -H "Content-Type: application/json" -d '{"type":"lp_executor"}' — if the executor ID appears, use the executor scripts |
If the user has been running an LP Executor in this session (executor ID is known from context), skip the question and go straight to:
python scripts/visualize_lp_executor.py --id <executor_id>
| Script | Purpose |
|---|---|
scripts/export_lp_positions.py | Export LP position events to CSV (SQLite/bot-container based) |
scripts/visualize_lp_positions.py | Generate HTML dashboard from position events (SQLite/bot-container based) |
scripts/export_lp_executor.py | Export a single LP executor to CSV by --id (REST API, no SQLite) |
scripts/visualize_lp_executor.py | Generate HTML dashboard for a single LP executor by --id (REST API) |
Shows position ADD/REMOVE events from the blockchain. Works for both running and stopped bots.
# Basic usage (auto-detects database in data/)
python scripts/visualize_lp_positions.py --pair SOL-USDC
# Specify database explicitly
python scripts/visualize_lp_positions.py --db data/my_bot.sqlite --pair SOL-USDC
# Filter by connector
python scripts/visualize_lp_positions.py --pair SOL-USDC --connector meteora/clmm
# Last 24 hours only
python scripts/visualize_lp_positions.py --pair SOL-USDC --hours 24
Dashboard Features:
# Export all position events
python scripts/export_lp_positions.py --db data/my_bot.sqlite
# Filter by trading pair
python scripts/export_lp_positions.py --pair SOL-USDC --output exports/positions.csv
# Show summary without exporting
python scripts/export_lp_positions.py --summary
These scripts work directly from the Hummingbot REST API — no SQLite database needed. Use them when executors were deployed via the API directly (e.g., via manage_executor.py), because those do not always produce SQLite records the way bot containers do.
Export a single LP executor to CSV:
python scripts/export_lp_executor.py --id <executor_id>
python scripts/export_lp_executor.py --id <executor_id> --output exports/my_run.csv
python scripts/export_lp_executor.py --id <executor_id> --print # JSON to stdout
CSV columns (LP executor schema):
id, account_name, controller_id, connector_name, trading_pairstatus, close_type, is_active, is_trading, error_countcreated_at, closed_at, close_timestamp, duration_secondsnet_pnl_quote, net_pnl_pct, cum_fees_quote, filled_amount_quotepool_address, lower_price, upper_price, base_amount_config, quote_amount_config, side, position_offset_pct, auto_close_above_range_seconds, auto_close_below_range_seconds, keep_positionstate, position_address, current_price, lower_price_actual, upper_price_actual, base_amount_current, quote_amount_current, base_fee, quote_fee, fees_earned_quote, total_value_quote, unrealized_pnl_quote, position_rent, position_rent_refunded, tx_fee, out_of_range_seconds, max_retries_reached, initial_base_amount, initial_quote_amountVisualize a single LP executor (HTML dashboard):
python scripts/visualize_lp_executor.py --id <executor_id>
python scripts/visualize_lp_executor.py --id <executor_id> --output report.html
python scripts/visualize_lp_executor.py --id <executor_id> --no-open
Dashboard panels:
#0d1117 / #161b27), responsive layout, Chart.js from CDN.env or ~/.hummingbot/.env or ~/.env (keys: HUMMINGBOT_API_URL, API_USER, API_PASS)Full Setup (first time):
# 1. Deploy API
bash scripts/deploy_hummingbot_api.sh install
# 2. Start Gateway
bash scripts/setup_gateway.sh --rpc-url https://your-rpc-endpoint.com
# 3. Add wallet
python scripts/add_wallet.py add
# 4. Find pool
python scripts/list_meteora_pools.py --query SOL-USDC
# 5. Check bin_step
python scripts/get_meteora_pool.py <pool_address>
# 6. Create config and deploy
python scripts/manage_controller.py create-config my_lp --pool <pool_address> --pair SOL-USDC --amount 100
python scripts/manage_controller.py deploy my_bot --configs my_lp
# 7. Verify
python scripts/manage_controller.py status
Analyze LP Positions:
# Visualize
python scripts/visualize_lp_positions.py --pair SOL-USDC
# Export CSV
python scripts/export_lp_positions.py --pair SOL-USDC
Before running commands that need the API or Gateway, verify they're running:
bash scripts/check_api.sh # Is Hummingbot API running?
bash scripts/check_gateway.sh # Is Gateway running? (also checks API)
Both support --json output. These scripts are also used internally by setup_gateway.sh and can be sourced by other shell scripts.
| Script | Purpose |
|---|---|
check_api.sh | Check if Hummingbot API is running (shared) |
check_gateway.sh | Check if Gateway is running (shared) |
deploy_hummingbot_api.sh | Install/upgrade/manage Hummingbot API |
setup_gateway.sh | Start Gateway and configure RPC |
add_wallet.py | Add wallets and check balances |
manage_gateway.py |
| Error | Cause | Solution |
|---|---|---|
| "InvalidRealloc" | Position range too wide | Reduce --width (check bin_step limits) |
| State stuck "OPENING" | Transaction failed | Stop executor, reduce range, retry |
| "Insufficient funds" (wallet has funds) | RPC rate limit or wrong amount units | Add custom RPC key; verify --amount is in quote asset |
| "Transaction simulation failed" | RPC rate limit masking as sim failure | Add custom RPC key (Helius/QuickNode) |
'meteora/clmm' KeyError | Gateway connector not registered yet | Use hummingbot-api PR #120+ (feat/lp-executor branch) |
These caused real confusion in production — read before deploying.
total_amount_quote is ALWAYS in quote assetThe quote asset is the 2nd token in the trading pair:
| Pair | Quote Asset | Example: deploy 100k base tokens worth ~$100 |
|---|---|---|
Percolator-SOL | SOL | --amount 1.33 (1.33 SOL ≈ $108) |
SOL-USDC | USDC | --amount 108 (108 USDC) |
RAY-SOL | SOL | --amount 2.5 (2.5 SOL) |
Even for --side 2 (SELL/base-only), you express the value in quote units. Convert: base_tokens × price_in_quote = total_amount_quote.
*_pct params are already in percent| Param | Correct | Wrong |
|---|---|---|
position_width_pct: 10 | 10% range | |
position_offset_pct: 1 | 1% offset | |
rebalance_threshold_pct: 1 | 1% threshold |
When adding a token to Gateway and configuring --pair, use the exact symbol from the pool (from get_meteora_pool.py or Meteora UI):
# Check pool token symbols first
python scripts/get_meteora_pool.py <pool_address>
# Look at "Symbol" column — use that exact string in --pair and when adding token to Gateway
Example: Percolator token symbol is Percolator (not PRCLT). Use --pair Percolator-SOL.
The public Solana RPC (api.mainnet-beta.solana.com) will rate-limit your bot, causing:
Always configure a custom RPC before deploying:
# Edit Gateway conf
GATEWAY_DIR=~/.openclaw/workspace/hummingbot-gateway # or your gateway dir
nano "$GATEWAY_DIR/conf/chains/solana/mainnet-beta.yml"
# Set: nodeURL: https://mainnet.helius-rpc.com/?api-key=YOUR_KEY
Free key at https://helius.dev. Restart Gateway after.
On macOS, Docker containers cannot reach processes running on the host (even with --network host). The bot container cannot connect to a Gateway running in dev mode (pnpm start).
Always run Gateway as Docker:
docker run -d --name gateway \
--network host \
-e GATEWAY_PASSPHRASE=hummingbot \
-v ~/.openclaw/workspace/hummingbot-gateway/conf:/home/gateway/conf \
-v ~/.openclaw/workspace/hummingbot-gateway/certs:/home/gateway/certs \
hummingbot/gateway:development
Then in bot's conf_client.yml: gateway_api_host: localhost (host networking resolves correctly inside Docker on macOS when gateway is also Docker with host network).
hummingbot:development image, not latestThe latest image may not have LP executor support. Always deploy with:
python scripts/manage_controller.py deploy my_bot --configs my_config
# manage_controller.py defaults to hummingbot/hummingbot:development
--amountpython scripts/add_wallet.py balances
Check which token account has funds — the wallet may have multiple SPL token accounts and balances can differ from expectations. Only the available balance in the specific token account can be deployed.
To close all positions on a pool:
# List open positions
curl -s "http://localhost:15888/connectors/meteora/clmm/positions-owned?network=mainnet-beta&walletAddress=<WALLET>"
# Close each position
curl -s -X POST http://localhost:15888/connectors/meteora/clmm/close-position \
-H "Content-Type: application/json" \
-d '{"network":"mainnet-beta","address":"<WALLET>","positionAddress":"<POSITION>"}'
Note: Gateway must be accessible. On macOS use docker run --rm --network host alpine/curl ... if Gateway is in Docker with host networking. | "Insufficient balance" | Not enough tokens | Check wallet has tokens + 0.06 SOL for rent |
Weekly Installs
169
Repository
GitHub Stars
24
First Seen
Feb 6, 2026
Security Audits
Gen Agent Trust HubPassSocketFailSnykWarn
Installed on
opencode158
codex156
gemini-cli155
github-copilot154
cursor150
kimi-cli149
Skills CLI 使用指南:AI Agent 技能包管理器安装与管理教程
33,600 周安装
JSON 转视频工具 - 使用 Remotion 渲染器将 JSON 时间线规范转换为动态视频
153 周安装
Slack 代理开发指南:Chat SDK 与 Bolt for JavaScript 框架选择与部署教程
153 周安装
inbox 智能体邮件收件箱 - 检查待处理消息和HELP_REQUEST | 命令行工具
153 周安装
ISO 13485内部审计专家指南:医疗器械QMS审计计划、执行与不符合项管理
153 周安装
TikTok广告优化全攻略:从创意、技术到效果分析的完整检查清单与评分系统
154 周安装
Odoo 升级助手 v4.0:自动化模块升级,解决版本兼容性问题
154 周安装
Shows wallet addresses like [solana] ABC123... |
No wallets found. or empty list [] |
| Another service on port |
| Stop conflicting service or use different port |
Custom RPC endpoint for --network |
--network ID | solana-mainnet-beta | Network to configure RPC for |
--port PORT | 15888 | Gateway port |
✗ Failed to start Gateway | Docker issue | Check Docker is running, check logs |
✓ RPC configured + ✓ Gateway restarted | Custom RPC set | Ready to use |
Error: Cannot connect to API| API not running |
Run /lp-agent deploy-hummingbot-api |
2--width | position_width_pct | 10 | Range width in % (e.g. 10 = ±10% around price). Already in pct — do not use decimals. |
--offset | position_offset_pct | 0.1 | Center offset from current price in %. Already in pct. |
--rebalance-seconds | rebalance_seconds | 300 | Seconds out-of-range before closing and reopening |
--rebalance-threshold | rebalance_threshold_pct | 1 | Min price move % to trigger rebalance. Already in pct. |
--sell-max/--sell-min | sell_price_max/min | null | Price limits for SELL side (null = no limit) |
--buy-max/--buy-min | buy_price_max/min | null | Price limits for BUY side (null = no limit) |
--strategy-type | strategy_type | 0 | Meteora shape: 0=Spot (uniform), 1=Curve (center-heavy), 2=Bid-Ask (edge-heavy) |
| Auto-close when price above range (for limit orders) |
--auto-close-below | Auto-close when price below range (for limit orders) |
| Advanced Gateway management |
list_meteora_pools.py | Search and list pools |
get_meteora_pool.py | Get pool details with liquidity chart |
manage_executor.py | Create, list, stop LP executors |
manage_controller.py | Create configs, deploy bots, get status |
export_lp_positions.py | Export position events to CSV (SQLite/bot-container) |
visualize_lp_positions.py | Generate HTML dashboard (SQLite/bot-container) |
export_lp_executor.py | Export single LP executor to CSV by --id (REST API) |
visualize_lp_executor.py | HTML dashboard for single LP executor by --id (REST API) |
| "No CLMM pool found for X-Y" | Token symbol mismatch | Use exact symbol from pool (e.g. Percolator not PRCLT) |
| "meteora/clmm is not ready" | Bot can't reach Gateway | Run Gateway as Docker container with --network host; dev-mode Gateway on macOS not reachable from containers |
| "Failed to load strategy" / password error | Missing .password_verification in bot conf | Copy from bots/credentials/master_account/.password_verification to bots/bots/instances/<bot>/conf/ |
candles_config / markets extra inputs | Stale script config format | Use minimal config: only controllers_config and script_file_name |
| Bot shows "stopped" in API but running in Docker | MQTT not connected | Bot is running but API can't see it via MQTT; check bot logs directly |