x-api-key header. Field names vary by client. This shape is an example; see your client’s documentation for its own. If your client signs in with OAuth instead, see Connect an agent.
list_portfolios for the portfolio_id, then check_trades:
prices covers every held and every changed symbol, except a held option with a stored mark. Allocait supplies none. A missing one fails with PRICES_INCOMPLETE and missing.
Read these fields in the result:
newly_or_further_outside_count: how many rules the change puts outside range or leaves further outside.rules_judged_count: how many rules the check judged. If it is 0, nothing was checked, so a count of 0 means nothing.not_covered: symbols no rule judged.within_rulesandcash.sufficient: whether the book stays inside its rules and cash stays at or above 0.
rules_judged_count is above 0, and decides for itself what to do about not_covered. A failed call is no result.
In a loop, send each proposed basket in one call: trades takes up to 50 changes and checks them together against the book as recorded. Compare the count and log positions_updated_at with each result. If the portfolio has no active scenario, pass scenario_id from list_portfolios.
Allocait offers a check_a_change prompt, which tells the agent to report rule facts only. Whether a client shows prompts is up to the client.
Next steps
- Check result: what each field of the result means.
- Check a change: the job and what to send.
- Use an API key: connect Claude Code with a key.
- MCP tools: every MCP tool.
- Check from a script: the same check over REST.