Overview
Create one from Condor
Agents and the Condor chat use thecreate_position_executor tool:
controller_id must be the session ID (see Session IDs).
Parameters
The entry order
The entry is a LIMIT order by default, even when you leave outentry_price:
For an immediate market entry, pass
open_order_type=1.
Exits
Stop loss, take profit and trailing stop are checked once the entry has filled, and are measured on the position’s net P&L, after fees, as a fraction of the entry value. The first exit to trigger closes the position with a market order.Take profit
With the defaulttake_profit_order_type=1, the executor closes at market once the net profit reaches take_profit. For a long entered at $100 with `take_profit=0.02`, that is a little above $102, because fees count against the profit.
With take_profit_order_type set to 2 or 3, the executor instead rests a limit order at entry price × (1 + take_profit) for a long, or entry price × (1 − take_profit) for a short, as soon as the entry fills.
Stop loss
The executor closes at market once the net loss reachesstop_loss. For a long entered at $100 with `stop_loss=0.01`, that is a little above $99, because fees count against the position.
Time limit
The executor closes at market oncetime_limit seconds have passed since it was created, whether or not the entry has filled. If the time limit has already passed when the executor starts, it ends at once with close type EXPIRED.
Trailing stop
A trailing stop locks in profit once the position is up bytrailing_stop_activation_price:
- When the net profit first rises above the activation level, the executor sets a trigger at that profit minus
trailing_stop_trailing_delta. - As the profit grows, the trigger rises with it, always
trailing_stop_trailing_deltabehind the best profit seen. - When the profit falls below the trigger, the executor closes at market.
trailing_stop_activation_price=0.01 and trailing_stop_trailing_delta=0.005:
Via the API
Create the executor withPOST /executors/. Order types are numbers (1 MARKET, 2 LIMIT, 3 LIMIT_MAKER) and side is 1 or 2.
activation_bounds, which the Condor tool doesn’t expose: a list of fractions that keeps a limit entry order on the book only while it is close enough to the mid price.
Close types
Stopping early
Stop the executor withstop_executor or POST /executors/{executor_id}/stop:
keep_position=false(the default) cancels the open orders and closes the filled amount at market.keep_position=truecancels the open orders and leaves the position open. The fills go to the Position Hold for this executor’scontroller_id. See Position Handover.
Learn more
- Executors overview: lifecycle, close types and the API
- Order Executor: one order with no managed exit
- DCA Executor: build the position over several price levels

