Skip to main content
Saving is optional. A saved account gives you three things:
  • A standing policy. It is the default for every later request on the account. The request’s goal and policy are laid over it.
  • Wash-sale memory. Loss sales you commit count in every later check.
  • Monitoring settings. Stored with the account. Event delivery is not live yet (see Monitoring).

Save an account

After that, send "account_id": "acct_7f3a" on proposals and trade checks (or "account": {"id": "acct_7f3a"} on any call) instead of the holdings.
A saved account keeps the id you send. An account sent without an id gets a new Abacus Labs id (acct_...). Saving counts the account as a portfolio this month.

Manage accounts

POST answers 201 with the saved account; PATCH answers 200 with the new version. A saved account comes back in Abacus Labs’ stored form, not the form you sent. Lots are {id, qty, cost, date, broker_id} with cost per share; broker_id is the lot id you sent (the one to name at the broker); type is the tax type; history holds the trades Abacus Labs knows about (your recent_trades and committed fills). This is GET /v1/accounts/acct_7f3a after the PATCH above and the commit with fills in Commits:
GET /v1/accounts answers {"accounts": [...]}, the three demo accounts and any inline accounts included. DELETE answers {"deleted": "acct_7f3a"}.

Holdings

GET /v1/accounts/{id}/holdings prices the account now. It runs no risk model and no AI step, and costs 1 credit. The answer has the shared shape with one holdings block: per position qty, price, value, weight, sector, cost_basis, unrealized and lots; and cash, positions_value and value for the account.
For risk, tracking error, exposures or tax, ask analyze.

Keep it current

A saved account is only as good as its holdings. Update it after trades: send fills with the commit, or PATCH the positions and cash from the broker. Fetch lots from the broker on the day you trade; broker lot ids can change after a partial sale.

Monitoring

Not live yet. Abacus Labs stores the monitor settings and sets up a watch on the account, but scheduled checks and webhook delivery do not run in production yet. Do not rely on events. To check an account, call analyze or propose on it.
monitor in the account’s policy (on a proposal with save: true, on POST /v1/accounts, or with PATCH) takes: Reference: Save, List, Get, Update, Delete.