Check backtest status
backtest_statusFetch the latest status/stage for a backtest by id. Response includes stage plus a rich structuredContent.progress snapshot of the current heartbeat:
percent,eta,elapsed,simulationDate,portfolioValue,totalReturnPct,heartbeatElapsedSecondsorders: array of open/recent orders from the simulation's current iteration, sanitized to the same shape asget_deployment_order_telemetry— the 7 canonical fields (timestamp,symbol,action,quantity,price,order_id,status,reason) PLUS flat option/contract metadata (asset_type,strike,expiration,option_type,order_type) surfaced from the nestedassetdict when the strategy trades options/futures so callers can render e.g. "SPY 2024-01-24 465 PUT smart_limit" without parsing OSI themselves.nullif the heartbeat omits orders or the payload was malformed. Handles both live-listenerOrder.to_dict()and backtest-heartbeatOrder.to_minimal_dict()shapes.positions: array of current holdings sanitized to the same essential-fields shape asget_deployment_position_telemetry(symbol,quantity,avg_fill_price,current_price,market_value,pnl,pnl_percent,asset_type,exchange,currency,multiplier,expiration,strike,option_type,underlying_symbol,asset). Accepts both fullPosition.to_dict()and compactPosition.to_minimal_dict()(qty/val/pnl) shapes.dataProvider: the provider slug the backtest is routing through (e.g.botspot_auto,ibkr,thetadata) so you can confirm routing mid-run without waiting forsettings.jsonat completion. If you are monitoring, summarize those fields (progress + current results) instead of repeatedly polling. Finished runs also returnrejectedOrderCount(null when not known yet) anderrorSummary(first error line, null when none). After any slow or failed backtest, call once with includeTiming=true to see where the time went (timing.run,timing.data.sharedCache,timing.strategy) and, for failed runs,failureSummary(what failed and why, e.g. the asset, bar size and date of missing history). Numbers the run does not record are null and explained intiming.missing. For iteration counts and the slowest functions, rerun with start_backtest profile=true (profiling makes that run slower). To measure cold data speed, rerun with start_backtest cache="off".
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": {
"backtestId": "<backtestId>"
},
"name": "backtest_status"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| backtestId | Yes | Actual backtest run UUID. Use the id returned by list_backtests or an explicit user-provided backtest id. Do not use a strategy id, aiStrategyId, revisionId, browser URL revisionId, conversation id, or a placeholder such as <unknown>. | |
| includeTiming | No | Set true after a slow or failed backtest to get `timing`: where the run spent its time (waiting to start, startup, simulation seconds, simulated days per minute, end-of-run reports, upload), shared market-data cache hits, misses and bytes, and, for runs started with start_backtest profile=true, iteration counts and the slowest functions. Numbers a run does not record are null and listed in `timing.missing` with the reason. Reads a few small result files, so leave it off while polling. |