Rebalancing execution order

Each individual rebalancing that is part of a rebalancing execution as defined above is represented in the Investment API as a ‘rebalancing execution order’. A rebalancing execution can therefore have one to many rebalancing execution orders, one for each account that is to be rebalanced.

A rebalancing execution order tracks the progress of a rebalancing as it is executed.

Lifecycle of a rebalancing execution order

The following table shows the individual stages that a rebalancing execution order goes through.

StatusDescription
NEWThe rebalancing execution order has been registered and is being checked. If the rebalancing request is valid, a portfolio order of the type REBALANCING is created for this account.
PROCESSINGA rebalancing execution order reaches this state when the underlying portfolio order starts execution. It remains in this state until all individual rebalancing orders have been completed and the portfolio order changes to a final state.
FILLEDThis status means that the rebalancing for this account has been completed.
CANCELLEDRebalancing execution orders can be cancelled for various reasons. All possible cases are listed in the table below.
INFO

You receive webhook events for each state transition.


Cancellation reasons

Cancellation reasonDescription
ACOUNT_IS_EMPTYThe account has no positions.
ACCOUNT_NOT_FOUNDThe portfolio account was not found.
CANCELLED_BY_CLIENTCancellation at the customer's request.
CANCELLED_BY_UPVESTCancelled by Upvest.
CONFIGURATION_IS_MISSINGThe account has no portfolio configuration.
INVALID_ACCOUNT_TYPEA rebalancing on a trading account is not allowed.
PORTFOLIO_IS_BALANCEDThe portfolio is already balanced, rebalancing is not required. (The threshold that defines what ‘balance’ means is configurable and can be set by the customer).
INVALID_ACCOUNT_STATUSThe account is in a state other than ACTIVE and cannot be rebalanced.

Was this page helpful?