Skip to main content
POST
Preview rebalance amounts with your prices

Authorizations

x-api-key
string
header
required

Raw API key shown once when created in the Allocait app (Settings > API keys). Send it verbatim in this header; the server stores and compares only its SHA-256 hash. Allocait generates every key: alc_ followed by 64 lowercase hex characters. Keys issued before 2026-10-10 are 64 hex characters with no prefix and keep working. A key may carry an expiry (90 days or 1 year, or never). A malformed, unknown, revoked or expired key gets 401 with no further detail, and a malformed one is refused before any lookup. Keys cannot be created through this API.

Body

application/json
portfolio_id
string<uuid>
required
prices
object
required

Symbol-to-price map. Keys are ticker symbols, matched case-insensitively (normalised to uppercase); values are numbers, 0 or more. 0 is a real price, for example an option that expired worthless. On the agent surface, a symbol you leave out of this map is never priced from Allocait's own data (ADR-036); it comes back null, or the call is refused, depending on the endpoint. Two exceptions are the user's own numbers, not Allocait's: a held option with a mark is priced at its mark, so you may leave it out, and a price you pass for it replaces the mark for that call only and is never stored; an option past its expiry counts 0 whatever you pass (ADR-147).

Example:
scenario_id
string<uuid>

Default is the portfolio's active scenario, and only that (ADR-187, ADR-232).

Response

Rebalance preview computed with the prices you provided

portfolio_id
string<uuid>
scenario_id
string<uuid>
total_value
number

Signed. A portfolio worth zero or less has no percentages, so trades is empty and the class percentages are null; the total itself is still reported (ADR-153).

price_source
enum<string>

Always overrides on this surface. prices is required and checked to cover every non-cash position before this is computed, except a held option that owns its price (ADR-036, ADR-147).

Available options:
overrides
trade_count
integer
trades
object[]

Pro rata amounts, ordered largest-dollar-value first. A holding priced at 0 gets no row, since an amount cannot be priced at 0 (ADR-080). A short (negative shares) or an option (a holding in the Options class) gets no row; its class's move is spread over the class's long holdings outside Options only (ADR-153, ADR-145).

resulting_classes
object[]

Each asset class's share of the portfolio after these amounts, Cash included. Proceeds from removed shares stay in Cash. Every resulting_pct is null when the portfolio is worth zero or less (ADR-153).

basis
string

Pro rata amounts that would move each class toward its aim: the user's target, or the midpoint of their band. Arithmetic on the user's own rules; not a recommendation.

unresolved
object[]

Classes still outside their band after these amounts, such as a class below its band with no holding to add to, each with the reason. The amounts don't resize holdings, so size_violations stand.

not_rebalanced
object[]

Every short and every Options class holding the rebalance leaves as it is, once each, ordered by symbol (ADR-145). Always present, empty when there are none. A holding with zero shares is not listed. An entry carries no price, count or value.