Portfolio X-Ray API

Build Portfolio X-Ray APIs into your digital experience for quick investment and earnings summaries.

Troubleshooting

Use this page to diagnose a failed request or a response that doesn't contain what you expected. Each issue lists the likely causes and how to fix them. For the meaning of a specific error code, see Errors.

Before You Start

Most problems can be traced to one of the following. Check them first.

  • The Authorization header contains Bearer {token} with a token less than 60 minutes old.
  • The Content-Type header is application/json.
  • The request uses the base URL for your region and the path /portfolioanalysis/v1/xray.
  • The body includes both Portfolios and RequestSettings, and RequestSettings includes OutputCurrency.
  • Every holding has one identifier and one position size, and all holdings in a portfolio use the same position size type.

Reading a 400 Response

A 400 response contains a Message and a SpecificErrorStatus array. Each entry describes one problem, so read every entry, not just the first.

{
  "Message": "The request is invalid.",
  "SpecificErrorStatus": [
    {
      "ErrorCode": "40015",
      "ErrorMessage": "Portfolio does not have any valid holdings. Invalid portfolio name: TestPortfolio1. Invalid Holdings: TradingSymbol:DODGX1."
    }
  ]
}

The ErrorMessage often names the portfolio and the holding that caused the problem. Use the ErrorCode to look up the issue in the sections below or on the Errors page.

Authentication and Access

Request Validation Errors

Request Structure Problems

Unexpected Results

Still Stuck?

  • Check the Errors page for the full list of error codes.
  • Compare your request with the complete example in Request Portfolio X-Ray.
  • Browse the FAQs.
  • Contact your Morningstar account manager about entitlement or licensing questions.