Backtest a rule-based strategy
technical-analysis_strategy-backtestBacktest declarative entry and exit rules built from this product's indicators on caller-supplied bars, with next-open fills, fees, slippage, stops, trades, equity curve and metrics. Price $0.05 USDC. POST /api/v1/technical-analysis/strategy-backtest. An unpaid call returns the x402 payment terms and does not run.
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": {
"bars": "<bars>",
"entry": "<entry>"
},
"name": "technical-analysis_strategy-backtest"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bars | Yes | bars, array. Required. | |
| exit | No | exit, object. Optional. | |
| side | No | side, string, one of long, short. Required. | long |
| entry | Yes | entry, object. Required. | |
| feePct | No | feePct, number, from 0 to 0.5. Required. | |
| slippagePct | No | slippagePct, number, from 0 to 0.5. Required. | |
| stopLossPct | No | stopLossPct, value. Optional. | |
| positionSize | No | positionSize, object. Required. | |
| takeProfitPct | No | takeProfitPct, value. Optional. | |
| initialCapital | No | initialCapital, number. Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | params. Object. | |
| trades | No | trades. Array. | |
| warmup | No | warmup. Object. | |
| metrics | No | metrics. Object. | |
| sources | No | sources. Array. | |
| equityCurve | No | equityCurve. Array. | |
| limitations | No | limitations. Array. |