lp-agent

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

lp-agent

lp-agent

This skill manages concentrated liquidity (CLMM) positions on decentralized exchanges like Meteora (Solana) and Raydium. It provides automated LP position management with rebalancing capabilities similar to the LP Manager controller.
该Skill用于在Meteora(Solana链)、Raydium等去中心化交易所(DEX)上管理集中流动性(CLMM)头寸,提供类似LP Manager控制器的自动化LP头寸管理及重新平衡功能。

Prerequisites

前置条件

Before using this skill, ensure hummingbot-api and MCP are running:
bash
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/lp-agent/scripts/check_prerequisites.sh)
If not installed, use the
hummingbot-deploy
skill first.
使用该Skill前,请确保hummingbot-api和MCP已运行:
bash
bash <(curl -s https://raw.githubusercontent.com/hummingbot/skills/main/skills/lp-agent/scripts/check_prerequisites.sh)
若未安装,请先使用
hummingbot-deploy
Skill。

Quick Start

快速开始

1. Find a Pool

1. 查找资金池

Use the
manage_gateway_clmm
MCP tool:
undefined
使用
manage_gateway_clmm
MCP工具:
undefined

List popular pools on Meteora

列出Meteora上的热门资金池

manage_gateway_clmm(action="list_pools", connector="meteora")
manage_gateway_clmm(action="list_pools", connector="meteora")

Search for specific pools

搜索特定资金池

manage_gateway_clmm(action="list_pools", connector="meteora", search_term="SOL")
manage_gateway_clmm(action="list_pools", connector="meteora", search_term="SOL")

Get detailed pool info

获取资金池详细信息

manage_gateway_clmm(action="get_pool_info", connector="meteora", network="solana-mainnet-beta", pool_address="<address>")
undefined
manage_gateway_clmm(action="get_pool_info", connector="meteora", network="solana-mainnet-beta", pool_address="<address>")
undefined

2. Create LP Position

2. 创建LP头寸

undefined
undefined

First, see the LP executor config schema

首先查看LP执行器的配置 schema

manage_executors(executor_type="lp_executor")
manage_executors(executor_type="lp_executor")

Create position with quote only (buy base as price drops)

创建仅使用报价代币的头寸(价格下跌时买入基础代币)

manage_executors( action="create", executor_config={ "type": "lp_executor", "connector_name": "meteora/clmm", "pool_address": "<pool_address>", "trading_pair": "SOL-USDC", "base_token": "SOL", "quote_token": "USDC", "base_amount": 0, "quote_amount": 100, "lower_price": 180, "upper_price": 200, "side": 1 } )

**Side values:**
- `0` = Both-sided (base + quote)
- `1` = Buy (quote-only, range below current price)
- `2` = Sell (base-only, range above current price)

**IMPORTANT - Verify Position Creation:**

After creating an executor, you MUST verify the position was actually created on-chain. Follow these steps:

**Step 1: Get the executor ID from the creation response**
The `manage_executors(action="create")` call returns the executor_id. Use this ID for verification.

**Step 2: Poll executor state until it changes from OPENING**
manage_executors(action="get", executor_id="<executor_id>")

Check `custom_info.state`:
- `OPENING` → Transaction in progress, **wait 5-10 seconds and check again**
- `IN_RANGE` or `OUT_OF_RANGE` → Position created successfully ✓
- `FAILED` or `RETRIES_EXCEEDED` → Transaction failed ✗

**Step 3: Confirm position exists on-chain**
Even if state shows success, verify the position actually exists:
manage_gateway_clmm( action="get_positions", connector="meteora", network="solana-mainnet-beta", pool_address="<pool_address>" )

The response should contain a position with matching `lower_price` and `upper_price`.

**If verification fails:**
1. Stop the failed executor: `manage_executors(action="stop", executor_id="<id>", keep_position=false)`
2. Check the error in `custom_info.error` if available
3. Common issues: range too wide (reduce width), insufficient balance, network congestion

**IMPORTANT - Range Width Limits (check BEFORE opening position):**

Meteora DLMM pools have bin limits. Each bin represents a small price increment based on `bin_step`:
- `bin_step=1` → Each bin is 0.01% apart
- `bin_step=10` → Each bin is 0.1% apart
- `bin_step=100` → Each bin is 1% apart

**Maximum bins per position is ~69 due to Solana account size limits.**

Calculate maximum range width:
max_width_pct = bin_step * 69 / 100 user_width_pct = (upper_price - lower_price) / lower_price * 100

**Before creating any position, the agent MUST:**
1. Get pool info: `manage_gateway_clmm(action="get_pool_info", connector="meteora", network="solana-mainnet-beta", pool_address="<address>")`
2. Extract `bin_step` from response
3. Calculate `max_width_pct = bin_step * 69 / 100`
4. If user's range exceeds max, **warn user and suggest narrower range**
5. Check wallet balance: user needs token amounts + **at least 0.06 SOL for position rent**
   - Use `get_portfolio_overview` to check balances
   - Warn if insufficient SOL or token balance

Examples:
- `bin_step=1`: max ~0.69% width
- `bin_step=10`: max ~6.9% width
- `bin_step=100`: max ~69% width
manage_executors( action="create", executor_config={ "type": "lp_executor", "connector_name": "meteora/clmm", "pool_address": "<pool_address>", "trading_pair": "SOL-USDC", "base_token": "SOL", "quote_token": "USDC", "base_amount": 0, "quote_amount": 100, "lower_price": 180, "upper_price": 200, "side": 1 } )

**Side参数取值:**
- `0` = 双币种(基础代币+报价代币)
- `1` = 买入(仅用报价代币,头寸区间低于当前价格)
- `2` = 卖出(仅用基础代币,头寸区间高于当前价格)

**重要提示 - 验证头寸创建:**

创建执行器后,您必须验证头寸是否已成功链上创建。请遵循以下步骤:

**步骤1:从创建响应中获取执行器ID**
调用`manage_executors(action="create")`会返回executor_id,请使用该ID进行验证。

**步骤2:轮询执行器状态,直到其从OPENING状态变更**
manage_executors(action="get", executor_id="<executor_id>")

检查`custom_info.state`:
- `OPENING` → 交易正在进行中,请**等待5-10秒后再次检查**
- `IN_RANGE` 或 `OUT_OF_RANGE` → 头寸创建成功 ✓
- `FAILED` 或 `RETRIES_EXCEEDED` → 交易失败 ✗

**步骤3:确认头寸已链上存在**
即使状态显示成功,也请验证头寸是否实际存在:
manage_gateway_clmm( action="get_positions", connector="meteora", network="solana-mainnet-beta", pool_address="<pool_address>" )

响应中应包含一个`lower_price`和`upper_price`匹配的头寸。

**若验证失败:**
1. 停止失败的执行器:`manage_executors(action="stop", executor_id="<id>", keep_position=false)`
2. 若有可用信息,请查看`custom_info.error`中的错误内容
3. 常见问题:区间过宽(缩小区间宽度)、余额不足、网络拥堵

**重要提示 - 区间宽度限制(创建头寸前务必检查):**

Meteora DLMM资金池有仓位(bin)限制。每个仓位代表基于`bin_step`的小幅价格增量:
- `bin_step=1` → 每个仓位间隔0.01%
- `bin_step=10` → 每个仓位间隔0.1%
- `bin_step=100` → 每个仓位间隔1%

**每个头寸最多可包含约69个仓位,受Solana账户大小限制。**

计算最大区间宽度:
max_width_pct = bin_step * 69 / 100 user_width_pct = (upper_price - lower_price) / lower_price * 100

**创建任何头寸前,Agent必须:**
1. 获取资金池信息:`manage_gateway_clmm(action="get_pool_info", connector="meteora", network="solana-mainnet-beta", pool_address="<address>")`
2. 从响应中提取`bin_step`
3. 计算`max_width_pct = bin_step * 69 / 100`
4. 若用户设置的区间超过最大值,**向用户发出警告并建议缩小区间**
5. 检查钱包余额:用户需要持有对应代币金额 + **至少0.06 SOL作为头寸租金**
   - 使用`get_portfolio_overview`检查余额
   - 若SOL或代币余额不足,发出警告

示例:
- `bin_step=1`:最大约0.69%宽度
- `bin_step=10`:最大约6.9%宽度
- `bin_step=100`:最大约69%宽度

3. Set Default Preferences (Optional)

3. 设置默认偏好(可选)

Save commonly-used settings to avoid repeating them. Ask user which values they want to default:
undefined
保存常用设置,避免重复输入。询问用户希望将哪些值设为默认:
undefined

View current preferences

查看当前偏好设置

manage_executors(action="get_preferences")
manage_executors(action="get_preferences")

Save connector/pair defaults when creating

创建时保存连接器/交易对默认值

manage_executors( action="create", executor_config={ "type": "lp_executor", "connector_name": "meteora/clmm", "trading_pair": "SOL-USDC", ... }, save_as_default=true )

**What can be defaulted:**
- `connector_name` - e.g., `meteora/clmm` (must include `/clmm` suffix)
- `trading_pair` - e.g., `SOL-USDC`
- `extra_params.strategyType` - Meteora only: 0=Spot, 1=Curve, 2=Bid-Ask

**What should NOT be defaulted:**
- `side` - Determined by amounts at creation time
- `base_token`/`quote_token` - Inferred from trading_pair
- `lower_price`/`upper_price` - Market-dependent

Defaults stored at `~/.hummingbot_mcp/executor_preferences.md`.
manage_executors( action="create", executor_config={ "type": "lp_executor", "connector_name": "meteora/clmm", "trading_pair": "SOL-USDC", ... }, save_as_default=true )

**可设为默认的项:**
- `connector_name` - 例如`meteora/clmm`(必须包含`/clmm`后缀)
- `trading_pair` - 例如`SOL-USDC`
- `extra_params.strategyType` - 仅Meteora支持:0=现货,1=曲线,2=买卖报价

**不应设为默认的项:**
- `side` - 创建时由代币金额决定
- `base_token`/`quote_token` - 从交易对自动推断
- `lower_price`/`upper_price` - 取决于市场情况

默认设置存储在`~/.hummingbot_mcp/executor_preferences.md`。

4. Monitor Positions

4. 监控头寸

undefined
undefined

List all LP positions

列出所有LP头寸

manage_executors(action="search", executor_types=["lp_executor"])
manage_executors(action="search", executor_types=["lp_executor"])

Get specific position details

获取特定头寸详情

manage_executors(action="get", executor_id="<executor_id>")
manage_executors(action="get", executor_id="<executor_id>")

Get positions summary

获取头寸汇总

manage_executors(action="get_summary")
undefined
manage_executors(action="get_summary")
undefined

5. Manage Positions

5. 管理头寸

undefined
undefined

Collect fees (via Gateway CLMM)

收取手续费(通过Gateway CLMM)

manage_gateway_clmm( action="collect_fees", connector="meteora", network="solana-mainnet-beta", position_address="<position_nft_address>" )
manage_gateway_clmm( action="collect_fees", connector="meteora", network="solana-mainnet-beta", position_address="<position_nft_address>" )

Close position

关闭头寸

manage_executors(action="stop", executor_id="<executor_id>", keep_position=false)
undefined
manage_executors(action="stop", executor_id="<executor_id>", keep_position=false)
undefined

Position Types

头寸类型

Double-Sided (Both Tokens)

双币种(两种代币)

Provide liquidity with both base and quote tokens. Best when you expect price to stay within range.
     Lower          Current         Upper
       |---------------|---------------|
       |<-- Quote zone | Base zone -->|
  • Price goes UP: You sell base, accumulate quote
  • Price goes DOWN: You buy base with quote
同时提供基础代币和报价代币的流动性,适合预期价格维持在区间内的场景。
     下限价格          当前价格         上限价格
       |---------------|---------------|
       |<-- 报价代币区域 | 基础代币区域 -->|
  • 价格上涨:卖出基础代币,累积报价代币
  • 价格下跌:用报价代币买入基础代币

Single-Sided: Quote Only (side=1)

单币种:仅报价代币(side=1)

Position entire range BELOW current price. You're buying base as price drops.
     Lower          Upper    Current
       |---------------|--------|
       |<---- Buy zone ---->|
头寸区间完全低于当前价格,价格下跌时买入基础代币。
     下限价格          上限价格    当前价格
       |---------------|--------|
       |<---- 买入区域 ---->|

Single-Sided: Base Only (side=2)

单币种:仅基础代币(side=2)

Position entire range ABOVE current price. You're selling base as price rises.
                   Current    Lower          Upper
                      |--------|---------------|
                               |<-- Sell zone -->|
头寸区间完全高于当前价格,价格上涨时卖出基础代币。
                   当前价格    下限价格          上限价格
                      |--------|---------------|
                               |<-- 卖出区域 -->|

Rebalancing Strategy (Agent-Driven)

重新平衡策略(Agent驱动)

When price moves out of your position range, the agent handles rebalancing automatically.
当价格移出您的头寸区间时,Agent会自动处理重新平衡。

Step 1: Monitor Position State

步骤1:监控头寸状态

manage_executors(action="get", executor_id="<id>")
Check
custom_info.state
:
  • IN_RANGE
    → No action needed
  • OUT_OF_RANGE
    → Wait for rebalance delay, then rebalance
Rebalance delay: Wait for position to be out of range for a set time (default: 60 seconds). Ask user to confirm delay before starting.
manage_executors(action="get", executor_id="<id>")
检查
custom_info.state
  • IN_RANGE
    → 无需操作
  • OUT_OF_RANGE
    → 等待重新平衡延迟后执行重新平衡
重新平衡延迟: 等待头寸处于区间外达到设定时长(默认:60秒),开始前请确认用户是否同意该延迟。

Step 2: Determine Rebalance Direction

步骤2:确定重新平衡方向

Compare
custom_info.current_price
with
custom_info.lower_price
and
custom_info.upper_price
:
If current_price < lower_price (price dropped below range):
  • You're now holding mostly BASE tokens
  • Strategy: Create BASE-ONLY position ABOVE current price
  • This lets you sell base as price recovers
If current_price > upper_price (price rose above range):
  • You're now holding mostly QUOTE tokens
  • Strategy: Create QUOTE-ONLY position BELOW current price
  • This lets you buy base if price drops
比较
custom_info.current_price
custom_info.lower_price
custom_info.upper_price
若current_price < lower_price(价格跌破区间下限):
  • 您当前持有大部分基础代币
  • 策略:在当前价格上方创建仅基础代币的头寸
  • 这样可在价格回升时卖出基础代币
若current_price > upper_price(价格涨破区间上限):
  • 您当前持有大部分报价代币
  • 策略:在当前价格下方创建仅报价代币的头寸
  • 这样可在价格下跌时买入基础代币

Step 3: Close Old Position

步骤3:关闭旧头寸

manage_executors(action="stop", executor_id="<old_id>", keep_position=false)
This returns tokens to wallet. Use the returned amounts for the new position.
manage_executors(action="stop", executor_id="<old_id>", keep_position=false)
操作后代币将返还至钱包,请使用返还的金额创建新头寸。

Step 4: Create New Single-Sided Position

步骤4:创建新的单币种头寸

Use tokens received from close. For position width W% (ask user, check bin_step limits):
Price below range → base-only position ABOVE current price (side=2):
new_lower_price = current_price
new_upper_price = current_price * (1 + W/100)
base_amount = <amount received from close>
quote_amount = 0
side = 2
Price above range → quote-only position BELOW current price (side=1):
new_lower_price = current_price * (1 - W/100)
new_upper_price = current_price
base_amount = 0
quote_amount = <amount received from close>
side = 1
manage_executors(action="create", executor_config={
    "type": "lp_executor",
    "connector_name": "<same_connector>",
    "pool_address": "<same_pool>",
    "trading_pair": "<same_pair>",
    "base_amount": <base_amount>,
    "quote_amount": <quote_amount>,
    "lower_price": <new_lower_price>,
    "upper_price": <new_upper_price>,
    "side": <side>
})
使用关闭旧头寸获得的代币。假设头寸宽度为W%(询问用户,同时检查bin_step限制):
价格低于区间下限 → 在当前价格上方创建仅基础代币的头寸(side=2):
new_lower_price = current_price
new_upper_price = current_price * (1 + W/100)
base_amount = <关闭头寸获得的金额>
quote_amount = 0
side = 2
价格高于区间上限 → 在当前价格下方创建仅报价代币的头寸(side=1):
new_lower_price = current_price * (1 - W/100)
new_upper_price = current_price
base_amount = 0
quote_amount = <关闭头寸获得的金额>
side = 1
manage_executors(action="create", executor_config={
    "type": "lp_executor",
    "connector_name": "<同一连接器>",
    "pool_address": "<同一资金池>",
    "trading_pair": "<同一交易对>",
    "base_amount": <base_amount>,
    "quote_amount": <quote_amount>,
    "lower_price": <new_lower_price>,
    "upper_price": <new_upper_price>,
    "side": <side>
})

Step 5: Verify New Position

步骤5:验证新头寸

manage_executors(action="get", executor_id="<new_id>")
Confirm
custom_info.state
is
IN_RANGE
or
OUT_OF_RANGE
(not
OPENING
or
FAILED
).
manage_executors(action="get", executor_id="<new_id>")
确认
custom_info.state
IN_RANGE
OUT_OF_RANGE
(而非
OPENING
FAILED
)。

MCP Tools Reference

MCP工具参考

manage_gateway_clmm

manage_gateway_clmm

ActionParametersDescription
list_pools
connector, search_term, sort_key, limitBrowse available pools
get_pool_info
connector, network, pool_addressGet pool details
get_positions
connector, network, pool_addressGet positions in a pool
open_position
connector, network, pool_address, lower_price, upper_price, base_token_amount, quote_token_amountOpen position directly
close_position
connector, network, position_addressClose position
collect_fees
connector, network, position_addressCollect accumulated fees
操作参数描述
list_pools
connector, search_term, sort_key, limit浏览可用资金池
get_pool_info
connector, network, pool_address获取资金池详情
get_positions
connector, network, pool_address获取资金池中的头寸
open_position
connector, network, pool_address, lower_price, upper_price, base_token_amount, quote_token_amount直接创建头寸
close_position
connector, network, position_address关闭头寸
collect_fees
connector, network, position_address收取累积的手续费

manage_executors

manage_executors

ActionParametersDescription
(none)executor_type="lp_executor"Show config schema with your defaults
create
executor_config, save_as_defaultCreate LP executor (optionally save as default)
search
executor_types=["lp_executor"]List LP executors
get
executor_idGet executor details
stop
executor_id, keep_positionStop executor
get_summary
-Get overall summary
get_preferences
-View preferences file
save_preferences
preferences_contentSave edited preferences
reset_preferences
-Reset to default template
操作参数描述
(无)executor_type="lp_executor"显示包含您默认设置的配置schema
create
executor_config, save_as_default创建LP执行器(可选择保存为默认设置)
search
executor_types=["lp_executor"]列出LP执行器
get
executor_id获取执行器详情
stop
executor_id, keep_position停止执行器
get_summary
-获取整体汇总
get_preferences
-查看偏好设置文件
save_preferences
preferences_content保存编辑后的偏好设置
reset_preferences
-重置为默认模板

Scripts

脚本

ScriptPurpose
check_prerequisites.sh
Verify API, Gateway, wallet setup
脚本用途
check_prerequisites.sh
验证API、Gateway、钱包设置

LP Executor Config Schema

LP Executor配置Schema

json
{
    "type": "lp_executor",
    "connector_name": "meteora/clmm",
    "pool_address": "2sfXxxxx...",
    "trading_pair": "SOL-USDC",
    "base_token": "SOL",
    "quote_token": "USDC",
    "base_amount": 0,
    "quote_amount": 100,
    "lower_price": 70,
    "upper_price": 90,
    "side": 1,
    "extra_params": {
        "strategyType": 0
    }
}
Fields:
  • connector_name
    : CLMM connector - append
    /clmm
    to connector name (e.g.,
    meteora/clmm
    )
  • pool_address
    : Pool contract address
  • trading_pair
    : Format "BASE-QUOTE"
  • base_amount
    /
    quote_amount
    : Token amounts (set one to 0 for single-sided)
  • lower_price
    /
    upper_price
    : Position price bounds
  • side
    : 0=both, 1=buy (quote-only), 2=sell (base-only)
  • extra_params
    : Connector-specific (Meteora strategyType: 0=Spot, 1=Curve, 2=Bid-Ask)
Supported Connectors:
  • meteora/clmm
    - Tested and fully supported
  • Other Gateway CLMM connectors - Should work but not yet tested
To list available CLMM connectors:
manage_gateway_config(resource_type="connectors", action="list")
Append
/clmm
to any CLMM connector name when creating executors.
json
{
    "type": "lp_executor",
    "connector_name": "meteora/clmm",
    "pool_address": "2sfXxxxx...",
    "trading_pair": "SOL-USDC",
    "base_token": "SOL",
    "quote_token": "USDC",
    "base_amount": 0,
    "quote_amount": 100,
    "lower_price": 70,
    "upper_price": 90,
    "side": 1,
    "extra_params": {
        "strategyType": 0
    }
}
字段说明:
  • connector_name
    : CLMM连接器 - 连接器名称后需追加
    /clmm
    (例如
    meteora/clmm
  • pool_address
    : 资金池合约地址
  • trading_pair
    : 格式为"BASE-QUOTE"
  • base_amount
    /
    quote_amount
    : 代币金额(单币种头寸需将其中一项设为0)
  • lower_price
    /
    upper_price
    : 头寸价格区间
  • side
    : 0=双币种, 1=买入(仅报价代币), 2=卖出(仅基础代币)
  • extra_params
    : 连接器特定参数(Meteora的strategyType:0=现货, 1=曲线, 2=买卖报价)
支持的连接器:
  • meteora/clmm
    - 已测试并完全支持
  • 其他Gateway CLMM连接器 - 理论可用但尚未测试
列出可用CLMM连接器:
manage_gateway_config(resource_type="connectors", action="list")
创建执行器时,请在任何CLMM连接器名称后追加
/clmm

Example: Full LP Management Flow

示例:完整LP管理流程

undefined
undefined

1. Check prerequisites

1. 检查前置条件

2. Find a pool

2. 查找资金池

manage_gateway_clmm(action="list_pools", connector="meteora", search_term="SOL", sort_key="volume")
manage_gateway_clmm(action="list_pools", connector="meteora", search_term="SOL", sort_key="volume")

3. Get pool details (note the bin_step for range calculation)

3. 获取资金池详情(记录bin_step用于区间计算)

manage_gateway_clmm(action="get_pool_info", connector="meteora", network="solana-mainnet-beta", pool_address="2sfXxxxx")
manage_gateway_clmm(action="get_pool_info", connector="meteora", network="solana-mainnet-beta", pool_address="2sfXxxxx")

Example response shows: bin_step=10, current_price=190

示例响应显示:bin_step=10, current_price=190

Max range width = 10 * 69 / 100 = 6.9%

最大区间宽度 = 10 * 69 / 100 = 6.9%

Use conservative 5% width: lower=185.5, upper=194.5

保守选择5%宽度:下限=185.5, 上限=194.5

4. Create position

4. 创建头寸

manage_executors(action="create", executor_config={ "type": "lp_executor", "connector_name": "meteora/clmm", "pool_address": "2sfXxxxx", "trading_pair": "SOL-USDC", "base_token": "SOL", "quote_token": "USDC", "base_amount": 0, "quote_amount": 100, "lower_price": 185.5, "upper_price": 194.5, "side": 1 })
manage_executors(action="create", executor_config={ "type": "lp_executor", "connector_name": "meteora/clmm", "pool_address": "2sfXxxxx", "trading_pair": "SOL-USDC", "base_token": "SOL", "quote_token": "USDC", "base_amount": 0, "quote_amount": 100, "lower_price": 185.5, "upper_price": 194.5, "side": 1 })

5. VERIFY position was created (critical step!)

5. 验证头寸是否创建成功(关键步骤!)

manage_executors(action="get", executor_id="<id>")
manage_executors(action="get", executor_id="<id>")

Check custom_info.state:

检查custom_info.state:

- "OPENING" → wait and check again

- "OPENING" → 等待后再次检查

- "IN_RANGE" or "OUT_OF_RANGE" → success!

- "IN_RANGE" 或 "OUT_OF_RANGE" → 创建成功!

- "FAILED" → check error, possibly reduce range width

- "FAILED" → 检查错误信息,可能需要缩小区间宽度

6. Monitor position

6. 监控头寸

manage_executors(action="get", executor_id="<id>")
manage_executors(action="get", executor_id="<id>")

7. If out of range for 60+ seconds, rebalance (see Rebalancing Strategy)

7. 若头寸超出区间达60秒以上,执行重新平衡(参考重新平衡策略)

- Close: manage_executors(action="stop", executor_id="<id>", keep_position=false)

- 关闭旧头寸:manage_executors(action="stop", executor_id="<id>", keep_position=false)

- Reopen with tokens received as single-sided position

- 使用获得的代币创建新的单币种头寸

8. When done, close

8. 操作完成后关闭头寸

manage_executors(action="stop", executor_id="<id>", keep_position=false)
undefined
manage_executors(action="stop", executor_id="<id>", keep_position=false)
undefined

Error Handling

错误处理

ErrorCauseSolution
"Prerequisites not met"API or MCP not runningRun
hummingbot-deploy
skill
"Pool not found"Invalid pool addressUse list_pools to find valid pools
"Insufficient balance"Not enough tokensCheck wallet balance, reduce amounts
"Position not in range"Price outside boundsWait or rebalance
"InvalidRealloc"Position range spans too many binsReduce range width (see bin_step limits above)
State stuck at "OPENING"Transaction failed silentlyStop executor and retry with narrower range
错误原因解决方案
"Prerequisites not met"API或MCP未运行运行
hummingbot-deploy
Skill
"Pool not found"资金池地址无效使用list_pools查找有效资金池
"Insufficient balance"代币余额不足检查钱包余额,减少代币金额
"Position not in range"价格超出区间等待或执行重新平衡
"InvalidRealloc"头寸区间包含过多仓位缩小区间宽度(参考上述bin_step限制)
状态持续为"OPENING"交易静默失败停止执行器并尝试使用更窄的区间重新创建