Skip to main content
The LP Executor manages one concentrated-liquidity (CLMM) position through Gateway. It opens the position inside a price range, tracks whether the price is in range, accrues fees, and closes the position when the price crosses a limit price or when you stop it. For a complete agent built on it, see Guide: Solana DEX LP Expert Agent.

Overview

Create one from Condor

Agents and the Condor chat open LP positions with the create_lp_executor tool. Find the pool and its current price with explore_dex_pools first.
This opens a two-sided position between 150 and 170, and closes it if the price falls to 145 or rises to 175.

Parameters

connector_name is the network. Passing the DEX there, such as meteora/clmm, is the most common mistake. The API rejects it with “Invalid network format”.
The tool watches the new executor for a few seconds and reports what happened. An executor ID alone doesn’t mean a position is open: check that the executor is running before relying on it.

Side

side decides which tokens you deposit, and the range has to agree with it:

Auto-close

The executor closes the position when the price rises to upper_limit_price or falls to lower_limit_price. The limits must sit outside the range: upper_limit_price at or above upper_price, and lower_limit_price at or below lower_price. Set both if you want the position to close on its own in either direction. Without a limit on one side, the position stays open out of range on that side until you stop it.

Via the API

Create the executor with POST /executors/. The executor’s settings go in executor_config, with "type": "lp_executor". side is the number 1, 2 or 3.
Find executors with POST /executors/search, and stop one with POST /executors/{executor_id}/stop:
The API also accepts these settings, which the Condor tool doesn’t expose:

Lifecycle states

Closing a position

Stopping or auto-closing an LP executor always removes the liquidity on-chain. keep_position only decides what happens to the net token change afterwards. Which keep_position applies depends on how the executor closes:
  • It closes itself (a limit price is hit): the keep_position in its config, default false.
  • You or an agent stop it (stop_executor or POST /executors/{executor_id}/stop): the keep_position passed with the stop, default false. The config’s value is ignored.
Then:

What gets recorded

With keep_position set to true, the executor records one net trade for the whole round trip. It compares what came back (tokens plus fees) with what was deposited:
  • More base and less quote than deposited: a BUY of the base difference
  • Less base and more quote: a SELL of the base difference
  • No meaningful change: a zero-amount record that carries only the transaction fees
The trade’s fee is the total transaction fee of the open and the close.

When a close fails

The executor retries a failed close with backoff and wider slippage. If every retry fails, it ends as POSITION_HOLD with hold_reason: close_retries_exhausted, and the position is still on-chain. If the close-out swap fails repeatedly, it keeps the withdrawn tokens as a held position with hold_reason: closeout_swap_failed. A position left on-chain is an orphan. Stopping the executor again won’t close it. Find it with list_orphaned_positions, close it with manage_clmm, then mark it recovered with resolve_orphaned_position.

What it reports

The API returns these fields in the executor’s custom_info, from GET /executors/{executor_id} and POST /executors/search:

P&L

Net P&L is the position’s current value plus the fees earned, minus the value deposited at open, minus transaction fees. The deposit is valued at the price when the position opened; everything else at the current price. Rent isn’t part of P&L. On Solana, opening a position locks rent in SOL, and closing the position refunds it. Meteora positions, for example, lock about 0.057 SOL each (see Guide: Solana DEX LP Expert Agent).

Learn more