flex_parse_fifo_pnl
Extract FIFO realized and unrealized P&L from Interactive Brokers Flex XML reports. Filter by symbol or asset category to get summarized profit and loss data.
Instructions
Extract FIFO realized/unrealized P&L summary from a Flex XML report.
Args: xml_content: Raw Flex XML string. symbol: Filter by ticker symbol (case-insensitive, optional). asset_category: Filter by asset category e.g. STK, OPT, FUT (optional).
Returns JSON: {"count": N, "total_realized": "...", "total_unrealized": "...", "rows": [...]}
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": {
"xml_content": "<xml_content>"
},
"name": "flex_parse_fifo_pnl"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | ||
| xml_content | Yes | ||
| asset_category | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |