List matched historical trade sales
get_closed_tradesReview matched historical SELL events and allocated FIFO cost basis. Filter by exact ticker, currency and winning/losing/breakeven outcome after complete matching. Choose gross, after_recorded_fees (default), or verified_net P&L basis; unknown verified net is excluded explicitly. Sort by sale_date, realized_pnl or recorded calendar holding_days. A realized_pnl ranking requires one currency. Paginated; use next_offset because response budgeting may shorten a page. Coverage retains excluded transactions, including sales on/after an ambiguous recorded date. No execution-hour claims or live orders.
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_closed_trades"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | End date in YYYY-MM-DD format. | |
| from | No | Start date in YYYY-MM-DD format. | |
| limit | No | ||
| offset | No | ||
| ticker | No | Optional exact ticker. Applied after complete FIFO matching; prior purchases remain available. | |
| outcome | No | ||
| sort_by | No | ||
| currency | No | Optional currency code. Required when ranking realized P&L so currencies are never compared nominally. | |
| pnl_basis | No | ||
| portfolio_name | No | ||
| sort_direction | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| error | No | ||
| metadata | Yes |