closed_trades
Retrieve completed trades from a backtest run, including entry/exit prices, P&L, fees, and slippage. Sort, filter by ticker, and page results to analyze trade performance.
Instructions
The closed trades of a backtest run: ticker, side, open and close time, entry and exit price, qty, gross and net P&L, fees, slippage, return_pct, stop_loss, take_profit. sort_by is any of those fields (for example net_pnl with descending=True for the best trades). Paged by limit and offset.
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": {
"run_id": "<run_id>"
},
"name": "closed_trades"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| offset | No | ||
| run_id | Yes | ||
| ticker | No | ||
| sort_by | No | close_timestamp | |
| descending | No |