REFERENCE
API Reference
Base URL: https://api.portfolwright.com/v1 — All requests require Authorization: Bearer <key>
Portfolios
/v1/portfolios
Create portfolio
Register a new portfolio with current holdings and target weights. Returns a portfolio_id used in subsequent rebalance requests.
"external_id" string // Your internal portfolio identifier
"currency" string // Base currency: "EUR" | "GBP" | "CHF"
"tax_wrapper" string // "GIA" | "ISA" | "PEA" | "Depot" | "SIPP"
"holdings" array // Current positions (isin, exchange, quantity)
"targets" array // Target allocations (isin, weight: 0.0–1.0)
/v1/portfolios/{portfolio_id}
Get portfolio
Return current holdings, target weights, and latest drift snapshot for a portfolio.
/v1/portfolios/{portfolio_id}
Delete portfolio
Remove a portfolio and stop monitoring it for drift. Historical rebalance records are retained per data retention policy (7 years).
Rebalancing
/v1/rebalance
Create rebalance plan
Generate a rebalance plan for a portfolio. The plan includes an ordered list of buy/sell orders and cost estimates. Use "simulation": true for a dry run (not billed).
"portfolio_id" string // required
"drift_threshold" float // 0.01–0.20, default: 0.05
"band_type" string // "absolute" | "relative"
"rebalance_trigger" string // "any_position" | "portfolio"
"cost_budget" float // Max bps total cost (optional)
"simulation" bool // Default: false
"fractional_precision" int // 2–6, default: 4
"fx_overlay" bool // Separate FX drift. Default: true
/v1/rebalance/{rebalance_id}
Get plan status
Poll plan status. Possible values: plan_ready, executing, partially_filled, complete, failed, cancelled.
/v1/rebalance/{rebalance_id}/execute
Execute plan
Submit the plan for execution. Pass {"confirm": true}. Orders are routed to the relevant exchange connectors. Subscribe to webhooks for fill events.
/v1/rebalance/{rebalance_id}
Cancel plan
Cancel a plan that is in plan_ready state. Plans in executing or later states cannot be cancelled — contact support for partial execution rollback.
Exchange Prices
/v1/prices/{isin}
Get intraday price
Returns the current mid price and last trade price for an ISIN across connected exchanges. Useful for pre-flight cost estimation.
{
"isin": "IE00B4L5Y983",
"prices": [
{ "exchange": "XAMS", "mid_eur": 72.14, "last_trade_eur": 72.11 }
],
"timestamp": "2025-01-03T14:22:11Z"
}
Error codes
| HTTP | Code | Description |
|---|---|---|
| 400 | invalid_request | Request body malformed or missing required fields |
| 401 | unauthorized | Missing or invalid API key |
| 402 | quota_exceeded | Monthly event limit reached for your tier |
| 404 | not_found | Portfolio or rebalance plan ID does not exist |
| 409 | already_executing | A rebalance is already in progress for this portfolio |
| 422 | drift_below_threshold | No position exceeds the configured drift band — no rebalance needed |
| 429 | rate_limit | Exceeded 60 requests/minute per API key |
| 500 | internal_error | Exchange connectivity failure or pricing unavailable |