Developers › API reference

Portfolio Center API

Accounts, positions, lots, cash, drift, risk, model portfolios, rebalancing and what-ifs.

Objects

  • Account: a portfolio (simulated cash), with its strategy, tags, base currency, model, tax-lot method (tax_optimal or fifo), value at the latest closes, cash, and your_permissions on it (view, propose, trade, approve). You only ever see accounts you may view; others answer 404.
  • Position: a holding with quantity, price, value, cost basis, unrealized P&L and weight. Lot: an open tax lot. Cash: the balance and recent movements.
  • Drift: each security's target, actual weight and drift against the account's model, and whether it is out of tolerance. Risk: concentration (top position, top 5, HHI, effective N), sector and issuer weights, factor betas, volatility and correlation spikes.
  • Model: target weights per symbol, a cash target and a drift tolerance.
  • Proposal: trades proposed by the deterministic optimizer for one account (from a rebalance, a what-if or the pipeline), with an explanation. A proposal is never an order.

Typical sequences

Monitor drift every morning

  1. GET /accounts?tag=growth → the accounts.
  2. GET /accounts/{id}/drift for each → out_of_tolerance.
  3. For those out of tolerance, POST /rebalance-proposals with their ids → a pipeline run with proposals (202 and a job for more than three accounts).
  4. A person reviews the proposals and creates the orders (POST /pipeline/runs/{id}/orders).

Keep a model in sync: GET /models/{id} (keep the ETag) → PUT /models/{id} with If-Match and the full targets.

Rules that apply

Writes need propose on the accounts (rebalances, what-ifs) or the manage accounts privilege (accounts, cash, models' assignment). Everything is checked like the screens and logged.

Endpoints

CallWhat it doesScope
GET/accountsThe accounts you can see, valued at the latest simulated closesreference:read
GET/accounts/{id}One accountreference:read
POST/accountsAdd an account (simulated cash)reference:write
PATCH/accounts/{id}Change an account, incl. its model (If-Match)reference:write
GET/accounts/{id}/positionsPositions with value and weightportfolio:read
GET/accounts/{id}/lotsOpen tax lotsportfolio:read
GET/accounts/{id}/cashCash balance and recent (simulated) movementsportfolio:read
POST/accounts/{id}/cashDeposit or withdraw simulated cashportfolio:write
GET/accounts/{id}/driftDrift against the account's modelportfolio:read
GET/accounts/{id}/riskConcentration, exposures and factor betasportfolio:read
GET/modelsModel portfoliosreference:read
GET/models/{id}One model with targetsreference:read
POST/modelsCreate a modelreference:write
PUT/models/{id}Replace a model's targets (If-Match)reference:write
POST/rebalance-proposalsRebalance accounts: proposals in the Intent Pipeline (never orders); 202 with a job for more than 3 accountsportfolio:write
POST/what-ifsA what-if: sector changes for accounts, as a pipeline proposalportfolio:write
GET/proposalsRebalance proposalspipeline:read
GET/proposals/{id}One proposal with its tradespipeline:read