---
title: "RequestPortfolioXray"
url: "https://developer-beta.morningstar.com/apis/portfolio-xray-api/versions/4c9879bf-1def-4f49-adea-5a04cd02e29e/schemas/RequestPortfolioXray"
---

> Full API specification: https://developer-beta.morningstar.com/apis/portfolio-xray-api/versions/4c9879bf-1def-4f49-adea-5a04cd02e29e.md

# RequestPortfolioXray

Generate a Portfolio X-Ray for up to **2** portfolios. The **maximum** number of holdings per portfolio is **250**.

## OpenAPI definition

```yaml
openapi: 3.1.0
info:
  title: Portfolio X-Ray API
  version: "1.0"
servers:
  - url: https://www.us-api.morningstar.com
    description: Americas Production
  - url: https://www.apac-api.morningstar.com
    description: APAC Production
  - url: https://www.emea-api.morningstar.com
    description: EMEA Production
components:
  schemas:
    InputView:
      title: InputXRayView
      type: object
      properties:
        Id:
          type: string
          description: Identifier of a predefined set of data points to return in the
            response.
          default: All
          enum:
            - All
            - Default
            - Intersection
            - Operation
            - Portfolio
            - StockIntersection
            - XrayOverview
            - Snapshot
    InputConfig:
      title: InputXRayConfig
      type: object
      properties:
        Id:
          type: string
          description: Account-specific configuration preset. Settings can be overridden
            directly in the request.
          default: Default
          enum:
            - Default
    InputRequestSettings:
      title: InputXRayRequestSettings
      required:
        - OutputCurrency
      description: Analysis settings including output currency, date range,
        performance frequency, and optional data sections.
      type: object
      properties:
        OutputCurrency:
          description: Currency used to calculate output values. 19 currencies are
            supported. Accepted values are ISO 4217 currency codes.
          type: string
          default: USD
          enum:
            - AUD
            - BRL
            - CAD
            - CHF
            - DKK
            - EUR
            - GBP
            - HKD
            - INR
            - JPY
            - MXN
            - MYR
            - NOK
            - NZD
            - SEK
            - SGD
            - TWD
            - USD
            - ZAR
          x-enumDescriptions:
            AUD: Australian Dollar
            BRL: Brazilian Real
            CAD: Canadian Dollar
            CHF: Swiss Franc
            DKK: Danish Krone
            EUR: Euro
            GBP: British Pound Sterling
            HKD: Hong Kong Dollar
            INR: Indian Rupee
            JPY: Japanese Yen
            MXN: Mexican Peso
            MYR: Malaysian Ringgit
            NOK: Norwegian Krone
            NZD: New Zealand Dollar
            SEK: Swedish Krona
            SGD: Singapore Dollar
            TWD: New Taiwan Dollar
            USD: United States Dollar
            ZAR: South African Rand
        AnalysisDateTimePeriod:
          description: End date period for the analysis. `CustomDate` requires
            `PortfolioPerformanceEndDate` to be set explicitly.
          type: string
          enum:
            - MonthEnd
            - QuarterEnd
            - YearEnd
            - CustomDate
          default: MonthEnd
        AssetClassGroupConfigs:
          $ref: "#/components/schemas/InputAssetClassGroupConfigs"
        DisableRescale:
          description: When `true`, portfolio weights are not rescaled if any holdings are
            invalid or unentitled.
          type: boolean
          default: false
        EnablePerformanceCommonEndDate:
          description: When `true`, the most recent common end date across all portfolios
            is used as the analysis end date.
          type: boolean
          default: false
        IncludeGrossNetReturns:
          description: When `true`, both gross and net return values are included in
            trailing returns and calendar year return data.
          type: boolean
          default: false
        IncludePortfolioInCorrelationMatrix:
          description: When `true`, the portfolio is included as an entry in the
            correlation matrix.
          type: boolean
          default: false
        InitialValue:
          description: Initial value of the portfolio in the output currency.
          type: number
          format: double
          minimum: 1
          default: 10000
        MaxCorrelationMatrixHoldingNumber:
          description: Maximum number of holdings to include in the correlation matrix.
            Only applies when `ReturnDataSections` includes `CorrelationMatrix`.
          type: integer
          format: int32
          default: 50
          minimum: 2
          maximum: 50
        PerformanceFrequency:
          description: Frequency of performance returns and risk calculations.
          enum:
            - Monthly
            - Quarterly
          type: string
          default: Monthly
        PortfolioPerformanceStartDate:
          description: Start date of the analysis. `CustomDate` requires
            `PortfolioPerformanceCustomStartDate` to be set explicitly.
          type: string
          enum:
            - EarliestCommon
            - EarliestAvailable
            - EarliestCommonExtended
            - EarliestCommonExtended10Year
            - Year10
            - CustomDate
          default: EarliestCommon
        PortfolioPerformanceEndDate:
          type: string
          description: End date of the analysis. Required when `AnalysisDateTimePeriod` is
            set to `CustomDate`.
          format: date
          example: 2022-10-31
        PortfolioPerformanceCustomStartDate:
          type: string
          description: "Custom start date of the analysis. Required when
            `PortfolioPerformanceStartDate` is set to `CustomDate`. Note: this
            field name contains a trailing space."
          format: date
          example: 2022-10-31
        ReturnDataSections:
          description: Additional data sections to include in the response. See
            `RollingReturnFrequencies` and `MaxCorrelationMatrixHoldingNumber`
            for related configuration.
          type: array
          items:
            type: string
            enum:
              - CorrelationMatrix
              - RollingReturns
            example: RollingReturns
        RollingReturnFrequencies:
          description: Rolling return periods to calculate. Required when
            `ReturnDataSections` includes `RollingReturns`.
          type: array
          items:
            type: string
            enum:
              - Month3
              - Month6
              - Year1
              - Year3
              - Year5
              - Year10
            example: Month3
        RollingReturnStep:
          description: Step interval (in months) between rolling return calculations. Only
            applies when `ReturnDataSections` includes `RollingReturns`.
          type: integer
          format: int32
          default: 1
          minimum: 1
        SynchronizePortfolioStartDate:
          description: When `true`, the latest common start date across all portfolios is
            used as the analysis start date for all portfolios.
          type: boolean
          default: false
    InputPortfolio:
      description: Object representing a portfolio to be analysed. Each holding must
        specify a security identifier and either `Weight` or `Value` to define
        its allocation. `TotalValue` is required when holdings use `Weight`.
      title: InputPortfolio
      required:
        - Currency
        - Holdings
        - Name
      type: object
      properties:
        Name:
          description: Portfolio name.
          type: string
        TotalValue:
          description: Total market value of the portfolio in the portfolio currency.
            Required when holdings use `Weight`.
          type: number
          format: double
          minimum: 1
          example: 20000
        Currency:
          description: Portfolio currency. 19 currencies are supported. Accepted values
            are ISO 4217 currency codes..
          type: string
          enum:
            - AUD
            - BRL
            - CAD
            - CHF
            - DKK
            - EUR
            - GBP
            - HKD
            - INR
            - JPY
            - MXN
            - MYR
            - NOK
            - NZD
            - SEK
            - SGD
            - TWD
            - USD
            - ZAR
          example: USD
        Holdings:
          type: array
          minItems: 1
          maxItems: 250
          items:
            $ref: "#/components/schemas/InputPortfolioHolding"
        Fees:
          $ref: "#/components/schemas/InputPortfolioFees"
        IrrFees:
          description: Annual fee used in the internal rate of return calculation.
          type: number
          format: double
          minimum: 1
          example: 1000
    InputAssetClassGroupConfigs:
      description: Asset class group to query.
      type: object
      properties:
        AssetClassGroupConfig:
          type: array
          description: Asset class group identifier. Maximum of one value can be passed in
            a request.
          items:
            $ref: "#/components/schemas/InputAssetClassGroupConfig"
    InputPortfolioHolding:
      description: "Each holding requires a security identifier and a position size.
        For the identifier, pass one of: `SecurityId`, `CUSIP`, `FundCode`,
        `ISIN`, `PerformanceId`, or `TradingSymbol`. If multiple identifiers are
        provided for a single security, `SecurityId` takes priority; if
        `SecurityId` is absent, the last identifier listed in the object is
        used. For the position size, pass either of: `Weight` or `Value`."
      type: object
      properties:
        SecurityId:
          description: Morningstar unique identifier of a security. Use `CASH%0.000` for
            cash positions.
          type: string
          examples:
            - FOUSA00DFS
            - CASH%0.000
        CUSIP:
          description: Security's CUSIP.
          type: string
          examples:
            - 09251T103
        ISIN:
          description: Security's ISIN.
          type: string
          examples:
            - US0378331005
        PerformanceId:
          description: Security's Morningstar Performance ID.
          type: string
          examples:
            - 0P00002QN3
        TradingSymbol:
          description: "\"Security's ticker/trading symbol.\""
          type: string
          examples:
            - MDLOX
        FundCode:
          description: Security's fund code.
          type: string
          examples:
            - ABG
        Weight:
          description: Holding weight as a percentage of portfolio total. All holding
            weights must sum to 100.
          minimum: 1
          maximum: 100
          examples:
            - 60
          type: number
          format: double
        Value:
          description: Market value of the holding in the portfolio currency. Sum of all
            holdings must equal portfolio `TotalValue`.
          minimum: 1
          examples:
            - 25000
          type: number
          format: double
        AnnualFeeFrequency:
          description: How often the holding-level annual fee is deducted.
          default: Monthly
          type: string
          enum:
            - Monthly
            - Quarterly
            - SemiAnnually
            - Annually
        AnnualFeePercent:
          description: Holding-level annual fee as a percentage of holding value (e.g.
            `1.15` = 1.15%). Defaults to `0` (no fee).
          minimum: 0
          default: 0
          examples:
            - 1.15
          type: number
          format: double
    InputPortfolioFees:
      description: Portfolio-level annual fee configuration.
      type: object
      properties:
        AnnualFeePercent:
          description: Annual fee as a percentage of portfolio value (e.g. `1.15` =
            1.15%). Defaults to `0` (no fee).
          minimum: 0
          default: 0
          example: 1.15
          type: number
          format: double
        AnnualFeeFrequency:
          description: How often the annual fee is deducted from the portfolio.
          default: Monthly
          type: string
          enum:
            - Monthly
            - Quarterly
            - SemiAnnually
            - Annually
    InputAssetClassGroupConfig:
      type: object
      properties:
        Id:
          description: Asset class group identifier.
          type: string
          enum:
            - ACG-AUDETAILED
            - ACG-BROAD-INDIA2
            - ACG-BROAD-JAPAN
            - ACG-CABROAD
            - ACG-CANBROAD4
            - ACG-EUBROAD
            - ACG-GLOBBROAD
            - ACG-NZDETAILED
            - ACG-UKBROAD
            - ACG-UK-GBR
            - ACG-USBROAD
          default: ACG-USBROAD
    RequestPortfolioXray:
      title: RequestPortfolioXray
      description: Generate a Portfolio X-Ray for up to **2** portfolios. The
        **maximum** number of holdings per portfolio is **250**.
      required:
        - Portfolios
        - RequestSettings
      type: object
      properties:
        View:
          $ref: "#/components/schemas/InputView"
        Config:
          $ref: "#/components/schemas/InputConfig"
        RequestSettings:
          $ref: "#/components/schemas/InputRequestSettings"
        Portfolios:
          description: Array of portfolios to analyse. Maximum 2 portfolios per request.
          type: array
          maxItems: 2
          minItems: 1
          items:
            $ref: "#/components/schemas/InputPortfolio"
```
