run_backtest
Start a backtest of one saved strategy over a window of history. Takes a strategy_id -- it reads the stored strategy's own rules, asset, timeframe and risk parameters. The recorded market is the default; pass quote_token and/or market_data_venue when the person chooses another quote or execution venue. An omitted choice keeps its recorded value. Check and report the selected market; never silently substitute a feed. IT RETURNS A SUBMISSION, NOT A RESULT: a real backtest takes minutes, so this hands back the run's id and the config it will use, and the metrics arrive on their own once the engine finishes. Tell the person it is running; do not call this again for the same question, and do not wait. It consumes a unit of the user's monthly backtest allowance at submission -- so it CHECKS THE STRATEGY FIRST, and a refusal costs nothing: a problem (verify_strategy's problems) always refuses, and a signal parameter still at its library default refuses until you either save chosen values or pass acknowledge_defaults=true to stand by the defaults deliberately. One (strategy, window) is ONE measurement: submitting the same strategy over the same dates again is refused and the existing run named -- read that with get_backtest instead. Both start_date and end_date are required: name the days, so the same question asked next week gives the same answer. Every message carries the current time, so work them out from that. A YYYY-MM-DD end date covers that whole UTC day; an end date of today stops at the end of yesterday, the last complete day; a later date is refused. get_benchmark reads the same dates the same way. When the person names no window, its length is set by the candle size: 5m 1 month, 15m 2 months, 30m 3 months, 1h 4 months, 4h 12 months, 1d 12 months (a month is 30 days). Pass end_date = today and start_date = today minus 30 days per month (1h: today minus 120 days); today is not complete, so the window covers exactly that many days, through the end of yesterday.
[Access: pay 0.10 USDC via x402 (PAYMENT-SIGNATURE header) OR authenticate with an API key. An x402-capable client will auto-pay; API-key clients pay nothing per call.]
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"end_date": "<end_date>",
"start_date": "<start_date>",
"strategy_id": "<strategy_id>"
},
"name": "run_backtest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_date | Yes | ISO end of the window. | |
| start_date | Yes | ISO start of the window, e.g. 2026-01-01. | |
| quote_token | No | Quote currency of the requested market. | |
| strategy_id | Yes | The strategy's UUID. | |
| engine_generation | No | Only set when the person specifies an engine generation; omitted uses latest. | |
| market_data_venue | No | Exact venue of the requested market. | |
| acknowledge_defaults | No | Pass True to submit even though signal parameters are at their library defaults -- an explicit statement that the defaults were considered and stood by, never a way to skip considering them. |