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": [...]}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | No | ||
| xml_content | Yes | ||
| asset_category | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |