Endpoints · Strategies

Create a strategy

POST/v2/strategies

A strategy is a saved boolean expression over the signal vocabulary (the same column names documented on /api/schema and /api/signals). It's queried per ticker at evaluation time — the same condition works on AAPL today and NVDA tomorrow. Without exit policy fields, a strategy behaves as a "watch" — it emits a 'strategy.entered' event when the condition flips true on a ticker and a 'strategy.exited' event when it flips false. With exit policy, the strategy tracks position state per ticker: stop_loss_pct closes the position when price falls that percent below entry, take_profit_pct closes when price rises that percent above entry, and max_hold_bars closes after that many bars regardless. `exit_reason` on the exit event discriminates which path fired. The condition is validated by the same compiler that runs at evaluation time — invalid expressions are rejected synchronously with structured errors. See /api/strategies/condition-grammar for the accepted syntax.

Plan access

Hobby and above.

Rate limit

Hobby 60/min · Pro 2,000/min · Scale 10,000/min.

Capacity

Counts against your saved-rule capacity until v1.5 introduces a separate cap.

201
Strategy created.
400
invalid_condition with structured errors (one per problem), bad_request for other validation failures.
403
plan_required for free-tier accounts.