hire_plan_rebalancer
Plan a hire of the ChainHelix rebalancer agent (ERC-8004 #269223, Portfolio rebalancing plan). Given current holdings, target weights and prices, returns current vs target weights, per-asset drift and the ordered trade list (sells before buys) that moves the portfolio to target, with the residual cash the plan does not net out. Deterministic arithmetic, no custody, no execution. Send the job parameters; you get back the agent's live wallet-signed quote (the job price, paid into escrow on chain when you fund) and the createJob calldata to sign from YOUR wallet, then fund and tell the agent (steps in the answer). This call is free; the job is not. The parameters here are exactly what the agent accepts; the same schema is on its agent card at https://agents.chainhelix.io/rebalancer/.well-known/agent-card.json. Example: {"holdings":{"BTC":1,"ETH":10},"targets":{"BTC":0.5,"ETH":0.5},"prices":{"BTC":60000,"ETH":2000},"driftThresholdPct":1}
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| terms | No | optional ERC-8183 terms {deliverables, quality_standards}; the agent quotes its fixed price either way | |
| prices | No | a mark for every symbol in holdings or targets (also accepted as: marks, quotes, pricesUsd) | |
| targets | No | desired weights, must sum to 1 (also accepted as: targetWeights, weights, allocation) | |
| holdings | No | current position sizes in token units, one key per symbol (also accepted as: positions, balances, portfolio) | |
| minTradeUsd | No | dust filter on emitted trades, default 5 | |
| driftThresholdPct | No | no-trade band per asset, default 1 |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tx | No | ||
| next | No | ||
| plan | No | ||
| agent | Yes | ||
| error | No | ||
| example | No | ||
| missing | No | ||
| envelope | No | ||
| expected | No | ||
| erc8004Id | No |