---
title: "Run a single-asset backtest (sync)"
method: POST
path: "/api/v1/backtests/run"
tags: ["Backtests"]
---

# Run a single-asset backtest (sync)

`POST /api/v1/backtests/run`

## Request

- Base URL: `https://tradingstrategies.work`
- URL: `https://tradingstrategies.work/api/v1/backtests/run`
- Auth: HTTP bearer

Synchronous backtest run. Persistiert in backtest_runs mit user_id. Per-Endpoint-Quota: Pro 50/d, Power 500/d. Globaler Tier-Rate-Limit zählt zusätzlich. With `?montecarlo=true` the response includes a `montecarlo` block: a trade-order block-bootstrap (5000 iterations) over the realized trades — percentile bands (P5–P95) for CAGR / max drawdown / final equity plus probability of ruin and of beating Buy & Hold. It measures how much the result depends on trade order, NOT a forecast of future prices. [API Pro tier]

## Query parameters

- `montecarlo` boolean

## Request body

- object
  - `strategy` string, required: Strategy key from /v1/strategies.
  - `pair` string, required: e.g. BTCUSDT, ETHUSDT, SOLUSDT
  - `asset_type` 'crypto' | 'tokenized_equity' | 'tokenized_etf' | 'commodities'
  - `interval` '1d' | '2d' | '3d' | '1w' | '1M', required
  - `date_from` string, date, required: YYYY-MM-DD
  - `date_to` string, date: YYYY-MM-DD (optional, default = today)
  - `capital` number
  - `params` object: Strategy-specific parameters.
  - `filters` object
    - `wma200` boolean
    - `atr_mode` 'off' | 'low' | 'high' | 'expansion'
    - `altcoin_season_mode` 'off' | 'aggressive' | 'conservative'
    - `bullmarket_stage_mode` 'off' | 'early' | 'confirmed' | 'strict'
    - `min_profit_guard_threshold` number, nullable

## Response `201`

Backtest result with summary + persisted run id. The summary `result` carries two win-rate metrics: `win_rate` (per entry/exit decision — counts profitable exits AND accretive re-entries, i.e. buying back below the last sell = accumulating more of the asset) and `roundtrip_win_rate` (per closed round-trip — share of USD-profitable closed exits only; null when no closed round-trips). `max_drawdown` is bar-exact (mark-to-market intra-trade, not only at trade points). `result.net_cagr` is the CAGR after per-side trading costs (K3-B); gross `cagr` stays canonical. Optional `montecarlo` block when ?montecarlo=true.

## Other responses

- `400`: Invalid input — fehlt Pflichtfeld oder Wert außerhalb des erlaubten Bereichs.
- `401`: Unauthenticated — kein gültiger Bearer-Token im Authorization-Header.
- `403`: Tier-Insufficient — Endpoint braucht höheren API-Tier. Response enthält upgrade_url.
- `404`: Not-Found — Resource existiert nicht oder gehört nicht dem aktuellen User.
- `429`: Rate-Limit überschritten — Tier-Quota (hourly/daily) oder Per-Endpoint-Quota erreicht. Retry-After-Header gesetzt.
- `500`: Internal Error.
- `503`: Upstream-Failure — Datenquelle nicht erreichbar (Binance, EODHD, etc.).

---

[API](https://skmtc.dev/tradingstrategies/apis/backtesting-arena-public-api.md) · [All operations](https://skmtc.dev/tradingstrategies/apis/backtesting-arena-public-api/llms.txt) · [OpenAPI document](https://skmtc.dev/tradingstrategies/apis/backtesting-arena-public-api/revisions/f82e8d6eecd7?raw)
