Get Backtest Positions
keel_backtest_positionsReview one completed backtest's entry-to-exit positions: get win rate and P&L summaries, page trade details by asset or date, or compare two runs for one asset.
Instructions
The positions of ONE completed backtest, entry to exit — what drove its result. Default: a summary (count, win rate, P&L by asset, five best, five worst). asset and/or start/end: one page of positions (entry/exit time and price, side, entry value, net P&L, fees) and a cursor. compare_to pairs two runs' positions for one asset.
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": {
"backtest_id": "<backtest_id>"
},
"name": "keel_backtest_positions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Window end on entry time, YYYY-MM-DD (exclusive). | |
| sort | No | Row order within a scope: `pnl` = largest absolute P&L first, `time` = entry time. | pnl |
| asset | No | One asset's positions (e.g. 'BTC'). | |
| limit | No | Maximum rows per page within a scope (1-100). | |
| start | No | Window start on entry time, YYYY-MM-DD (inclusive). | |
| cursor | No | The `cursor` from a previous page. | |
| compare_to | No | A second backtest_id; with `asset`, pairs the two runs' positions by nearest entry time. | |
| backtest_id | Yes | A completed run's backtest_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |