> ## Documentation Index
> Fetch the complete documentation index at: https://docs.wealthyhood.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Get portfolio prices by tenor

> Retrieve chart-ready price series for a portfolio across supported tenors.



## OpenAPI

````yaml GET /portfolios/{id}/prices-by-tenor
openapi: 3.0.3
info:
  title: Wealthyhood Portfolio API
  version: 1.0.0
  description: >
    Investments screen portfolio endpoints that expose chart prices and return
    metrics.


    All requests require a bearer token with the scopes advertised in the
    primary specification, 

    and must include the `x-user-id` header so the platform can resolve the
    acting investor.
servers:
  - url: https://{host}
    variables:
      host:
        default: api.wealthyhood.com
        description: Wealthyhood API host name.
security:
  - bearerAuth: []
tags:
  - name: Portfolio
    description: >-
      Investments screen data for a single portfolio (prices and performance by
      tenor).
paths:
  /portfolios/{id}/prices-by-tenor:
    get:
      tags:
        - Portfolio
      summary: Get portfolio prices by tenor
      description: >
        Returns sampled portfolio prices grouped by tenor for building the
        investments screen chart. The response

        contains separate arrays keyed by tenor code (e.g. `1w`, `1m`, `max`)
        with each point expressed in

        the investor's base currency.
      parameters:
        - $ref: '#/components/parameters/ExternalUserId'
        - $ref: '#/components/parameters/PortfolioId'
      responses:
        '200':
          description: Portfolio prices organised by tenor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PortfolioPricesByTenor'
              examples:
                sample:
                  summary: One-week and one-month series excerpt
                  value:
                    1w:
                      data:
                        - timestamp: 1720601400000
                          value: 5123.42
                          displayIntraday: true
                        - timestamp: 1720687800000
                          value: 5138.11
                          displayIntraday: true
                    1m:
                      data:
                        - timestamp: 1718188800000
                          value: 4980.3
                          displayIntraday: true
                        - timestamp: 1720687800000
                          value: 5138.11
                          displayIntraday: true
                    max:
                      data:
                        - timestamp: 1646091600000
                          value: 2100.54
                          displayIntraday: false
                        - timestamp: 1720687800000
                          value: 5138.11
                          displayIntraday: false
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '403':
          $ref: '#/components/responses/ForbiddenError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  parameters:
    ExternalUserId:
      name: x-user-id
      in: header
      required: true
      description: MongoDB identifier of the user whose portfolio is being queried.
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
    PortfolioId:
      name: id
      in: path
      required: true
      description: Portfolio identifier belonging to the authenticated user.
      schema:
        type: string
        pattern: ^[a-f0-9]{24}$
  schemas:
    PortfolioPricesByTenor:
      type: object
      description: >-
        Price series grouped by tenor code. Only tenors flagged for display are
        returned.
      additionalProperties: false
      properties:
        max:
          $ref: '#/components/schemas/TenorSeries'
        1y:
          $ref: '#/components/schemas/TenorSeries'
        6m:
          $ref: '#/components/schemas/TenorSeries'
        3m:
          $ref: '#/components/schemas/TenorSeries'
        1m:
          $ref: '#/components/schemas/TenorSeries'
        1w:
          $ref: '#/components/schemas/TenorSeries'
    TenorSeries:
      type: object
      required:
        - data
      properties:
        data:
          type: array
          description: Sampled time-series data for the tenor.
          items:
            $ref: '#/components/schemas/TenorDataPoint'
    ApiErrorResponse:
      type: object
      properties:
        status:
          type: integer
        error:
          type: object
          properties:
            message:
              type: string
            description:
              type: string
              nullable: true
        responseId:
          type: string
          format: uuid
      additionalProperties: false
    TenorDataPoint:
      type: object
      required:
        - timestamp
        - value
        - displayIntraday
      properties:
        timestamp:
          type: integer
          format: int64
          description: Unix timestamp in milliseconds.
        value:
          type: number
          format: double
          description: Portfolio value in the investor's base currency.
        displayIntraday:
          type: boolean
          description: >-
            Indicates whether the client should render intraday granularity for
            this tenor.
  responses:
    UnauthorizedError:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 401
            error:
              message: User not found
            responseId: 56962f31-e1bc-4a32-8b47-623f793aa2f8
    ForbiddenError:
      description: >-
        Authenticated user cannot access the requested portfolio or lacks
        scopes.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 403
            error:
              message: Portfolio does not belong to user
            responseId: 1c8b2106-5f8f-4f71-8f06-23a53205b384
    NotFoundError:
      description: Portfolio or related resource was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 404
            error:
              message: Portfolio not found
            responseId: 77354fbd-2d0a-4f5a-8e15-a64c2b7ac3b5
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Auth0-issued access token that includes the scopes listed for the route.

````