controller_id linking it to the agent that created it.
Why Executors?
Executors are the heart of the Trading Agent design. Agents only act through executors, which provides:Executor Types
From simplest to most complex:The Core Three
Order Executor is the simplest—it places an order using one of four execution strategies (LIMIT, LIMIT_MAKER, MARKET, LIMIT_CHASER) and terminates when filled. Position Executor builds on Order Executor by adding position management: after the entry order fills, it monitors the position and exits at take profit, stop loss, trailing stop, or time limit. Grid Executor is like running multiple Position Executors simultaneously across a price range, with each level having its own entry and take profit orders.Lifecycle
All executors follow a standard lifecycle:Position Handover
When an executor terminates withkeep_position=true:
- Inventory stays in the account, tagged with
controller_id - Agent sees it on the next tick via the positions provider
- Agent can manage it with a new executor (scale out, hedge, exit)
- P&L is not attributed until position is fully closed

