Skip to content

Portfolio

The portfolio is every saved-list item with a quantity held (qtyHeld), valued at the current floor of one market scope. Enter quantities and cost bases on a list’s items (PATCH /v1/lists/{listId}/items, or the Holdings columns of a list in the app); the portfolio adds them up across all of your organization’s lists.

All three reads need an API key with catalog:read (the scope of list reads) and a plan with market data for the scope you ask for (402 otherwise; see entitlements).

Operation Returns
GET /v1/portfolio Positions, totals and exposure by event date
GET /v1/portfolio/export.csv The same rows as CSV
GET /v1/portfolio/history Cost, market value and P&L per hour or day
Terminal window
curl -H "Authorization: Bearer $STATUS302_API_KEY" \
"https://api.status302.com/v1/portfolio?scope=secondary:best"

scope is the market the floors come from (primary by default, tm_resale, secondary:best or secondary:<marketplace>). For each position:

  • costTotal = quantity × cost basis, in the cost basis’s currency (costCurrency).
  • marketValue = quantity × floor, and pnl = quantity × (floor − cost basis), in the market’s currency (currency); pnlPct is pnl ÷ the cost of the tickets in it. No seller fee is deducted. Without a floor in the scope, floor, marketValue and pnl are null.
  • bucket says when the event takes place: past, next7d, next30d, later or undated; exposure sums the totals per bucket.
  • risks flags upcoming positions: losing_soon (P&L below zero within 7 days of the event) and floor_falling (the floor’s Δ24h is at or below floorFallingAt).

Money is in minor units (see money). totals equal the holdings of GET /v1/overview.

An event held in two lists is two positions (eventPositions counts them; list names the position’s list). groupBy=event folds them into one row per event: list is null and lists names the lists, quantities and money are summed, costBasis is the average per ticket over the items that have one (null when their cost currencies differ) and risks are recomputed on the folded P&L. totals and exposure are the same either way.

GET /v1/portfolio/export.csv takes the same scope and groupBy and returns the rows as RFC 4180 CSV, in the same order: money in major units, changes as percentages, times in RFC 3339 UTC. It needs CSV export on your plan and counts against the plan’s export row limit, like list exports.

GET /v1/portfolio/history?scope=primary&from=…&to=…&interval=1d returns the portfolio’s cost, value, pnl and pnlCost per bucket, one series per currency, aligned on t (column-oriented: series[i].value[k] belongs to t[k]).

  • from defaults to 30 days before to (default now); interval defaults to 1h for spans up to 31 days and 1d beyond (at most 2000 buckets). The range is clamped to your plan’s series history.
  • An item counts from the bucket in which it was added to its list, with its current quantity and cost basis: earlier quantities and removed items are not recorded.
  • A bucket’s floor is the last one in it, else the last before it (up to 7 days before from).