From 9a4d958c40c6de979b6f56c7396dbc472e52768f Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Wed, 4 Feb 2026 13:07:51 -0700 Subject: [PATCH 01/11] 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 --- hummingbot_mcp/guides/lp_executor.md | 49 ++++++++++++++++++++++++++++ hummingbot_mcp/tools/executors.py | 3 +- hummingbot_mcp/tools/gateway_clmm.py | 4 +++ hummingbot_mcp/tools/gateway_swap.py | 1 + 4 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 hummingbot_mcp/guides/lp_executor.md diff --git a/hummingbot_mcp/guides/lp_executor.md b/hummingbot_mcp/guides/lp_executor.md new file mode 100644 index 0000000..75459ca --- /dev/null +++ b/hummingbot_mcp/guides/lp_executor.md @@ -0,0 +1,49 @@ +### LP Executor +Manages liquidity provider positions on CLMM DEXs (Meteora, Raydium). +Opens positions within price bounds, monitors range status, tracks fees. + +**Use when:** +- Providing liquidity on Solana DEXs +- Want automated position monitoring and fee tracking +- Earning trading fees from LP positions + +**Avoid when:** +- Trading on CEX (use other executors) +- Want directional exposure only +- Not familiar with impermanent loss risks + +#### State Machine + +``` +NOT_ACTIVE → OPENING → IN_RANGE ↔ OUT_OF_RANGE → CLOSING → COMPLETE +``` + +- **NOT_ACTIVE**: Initial state, no position yet +- **OPENING**: Transaction submitted to open position +- **IN_RANGE**: Position active, current price within bounds +- **OUT_OF_RANGE**: Position active but price outside bounds (no fees earned) +- **CLOSING**: Transaction submitted to close position +- **COMPLETE**: Position closed, executor finished + +#### Key Parameters + +**Required:** +- `connector_name`: CLMM connector (e.g., `meteora`, `raydiumclmm`) +- `trading_pair`: Token pair (e.g., `SOL-USDC`) +- `pool_address`: Pool contract address +- `lower_price` / `upper_price`: Price range bounds + +**Liquidity:** +- `base_amount`: Amount of base token to provide +- `quote_amount`: Amount of quote token to provide +- `side`: Position side (0=BOTH, 1=BUY/quote-only, 2=SELL/base-only) + +**Position Management:** +- `keep_position=false` (default): Close LP position when executor stops +- `keep_position=true`: Leave position open on-chain, stop monitoring only + +#### Meteora Strategy Types (extra_params.strategyType) + +- `0`: **Spot** — Uniform liquidity across range +- `1`: **Curve** — Concentrated around current price +- `2`: **Bid-Ask** — Liquidity at range edges diff --git a/hummingbot_mcp/tools/executors.py b/hummingbot_mcp/tools/executors.py index c8ec356..1189ff8 100644 --- a/hummingbot_mcp/tools/executors.py +++ b/hummingbot_mcp/tools/executors.py @@ -76,7 +76,8 @@ async def manage_executors(client: Any, request: ManageExecutorsRequest) -> dict "- **position_executor** — Directional trading with entry, stop-loss, and take-profit\n" "- **dca_executor** — Dollar-cost averaging for gradual position building\n" "- **grid_executor** — Grid trading across multiple price levels in ranging markets\n" - "- **order_executor** — Simple BUY/SELL order with execution strategy\n\n" + "- **order_executor** — Simple BUY/SELL order with execution strategy\n" + "- **lp_executor** — Liquidity provision on CLMM DEXs (Meteora, Raydium)\n\n" "Provide `executor_type` to see the configuration schema." ) diff --git a/hummingbot_mcp/tools/gateway_clmm.py b/hummingbot_mcp/tools/gateway_clmm.py index f0ad242..85cb747 100644 --- a/hummingbot_mcp/tools/gateway_clmm.py +++ b/hummingbot_mcp/tools/gateway_clmm.py @@ -250,6 +250,7 @@ async def manage_gateway_clmm_positions(client: Any, request: GatewayCLMMRequest "connector": request.connector, "network": request.network, "pool_address": request.pool_address, + "wallet_address": request.wallet_address or "(default)", "price_range": { "lower_price": request.lower_price, "upper_price": request.upper_price @@ -281,6 +282,7 @@ async def manage_gateway_clmm_positions(client: Any, request: GatewayCLMMRequest "connector": request.connector, "network": request.network, "position_address": request.position_address, + "wallet_address": request.wallet_address or "(default)", "result": result } @@ -308,6 +310,7 @@ async def manage_gateway_clmm_positions(client: Any, request: GatewayCLMMRequest "connector": request.connector, "network": request.network, "position_address": request.position_address, + "wallet_address": request.wallet_address or "(default)", "result": result } @@ -335,6 +338,7 @@ async def manage_gateway_clmm_positions(client: Any, request: GatewayCLMMRequest "connector": request.connector, "network": request.network, "pool_address": request.pool_address, + "wallet_address": request.wallet_address or "(default)", "result": result } diff --git a/hummingbot_mcp/tools/gateway_swap.py b/hummingbot_mcp/tools/gateway_swap.py index 335e916..5fb5949 100644 --- a/hummingbot_mcp/tools/gateway_swap.py +++ b/hummingbot_mcp/tools/gateway_swap.py @@ -101,6 +101,7 @@ async def manage_gateway_swaps(client: Any, request: GatewaySwapRequest) -> dict "trading_pair": request.trading_pair, "side": request.side, "amount": request.amount, + "wallet_address": request.wallet_address or "(default)", "result": result } From 3a0cc85ea53ab8f74080663724eff9689e2714f0 Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Wed, 4 Feb 2026 14:35:47 -0700 Subject: [PATCH 02/11] chore: add .mcp.json and .vscode to gitignore Co-Authored-By: Claude Opus 4.5 --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 0a19790..4726657 100644 --- a/.gitignore +++ b/.gitignore @@ -172,3 +172,7 @@ cython_debug/ # PyPI configuration file .pypirc + +# Local config +.mcp.json +.vscode/ From 4ba4d1735e79c95f3860756996e7db1e362cc62f Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Wed, 4 Feb 2026 15:15:52 -0700 Subject: [PATCH 03/11] docs: document defaultWallet access via network config manage_gateway_config now documents that: - GET networks returns merged chain + network config including defaultWallet - UPDATE networks can modify chain-level fields like defaultWallet This works with the Gateway changes that merge chain config into network config. Co-Authored-By: Claude Opus 4.5 --- hummingbot_mcp/server.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hummingbot_mcp/server.py b/hummingbot_mcp/server.py index 5c1d688..3e10b99 100644 --- a/hummingbot_mcp/server.py +++ b/hummingbot_mcp/server.py @@ -958,11 +958,17 @@ async def manage_gateway_config( Resource Types: - chains: Get all blockchain chains - networks: List/get/update network configurations (format: 'chain-network') + - GET returns merged chain + network config including: defaultWallet, defaultNetwork, rpcProvider, nodeURL, chainID, etc. + - UPDATE can modify both network-level fields (nodeURL, chainID) and chain-level fields (defaultWallet, defaultNetwork) - tokens: List/add/delete tokens per network - connectors: List/get/update DEX connector configurations - pools: List/add liquidity pools per connector/network - wallets: Add/delete wallets for blockchain chains + Examples: + - Get network config with defaultWallet: resource_type="networks", action="get", network_id="solana-mainnet-beta" + - Set default wallet: resource_type="networks", action="update", network_id="solana-mainnet-beta", config_updates={"defaultWallet": "wallet_address"} + Args: resource_type: Type of resource to manage action: Action to perform on the resource From f282d0521e1b3d5f367373cc1fa5b462437538f4 Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Wed, 4 Feb 2026 18:38:09 -0700 Subject: [PATCH 04/11] fix: correctly extract executor_id from create response The API returns 'executor_id' but MCP tool was looking for 'id'. Now checks both fields for compatibility. Co-Authored-By: Claude Opus 4.5 --- hummingbot_mcp/tools/executors.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hummingbot_mcp/tools/executors.py b/hummingbot_mcp/tools/executors.py index 1189ff8..04774f3 100644 --- a/hummingbot_mcp/tools/executors.py +++ b/hummingbot_mcp/tools/executors.py @@ -175,8 +175,10 @@ async def manage_executors(client: Any, request: ManageExecutorsRequest) -> dict if request.save_as_default: executor_preferences.update_defaults(executor_type, request.executor_config) + executor_id = result.get("executor_id") or result.get("id") + formatted = f"Executor created successfully!\n\n" - formatted += f"Executor ID: {result.get('id', 'N/A')}\n" + formatted += f"Executor ID: {executor_id or 'N/A'}\n" formatted += f"Type: {executor_type}\n" formatted += f"Account: {account}\n" @@ -185,7 +187,7 @@ async def manage_executors(client: Any, request: ManageExecutorsRequest) -> dict return { "action": "create", - "executor_id": result.get("id"), + "executor_id": executor_id, "executor_type": executor_type, "account": account, "config_used": merged_config, From a82def6b8d599f63c8d8ad0ccd5591d3cdd0dea9 Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Thu, 5 Feb 2026 18:11:00 -0700 Subject: [PATCH 05/11] feat: improve LP executor documentation and display custom_info - Add custom_info display to executor detail view - Document correct connector_name format (meteora/clmm) - Add warning about using manage_executors vs manage_gateway_clmm Co-Authored-By: Claude Opus 4.5 --- hummingbot_mcp/formatters/executors.py | 6 ++++++ hummingbot_mcp/guides/lp_executor.md | 11 ++++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/hummingbot_mcp/formatters/executors.py b/hummingbot_mcp/formatters/executors.py index 196d30e..cf0fc9d 100644 --- a/hummingbot_mcp/formatters/executors.py +++ b/hummingbot_mcp/formatters/executors.py @@ -204,6 +204,12 @@ def format_executor_detail(executor: dict[str, Any]) -> str: if close_timestamp is not None and close_timestamp != "N/A" and close_timestamp != 0: output += f"Closed: {format_timestamp(close_timestamp, '%Y-%m-%d %H:%M:%S')}\n" + # Always show custom_info if present + if custom_info: + output += "\nCustom Info:\n" + for key, value in custom_info.items(): + output += f" {key}: {value}\n" + return output diff --git a/hummingbot_mcp/guides/lp_executor.md b/hummingbot_mcp/guides/lp_executor.md index 75459ca..757f0d7 100644 --- a/hummingbot_mcp/guides/lp_executor.md +++ b/hummingbot_mcp/guides/lp_executor.md @@ -28,7 +28,8 @@ NOT_ACTIVE → OPENING → IN_RANGE ↔ OUT_OF_RANGE → CLOSING → COMPLETE #### Key Parameters **Required:** -- `connector_name`: CLMM connector (e.g., `meteora`, `raydiumclmm`) +- `connector_name`: CLMM connector in `connector/clmm` format (e.g., `meteora/clmm`, `raydiumclmm/clmm`) + - **IMPORTANT:** Must include the `/clmm` suffix — using just `meteora` will fail - `trading_pair`: Token pair (e.g., `SOL-USDC`) - `pool_address`: Pool contract address - `lower_price` / `upper_price`: Price range bounds @@ -47,3 +48,11 @@ NOT_ACTIVE → OPENING → IN_RANGE ↔ OUT_OF_RANGE → CLOSING → COMPLETE - `0`: **Spot** — Uniform liquidity across range - `1`: **Curve** — Concentrated around current price - `2`: **Bid-Ask** — Liquidity at range edges + +#### Important: Managing Positions + +**Always use the executor tool (`manage_executors`) to open and close LP positions — NOT the gateway CLMM tool directly.** + +- Opening/closing via `manage_gateway_clmm` bypasses the executor state machine and leaves the database out of sync +- Use `manage_executors` with `action="stop"` to properly close positions and update executor status +- If a position is closed externally (via gateway or UI), manually mark the executor as `TERMINATED` in the database From 5272ccf6ba998566bbf468f9b3b64a1ade0e6519 Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Thu, 5 Feb 2026 18:15:00 -0700 Subject: [PATCH 06/11] docs: add single-sided vs double-sided position guidance - Base-only = SELL position above price - Quote-only = BUY position below price - Both = ask user about centered vs custom range Co-Authored-By: Claude Opus 4.5 --- hummingbot_mcp/guides/lp_executor.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/hummingbot_mcp/guides/lp_executor.md b/hummingbot_mcp/guides/lp_executor.md index 757f0d7..c942721 100644 --- a/hummingbot_mcp/guides/lp_executor.md +++ b/hummingbot_mcp/guides/lp_executor.md @@ -39,6 +39,22 @@ NOT_ACTIVE → OPENING → IN_RANGE ↔ OUT_OF_RANGE → CLOSING → COMPLETE - `quote_amount`: Amount of quote token to provide - `side`: Position side (0=BOTH, 1=BUY/quote-only, 2=SELL/base-only) +#### Single-Sided vs Double-Sided Positions + +**Single-sided (one asset only):** +- **Base token only** (e.g., 0.2 SOL): Creates a SELL position (`side=2`) with range ABOVE current price + - Position starts out-of-range, enters range when price rises + - SOL converts to USDC as price moves up through the range +- **Quote token only** (e.g., 50 USDC): Creates a BUY position (`side=1`) with range BELOW current price + - Position starts out-of-range, enters range when price falls + - USDC converts to SOL as price moves down through the range + +**Double-sided (both assets):** +- When user specifies both `base_amount` and `quote_amount`, ask: + 1. **Centered range** around current price? (±50% of position width above/below current price) + 2. **Custom range**? (user specifies exact lower/upper bounds) +- Set `side=0` (BOTH) for double-sided positions + **Position Management:** - `keep_position=false` (default): Close LP position when executor stops - `keep_position=true`: Leave position open on-chain, stop monitoring only From c09e99176626b66d8534c66e02f2a0b5108f3bf5 Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Thu, 5 Feb 2026 18:17:12 -0700 Subject: [PATCH 07/11] docs: add guidance for verifying position status - Use get_positions to check on-chain state - Compare with executor custom_info.position_address - Manually update DB if out of sync Co-Authored-By: Claude Opus 4.5 --- hummingbot_mcp/guides/lp_executor.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hummingbot_mcp/guides/lp_executor.md b/hummingbot_mcp/guides/lp_executor.md index c942721..c0be75b 100644 --- a/hummingbot_mcp/guides/lp_executor.md +++ b/hummingbot_mcp/guides/lp_executor.md @@ -72,3 +72,8 @@ NOT_ACTIVE → OPENING → IN_RANGE ↔ OUT_OF_RANGE → CLOSING → COMPLETE - Opening/closing via `manage_gateway_clmm` bypasses the executor state machine and leaves the database out of sync - Use `manage_executors` with `action="stop"` to properly close positions and update executor status - If a position is closed externally (via gateway or UI), manually mark the executor as `TERMINATED` in the database + +**Verifying position status:** +- If uncertain about position status, use `manage_gateway_clmm` with `action="get_positions"` to check on-chain state +- Compare on-chain positions with executor `custom_info.position_address` +- If position is closed on-chain but executor still shows `RUNNING`, manually update executor status in database to `TERMINATED` From c8c4ad4234df64492e1098e0a65c25637b8e139c Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Thu, 5 Feb 2026 18:17:57 -0700 Subject: [PATCH 08/11] docs: add note about stuck OPENING state Co-Authored-By: Claude Opus 4.5 --- hummingbot_mcp/guides/lp_executor.md | 1 + 1 file changed, 1 insertion(+) diff --git a/hummingbot_mcp/guides/lp_executor.md b/hummingbot_mcp/guides/lp_executor.md index c0be75b..0f357a4 100644 --- a/hummingbot_mcp/guides/lp_executor.md +++ b/hummingbot_mcp/guides/lp_executor.md @@ -77,3 +77,4 @@ NOT_ACTIVE → OPENING → IN_RANGE ↔ OUT_OF_RANGE → CLOSING → COMPLETE - If uncertain about position status, use `manage_gateway_clmm` with `action="get_positions"` to check on-chain state - Compare on-chain positions with executor `custom_info.position_address` - If position is closed on-chain but executor still shows `RUNNING`, manually update executor status in database to `TERMINATED` +- If position is open on-chain but executor still shows `OPENING`, the executor should eventually sync — if stuck, check API logs for errors From c5b8b0986212a222cb0ec391851115f651162c4b Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Thu, 5 Feb 2026 18:25:31 -0700 Subject: [PATCH 09/11] docs: add exception handling for executor not found (404) When API restarts, executors may not exist in memory but positions remain on-chain. Use gateway CLMM to close and update DB manually. Co-Authored-By: Claude Opus 4.5 --- hummingbot_mcp/guides/lp_executor.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hummingbot_mcp/guides/lp_executor.md b/hummingbot_mcp/guides/lp_executor.md index 0f357a4..f6f267b 100644 --- a/hummingbot_mcp/guides/lp_executor.md +++ b/hummingbot_mcp/guides/lp_executor.md @@ -78,3 +78,8 @@ NOT_ACTIVE → OPENING → IN_RANGE ↔ OUT_OF_RANGE → CLOSING → COMPLETE - Compare on-chain positions with executor `custom_info.position_address` - If position is closed on-chain but executor still shows `RUNNING`, manually update executor status in database to `TERMINATED` - If position is open on-chain but executor still shows `OPENING`, the executor should eventually sync — if stuck, check API logs for errors + +**Exception: Executor not found in API (404 error):** +- If API was restarted, executors may no longer exist in memory but positions remain on-chain +- In this case, use `manage_gateway_clmm` with `action="close_position"` to close the on-chain position directly +- Then manually update the executor status in the database to `TERMINATED` From cc058d84de968b883499c682fb2b91b7300bb933 Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Tue, 24 Feb 2026 13:15:29 -0800 Subject: [PATCH 10/11] docs: add auto-close parameters and limit range order guide for LP executor - Add auto_close_above_range_seconds and auto_close_below_range_seconds to key parameters section - Add position_offset_pct parameter documentation - Add new "Limit Range Orders" section explaining how to use auto-close for SELL limit (take profit) and BUY limit (accumulate on dip) strategies - Add LP executor defaults section to preferences template Co-Authored-By: Claude Opus 4.5 --- hummingbot_mcp/executor_preferences.py | 14 +++++++++++ hummingbot_mcp/guides/lp_executor.md | 35 ++++++++++++++++++++++++++ 2 files changed, 49 insertions(+) diff --git a/hummingbot_mcp/executor_preferences.py b/hummingbot_mcp/executor_preferences.py index 98397f9..cd838bf 100644 --- a/hummingbot_mcp/executor_preferences.py +++ b/hummingbot_mcp/executor_preferences.py @@ -97,6 +97,20 @@ # price: "95000" ``` +### Lp Executor Defaults + +```yaml +lp_executor: + # Set your preferred defaults here (all optional, ask user if not set): + # connector_name: meteora/clmm # Must include /clmm suffix + # trading_pair: SOL-USDC + # extra_params: + # strategyType: 0 # Meteora only: 0=Spot, 1=Curve, 2=Bid-Ask + # + # Note: base_token/quote_token are inferred from trading_pair + # Note: side is determined by amounts at creation time, not defaulted +``` + --- *Last updated: Never* diff --git a/hummingbot_mcp/guides/lp_executor.md b/hummingbot_mcp/guides/lp_executor.md index f6f267b..d172c56 100644 --- a/hummingbot_mcp/guides/lp_executor.md +++ b/hummingbot_mcp/guides/lp_executor.md @@ -39,6 +39,11 @@ NOT_ACTIVE → OPENING → IN_RANGE ↔ OUT_OF_RANGE → CLOSING → COMPLETE - `quote_amount`: Amount of quote token to provide - `side`: Position side (0=BOTH, 1=BUY/quote-only, 2=SELL/base-only) +**Auto-Close (Limit Range Orders):** +- `auto_close_above_range_seconds`: Close when price >= upper_price for this many seconds +- `auto_close_below_range_seconds`: Close when price <= lower_price for this many seconds +- Set to `null` (default) to disable auto-close + #### Single-Sided vs Double-Sided Positions **Single-sided (one asset only):** @@ -58,6 +63,36 @@ NOT_ACTIVE → OPENING → IN_RANGE ↔ OUT_OF_RANGE → CLOSING → COMPLETE **Position Management:** - `keep_position=false` (default): Close LP position when executor stops - `keep_position=true`: Leave position open on-chain, stop monitoring only +- `position_offset_pct`: Offset from current price for single-sided positions (default: 0.01%) + +#### Limit Range Orders (Auto-Close Feature) + +Use `auto_close_above_range_seconds` and `auto_close_below_range_seconds` to create limit-order-style LP positions that automatically close when price moves through the range. + +**SELL Limit (Take Profit on Long):** +``` +side=2, base_amount=X, quote_amount=0 +lower_price > current_price (range above current price) +auto_close_above_range_seconds=60 +``` +- Position starts OUT_OF_RANGE (price below range) +- When price rises into range: base → quote conversion, fees earned +- When price rises above range for 60s: position auto-closes with quote tokens + +**BUY Limit (Accumulate on Dip):** +``` +side=1, base_amount=0, quote_amount=X +upper_price < current_price (range below current price) +auto_close_below_range_seconds=60 +``` +- Position starts OUT_OF_RANGE (price above range) +- When price falls into range: quote → base conversion, fees earned +- When price falls below range for 60s: position auto-closes with base tokens + +**Key Benefits:** +- Earn LP fees while price moves through your target range +- Automatic execution without monitoring +- Better fills than traditional limit orders (continuous conversion vs single fill) #### Meteora Strategy Types (extra_params.strategyType) From d97f0aaaa2b7a4dbf29d034498cc5010c2046c01 Mon Sep 17 00:00:00 2001 From: Michael Feng Date: Fri, 27 Feb 2026 18:34:14 -0800 Subject: [PATCH 11/11] fix: correct raydium connector name and add amount defaults in LP guide MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Fix raydiumclmm/clmm → raydium/clmm (matches gateway routes) - Add default: 0 to base_amount/quote_amount docs Co-Authored-By: Claude Opus 4.6 --- hummingbot_mcp/guides/lp_executor.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hummingbot_mcp/guides/lp_executor.md b/hummingbot_mcp/guides/lp_executor.md index d172c56..4e5ec16 100644 --- a/hummingbot_mcp/guides/lp_executor.md +++ b/hummingbot_mcp/guides/lp_executor.md @@ -28,15 +28,15 @@ NOT_ACTIVE → OPENING → IN_RANGE ↔ OUT_OF_RANGE → CLOSING → COMPLETE #### Key Parameters **Required:** -- `connector_name`: CLMM connector in `connector/clmm` format (e.g., `meteora/clmm`, `raydiumclmm/clmm`) +- `connector_name`: CLMM connector in `connector/clmm` format (e.g., `meteora/clmm`, `raydium/clmm`) - **IMPORTANT:** Must include the `/clmm` suffix — using just `meteora` will fail - `trading_pair`: Token pair (e.g., `SOL-USDC`) - `pool_address`: Pool contract address - `lower_price` / `upper_price`: Price range bounds **Liquidity:** -- `base_amount`: Amount of base token to provide -- `quote_amount`: Amount of quote token to provide +- `base_amount`: Amount of base token to provide (default: 0) +- `quote_amount`: Amount of quote token to provide (default: 0) - `side`: Position side (0=BOTH, 1=BUY/quote-only, 2=SELL/base-only) **Auto-Close (Limit Range Orders):**