Get PnL
get_pnlRetrieve account profit and loss with per-symbol breakdown for a specified account and timeframe.
Instructions
Get account P&L with per-symbol breakdown.
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_pnl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| timeframe | No | ||
| account_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bySymbol | No | Map of symbol → PnlDetail. | |
| currency | Yes | Reporting currency. | |
| realized | Yes | Total realized P&L in this timeframe. | |
| accountId | Yes | IBKR account identifier. | |
| timeframe | Yes | Requested timeframe, e.g. 'INTRADAY', '1D', 'MTD', 'YTD'. | |
| timestamp | Yes | Timestamp of this P&L snapshot, ISO 8601. | |
| unrealized | Yes | Current unrealized P&L. |