Lookup#
- morningstar_data.direct.get_data_point_settings(
- data_point_ids: List[str],
Returns a DataFrame of settings for a given set of data points. This settings DataFrame can then be manipulated to reflect the specific settings to be used for data retrieval.
- Parameters:
data_point_ids (
list
) – A list of unique identifiers for data points. The format is an array of data point id. Example: [“OS01W”, “HP010”]- Returns:
A DataFrame object with data point settings data. The DataFrame columns include:
datapointId
datapointName
displayName
currency
preEuroConversion
sourceId
frequency
startDate
endDate
floatStart
floatEnd
startDelay
endDelay
diffStart
diffEnd
compounding
calculationId
annualized
annualDays
benchmark
riskfree
windowType
windowSize
stepSize
requireContinueData
fit
scalType
scalValue
scalPercentValue
timehorizon
- Return type:
DataFrame
Examples
Get data point setting for data point id “OS01W”.
import morningstar_data as md df = md.direct.get_data_point_settings(data_point_ids=["OS01W"]) df
- Output:
datapointId
datapointName
…
calcMnav
showType
transType
OS01W
Name
…
None
None
None
- morningstar_data.lookup.currency_codes(
- keyword: str | None = None,
Returns currency codes and currency name that match the given keyword. If no keyword is provided, the function returns all currency codes and currency names.
- Parameters:
keyword (Optional[str], optional) – A string used to lookup currency codes. Example: “USD”. Returns matching currency code for the keyword ‘USD’.
- Returns:
Returns a DataFrame. The DataFrame columns include:
currency_code
currency_name
- Return type:
DataFrame
- Examples:
Search currency codes based on keyword “Afgh”
import morningstar_data as md df = md.lookup.currency_codes( keyword="Afgh" ) df
- Output:
currency_code
currency_name
AFN
Afghani
- Errors:
AccessDeniedError: Raised when the user is not authenticated.
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.
NetworkError: Raised when the request fails to reach the server due to a network error.
ResourceNotFoundError: Raised when a currency code matching the given keyword does not exist.