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
) – The unique identifier of a saved search criteria from Morningstar Direct. The id string is numeric. For example, “9009”.- Returns:
A DataFrame object with the investments that match the search criteria. The DataFrame columns include:
secid
masterportfolioid
tradingsymbol
name
securitytype
exchangeid
category
- Return type:
DataFrame
Examples
Get core fields for investments with search criteria id “4237053”
import morningstar_data as md df = md.direct.user_items.get_search_results(search_criteria_id="4237053") 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 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.
- morningstar_data.direct.user_items.get_search_criteria_conditions(
- search_criteria_id: str,
Returns the specific logic used for a given search criteria.
- Parameters:
search_criteria_id (
str
) – The unique identifier of a saved search criteria from Morningstar Direct. The id string is numeric. For example, “9009”.- Returns:
Search conditions
- Return type:
dict
- Examples:
import morningstar_data as md df = md.direct.user_items.get_search_criteria_conditions(search_criteria_id="9009") 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 user lacks authentication.
BadRequestError: Raised when the user does not provide a properly formatted request.
ForbiddenError: Triggered when user lacks permission to access a 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.
- 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 criterias data. The 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 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.