TWS Invest / Divest
Submit TWS-style invest or divest instructions across one or more destination models for a set of accounts. Positive amtToInvest values invest cash into the target model; negative values divest. The response returns the resulting allocation plan and cash transfers between the source cash pool and each destination model.
The set of accounts to invest can be specified in one of three mutually exclusive ways:
account- a single U-account identifier (e.g."account": "DU12349").accountList- an explicit list of U-account identifiers (e.g."accountList": ["DU12349", "DU12350", "DU12351"]).group- the name of an FA pre-trade allocation group (e.g."group": "Group1"), or"All"to include every account under the advisor. WhenaccountListorgroupis used, eachamtToInvestvalue is divided equally across the resolved accounts.
Feature comparison vs. /fa/model/invest-divest:
tws-invest-divestsupports models denominated in multiple currencies;invest-divestsupports only single-currency models.tws-invest-divestaccepts multiple destination models per request (viamodelList);invest-divesttargets a single model per request.invest-divestallows a different investment amount per account because each account is listed individually with its ownamtToInvest. FA pre-trade allocation groups are not supported byinvest-divest.- When
tws-invest-divestusesgrouporaccountList, the singleamtToInvestis split equally across all resolved accounts.
Authentication
Request
List of invest/divest instructions, one per model destination.
Single U-account identifier submitting the invest/divest instructions. Mutually exclusive with accountList and group.
Explicit list of U-account identifiers to invest/divest. Each amtToInvest value in modelList is divided equally across the listed accounts. Mutually exclusive with account and group.
Name of an FA pre-trade allocation group whose member accounts should receive the invest/divest instructions. Use "All" to target every account under the advisor. When supplied, each amtToInvest value in modelList is divided equally across the resolved group members. Mutually exclusive with account and accountList.
Response
Successfully computed the invest/divest allocation plan.
Per-instrument allocation instructions produced by the invest/divest planner.
Errors produced by the planner. null when the plan is successful.
Identifier that groups the resulting transfers; supply to downstream submit endpoints.

