Backtest a strategy on a ticker
/v2/strategies/{name}/backtestFor strategies with exit policy, this walks bars in order and produces a series of (entry, exit, pnl, exit_reason) records the way a real trading bot would. With no exit policy, the strategy exits when the condition flips false; PnL is null unless `position_size` is supplied. Distinct from /history (per-bar boolean) and /events (condition-true spans). Backtest is the only one of the three that consumes the exit-policy fields.
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.
Query parameters
stringrequiredStrategy slug.
stringrequiredTicker symbol to backtest on.
stringdefault 1dBar resolution. Defaults to 1d.
integerEarliest epoch ms.
integerLatest epoch ms.
numberDollars per trade. When supplied, the PnL fields become absolute; otherwise PnL is expressed as percent.
Status codes
200{ as_of, ticker, interval, trades: [...], summary: { n_trades, win_rate, total_pnl_pct, total_pnl_abs?, avg_hold_bars } }.