# Portfolio X-Ray

Analyse allocation, exposure, and risk across portfolios in a single API call. {.sub-title___devsite}

<nav class="md-docs-tabs-action___devsite">

  - [Overview](#overview)
  - [Key Capabilities](#key-capabilities)
  - [How It Works](#how-it-works)
  - [Related Content](#related-content)

</nav>

## Overview

The Portfolio X-Ray API delivers instant portfolio analysis by aggregating portfolio holdings and applying Morningstar’s full underlying holdings and classification data. It provides high quality, on demand insights into asset allocation, sector and stock exposure, overlap, and portfolio structure supporting fast, scalable portfolio diagnostics for client facing and digital use cases.

## Key Capabilities

- Submit up to 2 portfolios in a single request, each containing up to 250 holdings.
- Receive equity analysis covering sectors, world regions, market maturity, style box, price ratios, and profitability.
- Access fixed income analysis including sector breakdown, maturity distribution, credit quality, and interest rate risk.
- Retrieve risk statistics such as Sharpe ratio, standard deviation, alpha, beta, drawdown, and capture ratios.
- Get trailing and calendar year returns, plus optional rolling returns and correlation matrices.
- Apply portfolio-level or holding-level annual fees to model net-of-fee performance.

## How It Works

**1. Define your portfolios**  
Provide a name, currency, and list of holdings for each portfolio. Each holding requires one security identifier and one position size field (Weight or Value). If using Weight, also supply `TotalValue` at the portfolio level.

**2. Configure request settings**  
Set the output currency, analysis date period, performance frequency, start date, and initial value. Optionally include rolling returns, correlation matrices, gross/net return splits, and synchronised start dates across portfolios.

**3. Submit the request**  
POST your payload to `/portfolioanalysis/v1/xray`. The response returns x-ray data for all matched portfolios alongside a `SecurityReference` block for metadata on each resolved holding.

**4. Handle the response**  
Parse the `XRay` array for analysis, holdings, statistics, returns, risks, and fees. Unmatched or unentitled securities are surfaced in the `SecurityReference` block so your application can handle them gracefully.

## Related Content

* [Getting Started](/direct-web-services/documentation/direct-web-services/portfolio-x-ray/getting-started)
* [OpenAPI Specification](/direct-web-services/documentation/direct-web-services/portfolio-x-ray/openapi-specification)