Skip to main content
The Order Executor places one buy or sell order and stops when the order is filled or cancelled. It has no exit logic: whatever it fills is handed to the agent’s inventory as a held position. It is also how Condor cancels an order (stop the executor) and how it swaps on a DEX (see DEX swaps).

Overview

Create one from Condor

Agents and the Condor chat use the create_order_executor tool:
This places a limit buy for 0.5 ETH at 3200. In an agent session, controller_id must be the session ID (see Session IDs). In the chat you can leave it out, and it defaults to main.

Parameters

Condor refuses a LIMIT or LIMIT_MAKER call without a price, and a LIMIT_CHASER call without both chaser settings, before anything is sent.

Execution strategies

Example of a chaser that rests 0.1% below the best bid and re-posts when the market moves 0.05% away:

DEX swaps

Set connector_name to a network and execution_strategy to MARKET to swap through Gateway. The route comes from the network’s configured swap provider.
This sells 0.5 SOL for USDC. On a Gateway connector the executor retries a swap that fails on slippage with a wider tolerance, up to a ceiling (see Via the API). The executor’s custom_info carries the on-chain transaction_hash.

Via the API

Create the executor with POST /executors/. side is the number 1 or 2; amount is in the base asset.
For LIMIT_CHASER, send "chaser_config": {"distance": "0.001", "refresh_threshold": "0.0005"} instead of price. The API also accepts these settings, which the Condor tool doesn’t expose. They apply to Gateway swaps only:

Lifecycle

To cancel a resting order, stop the executor with stop_executor (or POST /executors/{executor_id}/stop). An order executor can’t unwind a fill, so stopping it with keep_position=false still keeps whatever filled.

Position handover

Because every fill ends as POSITION_HOLD, the filled amount is added to the Position Hold for the executor’s account, connector, trading pair and controller_id. An order executor reports no P&L of its own: its net_pnl_quote is always 0. Profit and loss is tracked in the Position Hold, where a later sell nets against an earlier buy. See Position Handover and Inventory. This makes the order executor the usual way to build a position in steps, or to exit a held one.

Learn more