Get closed trades
get_trade_historyRetrieves closed trades with per-account stats: trade count, wins, losses, win rate, net profit, best and worst trade, plus a per-symbol breakdown over a chosen window.
Instructions
Closed positions (one row per round trip) on one or more accounts, with per-account stats: trade count, wins, losses, win rate, net profit after commission and swap, best and worst trade, and a per-symbol breakdown. Defaults to the last 7 days; the window can be up to 366 days. Lists at most 300 trades across all accounts, newest first; the stats always cover the whole window. Each trade has its open and close price and time and the stop-loss and take-profit it closed with (sl, tp; 0 = not set, and always 0 on cTrader). For positions that are still open, use get_open_positions.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_trade_history"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End of the window (a bare date includes that whole day). Defaults to now. Date (YYYY-MM-DD) or ISO-8601 datetime, in the broker's server time. | |
| from | No | Start of the window. Date (YYYY-MM-DD) or ISO-8601 datetime, in the broker's server time. | |
| symbol | No | Only this instrument. Matches broker suffixes too, so EURUSD also matches EURUSD.sd and EURUSDm. | |
| account_ids | No | Account ids from list_accounts. Omit to read every account this key can see. |