finance_rebalance
Portfolio rebalancing trades — Calculates the trades that bring a portfolio back to target weights: per-position current weight, drift in percentage points, BUY/SELL/HOLD, trade dollars (and shares when you give SYM:shares@price), new weights, turnover and leftover cash. Modes: full (sell overweights, buy underweights) or cash_only (invest new cash into underweights, or take a withdrawal from overweights, without other sales). Params: holdings= SYM:value;SYM:value or SYM:shares@price, targets= SYM:percent;... (required, scaled to 100% if needed); optional cash= (+deposit / -withdrawal), band= drift threshold in points (no trades if every position is inside it), min_trade= dollars, mode=full|cash_only, fractional=false for whole shares. Offline. Price: $0.002 USDC (Base, via x402).
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": {
"holdings": "<holdings>",
"targets": "<targets>"
},
"name": "finance_rebalance"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targets | Yes | VTI:50;BND:30;VXUS:20 | |
| holdings | Yes | VTI:60000;BND:25000;VXUS:15000 |