How your portfolio has done
get_performanceHow the signed-in user's portfolio has actually done — an annualized money-weighted return (XIRR) in their preferred currency, including dividends received and any sales, next to what the same money moved on the same days would have made in broad index funds.
Money-weighted, not time-weighted: it counts when each amount went in, so
money invested before a good year earns more of the credit than money added
at the end. Every flow is converted at the exchange rate published on its
own date, so currency movement is part of the answer — unlike get_realized,
which deliberately never converts because it measures a position rather than
a portfolio.
status says whether a number was produced:
"ok"—rate_pctand the comparison are present."insufficient_ledger"— no holding has any trades behind it, so there is nothing to measure a return on. Ask the user to import their broker's trades."awaiting_rates"— historical exchange rates for the years the ledger spans are still being fetched; they arrive shortly.
coverage matters when reporting this. Holdings whose shares were typed
in by hand have no purchase behind them, so they are excluded from both the
flows and the value: the rate describes only the part with trade history,
and coverage.value_pct says how much of the portfolio that is. Say so
rather than presenting the figure as the whole portfolio's.
Benchmarks are accumulating funds, whose price already includes reinvested dividends, so both sides are total return. They are priced monthly, so treat the comparison as a direction rather than a decimal. Private to the caller.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| portfolio | No |