> ## 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 price history

> Retrieve historical price data for an investment product organized by tenor periods.

Fetch historical price data for an investment product, organized by tenor periods (1 week, 1 month,
3 months, 6 months, 1 year, and all-time). This data powers asset detail charts, allowing users to
visualize price movements across different time horizons.

### Authentication & headers

<ParamField header="Authorization" type="string" required>
  Bearer token issued by Auth0. Format: `Bearer YOUR_ACCESS_TOKEN` with the `read:users` scope.
</ParamField>

### Path parameters

<ParamField path="isin" type="string" required>
  ISIN of the investment product (12 alphanumeric characters).
</ParamField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X GET 'https://api.wealthyhood.com/investment-products/IE00B4L5Y983/price-history' \
    -H 'Accept: application/json' \
    -H 'Authorization: Bearer YOUR_ACCESS_TOKEN'
  ```
</RequestExample>

<ResponseExample>
  ```json Success theme={null}
  {
    "1w": {
      "data": [
        { "timestamp": 1720440000000, "close": 78.25 },
        { "timestamp": 1720526400000, "close": 78.92 },
        { "timestamp": 1720612800000, "close": 79.15 },
        { "timestamp": 1720699200000, "close": 79.42 }
      ],
      "returns": 1.49,
      "displayIntraday": true
    },
    "1m": {
      "data": [
        { "timestamp": 1717804800000, "close": 76.10 },
        { "timestamp": 1718409600000, "close": 77.25 },
        { "timestamp": 1719014400000, "close": 78.50 },
        { "timestamp": 1719619200000, "close": 79.42 }
      ],
      "returns": 4.36,
      "displayIntraday": true
    },
    "3m": {
      "data": [
        { "timestamp": 1712016000000, "close": 72.30 },
        { "timestamp": 1714694400000, "close": 75.80 },
        { "timestamp": 1717372800000, "close": 79.42 }
      ],
      "returns": 9.85,
      "displayIntraday": false
    },
    "6m": {
      "data": [
        { "timestamp": 1704153600000, "close": 68.50 },
        { "timestamp": 1709424000000, "close": 73.20 },
        { "timestamp": 1714694400000, "close": 79.42 }
      ],
      "returns": 15.94,
      "displayIntraday": false
    },
    "1y": {
      "data": [
        { "timestamp": 1688947200000, "close": 62.15 },
        { "timestamp": 1696723200000, "close": 67.80 },
        { "timestamp": 1704499200000, "close": 72.30 },
        { "timestamp": 1712275200000, "close": 79.42 }
      ],
      "returns": 27.79,
      "displayIntraday": false
    },
    "max": {
      "data": [
        { "timestamp": 1546300800000, "close": 38.50 },
        { "timestamp": 1609459200000, "close": 52.10 },
        { "timestamp": 1672531200000, "close": 68.90 },
        { "timestamp": 1720699200000, "close": 79.42 }
      ],
      "returns": 106.29,
      "displayIntraday": false
    }
  }
  ```
</ResponseExample>

### Response fields

The response is an object with tenor keys, each containing price data for that period.

<ResponseField name="1w | 1m | 3m | 6m | 1y | max" type="TenorPriceData">
  Price data for the corresponding tenor period.

  <Expandable title="TenorPriceData properties">
    <ResponseField name="data" type="PriceDataPoint[]" required>
      Array of timestamped price points for charting.

      <Expandable title="PriceDataPoint properties">
        <ResponseField name="timestamp" type="integer" required>
          Unix timestamp in milliseconds.
        </ResponseField>

        <ResponseField name="close" type="number" required>
          Closing price at this timestamp in the asset's traded currency.
        </ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="returns" type="number" required>
      Percentage return for this tenor period. Positive values indicate gains, negative values indicate losses.
    </ResponseField>

    <ResponseField name="displayIntraday" type="boolean" required>
      Whether to display intraday granularity for this tenor. Typically `true` for shorter periods (1w, 1m)
      and `false` for longer periods (3m, 6m, 1y, max).
    </ResponseField>
  </Expandable>
</ResponseField>

### Tenor periods

| Key   | Period                    | Typical granularity |
| ----- | ------------------------- | ------------------- |
| `1w`  | 1 week                    | Intraday (minutes)  |
| `1m`  | 1 month                   | Intraday (minutes)  |
| `3m`  | 3 months                  | Daily               |
| `6m`  | 6 months                  | Daily               |
| `1y`  | 1 year                    | Daily               |
| `max` | All-time (up to 10 years) | Daily               |

<Tip>
  Use the `displayIntraday` flag to determine chart rendering granularity. For intraday data, you may
  want to show time labels; for daily data, date labels are more appropriate.
</Tip>


## OpenAPI

````yaml GET /investment-products/{isin}/price-history
openapi: 3.0.3
info:
  title: Wealthyhood Investment Products API
  version: 1.0.0
  description: >
    Machine-to-machine endpoints that expose the Wealthyhood asset universe,
    fundamentals, and

    user-specific portfolio context.


    All requests require an Auth0-issued bearer token with the `read:users`
    scope, and must 

    include the `x-user-id` header so the retail user context can be resolved.
servers:
  - url: https://{host}
    variables:
      host:
        default: api.wealthyhood.com
        description: Wealthyhood API host.
security:
  - bearerAuth: []
tags:
  - name: Investment Products
    description: >-
      Listed instruments available to Wealthyhood investors together with
      client-specific insights.
paths:
  /investment-products/{isin}/price-history:
    get:
      tags:
        - Investment Products
      summary: Get historical price data for an asset
      description: >
        Retrieve historical price data for an investment product organized by
        tenor periods. This endpoint

        provides the data needed to render price charts across different time
        horizons (1 week, 1 month,

        3 months, 6 months, 1 year, and all-time).


        Each tenor includes an array of timestamped price points, a returns
        percentage for the period,

        and a flag indicating whether to display intraday granularity.
      parameters:
        - $ref: '#/components/parameters/Isin'
      responses:
        '200':
          description: Historical price data organized by tenor.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PriceHistoryResponse'
              examples:
                priceHistory:
                  summary: Price history across tenors
                  value:
                    1w:
                      data:
                        - timestamp: 1720440000000
                          close: 78.25
                        - timestamp: 1720526400000
                          close: 78.92
                        - timestamp: 1720612800000
                          close: 79.15
                        - timestamp: 1720699200000
                          close: 79.42
                      returns: 1.49
                      displayIntraday: true
                    1m:
                      data:
                        - timestamp: 1717804800000
                          close: 76.1
                        - timestamp: 1718409600000
                          close: 77.25
                        - timestamp: 1719014400000
                          close: 78.5
                        - timestamp: 1719619200000
                          close: 79.42
                      returns: 4.36
                      displayIntraday: true
                    3m:
                      data:
                        - timestamp: 1712016000000
                          close: 72.3
                        - timestamp: 1714694400000
                          close: 75.8
                        - timestamp: 1717372800000
                          close: 79.42
                      returns: 9.85
                      displayIntraday: false
                    6m:
                      data:
                        - timestamp: 1704153600000
                          close: 68.5
                        - timestamp: 1709424000000
                          close: 73.2
                        - timestamp: 1714694400000
                          close: 79.42
                      returns: 15.94
                      displayIntraday: false
                    1y:
                      data:
                        - timestamp: 1688947200000
                          close: 62.15
                        - timestamp: 1696723200000
                          close: 67.8
                        - timestamp: 1704499200000
                          close: 72.3
                        - timestamp: 1712275200000
                          close: 79.42
                      returns: 27.79
                      displayIntraday: false
                    max:
                      data:
                        - timestamp: 1546300800000
                          close: 38.5
                        - timestamp: 1609459200000
                          close: 52.1
                        - timestamp: 1672531200000
                          close: 68.9
                        - timestamp: 1720699200000
                          close: 79.42
                      returns: 106.29
                      displayIntraday: false
        '400':
          $ref: '#/components/responses/BadRequestError'
        '401':
          $ref: '#/components/responses/UnauthorizedError'
        '404':
          $ref: '#/components/responses/NotFoundError'
components:
  parameters:
    Isin:
      name: isin
      in: path
      required: true
      description: ISIN of the investment product to retrieve.
      schema:
        type: string
        pattern: ^[A-Z0-9]{12}$
  schemas:
    PriceHistoryResponse:
      type: object
      description: >-
        Historical price data organized by tenor period. Each tenor key maps to
        price data for that time horizon.
      properties:
        1w:
          $ref: '#/components/schemas/TenorPriceData'
        1m:
          $ref: '#/components/schemas/TenorPriceData'
        3m:
          $ref: '#/components/schemas/TenorPriceData'
        6m:
          $ref: '#/components/schemas/TenorPriceData'
        1y:
          $ref: '#/components/schemas/TenorPriceData'
        max:
          $ref: '#/components/schemas/TenorPriceData'
    TenorPriceData:
      type: object
      description: Price data for a specific tenor period.
      properties:
        data:
          type: array
          description: Array of timestamped price points.
          items:
            $ref: '#/components/schemas/PriceDataPoint'
        returns:
          type: number
          format: float
          description: Percentage return for this tenor period.
        displayIntraday:
          type: boolean
          description: >-
            Whether to display intraday granularity for this tenor (typically
            true for shorter periods like 1w and 1m).
      required:
        - data
        - returns
        - displayIntraday
    ApiErrorResponse:
      type: object
      properties:
        status:
          type: integer
        error:
          type: object
          properties:
            message:
              type: string
            description:
              type: string
              nullable: true
        responseId:
          type: string
          format: uuid
      required:
        - status
        - error
    PriceDataPoint:
      type: object
      description: A single price data point for charting.
      properties:
        timestamp:
          type: integer
          format: int64
          description: Unix timestamp in milliseconds.
        close:
          type: number
          format: float
          description: Closing price at this timestamp.
      required:
        - timestamp
        - close
  responses:
    BadRequestError:
      description: Validation failure or business rule violation.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 400
            error:
              message: Unknown asset ISIN
            responseId: 6d86bcab-9c21-45da-9b9d-820d598e1f3b
    UnauthorizedError:
      description: Missing or invalid bearer token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 401
            error:
              message: User not found
            responseId: 145f2b0d-1d5b-4e91-8d0d-7af0ae9ad13a
    NotFoundError:
      description: Investment product was not found.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ApiErrorResponse'
          example:
            status: 404
            error:
              message: Product not found
            responseId: 0c8d8376-43db-4318-8ad4-0452bc0ce450
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: Auth0-issued access token that includes the `read:users` scope.

````