Backtest API
Test strategies against historical line, result and CLV data. Runs across the full vault history, so you can validate edge before risking capital. Quant tier ($299/mo).
Pass a strategy identifier, a date range, and optional filters. The response carries aggregate stats (total bets, win rate, ROI, average CLV) plus per-bet results with entry price, close and P&L.
GET/v7/{sport}/backtest
| Param | Type | Required | Description |
|---|---|---|---|
| sport | path | Yes | Sport slug. |
| strategy | string | — | Strategy identifier or inline rule. |
| from | date | — | Range start, YYYY-MM-DD. |
| to | date | — | Range end, inclusive. |
| market | string | — | Market filter. |
| min_edge | float | — | Minimum edge % to trigger entry. |
| stake | float | — | Flat stake per bet for P&L calculation. |
| limit | int | — | 1-500, default 50. |
| cursor | string | — | Pagination cursor from next_cursor. |
cURLGET
curl -H "X-API-Key: YOUR_API_KEY" \ "https://kashrock.up.railway.app/v7/cs2/backtest?strategy=clv_positive_steam&from=2026-09-01&to=2026-10-01"
200 · live (trimmed)
{
"available": true,
"sport": "cs2",
"strategy": "clv_positive_steam",
"period": {
"from": "2026-09-01",
"to": "2026-10-01"
},
"total_bets": 142,
"win_rate": 0.563,
"roi_pct": 8.4,
"avg_clv_pct": 3.1,
"results": [
{
"bet_key": "kr_cs2_aurora-gaming-vs-betboom-team-05-10-2026|match_winner|series|kr_tm_6a5f2b19c0d1|win|none",
"kr_match_id": "kr_cs2_aurora-gaming-vs-betboom-team-05-10-2026",
"market": "match_winner",
"selection": "Aurora Gaming",
"entry_decimal": 2.45,
"closing_decimal": 2.22,
"clv_pct": 5.2,
"grade": "hit",
"pnl": 1.45
}
]
}Backtests pull from the same vault that /results and /history serve. Every bet is graded from stored match outcomes, not simulated.
