Tax lot selection and wash-sale check
tax_lot_planAct as the tax advisor for a sale: compares FIFO, LIFO, HIFO and minimum-tax lot selection, splits short- and long-term gains, estimates tax, flags wash sales, and notes lots about to turn long-term. With mode=harvest it scans positions for tax-loss harvesting. Price: $0.02.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"lots": [
{
"lot_id": "a",
"quantity": 10,
"acquired_date": "2024-01-10",
"cost_basis_per_share": 200
},
{
"lot_id": "b",
"quantity": 10,
"acquired_date": "2026-09-01",
"cost_basis_per_share": 450
}
],
"sell": {
"date": "2026-10-12",
"price": 420,
"quantity": 10
},
"symbol": "MSFT"
},
"name": "tax_lot_plan"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| lots | Yes | ||
| mode | No | sell | |
| sell | No | mode=sell | |
| as_of | No | mode=harvest: date, default today | |
| prices | No | mode=harvest: {SYMBOL: current price} | |
| symbol | No | ||
| api_key | No | Optional. Your AFA API key (afa_...), from get_api_key. Pass it on every call so free calls and credits apply; without it calls use the anonymous trial. | |
| tax_rates | No | ||
| min_harvest_loss | No | mode=harvest: ignore losses smaller than this (USD), default 100. | |
| recent_transactions | No |