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.
Status | Description |
---|---|
NEW | The 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. |
PROCESSING | A 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. |
FILLED | This status means that the rebalancing for this account has been completed. |
CANCELLED | Rebalancing execution orders can be cancelled for various reasons. All possible cases are listed in the table below. |
You receive webhook events for each state transition.
Cancellation reasons
Cancellation reason | Description |
---|---|
ACOUNT_IS_EMPTY | The account has no positions. |
ACCOUNT_NOT_FOUND | The portfolio account was not found. |
CANCELLED_BY_CLIENT | Cancellation at the customer's request. |
CANCELLED_BY_UPVEST | Cancelled by Upvest. |
CONFIGURATION_IS_MISSING | The account has no portfolio configuration. |
INVALID_ACCOUNT_TYPE | A rebalancing on a trading account is not allowed. |
PORTFOLIO_IS_BALANCED | The 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_STATUS | The account is in a state other than ACTIVE and cannot be rebalanced. |