Search Criteria#
- morningstar_data.direct.user_items.get_search_results(
- search_criteria_id: str,
Returns all investments matching the specified search criteria.
- Parameters:
search_criteria_id (
str
) – Unique identifier of a saved search criteria in Morningstar Direct, e.g., “9009”. Use get_search_criteria to discover possible values.- Returns:
A DataFrame object with investments that match the search criteria. DataFrame columns include:
secid
masterportfolioid
tradingsymbol
name
securitytype
exchangeid
category
- Return type:
DataFrame
Examples
Get investments that match the given search criteria.
import morningstar_data as md df = md.direct.user_items.get_search_results(search_criteria_id="4237053") # Replace with a valid search criteria id df
- Output:
secid
masterportfolioid
tradingsymbol
name
securitytype
exchangeid
category
FOUSA06JNH
210311
AAAAX
DWS RREEF Real Assets A
FO
EXXNAS
World Allocation
…
- 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 permission to access the requested resource.
InternalServerError: Raised when the server encounters an unhandled error.
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.
- morningstar_data.direct.user_items.get_search_criteria_conditions(
- search_criteria_id: str,
Returns the detailed definition of a saved search criteria.
- Parameters:
search_criteria_id (
str
) –Unique identifier of a saved search criteria in Morningstar Direct, e.g., “9009”. Use get_search_criteria to discover possible values.
- Return type:
Dict
- Examples:
import morningstar_data as md df = md.direct.user_items.get_search_criteria_conditions(search_criteria_id="9009") # Replace with a valid search criteria id df
- Output:
{ "universeId": "FO", "subUniverseId": "", "subUniverseName": "", "securityStatus": "activeonly", "useDefinedPrimary": False, "criteria": [ { "relation": "", "field": "OS001", "operator": "=", "value": "AAAAX", "id": "FOUSA06JNH", "name": "AAAAX" } ] }
- 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 permission to access the requested resource.
InternalServerError: Raised when the server encounters an unhandled error.
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.
- morningstar_data.direct.user_items.get_search_criteria() DataFrame #
Returns all search criteria saved or shared to a user in Morningstar Direct
- Returns:
A DataFrame object with all search criteria names and identifiers. DataFrame columns include:
id
name
- Return type:
DataFrame
- Examples:
import morningstar_data as md df = md.direct.user_items.get_search_criteria() df
- Output:
id
name
4175985
sample
5022284
others
…
- 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 permission to access the requested resource.
InternalServerError: Raised when the server encounters an unhandled error.
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.