Endpoints · Strategies

Create a strategy

POST/v2/strategies

Persist a strategy under your account. The body carries five top-level fields: `name` (slug), `description` (free-form), `allocation` (the dollar pot legs size against), `cadence` (when the runner ticks the strategy), and `legs` (one or more rules — what to trade, when to enter, when to exit, how much). A leg's `what` is one of three forms: `{ ticker: "AAPL" }`, `{ universe: "<slug>" }`, or `{ scan: "<SQL WHERE>" }`. `entry` is either a bare SQL string (single-tranche, simple case) or an array of `{ condition, weight }` objects for scaling in. `exits` is an ordered, first-match-wins list of typed exits (10 types — see notes). `sizing` picks one of `fixed_fractional`, `risk_based`, or `vol_targeted`. `max_concurrent_positions` caps how many tickers the leg can hold at once (default 1). Every embedded SQL expression — `what.scan`, `entry` conditions, `signal_off`/`signal_on` exits — is compiled at create time against the live signal column whitelist. Compile errors are returned as a 400 with the failing path. Created strategies start in `status: 'stopped'` — flip to `'running'` via PATCH when you're ready for the runner to tick it.

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
{ as_of, strategy: {...} } — the saved strategy with status: "stopped", created_at, updated_at.
400
bad_request with path + message (and errors for SQL compile failures) on validation failure.
403
strategy_tier_required if the plan does not include strategies, or strategy_limit_reached if the per-plan cap is hit.
409
already_exists — slug already taken on this account.