Rebalance order list
rebalance_order_listThe dollar and share change per name to move a pasted positions export to target weights, as a list. Weights are a share of investable capital (positions + cash on hand - cash reserve). Each row: current $ and %, target %, dollar change, shares at the last price, direction, and whether exiting it would realize a gain or harvest a loss (from unrealized P&L; holding periods are not in a positions export, so short- vs long-term is not known). A target with no holding and no price is sized in dollars only. Arithmetic only: no order is placed or previewed. Nothing pasted is stored. Example: {"positions_csv": "symbol,quantity,last_price,total_gain\nAAPL,120,229.80,5940\nKO,200,70.10,-210", "target_weights_pct": {"AAPL": 30, "KO": 30, "VTI": 40}, "cash_on_hand": 10000, "prices": {"VTI": 301.55}}.
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": {
"positions_csv": "<positions_csv>",
"target_weights_pct": "<target_weights_pct>"
},
"name": "rebalance_order_list"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prices | No | Symbol -> price, for targets not currently held | |
| cash_on_hand | No | Uninvested cash (default: a cash row in the export, else 0) | |
| cash_reserve | No | Cash to keep out of the allocation (default 0) | |
| positions_csv | Yes | Positions export as CSV text, header row included | |
| sell_unlisted | No | Also exit held names absent from the targets (default false) | |
| target_weights_pct | Yes | Symbol -> target weight in percent (30 = 30%); 0 is a full exit |