diff --git a/openbb_platform/core/poetry.lock b/openbb_platform/core/poetry.lock index 9e84628997e..d833cea7f79 100644 --- a/openbb_platform/core/poetry.lock +++ b/openbb_platform/core/poetry.lock @@ -1162,6 +1162,7 @@ typing-extensions = [ {version = ">=4.12.2", markers = "python_version >= \"3.13\""}, {version = ">=4.6.1", markers = "python_version < \"3.13\""}, ] +tzdata = {version = "*", markers = "python_version >= \"3.9\""} [package.extras] email = ["email-validator (>=2.0.0)"] diff --git a/openbb_platform/extensions/economy/openbb_economy/economy_views.py b/openbb_platform/extensions/economy/openbb_economy/economy_views.py index c602858ed0a..f4ae6ae9d86 100644 --- a/openbb_platform/extensions/economy/openbb_economy/economy_views.py +++ b/openbb_platform/extensions/economy/openbb_economy/economy_views.py @@ -531,3 +531,210 @@ class EconomyViews: content = fig.to_plotly_json() return fig, content + + @staticmethod + def economy_survey_bls_series( + **kwargs, + ) -> Tuple["OpenBBFigure", Dict[str, Any]]: + """Economy Survey BLS Series Chart. + + Parameters + ---------- + data: Optional[Union[DataFrame, List[Data]]] + Filtered subset of the parent results. + target_symbol: Optional[str] + The target symbol(s) to plot. Plot multiple symbols by separating them with a comma. Max 10 symbols. + target_col: Optional[str] + The target column to plot. Default is 'value'. + plot_type: Literal["line", "bar"] + The type of plot to display. Default is 'line', unless the data is significantly small. + normalize: bool + Normalize the data before displaying. Default is False. + title: Optional[str] + The title of the chart. + xtitle: Optional[str] + The title of the x-axis. + ytitle: Optional[str] + The title of the y-axis. + bar_kwargs: Optional[Dict] + Additional keyword arguments applied to `fig.add_bar`. + scatter_kwargs: Optional[Dict] + Additional keyword arguments applied to `fig.add_scatter`. + layout_kwargs: Optional[Dict] + Additional keyword arguments applied to `fig.update_layout`. + """ + # pylint: disable=import-outside-toplevel + from openbb_charting.charts.generic_charts import bar_chart, line_chart + from openbb_charting.charts.helpers import ( + z_score_standardization, + ) + from openbb_core.app.utils import basemodel_to_df + from pandas import DataFrame + + provider = kwargs.get("provider") + + if provider != "bls": + raise RuntimeError( + f"This charting method does not support {provider}. Supported providers: bls." + ) + + _data = ( + kwargs.pop("data", None) + if "data" in kwargs and kwargs["data"] is not None + else kwargs.get("obbject_item") + ) + df = DataFrame() + + if isinstance(_data, DataFrame) and not _data.empty: + df = _data.reset_index() if _data.index.name == "date" else _data + else: + try: + df = basemodel_to_df(_data, index=None) # type: ignore + except Exception as e: + raise RuntimeError("Unable to process supplied data.") from e + + if df.empty or len(df) < 2: + raise RuntimeError("No data found to plot.") + + cols = df.columns.to_list() + target_col = kwargs.get("target_col", "value") + if target_col not in cols: + raise RuntimeError(f"Column '{target_col}' not found in the data.") + + new_df = df.pivot(columns="symbol", values=target_col, index="date") + target_symbols = kwargs.get("target_symbol", "").split(",")[:10] # type: ignore + + if not target_symbols or len(target_symbols) == 0 or target_symbols[0] == "": + target_symbols = new_df.columns.to_list()[:10] + + metadata = kwargs["extra"].get("results_metadata", {}) # type: ignore + ytitle = kwargs.get("ytitle", "") + + new_df = new_df.filter(target_symbols, axis=1) + + if "percent" in target_col.lower(): # type: ignore + ytitle = ( + ytitle + if ytitle + else target_col.replace("change_percent_", "").replace("M", " Month") # type: ignore + + " Change (%)" + ) + new_df = new_df.apply(lambda x: x * 100) + elif "change" in target_col.lower() and "percent" not in target_col.lower(): # type: ignore + ytitle = ( + ytitle + if ytitle + else target_col.replace("change_", "").replace("M", " Month") # type: ignore + + " Change" + ) + + title_map: Dict = {} + for symbol in target_symbols: + if symbol not in new_df.columns: + continue + survey_name = metadata.get(symbol, {}).get("survey_name", symbol) # type: ignore + series_title = metadata.get(symbol, {}).get("series_title", symbol) # type: ignore + + if survey_name != series_title: + title_map[symbol] = f"{survey_name} \n {series_title}" + + normalize = kwargs.get("normalize", False) + same_axis = kwargs.get("same_axis", False) + + if normalize: + new_df = new_df.apply(z_score_standardization) + same_axis = True + if ytitle: + ytitle = f"Normalized {ytitle.replace('(%)', '')}" # type: ignore + + plot_type = kwargs.get("plot_type") + + if plot_type is None: + plot_type = ( + "line" # type: ignore + if (len(new_df.index) > 36 and len(new_df.columns.to_list()) >= 1) + else "bar" + ) + + layout_kwargs: Dict = kwargs.pop("layout_kwargs", {}) # type: ignore + scatter_kwargs: Dict = kwargs.pop("scatter_kwargs", {}) # type: ignore + bar_kwargs: Dict = kwargs.pop("bar_kwargs", {}) # type: ignore + hovertemplate = scatter_kwargs.pop("hovertemplate", None) # type: ignore + trace_titles = { + symbol: metadata.get(symbol, {}) + .get("series_title", symbol) + .replace(",", " -") + for symbol in target_symbols + } + new_df.columns = [trace_titles.get(col, col) for col in new_df.columns] + scatter_kwargs["hovertemplate"] = ( # type: ignore + hovertemplate if hovertemplate else "%{fullData.name}:%{y}" + ) + + if len(target_symbols) == 1: + title = title_map.get(target_symbols[0], target_symbols[0]) + fig = ( + line_chart( + data=new_df, + title=title, + ytitle=ytitle, + y=list(trace_titles.values()), + scatter_kwargs=scatter_kwargs, + layout_kwargs=layout_kwargs, + **kwargs, + ) + if plot_type == "line" + else bar_chart( + data=new_df, + title=title, + ytitle=ytitle, + x=new_df.index, + y=list(trace_titles.values()), + layout_kwargs=layout_kwargs, + bar_kwargs=bar_kwargs, + **kwargs, + ) + ) + else: + survey_name = metadata.get(target_symbols[0], {}).get("survey_name", target_symbols[0]).split("\n")[0].strip() # type: ignore + _t = kwargs.pop("title", None) + title = _t if _t else f"{survey_name} - {ytitle}" if ytitle else survey_name + fig = ( + line_chart( + data=new_df, + y=list(trace_titles.values()), + title=title, + ytitle=ytitle, + same_axis=same_axis, + normalize=False, + scatter_kwargs=scatter_kwargs, + layout_kwargs=layout_kwargs, + **kwargs, + ) + if plot_type == "line" + else bar_chart( + data=new_df, + title=title, + ytitle=ytitle, + x=new_df.index, + y=list(trace_titles.values()), + layout_kwargs=layout_kwargs, + bar_kwargs=bar_kwargs, + **kwargs, + ) + ) + + fig.update_layout( + margin=dict(b=20), + legend=dict( + orientation="h", + yanchor="top", + xanchor="left", + y=-0.075, + x=0, + font=dict(size=12), + ), + ) + content = fig.to_plotly_json() + + return fig, content diff --git a/openbb_platform/openbb/package/economy.py b/openbb_platform/openbb/package/economy.py index 4864b98646f..5ee39b437b1 100644 --- a/openbb_platform/openbb/package/economy.py +++ b/openbb_platform/openbb/package/economy.py @@ -88,17 +88,17 @@ class ROUTER_economy(Container): AvailableIndicators ------------------- symbol_root : Optional[str] - The root symbol representing the indicator. + The root symbol representing the indicator. symbol : Optional[str] - Symbol representing the entity requested in the data. The root symbol with additional codes. + Symbol representing the entity requested in the data. The root symbol with additional codes. country : Optional[str] - The name of the country, region, or entity represented by the symbol. + The name of the country, region, or entity represented by the symbol. iso : Optional[str] - The ISO code of the country, region, or entity represented by the symbol. + The ISO code of the country, region, or entity represented by the symbol. description : Optional[str] - The description of the indicator. + The description of the indicator. frequency : Optional[str] - The frequency of the indicator data. + The frequency of the indicator data. currency : Optional[str] The currency, or unit, the data is based in. (provider: econdb) scale : Optional[str] @@ -138,7 +138,8 @@ class ROUTER_economy(Container): ("econdb", "imf"), ) }, - standard_params={}, + standard_params={ + }, extra_params=kwargs, ) ) @@ -147,12 +148,7 @@ class ROUTER_economy(Container): @validate def balance_of_payments( self, - provider: Annotated[ - Optional[Literal["fred"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred." - ), - ] = None, + provider: Annotated[Optional[Literal["fred"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.")] = None, **kwargs ) -> OBBject: """Balance of Payments Reports. @@ -185,47 +181,47 @@ class ROUTER_economy(Container): BalanceOfPayments ----------------- period : Optional[date] - The date representing the beginning of the reporting period. + The date representing the beginning of the reporting period. balance_percent_of_gdp : Optional[float] - Current Account Balance as Percent of GDP + Current Account Balance as Percent of GDP balance_total : Optional[float] - Current Account Total Balance (USD) + Current Account Total Balance (USD) balance_total_services : Optional[float] - Current Account Total Services Balance (USD) + Current Account Total Services Balance (USD) balance_total_secondary_income : Optional[float] - Current Account Total Secondary Income Balance (USD) + Current Account Total Secondary Income Balance (USD) balance_total_goods : Optional[float] - Current Account Total Goods Balance (USD) + Current Account Total Goods Balance (USD) balance_total_primary_income : Optional[float] - Current Account Total Primary Income Balance (USD) + Current Account Total Primary Income Balance (USD) credits_services_percent_of_goods_and_services : Optional[float] - Current Account Credits Services as Percent of Goods and Services + Current Account Credits Services as Percent of Goods and Services credits_services_percent_of_current_account : Optional[float] - Current Account Credits Services as Percent of Current Account + Current Account Credits Services as Percent of Current Account credits_total_services : Optional[float] - Current Account Credits Total Services (USD) + Current Account Credits Total Services (USD) credits_total_goods : Optional[float] - Current Account Credits Total Goods (USD) + Current Account Credits Total Goods (USD) credits_total_primary_income : Optional[float] - Current Account Credits Total Primary Income (USD) + Current Account Credits Total Primary Income (USD) credits_total_secondary_income : Optional[float] - Current Account Credits Total Secondary Income (USD) + Current Account Credits Total Secondary Income (USD) credits_total : Optional[float] - Current Account Credits Total (USD) + Current Account Credits Total (USD) debits_services_percent_of_goods_and_services : Optional[float] - Current Account Debits Services as Percent of Goods and Services + Current Account Debits Services as Percent of Goods and Services debits_services_percent_of_current_account : Optional[float] - Current Account Debits Services as Percent of Current Account + Current Account Debits Services as Percent of Current Account debits_total_services : Optional[float] - Current Account Debits Total Services (USD) + Current Account Debits Total Services (USD) debits_total_goods : Optional[float] - Current Account Debits Total Goods (USD) + Current Account Debits Total Goods (USD) debits_total_primary_income : Optional[float] - Current Account Debits Total Primary Income (USD) + Current Account Debits Total Primary Income (USD) debits_total : Optional[float] - Current Account Debits Total (USD) + Current Account Debits Total (USD) debits_total_secondary_income : Optional[float] - Current Account Debits Total Secondary Income (USD) + Current Account Debits Total Secondary Income (USD) Examples -------- @@ -244,7 +240,8 @@ class ROUTER_economy(Container): ("fred",), ) }, - standard_params={}, + standard_params={ + }, extra_params=kwargs, ) ) @@ -253,20 +250,9 @@ class ROUTER_economy(Container): @validate def calendar( self, - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["fmp", "tradingeconomics"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, tradingeconomics." - ), - ] = None, + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["fmp", "tradingeconomics"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, tradingeconomics.")] = None, **kwargs ) -> OBBject: """Get the upcoming, or historical, economic calendar of global events. @@ -305,29 +291,29 @@ class ROUTER_economy(Container): EconomicCalendar ---------------- date : Optional[datetime] - The date of the data. + The date of the data. country : Optional[str] - Country of event. + Country of event. category : Optional[str] - Category of event. + Category of event. event : Optional[str] - Event name. + Event name. importance : Optional[str] - The importance level for the event. + The importance level for the event. source : Optional[str] - Source of the data. + Source of the data. currency : Optional[str] - Currency of the data. + Currency of the data. unit : Optional[str] - Unit of the data. + Unit of the data. consensus : Optional[Union[str, float]] - Average forecast among a representative group of economists. + Average forecast among a representative group of economists. previous : Optional[Union[str, float]] - Value for the previous period after the revision (if revision is applicable). + Value for the previous period after the revision (if revision is applicable). revised : Optional[Union[str, float]] - Revised previous value, if applicable. + Revised previous value, if applicable. actual : Optional[Union[str, float]] - Latest released value. + Latest released value. change : Optional[float] Value change since previous. (provider: fmp) change_percent : Optional[float] @@ -624,16 +610,8 @@ class ROUTER_economy(Container): @validate def central_bank_holdings( self, - date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="A specific date to get data for."), - ] = None, - provider: Annotated[ - Optional[Literal["federal_reserve"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve." - ), - ] = None, + date: Annotated[Union[datetime.date, None, str], OpenBBField(description="A specific date to get data for.")] = None, + provider: Annotated[Optional[Literal["federal_reserve"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve.")] = None, **kwargs ) -> OBBject: """Get the balance sheet holdings of a central bank. @@ -672,7 +650,7 @@ class ROUTER_economy(Container): CentralBankHoldings ------------------- date : date - The date of the data. + The date of the data. security_type : Optional[str] Type of security - i.e. TIPs, FRNs, etc. (provider: federal_reserve) description : Optional[str] @@ -680,7 +658,7 @@ class ROUTER_economy(Container): is_aggreated : Optional[Literal['Y']] Whether the security is aggregated. Only returned for Agency securities. (provider: federal_reserve) cusip : Optional[str] - + issuer : Optional[str] Issuer of the security. (provider: federal_reserve) maturity_date : Optional[date] @@ -747,14 +725,7 @@ class ROUTER_economy(Container): "date": date, }, extra_params=kwargs, - info={ - "cusip": { - "federal_reserve": { - "multiple_items_allowed": True, - "choices": None, - } - } - }, + info={"cusip": {"federal_reserve": {"multiple_items_allowed": True, "choices": None}}}, ) ) @@ -762,20 +733,9 @@ class ROUTER_economy(Container): @validate def composite_leading_indicator( self, - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["oecd"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd." - ), - ] = None, + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["oecd"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.")] = None, **kwargs ) -> OBBject: """Get the composite leading indicator (CLI). @@ -784,7 +744,7 @@ class ROUTER_economy(Container): in business cycles showing fluctuation of the economic activity around its long term potential level. CLIs show short-term economic movements in qualitative rather than quantitative terms. - + Parameters ---------- @@ -818,11 +778,11 @@ class ROUTER_economy(Container): CompositeLeadingIndicator ------------------------- date : date - The date of the data. + The date of the data. value : Optional[float] - CLI value + CLI value country : str - Country for the CLI value. + Country for the CLI value. Examples -------- @@ -846,38 +806,7 @@ class ROUTER_economy(Container): "end_date": end_date, }, extra_params=kwargs, - info={ - "country": { - "oecd": { - "multiple_items_allowed": True, - "choices": [ - "g20", - "g7", - "asia5", - "north_america", - "europe4", - "australia", - "brazil", - "canada", - "china", - "france", - "germany", - "india", - "indonesia", - "italy", - "japan", - "mexico", - "spain", - "south_africa", - "south_korea", - "turkey", - "united_states", - "united_kingdom", - "all", - ], - } - } - }, + info={"country": {"oecd": {"multiple_items_allowed": True, "choices": ["g20", "g7", "asia5", "north_america", "europe4", "australia", "brazil", "canada", "china", "france", "germany", "india", "indonesia", "italy", "japan", "mexico", "spain", "south_africa", "south_korea", "turkey", "united_states", "united_kingdom", "all"]}}}, ) ) @@ -885,18 +814,8 @@ class ROUTER_economy(Container): @validate def country_profile( self, - country: Annotated[ - Union[str, List[str]], - OpenBBField( - description="The country to get data. Multiple comma separated items allowed for provider(s): econdb." - ), - ], - provider: Annotated[ - Optional[Literal["econdb"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb." - ), - ] = None, + country: Annotated[Union[str, List[str]], OpenBBField(description="The country to get data. Multiple comma separated items allowed for provider(s): econdb.")], + provider: Annotated[Optional[Literal["econdb"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb.")] = None, **kwargs ) -> OBBject: """Get a profile of country statistics and economic indicators. @@ -929,33 +848,33 @@ class ROUTER_economy(Container): CountryProfile -------------- country : str - + population : Optional[int] - Population. + Population. gdp_usd : Optional[float] - Gross Domestic Product, in billions of USD. + Gross Domestic Product, in billions of USD. gdp_qoq : Optional[float] - GDP growth quarter-over-quarter change, as a normalized percent. + GDP growth quarter-over-quarter change, as a normalized percent. gdp_yoy : Optional[float] - GDP growth year-over-year change, as a normalized percent. + GDP growth year-over-year change, as a normalized percent. cpi_yoy : Optional[float] - Consumer Price Index year-over-year change, as a normalized percent. + Consumer Price Index year-over-year change, as a normalized percent. core_yoy : Optional[float] - Core Consumer Price Index year-over-year change, as a normalized percent. + Core Consumer Price Index year-over-year change, as a normalized percent. retail_sales_yoy : Optional[float] - Retail Sales year-over-year change, as a normalized percent. + Retail Sales year-over-year change, as a normalized percent. industrial_production_yoy : Optional[float] - Industrial Production year-over-year change, as a normalized percent. + Industrial Production year-over-year change, as a normalized percent. policy_rate : Optional[float] - Short term policy rate, as a normalized percent. + Short term policy rate, as a normalized percent. yield_10y : Optional[float] - 10-year government bond yield, as a normalized percent. + 10-year government bond yield, as a normalized percent. govt_debt_gdp : Optional[float] - Government debt as a percent (normalized) of GDP. + Government debt as a percent (normalized) of GDP. current_account_gdp : Optional[float] - Current account balance as a percent (normalized) of GDP. + Current account balance as a percent (normalized) of GDP. jobless_rate : Optional[float] - Unemployment rate, as a normalized percent. + Unemployment rate, as a normalized percent. Examples -------- @@ -979,11 +898,7 @@ class ROUTER_economy(Container): "country": country, }, extra_params=kwargs, - info={ - "country": { - "econdb": {"multiple_items_allowed": True, "choices": None} - } - }, + info={"country": {"econdb": {"multiple_items_allowed": True, "choices": None}}}, ) ) @@ -991,45 +906,19 @@ class ROUTER_economy(Container): @validate def cpi( self, - country: Annotated[ - Union[str, List[str]], - OpenBBField( - description="The country to get data. Multiple comma separated items allowed for provider(s): fred, oecd." - ), - ] = "united_states", - transform: Annotated[ - Literal["index", "yoy", "period"], - OpenBBField( - description="Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy)." - ), - ] = "yoy", - frequency: Annotated[ - Literal["annual", "quarter", "monthly"], - OpenBBField(description="The frequency of the data."), - ] = "monthly", - harmonized: Annotated[ - bool, OpenBBField(description="If true, returns harmonized data.") - ] = False, - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["fred", "oecd"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred, oecd." - ), - ] = None, + country: Annotated[Union[str, List[str]], OpenBBField(description="The country to get data. Multiple comma separated items allowed for provider(s): fred, oecd.")] = "united_states", + transform: Annotated[Literal["index", "yoy", "period"], OpenBBField(description="Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy).")] = "yoy", + frequency: Annotated[Literal["annual", "quarter", "monthly"], OpenBBField(description="The frequency of the data.")] = "monthly", + harmonized: Annotated[bool, OpenBBField(description="If true, returns harmonized data.")] = False, + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["fred", "oecd"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred, oecd.")] = None, **kwargs ) -> OBBject: """Get Consumer Price Index (CPI). Returns either the rescaled index value, or a rate of change (inflation). - + Parameters ---------- @@ -1067,11 +956,11 @@ class ROUTER_economy(Container): ConsumerPriceIndex ------------------ date : date - The date of the data. + The date of the data. country : str None value : float - CPI index value or period change. + CPI index value or period change. expenditure : Optional[str] Expenditure component of CPI. (provider: oecd) @@ -1102,122 +991,77 @@ class ROUTER_economy(Container): "end_date": end_date, }, extra_params=kwargs, - info={ - "country": { - "fred": { - "multiple_items_allowed": True, - "choices": [ - "australia", - "austria", - "belgium", - "brazil", - "bulgaria", - "canada", - "chile", - "china", - "croatia", - "cyprus", - "czech_republic", - "denmark", - "estonia", - "euro_area", - "finland", - "france", - "germany", - "greece", - "hungary", - "iceland", - "india", - "indonesia", - "ireland", - "israel", - "italy", - "japan", - "korea", - "latvia", - "lithuania", - "luxembourg", - "malta", - "mexico", - "netherlands", - "new_zealand", - "norway", - "poland", - "portugal", - "romania", - "russian_federation", - "slovak_republic", - "slovakia", - "slovenia", - "south_africa", - "spain", - "sweden", - "switzerland", - "turkey", - "united_kingdom", - "united_states", - ], - }, - "oecd": { - "multiple_items_allowed": True, - "choices": [ - "G20", - "G7", - "argentina", - "australia", - "austria", - "belgium", - "brazil", - "canada", - "chile", - "china", - "colombia", - "costa_rica", - "czech_republic", - "denmark", - "estonia", - "euro_area_20", - "europe", - "european_union_27", - "finland", - "france", - "germany", - "greece", - "hungary", - "iceland", - "india", - "indonesia", - "ireland", - "israel", - "italy", - "japan", - "korea", - "latvia", - "lithuania", - "luxembourg", - "mexico", - "netherlands", - "new_zealand", - "norway", - "oecd_total", - "poland", - "portugal", - "russia", - "saudi_arabia", - "slovak_republic", - "slovenia", - "south_africa", - "spain", - "sweden", - "switzerland", - "turkey", - "united_kingdom", - "united_states", - "all", - ], - }, - } + info={"country": {"fred": {"multiple_items_allowed": True, "choices": ["australia", "austria", "belgium", "brazil", "bulgaria", "canada", "chile", "china", "croatia", "cyprus", "czech_republic", "denmark", "estonia", "euro_area", "finland", "france", "germany", "greece", "hungary", "iceland", "india", "indonesia", "ireland", "israel", "italy", "japan", "korea", "latvia", "lithuania", "luxembourg", "malta", "mexico", "netherlands", "new_zealand", "norway", "poland", "portugal", "romania", "russian_federation", "slovak_republic", "slovakia", "slovenia", "south_africa", "spain", "sweden", "switzerland", "turkey", "united_kingdom", "united_states"]}, "oecd": {"multiple_items_allowed": True, "choices": ["G20", "G7", "argentina", "australia", "austria", "belgium", "brazil", "canada", "chile", "china", "colombia", "costa_rica", "czech_republic", "denmark", "estonia", "euro_area_20", "europe", "european_union_27", "finland", "france", "germany", "greece", "hungary", "iceland", "india", "indonesia", "ireland", "israel", "italy", "japan", "korea", "latvia", "lithuania", "luxembourg", "mexico", "netherlands", "new_zealand", "norway", "oecd_total", "poland", "portugal", "russia", "saudi_arabia", "slovak_republic", "slovenia", "south_africa", "spain", "sweden", "switzerland", "turkey", "united_kingdom", "united_states", "all"]}}}, + ) + ) + + @exception_handler + @validate + def export_destinations( + self, + country: Annotated[Union[str, List[str]], OpenBBField(description="The country to get data. Multiple comma separated items allowed for provider(s): econdb.")], + provider: Annotated[Optional[Literal["econdb"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb.")] = None, + **kwargs + ) -> OBBject: + """Get top export destinations by country from the UN Comtrade International Trade Statistics Database. + + Parameters + ---------- + country : Union[str, List[str]] + The country to get data. Multiple comma separated items allowed for provider(s): econdb. + provider : Optional[Literal['econdb']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb. + + Returns + ------- + OBBject + results : List[ExportDestinations] + Serializable results. + provider : Optional[Literal['econdb']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + ExportDestinations + ------------------ + origin_country : str + The country of origin. + destination_country : str + The destination country. + value : Union[float, int] + The value of the export. + units : Optional[str] + The units of measurement for the value. (provider: econdb) + title : Optional[str] + The title of the data. (provider: econdb) + footnote : Optional[str] + The footnote for the data. (provider: econdb) + + Examples + -------- + >>> from openbb import obb + >>> obb.economy.export_destinations(provider='econdb', country='us') + """ # noqa: E501 + + return self._run( + "/economy/export_destinations", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "economy.export_destinations", + ("econdb",), + ) }, + standard_params={ + "country": country, + }, + extra_params=kwargs, + info={"country": {"econdb": {"multiple_items_allowed": True, "choices": None}}}, ) ) @@ -1950,30 +1794,16 @@ class ROUTER_economy(Container): def fred_regional( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - limit: Annotated[ - Optional[int], - OpenBBField(description="The number of data entries to return."), - ] = 100000, - provider: Annotated[ - Optional[Literal["fred"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred." - ), - ] = None, + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + limit: Annotated[Optional[int], OpenBBField(description="The number of data entries to return.")] = 100000, + provider: Annotated[Optional[Literal["fred"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.")] = None, **kwargs ) -> OBBject: """Query the Geo Fred API for regional economic data by series group. The series group ID is found by using `fred_search` and the `series_id` parameter. - + Parameters ---------- @@ -1997,66 +1827,66 @@ class ROUTER_economy(Container): The units of the data. This should match the units returned from searching by series ID. An incorrect field will not necessarily return an error. Parameter is only valid when `is_series_group` is True. (provider: fred) frequency : Optional[Literal['a', 'q', 'm', 'w', 'd', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']] Frequency aggregation to convert high frequency data to lower frequency. - + None = No change - + a = Annual - + q = Quarterly - + m = Monthly - + w = Weekly - + d = Daily - + wef = Weekly, Ending Friday - + weth = Weekly, Ending Thursday - + wew = Weekly, Ending Wednesday - + wetu = Weekly, Ending Tuesday - + wem = Weekly, Ending Monday - + wesu = Weekly, Ending Sunday - + wesa = Weekly, Ending Saturday - + bwew = Biweekly, Ending Wednesday - + bwem = Biweekly, Ending Monday (provider: fred) aggregation_method : Optional[Literal['avg', 'sum', 'eop']] A key that indicates the aggregation method used for frequency aggregation. This parameter has no affect if the frequency parameter is not set. - + avg = Average - + sum = Sum - + eop = End of Period (provider: fred) transform : Optional[Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']] Transformation type - + None = No transformation - + chg = Change - + ch1 = Change from Year Ago - + pch = Percent Change - + pc1 = Percent Change from Year Ago - + pca = Compounded Annual Rate of Change - + cch = Continuously Compounded Rate of Change - + cca = Continuously Compounded Annual Rate of Change - + log = Natural Log (provider: fred) @@ -2077,7 +1907,7 @@ class ROUTER_economy(Container): FredRegional ------------ date : date - The date of the data. + The date of the data. region : Optional[str] The name of the region. (provider: fred) code : Optional[Union[int, str]] @@ -2119,30 +1949,10 @@ class ROUTER_economy(Container): @validate def fred_release_table( self, - release_id: Annotated[ - str, - OpenBBField( - description="The ID of the release. Use `fred_search` to find releases." - ), - ], - element_id: Annotated[ - Optional[str], - OpenBBField( - description="The element ID of a specific table in the release." - ), - ] = None, - date: Annotated[ - Union[str, datetime.date, None, List[Union[str, datetime.date, None]]], - OpenBBField( - description="A specific date to get data for. Multiple comma separated items allowed for provider(s): fred." - ), - ] = None, - provider: Annotated[ - Optional[Literal["fred"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred." - ), - ] = None, + release_id: Annotated[str, OpenBBField(description="The ID of the release. Use `fred_search` to find releases.")], + element_id: Annotated[Optional[str], OpenBBField(description="The element ID of a specific table in the release.")] = None, + date: Annotated[Union[str, datetime.date, None, List[Union[str, datetime.date, None]]], OpenBBField(description="A specific date to get data for. Multiple comma separated items allowed for provider(s): fred.")] = None, + provider: Annotated[Optional[Literal["fred"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.")] = None, **kwargs ) -> OBBject: """Get economic release data by ID and/or element from FRED. @@ -2175,25 +1985,25 @@ class ROUTER_economy(Container): FredReleaseTable ---------------- date : Optional[date] - The date of the data. + The date of the data. level : Optional[int] - The indentation level of the element. + The indentation level of the element. element_type : Optional[str] - The type of the element. + The type of the element. line : Optional[int] - The line number of the element. + The line number of the element. element_id : Optional[str] - The element id in the parent/child relationship. + The element id in the parent/child relationship. parent_id : Optional[str] - The parent id in the parent/child relationship. + The parent id in the parent/child relationship. children : Optional[str] - The element_id of each child, as a comma-separated string. + The element_id of each child, as a comma-separated string. symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - The name of the series. + The name of the series. value : Optional[float] - The reported value of the series. + The reported value of the series. Examples -------- @@ -2222,9 +2032,7 @@ class ROUTER_economy(Container): "date": date, }, extra_params=kwargs, - info={ - "date": {"fred": {"multiple_items_allowed": True, "choices": None}} - }, + info={"date": {"fred": {"multiple_items_allowed": True, "choices": None}}}, ) ) @@ -2232,22 +2040,15 @@ class ROUTER_economy(Container): @validate def fred_search( self, - query: Annotated[ - Optional[str], OpenBBField(description="The search word(s).") - ] = None, - provider: Annotated[ - Optional[Literal["fred"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred." - ), - ] = None, + query: Annotated[Optional[str], OpenBBField(description="The search word(s).")] = None, + provider: Annotated[Optional[Literal["fred"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.")] = None, **kwargs ) -> OBBject: """Search for FRED series or economic releases by ID or string. This does not return the observation values, only the metadata. Use this function to find series IDs for `fred_series()`. - + Parameters ---------- @@ -2291,37 +2092,37 @@ class ROUTER_economy(Container): FredSearch ---------- release_id : Optional[Union[int, str]] - The release ID for queries. + The release ID for queries. series_id : Optional[str] - The series ID for the item in the release. + The series ID for the item in the release. name : Optional[str] - The name of the release. + The name of the release. title : Optional[str] - The title of the series. + The title of the series. observation_start : Optional[date] - The date of the first observation in the series. + The date of the first observation in the series. observation_end : Optional[date] - The date of the last observation in the series. + The date of the last observation in the series. frequency : Optional[str] - The frequency of the data. + The frequency of the data. frequency_short : Optional[str] - Short form of the data frequency. + Short form of the data frequency. units : Optional[str] - The units of the data. + The units of the data. units_short : Optional[str] - Short form of the data units. + Short form of the data units. seasonal_adjustment : Optional[str] - The seasonal adjustment of the data. + The seasonal adjustment of the data. seasonal_adjustment_short : Optional[str] - Short form of the data seasonal adjustment. + Short form of the data seasonal adjustment. last_updated : Optional[datetime] - The datetime of the last update to the data. + The datetime of the last update to the data. notes : Optional[str] - Description of the release. + Description of the release. press_release : Optional[bool] - If the release is a press release. + If the release is a press release. url : Optional[str] - URL to the release. + URL to the release. popularity : Optional[int] Popularity of the series (provider: fred) group_popularity : Optional[int] @@ -2351,14 +2152,7 @@ class ROUTER_economy(Container): "query": query, }, extra_params=kwargs, - info={ - "tag_names": { - "fred": {"multiple_items_allowed": True, "choices": None} - }, - "exclude_tag_names": { - "fred": {"multiple_items_allowed": True, "choices": None} - }, - }, + info={"tag_names": {"fred": {"multiple_items_allowed": True, "choices": None}}, "exclude_tag_names": {"fred": {"multiple_items_allowed": True, "choices": None}}}, ) ) @@ -2366,30 +2160,11 @@ class ROUTER_economy(Container): @validate def fred_series( self, - symbol: Annotated[ - Union[str, List[str]], - OpenBBField( - description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fred." - ), - ], - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - limit: Annotated[ - Optional[int], - OpenBBField(description="The number of data entries to return."), - ] = 100000, - provider: Annotated[ - Optional[Literal["fred", "intrinio"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred, intrinio." - ), - ] = None, + symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fred.")], + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + limit: Annotated[Optional[int], OpenBBField(description="The number of data entries to return.")] = 100000, + provider: Annotated[Optional[Literal["fred", "intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred, intrinio.")] = None, **kwargs ) -> OBBject: """Get data by series ID from FRED. @@ -2408,66 +2183,66 @@ class ROUTER_economy(Container): The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred, intrinio. frequency : Optional[Literal['a', 'q', 'm', 'w', 'd', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']] Frequency aggregation to convert high frequency data to lower frequency. - + None = No change - + a = Annual - + q = Quarterly - + m = Monthly - + w = Weekly - + d = Daily - + wef = Weekly, Ending Friday - + weth = Weekly, Ending Thursday - + wew = Weekly, Ending Wednesday - + wetu = Weekly, Ending Tuesday - + wem = Weekly, Ending Monday - + wesu = Weekly, Ending Sunday - + wesa = Weekly, Ending Saturday - + bwew = Biweekly, Ending Wednesday - + bwem = Biweekly, Ending Monday (provider: fred) aggregation_method : Optional[Literal['avg', 'sum', 'eop']] A key that indicates the aggregation method used for frequency aggregation. This parameter has no affect if the frequency parameter is not set. - + avg = Average - + sum = Sum - + eop = End of Period (provider: fred) transform : Optional[Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']] Transformation type - + None = No transformation - + chg = Change - + ch1 = Change from Year Ago - + pch = Percent Change - + pc1 = Percent Change from Year Ago - + pca = Compounded Annual Rate of Change - + cch = Continuously Compounded Rate of Change - + cca = Continuously Compounded Annual Rate of Change - + log = Natural Log (provider: fred) all_pages : Optional[bool] @@ -2492,7 +2267,7 @@ class ROUTER_economy(Container): FredSeries ---------- date : date - The date of the data. + The date of the data. value : Optional[float] Value of the index. (provider: intrinio) @@ -2523,11 +2298,7 @@ class ROUTER_economy(Container): "limit": limit, }, extra_params=kwargs, - info={ - "symbol": { - "fred": {"multiple_items_allowed": True, "choices": None} - } - }, + info={"symbol": {"fred": {"multiple_items_allowed": True, "choices": None}}}, ) ) @@ -2542,36 +2313,12 @@ class ROUTER_economy(Container): @validate def house_price_index( self, - country: Annotated[ - Union[str, List[str]], - OpenBBField( - description="The country to get data. Multiple comma separated items allowed for provider(s): oecd." - ), - ] = "united_states", - frequency: Annotated[ - Literal["monthly", "quarter", "annual"], - OpenBBField(description="The frequency of the data."), - ] = "quarter", - transform: Annotated[ - Literal["index", "yoy", "period"], - OpenBBField( - description="Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy)." - ), - ] = "index", - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["oecd"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd." - ), - ] = None, + country: Annotated[Union[str, List[str]], OpenBBField(description="The country to get data. Multiple comma separated items allowed for provider(s): oecd.")] = "united_states", + frequency: Annotated[Literal["monthly", "quarter", "annual"], OpenBBField(description="The frequency of the data.")] = "quarter", + transform: Annotated[Literal["index", "yoy", "period"], OpenBBField(description="Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy).")] = "index", + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["oecd"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.")] = None, **kwargs ) -> OBBject: """Get the House Price Index by country from the OECD Short-Term Economics Statistics. @@ -2608,11 +2355,11 @@ class ROUTER_economy(Container): HousePriceIndex --------------- date : Optional[date] - The date of the data. + The date of the data. country : Optional[str] - + value : Optional[float] - Share price index value. + Share price index value. Examples -------- @@ -2640,72 +2387,7 @@ class ROUTER_economy(Container): "end_date": end_date, }, extra_params=kwargs, - info={ - "country": { - "oecd": { - "multiple_items_allowed": True, - "choices": [ - "G20", - "G7", - "argentina", - "australia", - "austria", - "belgium", - "brazil", - "bulgaria", - "canada", - "chile", - "china", - "colombia", - "costa_rica", - "croatia", - "czech_republic", - "denmark", - "estonia", - "euro_area_20", - "euro_area_19", - "europe", - "european_union_27", - "finland", - "france", - "germany", - "greece", - "hungary", - "iceland", - "india", - "indonesia", - "ireland", - "israel", - "italy", - "japan", - "korea", - "latvia", - "lithuania", - "luxembourg", - "mexico", - "netherlands", - "new_zealand", - "norway", - "oecd_total", - "poland", - "portugal", - "romania", - "russia", - "saudi_arabia", - "slovak_republic", - "slovenia", - "south_africa", - "spain", - "sweden", - "switzerland", - "turkey", - "united_kingdom", - "united_states", - "all", - ], - } - } - }, + info={"country": {"oecd": {"multiple_items_allowed": True, "choices": ["G20", "G7", "argentina", "australia", "austria", "belgium", "brazil", "bulgaria", "canada", "chile", "china", "colombia", "costa_rica", "croatia", "czech_republic", "denmark", "estonia", "euro_area_20", "euro_area_19", "europe", "european_union_27", "finland", "france", "germany", "greece", "hungary", "iceland", "india", "indonesia", "ireland", "israel", "italy", "japan", "korea", "latvia", "lithuania", "luxembourg", "mexico", "netherlands", "new_zealand", "norway", "oecd_total", "poland", "portugal", "romania", "russia", "saudi_arabia", "slovak_republic", "slovenia", "south_africa", "spain", "sweden", "switzerland", "turkey", "united_kingdom", "united_states", "all"]}}}, ) ) @@ -2717,26 +2399,10 @@ class ROUTER_economy(Container): ) def immediate_interest_rate( self, - country: Annotated[ - Union[str, List[str]], - OpenBBField( - description="The country to get data. Multiple comma separated items allowed for provider(s): oecd." - ), - ] = "united_states", - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["oecd"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd." - ), - ] = None, + country: Annotated[Union[str, List[str]], OpenBBField(description="The country to get data. Multiple comma separated items allowed for provider(s): oecd.")] = "united_states", + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["oecd"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.")] = None, **kwargs ) -> OBBject: """Get immediate interest rates by country. @@ -2771,11 +2437,11 @@ class ROUTER_economy(Container): ImmediateInterestRate --------------------- date : Optional[date] - The date of the data. + The date of the data. country : Optional[str] - Country for which interest rate is given + Country for which interest rate is given value : Optional[float] - Immediate interest rates, call money, interbank rate. + Immediate interest rates, call money, interbank rate. Examples -------- @@ -2786,11 +2452,7 @@ class ROUTER_economy(Container): """ # noqa: E501 simplefilter("always", DeprecationWarning) - warn( - "This endpoint will be removed in a future version. Use, `/economy/interest_rates`, instead. Deprecated in OpenBB Platform V4.3 to be removed in V4.5.", - category=DeprecationWarning, - stacklevel=2, - ) + warn("This endpoint will be removed in a future version. Use, `/economy/interest_rates`, instead. Deprecated in OpenBB Platform V4.3 to be removed in V4.5.", category=DeprecationWarning, stacklevel=2) return self._run( "/economy/immediate_interest_rate", @@ -2808,64 +2470,7 @@ class ROUTER_economy(Container): "end_date": end_date, }, extra_params=kwargs, - info={ - "country": { - "oecd": { - "multiple_items_allowed": True, - "choices": [ - "belgium", - "bulgaria", - "brazil", - "ireland", - "mexico", - "indonesia", - "new_zealand", - "japan", - "united_kingdom", - "france", - "chile", - "canada", - "netherlands", - "united_states", - "south_korea", - "norway", - "austria", - "south_africa", - "denmark", - "switzerland", - "hungary", - "luxembourg", - "australia", - "germany", - "sweden", - "iceland", - "turkey", - "greece", - "israel", - "czech_republic", - "latvia", - "slovenia", - "poland", - "estonia", - "lithuania", - "portugal", - "costa_rica", - "slovakia", - "finland", - "spain", - "romania", - "russia", - "euro_area19", - "colombia", - "italy", - "india", - "china", - "croatia", - "all", - ], - } - } - }, + info={"country": {"oecd": {"multiple_items_allowed": True, "choices": ["belgium", "bulgaria", "brazil", "ireland", "mexico", "indonesia", "new_zealand", "japan", "united_kingdom", "france", "chile", "canada", "netherlands", "united_states", "south_korea", "norway", "austria", "south_africa", "denmark", "switzerland", "hungary", "luxembourg", "australia", "germany", "sweden", "iceland", "turkey", "greece", "israel", "czech_republic", "latvia", "slovenia", "poland", "estonia", "lithuania", "portugal", "costa_rica", "slovakia", "finland", "spain", "romania", "russia", "euro_area19", "colombia", "italy", "india", "china", "croatia", "all"]}}}, ) ) @@ -2922,12 +2527,12 @@ class ROUTER_economy(Container): Multiple comma separated items allowed. (provider: imf) transform : Optional[Literal['toya', 'tpop', 'tusd', 'tpgp']] The transformation to apply to the data, default is None. - + tpop: Change from previous period toya: Change from one year ago tusd: Values as US dollars tpgp: Values as a percent of GDP - + Only 'tpop' and 'toya' are applicable to all indicators. Applying transformations across multiple indicators/countries may produce unexpected results. This is because not all indicators are compatible with all transformations, and the original units and scale differ between entities. `tusd` should only be used where values are currencies. (provider: econdb) @@ -2954,13 +2559,13 @@ class ROUTER_economy(Container): EconomicIndicators ------------------ date : date - The date of the data. + The date of the data. symbol_root : Optional[str] - The root symbol for the indicator (e.g. GDP). + The root symbol for the indicator (e.g. GDP). symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. country : Optional[str] - The country represented by the data. + The country represented by the data. value : Optional[Union[int, float]] scale : Optional[str] @@ -3251,31 +2856,15 @@ class ROUTER_economy(Container): @validate def interest_rates( self, - country: Annotated[ - Union[str, List[str]], - OpenBBField( - description="The country to get data. Multiple comma separated items allowed for provider(s): oecd." - ), - ] = "united_states", - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["oecd"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd." - ), - ] = None, + country: Annotated[Union[str, List[str]], OpenBBField(description="The country to get data. Multiple comma separated items allowed for provider(s): oecd.")] = "united_states", + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["oecd"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.")] = None, **kwargs ) -> OBBject: """Get interest rates by country(s) and duration. Most OECD countries publish short-term, a long-term, and immediate rates monthly. - + Parameters ---------- @@ -3309,11 +2898,11 @@ class ROUTER_economy(Container): CountryInterestRates -------------------- date : Optional[date] - The date of the data. + The date of the data. value : Optional[float] - The interest rate value. + The interest rate value. country : Optional[str] - Country for which the interest rate is given. + Country for which the interest rate is given. Examples -------- @@ -3341,76 +2930,7 @@ class ROUTER_economy(Container): "end_date": end_date, }, extra_params=kwargs, - info={ - "country": { - "oecd": { - "multiple_items_allowed": True, - "choices": [ - "belgium", - "bulgaria", - "brazil", - "ireland", - "mexico", - "indonesia", - "new_zealand", - "japan", - "united_kingdom", - "france", - "chile", - "canada", - "netherlands", - "united_states", - "south_korea", - "norway", - "austria", - "south_africa", - "denmark", - "switzerland", - "hungary", - "luxembourg", - "australia", - "germany", - "sweden", - "iceland", - "turkey", - "greece", - "israel", - "czech_republic", - "latvia", - "slovenia", - "poland", - "estonia", - "lithuania", - "portugal", - "costa_rica", - "slovakia", - "finland", - "spain", - "romania", - "russia", - "euro_area19", - "colombia", - "italy", - "india", - "china", - "croatia", - "all", - ], - } - }, - "duration": { - "oecd": { - "multiple_items_allowed": False, - "choices": ["immediate", "short", "long"], - } - }, - "frequency": { - "oecd": { - "multiple_items_allowed": False, - "choices": ["monthly", "quarter", "annual"], - } - }, - }, + info={"country": {"oecd": {"multiple_items_allowed": True, "choices": ["belgium", "bulgaria", "brazil", "ireland", "mexico", "indonesia", "new_zealand", "japan", "united_kingdom", "france", "chile", "canada", "netherlands", "united_states", "south_korea", "norway", "austria", "south_africa", "denmark", "switzerland", "hungary", "luxembourg", "australia", "germany", "sweden", "iceland", "turkey", "greece", "israel", "czech_republic", "latvia", "slovenia", "poland", "estonia", "lithuania", "portugal", "costa_rica", "slovakia", "finland", "spain", "romania", "russia", "euro_area19", "colombia", "italy", "india", "china", "croatia", "all"]}}, "duration": {"oecd": {"multiple_items_allowed": False, "choices": ["immediate", "short", "long"]}}, "frequency": {"oecd": {"multiple_items_allowed": False, "choices": ["monthly", "quarter", "annual"]}}}, ) ) @@ -3422,20 +2942,9 @@ class ROUTER_economy(Container): ) def long_term_interest_rate( self, - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["oecd"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd." - ), - ] = None, + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["oecd"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.")] = None, **kwargs ) -> OBBject: """Get Long-term interest rates that refer to government bonds maturing in ten years. @@ -3448,7 +2957,7 @@ class ROUTER_economy(Container): Long-term interest rates are one of the determinants of business investment. Low long-term interest rates encourage investment in new equipment and high interest rates discourage it. Investment is, in turn, a major source of economic growth. - + Parameters ---------- @@ -3480,11 +2989,11 @@ class ROUTER_economy(Container): LTIR ---- date : Optional[date] - The date of the data. + The date of the data. value : Optional[float] - Interest rate (given as a whole number, i.e 10=10%) + Interest rate (given as a whole number, i.e 10=10%) country : Optional[str] - Country for which interest rate is given + Country for which interest rate is given Examples -------- @@ -3494,11 +3003,7 @@ class ROUTER_economy(Container): """ # noqa: E501 simplefilter("always", DeprecationWarning) - warn( - "This endpoint will be removed in a future version. Use, `/economy/interest_rates`, instead. Deprecated in OpenBB Platform V4.3 to be removed in V4.5.", - category=DeprecationWarning, - stacklevel=2, - ) + warn("This endpoint will be removed in a future version. Use, `/economy/interest_rates`, instead. Deprecated in OpenBB Platform V4.3 to be removed in V4.5.", category=DeprecationWarning, stacklevel=2) return self._run( "/economy/long_term_interest_rate", @@ -3522,30 +3027,16 @@ class ROUTER_economy(Container): @validate def money_measures( self, - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - adjusted: Annotated[ - Optional[bool], - OpenBBField(description="Whether to return seasonally adjusted data."), - ] = True, - provider: Annotated[ - Optional[Literal["federal_reserve"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve." - ), - ] = None, + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + adjusted: Annotated[Optional[bool], OpenBBField(description="Whether to return seasonally adjusted data.")] = True, + provider: Annotated[Optional[Literal["federal_reserve"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve.")] = None, **kwargs ) -> OBBject: """Get Money Measures (M1/M2 and components). The Federal Reserve publishes as part of the H.6 Release. - + Parameters ---------- @@ -3575,21 +3066,21 @@ class ROUTER_economy(Container): MoneyMeasures ------------- month : date - The date of the data. + The date of the data. M1 : float - Value of the M1 money supply in billions. + Value of the M1 money supply in billions. M2 : float - Value of the M2 money supply in billions. + Value of the M2 money supply in billions. currency : Optional[float] - Value of currency in circulation in billions. + Value of currency in circulation in billions. demand_deposits : Optional[float] - Value of demand deposits in billions. + Value of demand deposits in billions. retail_money_market_funds : Optional[float] - Value of retail money market funds in billions. + Value of retail money market funds in billions. other_liquid_deposits : Optional[float] - Value of other liquid deposits in billions. + Value of other liquid deposits in billions. small_denomination_time_deposits : Optional[float] - Value of small denomination time deposits in billions. + Value of small denomination time deposits in billions. Examples -------- @@ -3621,18 +3112,8 @@ class ROUTER_economy(Container): @validate def pce( self, - date: Annotated[ - Union[str, datetime.date, None, List[Union[str, datetime.date, None]]], - OpenBBField( - description="A specific date to get data for. Default is the latest report. Multiple comma separated items allowed for provider(s): fred." - ), - ] = None, - provider: Annotated[ - Optional[Literal["fred"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred." - ), - ] = None, + date: Annotated[Union[str, datetime.date, None, List[Union[str, datetime.date, None]]], OpenBBField(description="A specific date to get data for. Default is the latest report. Multiple comma separated items allowed for provider(s): fred.")] = None, + provider: Annotated[Optional[Literal["fred"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.")] = None, **kwargs ) -> OBBject: """Get Personal Consumption Expenditures (PCE) reports. @@ -3663,11 +3144,11 @@ class ROUTER_economy(Container): PersonalConsumptionExpenditures ------------------------------- date : date - The date of the data. + The date of the data. symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. value : float - + name : Optional[str] The name of the series. (provider: fred) element_id : Optional[str] @@ -3703,9 +3184,7 @@ class ROUTER_economy(Container): "date": date, }, extra_params=kwargs, - info={ - "date": {"fred": {"multiple_items_allowed": True, "choices": None}} - }, + info={"date": {"fred": {"multiple_items_allowed": True, "choices": None}}}, ) ) @@ -3921,20 +3400,9 @@ class ROUTER_economy(Container): @validate def primary_dealer_positioning( self, - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["federal_reserve"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve." - ), - ] = None, + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["federal_reserve"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve.")] = None, **kwargs ) -> OBBject: """Get Primary dealer positioning statistics. @@ -3967,9 +3435,9 @@ class ROUTER_economy(Container): PrimaryDealerPositioning ------------------------ date : date - The date of the data. + The date of the data. symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. value : Optional[int] The reported value of the net position (long - short), in millions of $USD. (provider: federal_reserve) name : Optional[str] @@ -4006,27 +3474,11 @@ class ROUTER_economy(Container): @validate def retail_prices( self, - item: Annotated[ - Optional[str], - OpenBBField(description="The item or basket of items to query."), - ] = None, - country: Annotated[ - str, OpenBBField(description="The country to get data.") - ] = "united_states", - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["fred"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred." - ), - ] = None, + item: Annotated[Optional[str], OpenBBField(description="The item or basket of items to query.")] = None, + country: Annotated[str, OpenBBField(description="The country to get data.")] = "united_states", + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["fred"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.")] = None, **kwargs ) -> OBBject: """Get retail prices for common items. @@ -4048,7 +3500,7 @@ class ROUTER_economy(Container): frequency : Literal['annual', 'quarter', 'monthly'] The frequency of the data. (provider: fred) transform : Optional[Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']] - + Transformation type None = No transformation chg = Change @@ -4078,15 +3530,15 @@ class ROUTER_economy(Container): RetailPrices ------------ date : Optional[date] - The date of the data. + The date of the data. symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. country : Optional[str] - + description : Optional[str] - Description of the item. + Description of the item. value : Optional[float] - Price, or change in price, per unit. + Price, or change in price, per unit. Examples -------- @@ -4122,12 +3574,7 @@ class ROUTER_economy(Container): @validate def risk_premium( self, - provider: Annotated[ - Optional[Literal["fmp"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp." - ), - ] = None, + provider: Annotated[Optional[Literal["fmp"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.")] = None, **kwargs ) -> OBBject: """Get Market Risk Premium by country. @@ -4154,13 +3601,13 @@ class ROUTER_economy(Container): RiskPremium ----------- country : str - Market country. + Market country. continent : Optional[str] - Continent of the country. + Continent of the country. total_equity_risk_premium : Optional[Annotated[float, Gt(gt=0)]] - Total equity risk premium for the country. + Total equity risk premium for the country. country_risk_premium : Optional[Annotated[float, Ge(ge=0)]] - Country-specific risk premium. + Country-specific risk premium. Examples -------- @@ -4178,7 +3625,8 @@ class ROUTER_economy(Container): ("fmp",), ) }, - standard_params={}, + standard_params={ + }, extra_params=kwargs, ) ) @@ -4187,30 +3635,11 @@ class ROUTER_economy(Container): @validate def share_price_index( self, - country: Annotated[ - Union[str, List[str]], - OpenBBField( - description="The country to get data. Multiple comma separated items allowed for provider(s): oecd." - ), - ] = "united_states", - frequency: Annotated[ - Literal["monthly", "quarter", "annual"], - OpenBBField(description="The frequency of the data."), - ] = "monthly", - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["oecd"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd." - ), - ] = None, + country: Annotated[Union[str, List[str]], OpenBBField(description="The country to get data. Multiple comma separated items allowed for provider(s): oecd.")] = "united_states", + frequency: Annotated[Literal["monthly", "quarter", "annual"], OpenBBField(description="The frequency of the data.")] = "monthly", + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["oecd"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.")] = None, **kwargs ) -> OBBject: """Get the Share Price Index by country from the OECD Short-Term Economics Statistics. @@ -4245,11 +3674,11 @@ class ROUTER_economy(Container): SharePriceIndex --------------- date : Optional[date] - The date of the data. + The date of the data. country : Optional[str] - + value : Optional[float] - Share price index value. + Share price index value. Examples -------- @@ -4276,72 +3705,7 @@ class ROUTER_economy(Container): "end_date": end_date, }, extra_params=kwargs, - info={ - "country": { - "oecd": { - "multiple_items_allowed": True, - "choices": [ - "G20", - "G7", - "all", - "argentina", - "australia", - "austria", - "belgium", - "brazil", - "bulgaria", - "canada", - "chile", - "china", - "colombia", - "costa_rica", - "croatia", - "czech_republic", - "denmark", - "estonia", - "euro_area_19", - "euro_area_20", - "europe", - "european_union_27", - "finland", - "france", - "germany", - "greece", - "hungary", - "iceland", - "india", - "indonesia", - "ireland", - "israel", - "italy", - "japan", - "korea", - "latvia", - "lithuania", - "luxembourg", - "mexico", - "netherlands", - "new_zealand", - "norway", - "oecd_total", - "poland", - "portugal", - "romania", - "russia", - "saudi_arabia", - "slovak_republic", - "slovenia", - "south_africa", - "spain", - "sweden", - "switzerland", - "turkey", - "united_kingdom", - "united_states", - ], - } - } - }, + info={"country": {"oecd": {"multiple_items_allowed": True, "choices": ["G20", "G7", "all", "argentina", "australia", "austria", "belgium", "brazil", "bulgaria", "canada", "chile", "china", "colombia", "costa_rica", "croatia", "czech_republic", "denmark", "estonia", "euro_area_19", "euro_area_20", "europe", "european_union_27", "finland", "france", "germany", "greece", "hungary", "iceland", "india", "indonesia", "ireland", "israel", "italy", "japan", "korea", "latvia", "lithuania", "luxembourg", "mexico", "netherlands", "new_zealand", "norway", "oecd_total", "poland", "portugal", "romania", "russia", "saudi_arabia", "slovak_republic", "slovenia", "south_africa", "spain", "sweden", "switzerland", "turkey", "united_kingdom", "united_states"]}}}, ) ) @@ -4353,20 +3717,9 @@ class ROUTER_economy(Container): ) def short_term_interest_rate( self, - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["oecd"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd." - ), - ] = None, + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["oecd"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.")] = None, **kwargs ) -> OBBject: """Get Short-term interest rates. @@ -4377,7 +3730,7 @@ class ROUTER_economy(Container): Short-term interest rates are generally averages of daily rates, measured as a percentage. Short-term interest rates are based on three-month money market rates where available. Typical standardised names are "money market rate" and "treasury bill rate". - + Parameters ---------- @@ -4409,11 +3762,11 @@ class ROUTER_economy(Container): STIR ---- date : Optional[date] - The date of the data. + The date of the data. value : Optional[float] - Interest rate (given as a whole number, i.e 10=10%) + Interest rate (given as a whole number, i.e 10=10%) country : Optional[str] - Country for which interest rate is given + Country for which interest rate is given Examples -------- @@ -4423,11 +3776,7 @@ class ROUTER_economy(Container): """ # noqa: E501 simplefilter("always", DeprecationWarning) - warn( - "This endpoint will be removed in a future version. Use, `/economy/interest_rates`, instead. Deprecated in OpenBB Platform V4.3 to be removed in V4.5.", - category=DeprecationWarning, - stacklevel=2, - ) + warn("This endpoint will be removed in a future version. Use, `/economy/interest_rates`, instead. Deprecated in OpenBB Platform V4.3 to be removed in V4.5.", category=DeprecationWarning, stacklevel=2) return self._run( "/economy/short_term_interest_rate", @@ -4458,30 +3807,11 @@ class ROUTER_economy(Container): @validate def unemployment( self, - country: Annotated[ - Union[str, List[str]], - OpenBBField( - description="The country to get data. Multiple comma separated items allowed for provider(s): oecd." - ), - ] = "united_states", - frequency: Annotated[ - Literal["monthly", "quarter", "annual"], - OpenBBField(description="The frequency of the data."), - ] = "monthly", - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBField(description="End date of the data, in YYYY-MM-DD format."), - ] = None, - provider: Annotated[ - Optional[Literal["oecd"]], - OpenBBField( - description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd." - ), - ] = None, + country: Annotated[Union[str, List[str]], OpenBBField(description="The country to get data. Multiple comma separated items allowed for provider(s): oecd.")] = "united_states", + frequency: Annotated[Literal["monthly", "quarter", "annual"], OpenBBField(description="The frequency of the data.")] = "monthly", + start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format.")] = None, + end_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format.")] = None, + provider: Annotated[Optional[Literal["oecd"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.")] = None, **kwargs ) -> OBBject: """Get global unemployment data. @@ -4522,11 +3852,11 @@ class ROUTER_economy(Container): Unemployment ------------ date : Optional[date] - The date of the data. + The date of the data. country : Optional[str] - Country for which unemployment rate is given + Country for which unemployment rate is given value : Optional[float] - Unemployment rate, as a normalized percent. + Unemployment rate, as a normalized percent. Examples -------- @@ -4554,59 +3884,6 @@ class ROUTER_economy(Container): "end_date": end_date, }, extra_params=kwargs, - info={ - "country": { - "oecd": { - "multiple_items_allowed": True, - "choices": [ - "all", - "australia", - "austria", - "belgium", - "canada", - "chile", - "colombia", - "costa_rica", - "czech_republic", - "denmark", - "estonia", - "euro_area20", - "european_union27_2020", - "finland", - "france", - "g7", - "germany", - "greece", - "hungary", - "iceland", - "ireland", - "israel", - "italy", - "japan", - "korea", - "latvia", - "lithuania", - "luxembourg", - "mexico", - "netherlands", - "new_zealand", - "norway", - "oecd", - "poland", - "portugal", - "russia", - "slovakia", - "slovenia", - "south_africa", - "spain", - "sweden", - "switzerland", - "turkey", - "united_kingdom", - "united_states", - ], - } - } - }, + info={"country": {"oecd": {"multiple_items_allowed": True, "choices": ["all", "australia", "austria", "belgium", "canada", "chile", "colombia", "costa_rica", "czech_republic", "denmark", "estonia", "euro_area20", "european_union27_2020", "finland", "france", "g7", "germany", "greece", "hungary", "iceland", "ireland", "israel", "italy", "japan", "korea", "latvia", "lithuania", "luxembourg", "mexico", "netherlands", "new_zealand", "norway", "oecd", "poland", "portugal", "russia", "slovakia", "slovenia", "south_africa", "spain", "sweden", "switzerland", "turkey", "united_kingdom", "united_states"]}}}, ) ) diff --git a/openbb_platform/poetry.lock b/openbb_platform/poetry.lock index 49c4b1a373d..7fa75bdef07 100644 --- a/openbb_platform/poetry.lock +++ b/openbb_platform/poetry.lock @@ -2609,6 +2609,7 @@ files = [ annotated-types = ">=0.6.0" pydantic-core = "2.23.4" typing-extensions = {version = ">=4.6.1", markers = "python_version < \"3.13\""} +tzdata = {version = "*", markers = "python_version >= \"3.9\""} [package.extras] email = ["email-validator (>=2.0.0)"]