基于 SOC 职业分类
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
直接命令不会经过审查 Prompt;运行前请先检查来源。
npx skills add https://github.com/tools-only/X-Skills --skill lp-agent命令会保持在同一行。复制前请横向滚动并检查完整内容。
想先保存到本地?可下载 SkillsMP 当前能够提供的文件。
正在显示 SKILL.md
Index of Build Systems Skills
Coordination patterns for distributed dataflow systems including barriers, epochs, and distributed snapshots
Windowing, sessionization, time-series aggregation, and late data handling for streaming systems
| name | lp-agent |
| description | Run automated liquidity provision strategies on concentrated liquidity (CLMM) DEXs using Hummingbot API. |
| metadata | {"author":"hummingbot"} |
This skill helps you run automated liquidity provision strategies on concentrated liquidity (CLMM) DEXs using Hummingbot API.
Tasks (start with any):
Before using this skill, ensure hummingbot-api is running:
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.
Gateway is required for LP operations. Start it with:
python scripts/manage_gateway.py start
To avoid RPC rate limits, configure a custom Solana RPC endpoint:
python scripts/manage_gateway.py network solana-mainnet-beta --node-url https://your-rpc-endpoint.com
Use these scripts to find and explore Meteora DLMM pools before creating LP positions. Scripts are in this skill's scripts/ directory.
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 |
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.
# 1. Create LP Rebalancer config
python scripts/manage_controller.py create-config my_lp_config \
--pool <pool_address> \
--pair SOL-USDC \
--amount 100 \
--side 1 \
--width 0.5 \
--offset 0.01 \
--rebalance-seconds 60 \
--sell-max 100 \
--sell-min 75 \
--buy-max 90 \
--buy-min 70
# 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 | Description |
|---|---|
--amount | Position size in quote currency |
--side | 0=BOTH, 1=BUY (quote-only), 2=SELL (base-only) |
--width | Position width % (must fit bin_step limits) |
--rebalance-seconds | Seconds out-of-range before rebalancing |
--buy-max/--buy-min | Price limits for BUY positions (anchor points) |
--sell-max/--sell-min | Price limits for SELL positions (anchor points) |
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 | Auto-close when price above range (for limit orders) |
--auto-close-below | Auto-close when price below range (for limit orders) |
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
Use the analysis scripts to export data and generate visual dashboards. Scripts are in this skill's scripts/ directory.
LP position events (ADD/REMOVE) are recorded immediately when transactions complete on-chain, so analysis works for both running and stopped bots.
| Script | Purpose |
|---|---|
scripts/export_lp_positions.py | Export LP position events to CSV |
scripts/visualize_lp_positions.py | Generate HTML dashboard from position events |
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
Start LP Rebalancer:
# 1. Find pool
python scripts/list_meteora_pools.py --query SOL-USDC
# 2. Check bin_step
python scripts/get_meteora_pool.py <pool_address>
# 3. 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
# 4. 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
| Script | Purpose |
|---|---|
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 |
visualize_lp_positions.py | Generate HTML dashboard |
| 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 balance" | Not enough tokens | Check wallet has tokens + 0.06 SOL for rent |