Cash settings
A cash setting is a named cash target, with a minimum and a maximum cash trigger and a cash split, that you assign to accounts. The cash target is the cash balance to keep in an account: AdviceCloud applies the account's model to the rest of the balance when it calculates rebalances. The minimum and maximum cash triggers are the cash balances that trigger a rebalance. The console shows cash settings on the Cash Settings tab of the Cash page.
cashTargetType sets whether the cash target is a dollar amount, cashTargetAbsolute, or a percent of the account balance, cashTargetPercent. Each cash trigger can have a dollar amount and a percent of the account balance; its condition, and or or, sets how the two combine when both are set. Dollar amounts are in US dollars. Percents are from 0 to 100, with up to two decimal places. Responses send each percent as a decimal string, such as "5.00". Send it in a request body as a JSON number, such as 5.
To assign a cash setting to accounts, call Assign a cash setting to accounts. Before you delete a cash setting, call Get the number of accounts assigned a cash setting.
List cash settings
Returns your firm's cash settings in the order they were created.
Create a cash setting
Creates a cash setting and returns it. Send `cashTargetAbsolute` for an `absolute` cash target, or `cashTargetPercent` for a `percent` one. To use the cash setting for accounts, call **Assign a cash setting to accounts**.
Get a cash setting
Returns the cash setting with the given ID. If your firm has no cash setting with that ID, the response is `404`.
Update a cash setting
Replaces the cash setting with the given ID with the one in the request body. Send every required field, as for **Create a cash setting**. A dollar amount, percent or cash split you leave out is cleared. The accounts assigned the cash setting keep it. If your firm has no cash setting with that ID, the response is `404` and nothing changes.
Delete a cash setting
Deletes the cash setting with the given ID. If accounts are assigned the cash setting, send `newCashSettingId` with the ID of another cash setting of your firm to assign them that one, or send it with no value (`newCashSettingId=`) to leave them with no cash setting; the change and the delete succeed or fail together. If you leave out `newCashSettingId` while an account, active or not, is assigned the cash setting, nothing is deleted. To see how many accounts are assigned it, call **Get the number of accounts assigned a cash setting**. Returns `200` with `deleted: true`. If your firm has no cash setting with the given ID, or none with the ID in `newCashSettingId`, the response is `404`.
Get the number of accounts assigned a cash setting
Returns the number of your firm's accounts assigned the cash setting with the given ID, including accounts that are not active. If your firm has no cash setting with that ID, the response is `200` with `accountsAssignmentCount` `0`.