Before you start
You need an account with agent access, the holdings you want checked and at least one allocation band. If you haven’t set those up, follow the app quickstart first. A Read only key is enough here, because every call on this page only reads.1
Create a key
In the app, open Settings > API keys and select Create API key. Enter a name, choose Read only, and select Create key. Copy the key before you select Done. Allocait shows a key once and stores only its hash.Keep the key in an environment variable. Every request sends it in the Authentication covers permissions and access levels.
x-api-key header.2
List your portfolios
Main Portfolio. Every list route returns data and has_more.portfolio_id. The next calls need it. Allocait supports US dollars only, so base_currency is always USD.3
See what needs a price
null. symbols_to_price lists the symbols you need to price. Cash needs no price. Neither does an option with a mark, the per-share premium you recorded for it, which Allocait counts as its price. This response is trimmed: rules, monitors, generated_at and some position fields are left out.4
Run your first check
Get a price for each symbol in The values and the check now come from your prices. This response is trimmed the same way. Read
symbols_to_price from your own source, then send them with the same portfolio.exposure shows only its totals here; it also lists classes and holdings.compliance.status:Here Commodities is 18.69% of the portfolio against a range of 4 to 13%.
outside_by states how far: 5.69 percentage points above the maximum, or 5,690 dollars at your prices. It describes where the rule stands. It doesn’t say what to do.POST /compliance/check returns this compliance block on its own. It needs a price for every non-cash position, except a held option with a mark. scenario_id is optional: left out, the portfolio’s active scenario is used, and a portfolio with none set is refused. To ask about a change before you place it elsewhere, use Check a change.5
Handle a refusal
Send The call fails with Build your code around these rules:
/compliance/check a price map that leaves out two held symbols. The call uses the portfolio’s active scenario.400. Every refusal a route produces uses this envelope.- Treat any non-2xx response as no result. It isn’t a pass and it isn’t a finding.
- Branch on
error_code, and showerrorto a person. Four answers carry noerror_code, so branch on their status:401, the403for an account with no agent access, the403for a key without read permission, and the429for the request budget. - Change the request before you retry a
400,403,404or409. The same request usually fails the same way. - Wait for
Retry-After, then retry a request-budget429. A429witherror_code: DAILY_LIMIT_EXCEEDEDhas noRetry-After; don’t retry it on a timer. - Retry a
500once only for a read, or for a write that is safe to repeat (see Idempotency). Quote itsrequest_idwhen you contact support.
X-RateLimit-Limit (60) and X-RateLimit-Remaining, the requests left in the rolling 60-second window. See API errors and Rate limits.Next steps
- Check a change: which of your rules a change puts outside range.
- Update with an agent: set a holding to the share count you hold now. Writes need a key with Read and change access.
- Idempotency: make a retried cash movement safe.
- Endpoints by task: every task with its route and its MCP tool. Open Endpoints in the API reference sidebar for every operation with request and response examples.
- Connect an agent: the same reads and checks as tools for an agent.