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.
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. |