Skip to main content

Portfolios

Portfolio endpoints let you create multi-asset portfolios, record trade history, compute current positions and NAV, and generate a structured context payload for analysis.

All portfolio endpoints are owner-scoped — each API key can only access its own portfolios.


Endpoints​

MethodPathDescription
GET/v1/portfoliosList your portfolios
POST/v1/portfoliosCreate a new portfolio
GET/v1/portfolios/:idGet portfolio metadata
PATCH/v1/portfolios/:idUpdate portfolio metadata
DELETE/v1/portfolios/:idDelete a portfolio
GET/v1/portfolios/:id/outstandingCurrent positions (mark-to-market)
GET/v1/portfolios/:id/navNAV history
GET/v1/portfolios/:id/tradesTrade ledger
GET/v1/portfolios/:id/contextLLM-ready portfolio context
POST/v1/portfolios/:id/tradesAdd a trade
PATCH/v1/portfolios/:id/trades/:trade_idEdit a trade
DELETE/v1/portfolios/:id/trades/:trade_idRemove a trade
DELETE/v1/portfolios/:id/positions/:listing_idRemove all trades for a position

GET /v1/portfolios​

List all portfolios belonging to the authenticated API key.

ParameterTypeDescription
includestringOptional: breakdown — include theme/country distribution per portfolio.
GET /v1/portfolios

POST /v1/portfolios​

Create a new portfolio.

Request body​

{
"name": "Tech Growth 2026",
"description": "US-focused high-growth tech names",
"base_currency": "USD",
"mode": "standard"
}
FieldTypeRequiredDescription
namestring✅Portfolio name.
descriptionstring—Optional description.
base_currencystring—Base currency code. Default USD.
modestring—standard (default) or advanced (enables short/leverage trades).

Returns 201 Created with the new portfolio object.


GET /v1/portfolios/:id​

Metadata for a single portfolio — name, description, base currency, mode, and investor intent summary.

GET /v1/portfolios/42

PATCH /v1/portfolios/:id​

Update editable metadata.

{
"name": "Tech Growth 2026 (revised)",
"description": "Updated focus",
"base_currency": "USD"
}

Editable fields: name, description, base_currency, mode, margin.


DELETE /v1/portfolios/:id​

Delete a portfolio and all its trade history. Irreversible.


GET /v1/portfolios/:id/outstanding​

Current positions with mark-to-market values. Returns each position's quantity, average cost, current price, unrealized P&L (in base currency and %), and weight.

GET /v1/portfolios/42/outstanding

GET /v1/portfolios/:id/nav​

NAV (net asset value) history — daily portfolio value from inception to today. Useful for plotting cumulative returns and drawdowns.

GET /v1/portfolios/42/nav

GET /v1/portfolios/:id/trades​

Full trade ledger — all buy/sell entries with dates, quantities, prices, and fees.

GET /v1/portfolios/42/trades

GET /v1/portfolios/:id/context​

LLM-ready portfolio context — a structured snapshot for analysis. Returns a composite payload including:

  • Holdings summary (position weights, sectors, countries, themes)
  • Performance attribution over the selected window
  • Key metrics (volatility, Sharpe, max drawdown)
  • Recent news impact on held positions

:::info Cost GET /v1/portfolios/:id/context charges 5 credits. :::

ParameterTypeDescription
windowstringAnalysis window: 7d, 30d, 90d, 1y, mtd, qtd, ytd.
from / tostringISO date range, alternative to window.
snapshotsstringComposition granularity override.
90-day portfolio context
GET /v1/portfolios/42/context?window=90d

POST /v1/portfolios/:id/trades​

Add a trade to the portfolio.

Request body​

{
"ticker": "NVDA.US",
"date": "2026-01-15",
"quantity": 100,
"price": 142.50,
"fee": 1.00,
"direction": "buy"
}
FieldTypeRequiredDescription
tickerstring✅Asset ticker in SYMBOL.EXCHANGE format.
datestring✅Trade date YYYY-MM-DD.
quantitynumber✅Number of shares/units (positive).
pricenumber✅Execution price per share (in the asset's native currency).
feenumber—Commission/fee. Default 0.
directionstring—buy (default) or sell. In advanced mode: also short and cover.

PATCH /v1/portfolios/:id/trades/:trade_id​

Edit an existing trade. Use the same fields as POST /v1/portfolios/:id/trades. Only the fields you send are updated.


DELETE /v1/portfolios/:id/trades/:trade_id​

Remove a single trade entry from the ledger.


DELETE /v1/portfolios/:id/positions/:listing_id​

Remove all trades for a specific position (identified by its internal listing_id). This closes out the entire position history for that stock.

ParameterTypeDescription
afterstringOnly delete trades after this date YYYY-MM-DD.
beforestringOnly delete trades before this date YYYY-MM-DD.
Close out NVDA position entirely
DELETE /v1/portfolios/42/positions/12345