Skip to main content
Executors are self-contained trading operations that manage their complete lifecycle—from entry to exit—with standardized P&L and fee reporting. Each executor is tagged with a 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 with keep_position=true:
  1. Inventory stays in the account, tagged with controller_id
  2. Agent sees it on the next tick via the positions provider
  3. Agent can manage it with a new executor (scale out, hedge, exit)
  4. P&L is not attributed until position is fully closed
Example: Grid hits stop-loss → keeps 0.005 BTC → agent waits for recovery → spawns Order Executor to exit at better price.

Creating Executors

Via MCP Tools

Via API

Standardized Metrics

All executors report: