Skip to main content
Every order — autopilot, CLI agent, web terminal trade ticket, intent executor — runs through these gates. They fail-closed on every violation: the order is rejected with a structured reason, never silently downsized.

Gate checks (entry orders)

Gate checks (exit orders)

Exit orders skip the position-count and exposure gates (they reduce exposure), but still respect single-order cap and daily-loss cap.

Configuration

Per-user limits live in portfolio_config. Update with:
Defaults:

Drawdown halt

Two thresholds beyond per-trade gates:
  • drawdown_warn_cents (default $300) — emits a health_alert but doesn’t halt.
  • max_drawdown_halt_cents (default $500) — auto-flips execution_mode to halted. Recoverable only by manual sf portfolio config executionMode live.

Where gates apply

The same gate semantics apply across the CLI agent, web terminal trade ticket, intent executor, and portfolio autopilot. Treat the gate result as the contract: accepted orders proceed, rejected orders return a structured reason.

Next steps

Portfolio autopilot

The autopilot runtime calling these gates.

Trade intents

Gate also runs on intent submission.