Skip to main content
GET
/
portfolios
/
{id}
/
with-returns-by-tenor
Get portfolio with returns by tenor
curl --request GET \
  --url https://{host}/portfolios/{id}/with-returns-by-tenor \
  --header 'Authorization: Bearer <token>' \
  --header 'x-user-id: <x-user-id>'
{
  "id": "64f0c51e7fb3fc001234abcd",
  "currency": "EUR",
  "calculatedPrice": 5123.42,
  "returnsValues": {
    "max": 0.143,
    "1y": 0.082,
    "6m": 0.045,
    "3m": 0.023,
    "1m": 0.012,
    "1w": 0.003
  },
  "upByValues": {
    "max": 642.15,
    "1y": 390.25,
    "6m": 210.5,
    "3m": 105.3,
    "1m": 54.2,
    "1w": 13.5
  },
  "holdings": [
    {
      "isin": "US88160R1014",
      "assetCommonId": "equities_tesla",
      "quantity": 12.5,
      "sinceBuyReturns": 0.156
    },
    {
      "isin": "US9229087699",
      "assetCommonId": "etf_vanguard_snp500",
      "quantity": 8,
      "sinceBuyReturns": 0.089
    }
  ],
  "createdAt": "2024-03-01T10:00:00.000Z",
  "updatedAt": "2024-07-10T12:00:00.000Z"
}

Authorizations

Authorization
string
header
required

Auth0-issued access token that includes the scopes listed for the route.

Headers

x-user-id
string
required

MongoDB identifier of the user whose portfolio is being queried.

Path Parameters

id
string
required

Portfolio identifier belonging to the authenticated user.

Response

Portfolio with returns and upBy values by tenor.

id
string
required

Portfolio unique identifier.

currency
string
required

ISO currency code for the portfolio (e.g. EUR, GBP, USD).

calculatedPrice
number<double>
required

Latest calculated portfolio value in the user's currency.

returnsValues
object
required

Map of tenor code to numeric value.

upByValues
object
required

Map of tenor code to numeric value.

holdings
object[]
required

Array of holdings with returns data.

createdAt
string<date-time>
required

Portfolio creation timestamp.

updatedAt
string<date-time>
required

Last update timestamp.