Portfolio List#

morningstar_data.direct.user_items.get_portfolios(
portfolio_type: str | None = None,
) DataFrame#

Returns all portfolios for the given portfolio type.

Parameters:

portfolio_type (str) – The portfolio type. The available options are: transaction_accounts, client_accounts, model_portfolios, custom_benchmarks.

Returns:

A DataFrame object with portfolio details. The DataFrame columns include:

  • PortfolioId

  • Name

  • Type

Return type:

DataFrame

Examples

Get client account portfolios.

import morningstar_data as md

df = md.direct.user_items.get_portfolios(portfolio_type = "client_accounts")
df
Output:

PortfolioId

Name

Type

3d25b613-ae42-4cb6-bd05-7ba7c74883f3;UA

Portfolio1

client_accounts

5d25b613-ae42-4cb6-bd05-7ba7c74883f3;BK

Portfolio2

client_accounts

Errors:

AccessDeniedError: Raised when the user is not authenticated.

BadRequestError: Raised when the user does not provide a properly formatted request.

ForbiddenError: Raised when the user does not have permissions to access the requested resource.

InternalServerError: Raised when the server encounters an error it does not know how to handle.

NetworkExceptionError: Raised when the request fails to reach the server due to a network error.

ResourceNotFoundError: Raised when the requested resource does not exist in Direct.