Rebalances
A rebalance is a set of trades AdviceCloud proposes for the accounts of one household. The console calls a rebalance a trade proposal.
After you create a rebalance, AdviceCloud builds its trades in the background. The rebalance starts with the status requested, and has the status proposed when its trades are ready. To check it, call Get a rebalance. You approve a rebalance and execute its trades in the console. An approved rebalance has the status approved, and an executed one complete.
To find rebalances by status and by an RQL query, call List rebalances. To see why AdviceCloud proposed the trades of a rebalance, call Get the explanation of a rebalance.
List today's suggested rebalances
Returns your firm's rebalances set for today with the status `requested` or `proposed`, latest `proposedExecutedTime` first. To filter or sort them, call **List rebalances** with `status=requested,proposed`.
List rebalances
Returns your firm's rebalances set for today that have one of the statuses in `status` and match the query in `q`. Send `executedFrom` and `executedTo` instead to return the rebalances executed in that time range, whatever day they were set for. To see only the rebalances of a rebalance board, send its `query` as `q`.
Create rebalances
Creates one rebalance for each entry of the request body, and returns the ID and the status of each, in request order. AdviceCloud then builds the trades of each rebalance in the background. A `manual` rebalance starts with the status `proposed` and no trades; add them with **Update a rebalance**.
List today's approved rebalances
Returns your firm's rebalances set for today with the status `approved`, latest `proposedExecutedTime` first.
List executed rebalances
Returns your firm's rebalances with the status `complete`, latest `actualExecutedTime` first. Send `todayOnly=true` for the ones executed today.
List future rebalances
Returns your firm's rebalances with the status `proposed` that are set for a day after today, latest `proposedExecutedTime` first.
Get a rebalance
Returns the rebalance with the given ID. Send `trades=true` for the trades of each account. With `metrics=true`, the rebalance's `riskAllocation.target` is the household target stored for the rebalance when one was stored, which is the risk allocation of the household's model under the `soft_completion` strategy, and otherwise the target of each account weighted by its balance; each account's own target is unchanged. If your firm has no rebalance with that ID, the response is `404`.
Update a rebalance
Replaces the trades and the dollar-cost averaging fields of the rebalance with the given ID with the ones in the request body. Trades of the rebalance that the body does not list are deleted, and dollar-cost averaging fields you leave out are cleared. The status does not change. If your firm has no rebalance with that ID, nothing changes and the response is `404`. A proposal of a position swap is changed from its swap: for one, nothing changes and the response is `409`, naming the swap.
Get the history of a rebalance
Returns each version of the rebalance with the given ID, latest first, and the people who made them. If your firm has no rebalance with that ID, the response is `404`.
Get the explanation of a rebalance
Returns why AdviceCloud proposed the trades of the rebalance with the given ID: what triggered it, the model it used, and the steps for each account. The console shows it on the Explain tab of a trade proposal. `data` is `null` for a rebalance that has no explanation. If your firm has no rebalance with that ID, the response is `404`.
Get the check of a rebalance
Returns the latest check of the rebalance with the given ID: its score, its status and its findings. `data` is `null` for a rebalance that has no check. If your firm has no rebalance with that ID, the response is `404`.