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

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

# InputPortfolio

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`.

## 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:
    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
    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
```
