Skip to content

Commit 9a4d958

Browse files
fengtalityclaude
andcommitted
feat: add LP executor support
- Add lp_executor to list_types output - Add lp_executor.md guide for LP position management - Show wallet_address in CLMM and swap responses Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 1a03236 commit 9a4d958

File tree

4 files changed

+56
-1
lines changed

4 files changed

+56
-1
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
### LP Executor
2+
Manages liquidity provider positions on CLMM DEXs (Meteora, Raydium).
3+
Opens positions within price bounds, monitors range status, tracks fees.
4+
5+
**Use when:**
6+
- Providing liquidity on Solana DEXs
7+
- Want automated position monitoring and fee tracking
8+
- Earning trading fees from LP positions
9+
10+
**Avoid when:**
11+
- Trading on CEX (use other executors)
12+
- Want directional exposure only
13+
- Not familiar with impermanent loss risks
14+
15+
#### State Machine
16+
17+
```
18+
NOT_ACTIVE → OPENING → IN_RANGE ↔ OUT_OF_RANGE → CLOSING → COMPLETE
19+
```
20+
21+
- **NOT_ACTIVE**: Initial state, no position yet
22+
- **OPENING**: Transaction submitted to open position
23+
- **IN_RANGE**: Position active, current price within bounds
24+
- **OUT_OF_RANGE**: Position active but price outside bounds (no fees earned)
25+
- **CLOSING**: Transaction submitted to close position
26+
- **COMPLETE**: Position closed, executor finished
27+
28+
#### Key Parameters
29+
30+
**Required:**
31+
- `connector_name`: CLMM connector (e.g., `meteora`, `raydiumclmm`)
32+
- `trading_pair`: Token pair (e.g., `SOL-USDC`)
33+
- `pool_address`: Pool contract address
34+
- `lower_price` / `upper_price`: Price range bounds
35+
36+
**Liquidity:**
37+
- `base_amount`: Amount of base token to provide
38+
- `quote_amount`: Amount of quote token to provide
39+
- `side`: Position side (0=BOTH, 1=BUY/quote-only, 2=SELL/base-only)
40+
41+
**Position Management:**
42+
- `keep_position=false` (default): Close LP position when executor stops
43+
- `keep_position=true`: Leave position open on-chain, stop monitoring only
44+
45+
#### Meteora Strategy Types (extra_params.strategyType)
46+
47+
- `0`: **Spot** — Uniform liquidity across range
48+
- `1`: **Curve** — Concentrated around current price
49+
- `2`: **Bid-Ask** — Liquidity at range edges

hummingbot_mcp/tools/executors.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ async def manage_executors(client: Any, request: ManageExecutorsRequest) -> dict
7676
"- **position_executor** — Directional trading with entry, stop-loss, and take-profit\n"
7777
"- **dca_executor** — Dollar-cost averaging for gradual position building\n"
7878
"- **grid_executor** — Grid trading across multiple price levels in ranging markets\n"
79-
"- **order_executor** — Simple BUY/SELL order with execution strategy\n\n"
79+
"- **order_executor** — Simple BUY/SELL order with execution strategy\n"
80+
"- **lp_executor** — Liquidity provision on CLMM DEXs (Meteora, Raydium)\n\n"
8081
"Provide `executor_type` to see the configuration schema."
8182
)
8283

hummingbot_mcp/tools/gateway_clmm.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ async def manage_gateway_clmm_positions(client: Any, request: GatewayCLMMRequest
250250
"connector": request.connector,
251251
"network": request.network,
252252
"pool_address": request.pool_address,
253+
"wallet_address": request.wallet_address or "(default)",
253254
"price_range": {
254255
"lower_price": request.lower_price,
255256
"upper_price": request.upper_price
@@ -281,6 +282,7 @@ async def manage_gateway_clmm_positions(client: Any, request: GatewayCLMMRequest
281282
"connector": request.connector,
282283
"network": request.network,
283284
"position_address": request.position_address,
285+
"wallet_address": request.wallet_address or "(default)",
284286
"result": result
285287
}
286288

@@ -308,6 +310,7 @@ async def manage_gateway_clmm_positions(client: Any, request: GatewayCLMMRequest
308310
"connector": request.connector,
309311
"network": request.network,
310312
"position_address": request.position_address,
313+
"wallet_address": request.wallet_address or "(default)",
311314
"result": result
312315
}
313316

@@ -335,6 +338,7 @@ async def manage_gateway_clmm_positions(client: Any, request: GatewayCLMMRequest
335338
"connector": request.connector,
336339
"network": request.network,
337340
"pool_address": request.pool_address,
341+
"wallet_address": request.wallet_address or "(default)",
338342
"result": result
339343
}
340344

hummingbot_mcp/tools/gateway_swap.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ async def manage_gateway_swaps(client: Any, request: GatewaySwapRequest) -> dict
101101
"trading_pair": request.trading_pair,
102102
"side": request.side,
103103
"amount": request.amount,
104+
"wallet_address": request.wallet_address or "(default)",
104105
"result": result
105106
}
106107

0 commit comments

Comments
 (0)