From 3b02961661b6cb12dc07abac54d79cb8b953dbee Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 8 Oct 2024 10:24:31 -0700 Subject: [PATCH] static files --- openbb_platform/openbb/assets/reference.json | 2 +- openbb_platform/openbb/package/commodity.py | 4 +- .../openbb/package/commodity_price.py | 92 +- openbb_platform/openbb/package/crypto.py | 15 +- .../openbb/package/crypto_price.py | 75 +- openbb_platform/openbb/package/currency.py | 71 +- .../openbb/package/currency_price.py | 79 +- openbb_platform/openbb/package/derivatives.py | 8 +- .../openbb/package/derivatives_futures.py | 73 +- .../openbb/package/derivatives_options.py | 165 +- openbb_platform/openbb/package/economy.py | 2556 +++++++++++++++-- openbb_platform/openbb/package/economy_gdp.py | 269 +- .../openbb/package/economy_survey.py | 323 ++- openbb_platform/openbb/package/equity.py | 211 +- .../openbb/package/equity_calendar.py | 115 +- .../openbb/package/equity_compare.py | 347 ++- .../openbb/package/equity_discovery.py | 224 +- .../openbb/package/equity_estimates.py | 387 ++- .../openbb/package/equity_fundamental.py | 865 ++++-- .../openbb/package/equity_ownership.py | 258 +- .../openbb/package/equity_price.py | 253 +- .../openbb/package/equity_shorts.py | 23 +- openbb_platform/openbb/package/etf.py | 281 +- openbb_platform/openbb/package/fixedincome.py | 193 +- .../openbb/package/fixedincome_corporate.py | 206 +- .../openbb/package/fixedincome_government.py | 132 +- .../openbb/package/fixedincome_rate.py | 384 ++- .../openbb/package/fixedincome_spreads.py | 82 +- openbb_platform/openbb/package/index.py | 25 +- openbb_platform/openbb/package/index_price.py | 69 +- openbb_platform/openbb/package/news.py | 124 +- openbb_platform/openbb/package/regulators.py | 4 +- .../openbb/package/regulators_cftc.py | 93 +- .../openbb/package/regulators_sec.py | 54 +- 34 files changed, 6316 insertions(+), 1746 deletions(-) diff --git a/openbb_platform/openbb/assets/reference.json b/openbb_platform/openbb/assets/reference.json index 33781765a6ff..2c53c71c98f4 100644 --- a/openbb_platform/openbb/assets/reference.json +++ b/openbb_platform/openbb/assets/reference.json @@ -3,7 +3,7 @@ "info": { "title": "OpenBB Platform (Python)", "description": "Investment research for everyone, anywhere.", - "core": "1.3.3", + "core": "1.3.4", "extensions": { "openbb_core_extension": [ "commodity@1.2.3", diff --git a/openbb_platform/openbb/package/commodity.py b/openbb_platform/openbb/package/commodity.py index 5d4442b91c34..ad021c15cee1 100644 --- a/openbb_platform/openbb/package/commodity.py +++ b/openbb_platform/openbb/package/commodity.py @@ -17,4 +17,6 @@ def price(self): # pylint: disable=import-outside-toplevel from . import commodity_price - return commodity_price.ROUTER_commodity_price(command_runner=self._command_runner) + return commodity_price.ROUTER_commodity_price( + command_runner=self._command_runner + ) diff --git a/openbb_platform/openbb/package/commodity_price.py b/openbb_platform/openbb/package/commodity_price.py index 8277fa3f504c..09d87f7041b0 100644 --- a/openbb_platform/openbb/package/commodity_price.py +++ b/openbb_platform/openbb/package/commodity_price.py @@ -23,9 +23,20 @@ def __repr__(self) -> str: @validate def spot( 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["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, + 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: """Commodity Spot Prices. @@ -95,15 +106,15 @@ def spot( CommoditySpotPrices ------------------- date : 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. commodity : Optional[str] - Commodity name. + Commodity name. price : float - Price of the commodity. + Price of the commodity. unit : Optional[str] - Unit of the commodity price. + Unit of the commodity price. Examples -------- @@ -127,6 +138,69 @@ def spot( "end_date": end_date, }, extra_params=kwargs, - info={"commodity": {"fred": {"multiple_items_allowed": False, "choices": ["wti", "brent", "natural_gas", "jet_fuel", "propane", "heating_oil", "diesel_gulf_coast", "diesel_ny_harbor", "diesel_la", "gasoline_ny_harbor", "gasoline_gulf_coast", "rbob", "all"]}}, "frequency": {"fred": {"multiple_items_allowed": False, "choices": ["a", "q", "m", "w", "d", "wef", "weth", "wew", "wetu", "wem", "wesu", "wesa", "bwew", "bwem"]}}, "aggregation_method": {"fred": {"multiple_items_allowed": False, "choices": ["avg", "sum", "eop"]}}, "transform": {"fred": {"multiple_items_allowed": False, "choices": ["chg", "ch1", "pch", "pc1", "pca", "cch", "cca", "log"]}}}, + info={ + "commodity": { + "fred": { + "multiple_items_allowed": False, + "choices": [ + "wti", + "brent", + "natural_gas", + "jet_fuel", + "propane", + "heating_oil", + "diesel_gulf_coast", + "diesel_ny_harbor", + "diesel_la", + "gasoline_ny_harbor", + "gasoline_gulf_coast", + "rbob", + "all", + ], + } + }, + "frequency": { + "fred": { + "multiple_items_allowed": False, + "choices": [ + "a", + "q", + "m", + "w", + "d", + "wef", + "weth", + "wew", + "wetu", + "wem", + "wesu", + "wesa", + "bwew", + "bwem", + ], + } + }, + "aggregation_method": { + "fred": { + "multiple_items_allowed": False, + "choices": ["avg", "sum", "eop"], + } + }, + "transform": { + "fred": { + "multiple_items_allowed": False, + "choices": [ + "chg", + "ch1", + "pch", + "pc1", + "pca", + "cch", + "cca", + "log", + ], + } + }, + }, ) ) diff --git a/openbb_platform/openbb/package/crypto.py b/openbb_platform/openbb/package/crypto.py index 6d510d1ea59b..be006b8c7ab7 100644 --- a/openbb_platform/openbb/package/crypto.py +++ b/openbb_platform/openbb/package/crypto.py @@ -30,8 +30,15 @@ def price(self): @validate def search( self, - query: Annotated[Optional[str], OpenBBField(description="Search query.")] = 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, + query: Annotated[ + Optional[str], OpenBBField(description="Search query.") + ] = 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: """Search available cryptocurrency pairs within a provider. @@ -60,9 +67,9 @@ def search( CryptoSearch ------------ symbol : str - Symbol representing the entity requested in the data. (Crypto) + Symbol representing the entity requested in the data. (Crypto) name : Optional[str] - Name of the crypto. + Name of the crypto. currency : Optional[str] The currency the crypto trades for. (provider: fmp) exchange : Optional[str] diff --git a/openbb_platform/openbb/package/crypto_price.py b/openbb_platform/openbb/package/crypto_price.py index 4c719ff55680..5489f57765b3 100644 --- a/openbb_platform/openbb/package/crypto_price.py +++ b/openbb_platform/openbb/package/crypto_price.py @@ -23,10 +23,26 @@ def __repr__(self) -> str: @validate def historical( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Can use CURR1-CURR2 or CURR1CURR2 format. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance.")], - 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", "polygon", "tiingo", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, polygon, tiingo, yfinance.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Can use CURR1-CURR2 or CURR1CURR2 format. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance." + ), + ], + 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", "polygon", "tiingo", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, polygon, tiingo, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get historical price data for cryptocurrency pair(s) within a provider. @@ -67,19 +83,19 @@ def historical( CryptoHistorical ---------------- date : Union[date, datetime] - The date of the data. + The date of the data. open : float - The open price. + The open price. high : float - The high price. + The high price. low : float - The low price. + The low price. close : float - The close price. + The close price. volume : float - The trading volume. + The trading volume. vwap : Optional[Annotated[float, Gt(gt=0)]] - Volume Weighted Average Price over the period. + Volume Weighted Average Price over the period. adj_close : Optional[float] The adjusted close price. (provider: fmp) change : Optional[float] @@ -117,6 +133,41 @@ def historical( "end_date": end_date, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "polygon": {"multiple_items_allowed": True, "choices": None}, "tiingo": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}}, "interval": {"fmp": {"multiple_items_allowed": False, "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, "tiingo": {"multiple_items_allowed": False, "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, "yfinance": {"multiple_items_allowed": False, "choices": ["1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1W", "1M", "1Q"]}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "tiingo": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + }, + "interval": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "tiingo": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ], + }, + }, + }, ) ) diff --git a/openbb_platform/openbb/package/currency.py b/openbb_platform/openbb/package/currency.py index 00d15a282a59..a42e26cd17ed 100644 --- a/openbb_platform/openbb/package/currency.py +++ b/openbb_platform/openbb/package/currency.py @@ -31,8 +31,16 @@ def price(self): @validate def search( self, - query: Annotated[Optional[str], OpenBBField(description="Query to search for currency pairs.")] = None, - provider: Annotated[Optional[Literal["fmp", "intrinio", "polygon"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon.")] = None, + query: Annotated[ + Optional[str], + OpenBBField(description="Query to search for currency pairs."), + ] = None, + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "polygon"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon." + ), + ] = None, **kwargs ) -> OBBject: """Currency Search. @@ -44,7 +52,7 @@ def search( All trading within the forex market, whether selling, buying, or trading, will take place through currency pairs. (ref: Investopedia) Major currency pairs include pairs such as EUR/USD, USD/JPY, GBP/USD, etc. - + Parameters ---------- @@ -70,9 +78,9 @@ def search( CurrencyPairs ------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the currency pair. + Name of the currency pair. currency : Optional[str] Base currency of the currency pair. (provider: fmp) stock_exchange : Optional[str] @@ -129,10 +137,30 @@ def search( @validate def snapshots( self, - base: Annotated[Union[str, List[str]], OpenBBField(description="The base currency symbol. Multiple comma separated items allowed for provider(s): fmp, polygon.")] = "usd", - quote_type: Annotated[Literal["direct", "indirect"], OpenBBField(description="Whether the quote is direct or indirect. Selecting 'direct' will return the exchange rate as the amount of domestic currency required to buy one unit of the foreign currency. Selecting 'indirect' (default) will return the exchange rate as the amount of foreign currency required to buy one unit of the domestic currency.")] = "indirect", - counter_currencies: Annotated[Union[List[str], str, None], OpenBBField(description="An optional list of counter currency symbols to filter for. None returns all.")] = None, - provider: Annotated[Optional[Literal["fmp", "polygon"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, polygon.")] = None, + base: Annotated[ + Union[str, List[str]], + OpenBBField( + description="The base currency symbol. Multiple comma separated items allowed for provider(s): fmp, polygon." + ), + ] = "usd", + quote_type: Annotated[ + Literal["direct", "indirect"], + OpenBBField( + description="Whether the quote is direct or indirect. Selecting 'direct' will return the exchange rate as the amount of domestic currency required to buy one unit of the foreign currency. Selecting 'indirect' (default) will return the exchange rate as the amount of foreign currency required to buy one unit of the domestic currency." + ), + ] = "indirect", + counter_currencies: Annotated[ + Union[List[str], str, None], + OpenBBField( + description="An optional list of counter currency symbols to filter for. None returns all." + ), + ] = None, + provider: Annotated[ + Optional[Literal["fmp", "polygon"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, polygon." + ), + ] = None, **kwargs ) -> OBBject: """Snapshots of currency exchange rates from an indirect or direct perspective of a base currency. @@ -165,23 +193,23 @@ def snapshots( CurrencySnapshots ----------------- base_currency : str - The base, or domestic, currency. + The base, or domestic, currency. counter_currency : str - The counter, or foreign, currency. + The counter, or foreign, currency. last_rate : float - The exchange rate, relative to the base currency. Rates are expressed as the amount of foreign currency received from selling one unit of the base currency, or the quantity of foreign currency required to purchase one unit of the domestic currency. To inverse the perspective, set the 'quote_type' parameter as 'direct'. + The exchange rate, relative to the base currency. Rates are expressed as the amount of foreign currency received from selling one unit of the base currency, or the quantity of foreign currency required to purchase one unit of the domestic currency. To inverse the perspective, set the 'quote_type' parameter as 'direct'. open : Optional[float] - The open price. + The open price. high : Optional[float] - The high price. + The high price. low : Optional[float] - The low price. + The low price. close : Optional[float] - The close price. + The close price. volume : Optional[int] - The trading volume. + The trading volume. prev_close : Optional[float] - The previous close price. + The previous close price. change : Optional[float] The change in the price from the previous close. (provider: fmp, polygon) change_percent : Optional[float] @@ -258,6 +286,11 @@ def snapshots( "counter_currencies": counter_currencies, }, extra_params=kwargs, - info={"base": {"fmp": {"multiple_items_allowed": True, "choices": None}, "polygon": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "base": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + } + }, ) ) diff --git a/openbb_platform/openbb/package/currency_price.py b/openbb_platform/openbb/package/currency_price.py index 856369ee32b1..4288d5afd737 100644 --- a/openbb_platform/openbb/package/currency_price.py +++ b/openbb_platform/openbb/package/currency_price.py @@ -23,20 +23,36 @@ def __repr__(self) -> str: @validate def historical( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Can use CURR1-CURR2 or CURR1CURR2 format. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance.")], - 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", "polygon", "tiingo", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, polygon, tiingo, yfinance.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Can use CURR1-CURR2 or CURR1CURR2 format. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance." + ), + ], + 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", "polygon", "tiingo", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, polygon, tiingo, yfinance." + ), + ] = None, **kwargs ) -> OBBject: - """ Currency Historical Price. Currency historical data. + """Currency Historical Price. Currency historical data. Currency historical prices refer to the past exchange rates of one currency against another over a specific period. This data provides insight into the fluctuations and trends in the foreign exchange market, helping analysts, traders, and economists understand currency performance, evaluate economic health, and make predictions about future movements. - + Parameters ---------- @@ -72,19 +88,19 @@ def historical( CurrencyHistorical ------------------ date : Union[date, datetime] - The date of the data. + The date of the data. open : float - The open price. + The open price. high : float - The high price. + The high price. low : float - The low price. + The low price. close : float - The close price. + The close price. volume : Optional[float] - The trading volume. + The trading volume. vwap : Optional[Annotated[float, Gt(gt=0)]] - Volume Weighted Average Price over the period. + Volume Weighted Average Price over the period. adj_close : Optional[float] The adjusted close price. (provider: fmp) change : Optional[float] @@ -120,6 +136,41 @@ def historical( "end_date": end_date, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "polygon": {"multiple_items_allowed": True, "choices": None}, "tiingo": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}}, "interval": {"fmp": {"multiple_items_allowed": False, "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, "tiingo": {"multiple_items_allowed": False, "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, "yfinance": {"multiple_items_allowed": False, "choices": ["1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1W", "1M", "1Q"]}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "tiingo": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + }, + "interval": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "tiingo": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ], + }, + }, + }, ) ) diff --git a/openbb_platform/openbb/package/derivatives.py b/openbb_platform/openbb/package/derivatives.py index 902d76d62ab9..09e666eb8606 100644 --- a/openbb_platform/openbb/package/derivatives.py +++ b/openbb_platform/openbb/package/derivatives.py @@ -18,11 +18,15 @@ def futures(self): # pylint: disable=import-outside-toplevel from . import derivatives_futures - return derivatives_futures.ROUTER_derivatives_futures(command_runner=self._command_runner) + return derivatives_futures.ROUTER_derivatives_futures( + command_runner=self._command_runner + ) @property def options(self): # pylint: disable=import-outside-toplevel from . import derivatives_options - return derivatives_options.ROUTER_derivatives_options(command_runner=self._command_runner) + return derivatives_options.ROUTER_derivatives_options( + command_runner=self._command_runner + ) diff --git a/openbb_platform/openbb/package/derivatives_futures.py b/openbb_platform/openbb/package/derivatives_futures.py index ef83acd06af5..0678828aa42a 100644 --- a/openbb_platform/openbb/package/derivatives_futures.py +++ b/openbb_platform/openbb/package/derivatives_futures.py @@ -25,8 +25,18 @@ def __repr__(self) -> str: def curve( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - 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): yfinance.")] = None, - provider: Annotated[Optional[Literal["yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.")] = 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): yfinance." + ), + ] = None, + provider: Annotated[ + Optional[Literal["yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Futures Term Structure, current or historical. @@ -57,11 +67,11 @@ def curve( FuturesCurve ------------ date : Optional[date] - The date of the data. + The date of the data. expiration : str - Futures expiration month. + Futures expiration month. price : Optional[float] - The price of the futures contract. + The price of the futures contract. Examples -------- @@ -84,7 +94,11 @@ def curve( "date": date, }, extra_params=kwargs, - info={"date": {"yfinance": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "date": { + "yfinance": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) @@ -92,11 +106,30 @@ def curve( @validate def historical( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): yfinance.")], - 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, - expiration: Annotated[Optional[str], OpenBBField(description="Future expiry date with format YYYY-MM")] = None, - provider: Annotated[Optional[Literal["yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): yfinance." + ), + ], + 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, + expiration: Annotated[ + Optional[str], + OpenBBField(description="Future expiry date with format YYYY-MM"), + ] = None, + provider: Annotated[ + Optional[Literal["yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Historical futures prices. @@ -133,17 +166,17 @@ def historical( FuturesHistorical ----------------- date : datetime - The date of the data. + The date of the data. open : float - The open price. + The open price. high : float - The high price. + The high price. low : float - The low price. + The low price. close : float - The close price. + The close price. volume : float - The trading volume. + The trading volume. Examples -------- @@ -172,6 +205,10 @@ def historical( "expiration": expiration, }, extra_params=kwargs, - info={"symbol": {"yfinance": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "yfinance": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) diff --git a/openbb_platform/openbb/package/derivatives_options.py b/openbb_platform/openbb/package/derivatives_options.py index b22804171684..f976eab64b60 100644 --- a/openbb_platform/openbb/package/derivatives_options.py +++ b/openbb_platform/openbb/package/derivatives_options.py @@ -25,7 +25,12 @@ def __repr__(self) -> str: def chains( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - provider: Annotated[Optional[Literal["intrinio", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio, yfinance.")] = None, + provider: Annotated[ + Optional[Literal["intrinio", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get the complete options chain for a ticker. @@ -78,107 +83,107 @@ def chains( OptionsChains ------------- underlying_symbol : List[Optional[str]] - Underlying symbol for the option. + Underlying symbol for the option. underlying_price : List[Optional[float]] - Price of the underlying stock. + Price of the underlying stock. contract_symbol : List[str] - Contract symbol for the option. + Contract symbol for the option. eod_date : List[Optional[date]] - Date for which the options chains are returned. + Date for which the options chains are returned. expiration : List[date] - Expiration date of the contract. + Expiration date of the contract. dte : List[Optional[int]] - Days to expiration of the contract. + Days to expiration of the contract. strike : List[float] - Strike price of the contract. + Strike price of the contract. option_type : List[str] - Call or Put. + Call or Put. open_interest : List[Optional[int]] - Open interest on the contract. + Open interest on the contract. volume : List[Optional[int]] - The trading volume. + The trading volume. theoretical_price : List[Optional[float]] - Theoretical value of the option. + Theoretical value of the option. last_trade_price : List[Optional[float]] - Last trade price of the option. + Last trade price of the option. last_trade_size : List[Optional[int]] - Last trade size of the option. + Last trade size of the option. last_trade_time : List[Optional[datetime]] - The timestamp of the last trade. + The timestamp of the last trade. tick : List[Optional[str]] - Whether the last tick was up or down in price. + Whether the last tick was up or down in price. bid : List[Optional[float]] - Current bid price for the option. + Current bid price for the option. bid_size : List[Optional[int]] - Bid size for the option. + Bid size for the option. bid_time : List[Optional[datetime]] - The timestamp of the bid price. + The timestamp of the bid price. bid_exchange : List[Optional[str]] - The exchange of the bid price. + The exchange of the bid price. ask : List[Optional[float]] - Current ask price for the option. + Current ask price for the option. ask_size : List[Optional[int]] - Ask size for the option. + Ask size for the option. ask_time : List[Optional[datetime]] - The timestamp of the ask price. + The timestamp of the ask price. ask_exchange : List[Optional[str]] - The exchange of the ask price. + The exchange of the ask price. mark : List[Optional[float]] - The mid-price between the latest bid and ask. + The mid-price between the latest bid and ask. open : List[Optional[float]] - The open price. + The open price. open_bid : List[Optional[float]] - The opening bid price for the option that day. + The opening bid price for the option that day. open_ask : List[Optional[float]] - The opening ask price for the option that day. + The opening ask price for the option that day. high : List[Optional[float]] - The high price. + The high price. bid_high : List[Optional[float]] - The highest bid price for the option that day. + The highest bid price for the option that day. ask_high : List[Optional[float]] - The highest ask price for the option that day. + The highest ask price for the option that day. low : List[Optional[float]] - The low price. + The low price. bid_low : List[Optional[float]] - The lowest bid price for the option that day. + The lowest bid price for the option that day. ask_low : List[Optional[float]] - The lowest ask price for the option that day. + The lowest ask price for the option that day. close : List[Optional[float]] - The close price. + The close price. close_size : List[Optional[int]] - The closing trade size for the option that day. + The closing trade size for the option that day. close_time : List[Optional[datetime]] - The time of the closing price for the option that day. + The time of the closing price for the option that day. close_bid : List[Optional[float]] - The closing bid price for the option that day. + The closing bid price for the option that day. close_bid_size : List[Optional[int]] - The closing bid size for the option that day. + The closing bid size for the option that day. close_bid_time : List[Optional[datetime]] - The time of the bid closing price for the option that day. + The time of the bid closing price for the option that day. close_ask : List[Optional[float]] - The closing ask price for the option that day. + The closing ask price for the option that day. close_ask_size : List[Optional[int]] - The closing ask size for the option that day. + The closing ask size for the option that day. close_ask_time : List[Optional[datetime]] - The time of the ask closing price for the option that day. + The time of the ask closing price for the option that day. prev_close : List[Optional[float]] - The previous close price. + The previous close price. change : List[Optional[float]] - The change in the price of the option. + The change in the price of the option. change_percent : List[Optional[float]] - Change, in normalized percentage points, of the option. + Change, in normalized percentage points, of the option. implied_volatility : List[Optional[float]] - Implied volatility of the option. + Implied volatility of the option. delta : List[Optional[float]] - Delta of the option. + Delta of the option. gamma : List[Optional[float]] - Gamma of the option. + Gamma of the option. theta : List[Optional[float]] - Theta of the option. + Theta of the option. vega : List[Optional[float]] - Vega of the option. + Vega of the option. rho : List[Optional[float]] - Rho of the option. + Rho of the option. in_the_money : List[Optional[bool]] Whether the option is in the money. (provider: yfinance) currency : List[Optional[str]] @@ -213,7 +218,12 @@ def chains( @validate def snapshots( self, - provider: Annotated[Optional[Literal["intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.")] = None, + provider: Annotated[ + Optional[Literal["intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get a snapshot of the options market universe. @@ -244,35 +254,35 @@ def snapshots( OptionsSnapshots ---------------- underlying_symbol : List[str] - Ticker symbol of the underlying asset. + Ticker symbol of the underlying asset. contract_symbol : List[str] - Symbol of the options contract. + Symbol of the options contract. expiration : List[date] - Expiration date of the options contract. + Expiration date of the options contract. dte : List[Optional[int]] - Number of days to expiration of the options contract. + Number of days to expiration of the options contract. strike : List[float] - Strike price of the options contract. + Strike price of the options contract. option_type : List[str] - The type of option. + The type of option. volume : List[Optional[int]] - The trading volume. + The trading volume. open_interest : List[Optional[int]] - Open interest at the time. + Open interest at the time. last_price : List[Optional[float]] - Last trade price at the time. + Last trade price at the time. last_size : List[Optional[int]] - Lot size of the last trade. + Lot size of the last trade. last_timestamp : List[Optional[datetime]] - Timestamp of the last price. + Timestamp of the last price. open : List[Optional[float]] - The open price. + The open price. high : List[Optional[float]] - The high price. + The high price. low : List[Optional[float]] - The low price. + The low price. close : List[Optional[float]] - The close price. + The close price. bid : List[Optional[float]] The last bid price at the time. (provider: intrinio) bid_size : List[Optional[int]] @@ -314,8 +324,7 @@ def snapshots( ("intrinio",), ) }, - standard_params={ - }, + standard_params={}, extra_params=kwargs, ) ) @@ -324,8 +333,16 @@ def snapshots( @validate def unusual( self, - symbol: Annotated[Optional[str], OpenBBField(description="Symbol to get data for. (the underlying symbol)")] = None, - provider: Annotated[Optional[Literal["intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.")] = None, + symbol: Annotated[ + Optional[str], + OpenBBField(description="Symbol to get data for. (the underlying symbol)"), + ] = None, + provider: Annotated[ + Optional[Literal["intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get the complete options chain for a ticker. @@ -370,9 +387,9 @@ def unusual( OptionsUnusual -------------- underlying_symbol : Optional[str] - Symbol representing the entity requested in the data. (the underlying symbol) + Symbol representing the entity requested in the data. (the underlying symbol) contract_symbol : str - Contract symbol for the option. + Contract symbol for the option. trade_timestamp : Optional[datetime] The datetime of order placement. (provider: intrinio) trade_type : Optional[Literal['block', 'sweep', 'large']] diff --git a/openbb_platform/openbb/package/economy.py b/openbb_platform/openbb/package/economy.py index 2478d448fdb3..9c5d1a7329eb 100644 --- a/openbb_platform/openbb/package/economy.py +++ b/openbb_platform/openbb/package/economy.py @@ -54,7 +54,12 @@ def __repr__(self) -> str: @validate def available_indicators( self, - provider: Annotated[Optional[Literal["econdb", "imf"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, imf.")] = None, + provider: Annotated[ + Optional[Literal["econdb", "imf"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, imf." + ), + ] = None, **kwargs ) -> OBBject: """Get the available economic indicators for a provider. @@ -83,17 +88,17 @@ def available_indicators( 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] @@ -133,8 +138,7 @@ def available_indicators( ("econdb", "imf"), ) }, - standard_params={ - }, + standard_params={}, extra_params=kwargs, ) ) @@ -143,7 +147,12 @@ def available_indicators( @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. @@ -176,47 +185,47 @@ def balance_of_payments( 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 -------- @@ -235,8 +244,7 @@ def balance_of_payments( ("fred",), ) }, - standard_params={ - }, + standard_params={}, extra_params=kwargs, ) ) @@ -245,9 +253,20 @@ def balance_of_payments( @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. @@ -286,29 +305,29 @@ def calendar( 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] @@ -360,7 +379,244 @@ def calendar( "end_date": end_date, }, extra_params=kwargs, - info={"country": {"tradingeconomics": {"multiple_items_allowed": True, "choices": ["afghanistan", "albania", "algeria", "andorra", "angola", "antigua_and_barbuda", "argentina", "armenia", "aruba", "australia", "austria", "azerbaijan", "bahamas", "bahrain", "bangladesh", "barbados", "belarus", "belgium", "belize", "benin", "bermuda", "bhutan", "bolivia", "bosnia_and_herzegovina", "botswana", "brazil", "brunei", "bulgaria", "burkina_faso", "burundi", "cambodia", "cameroon", "canada", "cape_verde", "cayman_islands", "central_african_republic", "chad", "chile", "china", "colombia", "comoros", "congo", "costa_rica", "croatia", "cuba", "cyprus", "czech_republic", "denmark", "djibouti", "dominica", "dominican_republic", "east_timor", "ecuador", "egypt", "el_salvador", "equatorial_guinea", "eritrea", "estonia", "ethiopia", "euro_area", "faroe_islands", "fiji", "finland", "france", "gabon", "gambia", "georgia", "germany", "ghana", "greece", "grenada", "guatemala", "guinea", "guinea_bissau", "guyana", "haiti", "honduras", "hong_kong", "hungary", "iceland", "india", "indonesia", "iran", "iraq", "ireland", "isle_of_man", "israel", "italy", "ivory_coast", "jamaica", "japan", "jordan", "kazakhstan", "kenya", "kiribati", "kosovo", "kuwait", "kyrgyzstan", "laos", "latvia", "lebanon", "lesotho", "liberia", "libya", "liechtenstein", "lithuania", "luxembourg", "macao", "madagascar", "malawi", "malaysia", "maldives", "mali", "malta", "mauritania", "mauritius", "mexico", "moldova", "monaco", "mongolia", "montenegro", "morocco", "mozambique", "myanmar", "namibia", "nepal", "netherlands", "new_caledonia", "new_zealand", "nicaragua", "niger", "nigeria", "north_korea", "north_macedonia", "norway", "oman", "pakistan", "palestine", "panama", "papua_new_guinea", "paraguay", "peru", "philippines", "poland", "portugal", "puerto_rico", "qatar", "republic_of_the_congo", "romania", "russia", "rwanda", "samoa", "sao_tome_and_principe", "saudi_arabia", "senegal", "serbia", "seychelles", "sierra_leone", "singapore", "slovakia", "slovenia", "solomon_islands", "somalia", "south_africa", "south_korea", "south_sudan", "spain", "sri_lanka", "sudan", "suriname", "swaziland", "sweden", "switzerland", "syria", "taiwan", "tajikistan", "tanzania", "thailand", "togo", "tonga", "trinidad_and_tobago", "tunisia", "turkey", "turkmenistan", "uganda", "ukraine", "united_arab_emirates", "united_kingdom", "united_states", "uruguay", "uzbekistan", "vanuatu", "venezuela", "vietnam", "yemen", "zambia", "zimbabwe"]}}, "importance": {"tradingeconomics": {"multiple_items_allowed": False, "choices": ["low", "medium", "high"]}}, "group": {"tradingeconomics": {"multiple_items_allowed": False, "choices": ["interest_rate", "inflation", "bonds", "consumer", "gdp", "government", "housing", "labour", "markets", "money", "prices", "trade", "business"]}}, "calendar_id": {"tradingeconomics": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "country": { + "tradingeconomics": { + "multiple_items_allowed": True, + "choices": [ + "afghanistan", + "albania", + "algeria", + "andorra", + "angola", + "antigua_and_barbuda", + "argentina", + "armenia", + "aruba", + "australia", + "austria", + "azerbaijan", + "bahamas", + "bahrain", + "bangladesh", + "barbados", + "belarus", + "belgium", + "belize", + "benin", + "bermuda", + "bhutan", + "bolivia", + "bosnia_and_herzegovina", + "botswana", + "brazil", + "brunei", + "bulgaria", + "burkina_faso", + "burundi", + "cambodia", + "cameroon", + "canada", + "cape_verde", + "cayman_islands", + "central_african_republic", + "chad", + "chile", + "china", + "colombia", + "comoros", + "congo", + "costa_rica", + "croatia", + "cuba", + "cyprus", + "czech_republic", + "denmark", + "djibouti", + "dominica", + "dominican_republic", + "east_timor", + "ecuador", + "egypt", + "el_salvador", + "equatorial_guinea", + "eritrea", + "estonia", + "ethiopia", + "euro_area", + "faroe_islands", + "fiji", + "finland", + "france", + "gabon", + "gambia", + "georgia", + "germany", + "ghana", + "greece", + "grenada", + "guatemala", + "guinea", + "guinea_bissau", + "guyana", + "haiti", + "honduras", + "hong_kong", + "hungary", + "iceland", + "india", + "indonesia", + "iran", + "iraq", + "ireland", + "isle_of_man", + "israel", + "italy", + "ivory_coast", + "jamaica", + "japan", + "jordan", + "kazakhstan", + "kenya", + "kiribati", + "kosovo", + "kuwait", + "kyrgyzstan", + "laos", + "latvia", + "lebanon", + "lesotho", + "liberia", + "libya", + "liechtenstein", + "lithuania", + "luxembourg", + "macao", + "madagascar", + "malawi", + "malaysia", + "maldives", + "mali", + "malta", + "mauritania", + "mauritius", + "mexico", + "moldova", + "monaco", + "mongolia", + "montenegro", + "morocco", + "mozambique", + "myanmar", + "namibia", + "nepal", + "netherlands", + "new_caledonia", + "new_zealand", + "nicaragua", + "niger", + "nigeria", + "north_korea", + "north_macedonia", + "norway", + "oman", + "pakistan", + "palestine", + "panama", + "papua_new_guinea", + "paraguay", + "peru", + "philippines", + "poland", + "portugal", + "puerto_rico", + "qatar", + "republic_of_the_congo", + "romania", + "russia", + "rwanda", + "samoa", + "sao_tome_and_principe", + "saudi_arabia", + "senegal", + "serbia", + "seychelles", + "sierra_leone", + "singapore", + "slovakia", + "slovenia", + "solomon_islands", + "somalia", + "south_africa", + "south_korea", + "south_sudan", + "spain", + "sri_lanka", + "sudan", + "suriname", + "swaziland", + "sweden", + "switzerland", + "syria", + "taiwan", + "tajikistan", + "tanzania", + "thailand", + "togo", + "tonga", + "trinidad_and_tobago", + "tunisia", + "turkey", + "turkmenistan", + "uganda", + "ukraine", + "united_arab_emirates", + "united_kingdom", + "united_states", + "uruguay", + "uzbekistan", + "vanuatu", + "venezuela", + "vietnam", + "yemen", + "zambia", + "zimbabwe", + ], + } + }, + "importance": { + "tradingeconomics": { + "multiple_items_allowed": False, + "choices": ["low", "medium", "high"], + } + }, + "group": { + "tradingeconomics": { + "multiple_items_allowed": False, + "choices": [ + "interest_rate", + "inflation", + "bonds", + "consumer", + "gdp", + "government", + "housing", + "labour", + "markets", + "money", + "prices", + "trade", + "business", + ], + } + }, + "calendar_id": { + "tradingeconomics": { + "multiple_items_allowed": True, + "choices": None, + } + }, + }, ) ) @@ -368,8 +624,16 @@ def calendar( @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. @@ -408,7 +672,7 @@ def central_bank_holdings( 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] @@ -416,7 +680,7 @@ def central_bank_holdings( 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] @@ -483,7 +747,14 @@ def central_bank_holdings( "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, + } + } + }, ) ) @@ -491,9 +762,20 @@ def central_bank_holdings( @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). @@ -502,7 +784,7 @@ def composite_leading_indicator( 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 ---------- @@ -536,11 +818,11 @@ def composite_leading_indicator( 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 -------- @@ -564,7 +846,38 @@ def composite_leading_indicator( "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", + ], + } + } + }, ) ) @@ -572,8 +885,18 @@ def composite_leading_indicator( @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. @@ -606,33 +929,33 @@ def country_profile( 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 -------- @@ -656,7 +979,11 @@ def country_profile( "country": country, }, extra_params=kwargs, - info={"country": {"econdb": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "country": { + "econdb": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) @@ -664,19 +991,45 @@ def country_profile( @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 ---------- @@ -714,11 +1067,11 @@ def cpi( 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) @@ -749,7 +1102,122 @@ def cpi( "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", + ], + }, + } + }, ) ) @@ -757,13 +1225,42 @@ def cpi( @validate def direction_of_trade( self, - country: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="The country to get data. None is an equiavlent to 'all'. If 'all' is used, the counterpart field cannot be 'all'. Multiple comma separated items allowed for provider(s): imf.")] = None, - counterpart: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="Counterpart country to the trade. None is an equiavlent to 'all'. If 'all' is used, the country field cannot be 'all'. Multiple comma separated items allowed for provider(s): imf.")] = None, - direction: Annotated[Literal["exports", "imports", "balance", "all"], OpenBBField(description="Trade direction. Use 'all' to get all data for this dimension.")] = "balance", - 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, - frequency: Annotated[Literal["month", "quarter", "annual"], OpenBBField(description="The frequency of the data.")] = "month", - provider: Annotated[Optional[Literal["imf"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: imf.")] = None, + country: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="The country to get data. None is an equiavlent to 'all'. If 'all' is used, the counterpart field cannot be 'all'. Multiple comma separated items allowed for provider(s): imf." + ), + ] = None, + counterpart: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="Counterpart country to the trade. None is an equiavlent to 'all'. If 'all' is used, the country field cannot be 'all'. Multiple comma separated items allowed for provider(s): imf." + ), + ] = None, + direction: Annotated[ + Literal["exports", "imports", "balance", "all"], + OpenBBField( + description="Trade direction. Use 'all' to get all data for this dimension." + ), + ] = "balance", + 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, + frequency: Annotated[ + Literal["month", "quarter", "annual"], + OpenBBField(description="The frequency of the data."), + ] = "month", + provider: Annotated[ + Optional[Literal["imf"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: imf." + ), + ] = None, **kwargs ) -> OBBject: """Get Direction Of Trade Statistics from the IMF database. @@ -776,7 +1273,7 @@ def direction_of_trade( and exports are reported on a free on board (FOB) basis. Time series data includes estimates derived from reports of partner countries for non-reporting and slow-reporting countries. - + Parameters ---------- @@ -812,19 +1309,19 @@ def direction_of_trade( DirectionOfTrade ---------------- date : 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 : str - + counterpart : str - Counterpart country or region to the trade. + Counterpart country or region to the trade. title : Optional[str] - Title corresponding to the symbol. + Title corresponding to the symbol. value : float - Trade value. + Trade value. scale : Optional[str] - Scale of the value. + Scale of the value. Examples -------- @@ -853,7 +1350,514 @@ def direction_of_trade( "frequency": frequency, }, extra_params=kwargs, - info={"country": {"imf": {"multiple_items_allowed": True, "choices": ["all", "advanced_economies", "afghanistan", "africa", "africa_not_allocated", "albania", "algeria", "american_samoa", "angola", "anguilla", "antigua_and_barbuda", "antilles", "argentina", "armenia", "aruba", "asia_not_allocated", "australia", "austria", "azerbaijan", "bahamas", "bahrain", "bangladesh", "barbados", "belarus", "belgium", "belgo-luxembourg_economic_union", "belize", "benin", "bermuda", "bhutan", "bolivia", "bosnia_and_herzegovina", "botswana", "brazil", "brunei_darussalam", "bulgaria", "burkina_faso", "burundi", "cabo_verde", "cambodia", "cameroon", "canada", "central_african_republic", "chad", "chile", "china", "colombia", "community_of_independent_states", "comoros", "congo", "costa_rica", "croatia", "cuba", "curacao", "cyprus", "czech_republic", "democratic_republic_of_the_congo", "denmark", "developing_asia", "djibouti", "dominica", "dominican_republic", "east_germany", "ecuador", "egypt", "el_salvador", "emerging_and_developing_countries", "emerging_and_developing_europe", "equatorial_guinea", "eritrea", "estonia", "eswatini", "ethiopia", "euro_area", "europe", "europe_not_allocated", "european_union", "export_earnings_fuel", "export_earnings_nonfuel", "falkland_islands", "faroe_islands", "fiji", "finland", "former_czechoslovakia", "former_ussr", "former_yugoslavia", "france", "french_polynesia", "gabon", "gambia", "georgia", "germany", "ghana", "gibraltar", "greece", "greenland", "grenada", "guam", "guatemala", "guinea", "guyana", "haiti", "honduras", "hong_kong", "hungary", "iceland", "india", "indonesia", "iran", "iraq", "ireland", "israel", "italy", "ivory_coast", "jamaica", "japan", "jordan", "kazakhstan", "kenya", "kiribati", "kosovo", "kuwait", "kyrgyzstan", "lao", "latvia", "lebanon", "lesotho", "liberia", "libya", "lithuania", "luxembourg", "macao", "madagascar", "malawi", "malaysia", "maldives", "mali", "malta", "marshall_islands", "mauritania", "mauritius", "mexico", "micronesia", "middle_east", "middle_east_and_central_asia", "middle_east_and_central_asia_not_specified", "middle_east_north_africa_afghanistan_and_pakistan", "moldova", "mongolia", "montenegro", "montserrat", "morocco", "mozambique", "myanmar", "namibia", "nauru", "nepal", "netherlands", "new_caledonia", "new_zealand", "nicaragua", "niger", "nigeria", "north_korea", "north_macedonia", "north_vietnam", "norway", "oman", "other_countries_nie", "pakistan", "palau", "palestine", "panama", "papua_new_guinea", "paraguay", "peru", "philippines", "poland", "portugal", "qatar", "romania", "russia", "rwanda", "saint_kitts_and_nevis", "saint_lucia", "saint_vincent_and_the_grenadines", "samoa", "san_marino", "sao_tome_and_principe", "saudi_arabia", "senegal", "serbia", "serbia_and_montenegro", "seychelles", "sierra_leone", "singapore", "sint_maarten", "slovakia", "slovenia", "solomon_islands", "somalia", "south_africa", "south_african_common_customs_area", "south_korea", "south_sudan", "spain", "special_categories_and_economic_zones", "sri_lanka", "sub-saharan_africa", "sudan", "suriname", "sweden", "switzerland", "syria", "taiwan", "tajikistan", "tanzania", "thailand", "timor-leste", "togo", "tonga", "trinidad_and_tobago", "tunisia", "turkey", "turkmenistan", "tuvalu", "uganda", "ukraine", "united_arab_emirates", "united_kingdom", "united_states", "uruguay", "uzbekistan", "vanuatu", "vatican_city_state", "venezuela", "viet_nam", "west_malaysia", "western_hemisphere", "western_hemisphere_not_allocated", "world", "yemen", "yemen_arab_rep", "yemen_pd_rep", "zambia", "zimbabwe"]}}, "counterpart": {"imf": {"multiple_items_allowed": True, "choices": ["all", "advanced_economies", "afghanistan", "africa", "africa_not_allocated", "albania", "algeria", "american_samoa", "angola", "anguilla", "antigua_and_barbuda", "antilles", "argentina", "armenia", "aruba", "asia_not_allocated", "australia", "austria", "azerbaijan", "bahamas", "bahrain", "bangladesh", "barbados", "belarus", "belgium", "belgo-luxembourg_economic_union", "belize", "benin", "bermuda", "bhutan", "bolivia", "bosnia_and_herzegovina", "botswana", "brazil", "brunei_darussalam", "bulgaria", "burkina_faso", "burundi", "cabo_verde", "cambodia", "cameroon", "canada", "central_african_republic", "chad", "chile", "china", "colombia", "community_of_independent_states", "comoros", "congo", "costa_rica", "croatia", "cuba", "curacao", "cyprus", "czech_republic", "democratic_republic_of_the_congo", "denmark", "developing_asia", "djibouti", "dominica", "dominican_republic", "east_germany", "ecuador", "egypt", "el_salvador", "emerging_and_developing_countries", "emerging_and_developing_europe", "equatorial_guinea", "eritrea", "estonia", "eswatini", "ethiopia", "euro_area", "europe", "europe_not_allocated", "european_union", "export_earnings_fuel", "export_earnings_nonfuel", "falkland_islands", "faroe_islands", "fiji", "finland", "former_czechoslovakia", "former_ussr", "former_yugoslavia", "france", "french_polynesia", "gabon", "gambia", "georgia", "germany", "ghana", "gibraltar", "greece", "greenland", "grenada", "guam", "guatemala", "guinea", "guyana", "haiti", "honduras", "hong_kong", "hungary", "iceland", "india", "indonesia", "iran", "iraq", "ireland", "israel", "italy", "ivory_coast", "jamaica", "japan", "jordan", "kazakhstan", "kenya", "kiribati", "kosovo", "kuwait", "kyrgyzstan", "lao", "latvia", "lebanon", "lesotho", "liberia", "libya", "lithuania", "luxembourg", "macao", "madagascar", "malawi", "malaysia", "maldives", "mali", "malta", "marshall_islands", "mauritania", "mauritius", "mexico", "micronesia", "middle_east", "middle_east_and_central_asia", "middle_east_and_central_asia_not_specified", "middle_east_north_africa_afghanistan_and_pakistan", "moldova", "mongolia", "montenegro", "montserrat", "morocco", "mozambique", "myanmar", "namibia", "nauru", "nepal", "netherlands", "new_caledonia", "new_zealand", "nicaragua", "niger", "nigeria", "north_korea", "north_macedonia", "north_vietnam", "norway", "oman", "other_countries_nie", "pakistan", "palau", "palestine", "panama", "papua_new_guinea", "paraguay", "peru", "philippines", "poland", "portugal", "qatar", "romania", "russia", "rwanda", "saint_kitts_and_nevis", "saint_lucia", "saint_vincent_and_the_grenadines", "samoa", "san_marino", "sao_tome_and_principe", "saudi_arabia", "senegal", "serbia", "serbia_and_montenegro", "seychelles", "sierra_leone", "singapore", "sint_maarten", "slovakia", "slovenia", "solomon_islands", "somalia", "south_africa", "south_african_common_customs_area", "south_korea", "south_sudan", "spain", "special_categories_and_economic_zones", "sri_lanka", "sub-saharan_africa", "sudan", "suriname", "sweden", "switzerland", "syria", "taiwan", "tajikistan", "tanzania", "thailand", "timor-leste", "togo", "tonga", "trinidad_and_tobago", "tunisia", "turkey", "turkmenistan", "tuvalu", "uganda", "ukraine", "united_arab_emirates", "united_kingdom", "united_states", "uruguay", "uzbekistan", "vanuatu", "vatican_city_state", "venezuela", "viet_nam", "west_malaysia", "western_hemisphere", "western_hemisphere_not_allocated", "world", "yemen", "yemen_arab_rep", "yemen_pd_rep", "zambia", "zimbabwe"]}}}, + info={ + "country": { + "imf": { + "multiple_items_allowed": True, + "choices": [ + "all", + "advanced_economies", + "afghanistan", + "africa", + "africa_not_allocated", + "albania", + "algeria", + "american_samoa", + "angola", + "anguilla", + "antigua_and_barbuda", + "antilles", + "argentina", + "armenia", + "aruba", + "asia_not_allocated", + "australia", + "austria", + "azerbaijan", + "bahamas", + "bahrain", + "bangladesh", + "barbados", + "belarus", + "belgium", + "belgo-luxembourg_economic_union", + "belize", + "benin", + "bermuda", + "bhutan", + "bolivia", + "bosnia_and_herzegovina", + "botswana", + "brazil", + "brunei_darussalam", + "bulgaria", + "burkina_faso", + "burundi", + "cabo_verde", + "cambodia", + "cameroon", + "canada", + "central_african_republic", + "chad", + "chile", + "china", + "colombia", + "community_of_independent_states", + "comoros", + "congo", + "costa_rica", + "croatia", + "cuba", + "curacao", + "cyprus", + "czech_republic", + "democratic_republic_of_the_congo", + "denmark", + "developing_asia", + "djibouti", + "dominica", + "dominican_republic", + "east_germany", + "ecuador", + "egypt", + "el_salvador", + "emerging_and_developing_countries", + "emerging_and_developing_europe", + "equatorial_guinea", + "eritrea", + "estonia", + "eswatini", + "ethiopia", + "euro_area", + "europe", + "europe_not_allocated", + "european_union", + "export_earnings_fuel", + "export_earnings_nonfuel", + "falkland_islands", + "faroe_islands", + "fiji", + "finland", + "former_czechoslovakia", + "former_ussr", + "former_yugoslavia", + "france", + "french_polynesia", + "gabon", + "gambia", + "georgia", + "germany", + "ghana", + "gibraltar", + "greece", + "greenland", + "grenada", + "guam", + "guatemala", + "guinea", + "guyana", + "haiti", + "honduras", + "hong_kong", + "hungary", + "iceland", + "india", + "indonesia", + "iran", + "iraq", + "ireland", + "israel", + "italy", + "ivory_coast", + "jamaica", + "japan", + "jordan", + "kazakhstan", + "kenya", + "kiribati", + "kosovo", + "kuwait", + "kyrgyzstan", + "lao", + "latvia", + "lebanon", + "lesotho", + "liberia", + "libya", + "lithuania", + "luxembourg", + "macao", + "madagascar", + "malawi", + "malaysia", + "maldives", + "mali", + "malta", + "marshall_islands", + "mauritania", + "mauritius", + "mexico", + "micronesia", + "middle_east", + "middle_east_and_central_asia", + "middle_east_and_central_asia_not_specified", + "middle_east_north_africa_afghanistan_and_pakistan", + "moldova", + "mongolia", + "montenegro", + "montserrat", + "morocco", + "mozambique", + "myanmar", + "namibia", + "nauru", + "nepal", + "netherlands", + "new_caledonia", + "new_zealand", + "nicaragua", + "niger", + "nigeria", + "north_korea", + "north_macedonia", + "north_vietnam", + "norway", + "oman", + "other_countries_nie", + "pakistan", + "palau", + "palestine", + "panama", + "papua_new_guinea", + "paraguay", + "peru", + "philippines", + "poland", + "portugal", + "qatar", + "romania", + "russia", + "rwanda", + "saint_kitts_and_nevis", + "saint_lucia", + "saint_vincent_and_the_grenadines", + "samoa", + "san_marino", + "sao_tome_and_principe", + "saudi_arabia", + "senegal", + "serbia", + "serbia_and_montenegro", + "seychelles", + "sierra_leone", + "singapore", + "sint_maarten", + "slovakia", + "slovenia", + "solomon_islands", + "somalia", + "south_africa", + "south_african_common_customs_area", + "south_korea", + "south_sudan", + "spain", + "special_categories_and_economic_zones", + "sri_lanka", + "sub-saharan_africa", + "sudan", + "suriname", + "sweden", + "switzerland", + "syria", + "taiwan", + "tajikistan", + "tanzania", + "thailand", + "timor-leste", + "togo", + "tonga", + "trinidad_and_tobago", + "tunisia", + "turkey", + "turkmenistan", + "tuvalu", + "uganda", + "ukraine", + "united_arab_emirates", + "united_kingdom", + "united_states", + "uruguay", + "uzbekistan", + "vanuatu", + "vatican_city_state", + "venezuela", + "viet_nam", + "west_malaysia", + "western_hemisphere", + "western_hemisphere_not_allocated", + "world", + "yemen", + "yemen_arab_rep", + "yemen_pd_rep", + "zambia", + "zimbabwe", + ], + } + }, + "counterpart": { + "imf": { + "multiple_items_allowed": True, + "choices": [ + "all", + "advanced_economies", + "afghanistan", + "africa", + "africa_not_allocated", + "albania", + "algeria", + "american_samoa", + "angola", + "anguilla", + "antigua_and_barbuda", + "antilles", + "argentina", + "armenia", + "aruba", + "asia_not_allocated", + "australia", + "austria", + "azerbaijan", + "bahamas", + "bahrain", + "bangladesh", + "barbados", + "belarus", + "belgium", + "belgo-luxembourg_economic_union", + "belize", + "benin", + "bermuda", + "bhutan", + "bolivia", + "bosnia_and_herzegovina", + "botswana", + "brazil", + "brunei_darussalam", + "bulgaria", + "burkina_faso", + "burundi", + "cabo_verde", + "cambodia", + "cameroon", + "canada", + "central_african_republic", + "chad", + "chile", + "china", + "colombia", + "community_of_independent_states", + "comoros", + "congo", + "costa_rica", + "croatia", + "cuba", + "curacao", + "cyprus", + "czech_republic", + "democratic_republic_of_the_congo", + "denmark", + "developing_asia", + "djibouti", + "dominica", + "dominican_republic", + "east_germany", + "ecuador", + "egypt", + "el_salvador", + "emerging_and_developing_countries", + "emerging_and_developing_europe", + "equatorial_guinea", + "eritrea", + "estonia", + "eswatini", + "ethiopia", + "euro_area", + "europe", + "europe_not_allocated", + "european_union", + "export_earnings_fuel", + "export_earnings_nonfuel", + "falkland_islands", + "faroe_islands", + "fiji", + "finland", + "former_czechoslovakia", + "former_ussr", + "former_yugoslavia", + "france", + "french_polynesia", + "gabon", + "gambia", + "georgia", + "germany", + "ghana", + "gibraltar", + "greece", + "greenland", + "grenada", + "guam", + "guatemala", + "guinea", + "guyana", + "haiti", + "honduras", + "hong_kong", + "hungary", + "iceland", + "india", + "indonesia", + "iran", + "iraq", + "ireland", + "israel", + "italy", + "ivory_coast", + "jamaica", + "japan", + "jordan", + "kazakhstan", + "kenya", + "kiribati", + "kosovo", + "kuwait", + "kyrgyzstan", + "lao", + "latvia", + "lebanon", + "lesotho", + "liberia", + "libya", + "lithuania", + "luxembourg", + "macao", + "madagascar", + "malawi", + "malaysia", + "maldives", + "mali", + "malta", + "marshall_islands", + "mauritania", + "mauritius", + "mexico", + "micronesia", + "middle_east", + "middle_east_and_central_asia", + "middle_east_and_central_asia_not_specified", + "middle_east_north_africa_afghanistan_and_pakistan", + "moldova", + "mongolia", + "montenegro", + "montserrat", + "morocco", + "mozambique", + "myanmar", + "namibia", + "nauru", + "nepal", + "netherlands", + "new_caledonia", + "new_zealand", + "nicaragua", + "niger", + "nigeria", + "north_korea", + "north_macedonia", + "north_vietnam", + "norway", + "oman", + "other_countries_nie", + "pakistan", + "palau", + "palestine", + "panama", + "papua_new_guinea", + "paraguay", + "peru", + "philippines", + "poland", + "portugal", + "qatar", + "romania", + "russia", + "rwanda", + "saint_kitts_and_nevis", + "saint_lucia", + "saint_vincent_and_the_grenadines", + "samoa", + "san_marino", + "sao_tome_and_principe", + "saudi_arabia", + "senegal", + "serbia", + "serbia_and_montenegro", + "seychelles", + "sierra_leone", + "singapore", + "sint_maarten", + "slovakia", + "slovenia", + "solomon_islands", + "somalia", + "south_africa", + "south_african_common_customs_area", + "south_korea", + "south_sudan", + "spain", + "special_categories_and_economic_zones", + "sri_lanka", + "sub-saharan_africa", + "sudan", + "suriname", + "sweden", + "switzerland", + "syria", + "taiwan", + "tajikistan", + "tanzania", + "thailand", + "timor-leste", + "togo", + "tonga", + "trinidad_and_tobago", + "tunisia", + "turkey", + "turkmenistan", + "tuvalu", + "uganda", + "ukraine", + "united_arab_emirates", + "united_kingdom", + "united_states", + "uruguay", + "uzbekistan", + "vanuatu", + "vatican_city_state", + "venezuela", + "viet_nam", + "west_malaysia", + "western_hemisphere", + "western_hemisphere_not_allocated", + "world", + "yemen", + "yemen_arab_rep", + "yemen_pd_rep", + "zambia", + "zimbabwe", + ], + } + }, + }, ) ) @@ -861,8 +1865,18 @@ def direction_of_trade( @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, + 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. @@ -891,11 +1905,11 @@ def export_destinations( ExportDestinations ------------------ origin_country : str - The country of origin. + The country of origin. destination_country : str - The destination country. + The destination country. value : Union[float, int] - The value of the export. + The value of the export. units : Optional[str] The units of measurement for the value. (provider: econdb) title : Optional[str] @@ -923,7 +1937,11 @@ def export_destinations( "country": country, }, extra_params=kwargs, - info={"country": {"econdb": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "country": { + "econdb": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) @@ -932,16 +1950,30 @@ def export_destinations( 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 ---------- @@ -965,66 +1997,66 @@ def fred_regional( 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) @@ -1045,7 +2077,7 @@ def fred_regional( 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]] @@ -1087,10 +2119,30 @@ def fred_regional( @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. @@ -1123,25 +2175,25 @@ def fred_release_table( 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 -------- @@ -1170,7 +2222,9 @@ def fred_release_table( "date": date, }, extra_params=kwargs, - info={"date": {"fred": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "date": {"fred": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -1178,15 +2232,22 @@ def fred_release_table( @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 ---------- @@ -1230,37 +2291,37 @@ def fred_search( 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] @@ -1290,7 +2351,14 @@ def fred_search( "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} + }, + }, ) ) @@ -1298,11 +2366,30 @@ def fred_search( @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. @@ -1378,7 +2465,7 @@ def fred_series( FredSeries ---------- date : date - The date of the data. + The date of the data. value : Optional[float] Value of the index. (provider: intrinio) @@ -1409,7 +2496,53 @@ def fred_series( "limit": limit, }, extra_params=kwargs, - info={"symbol": {"fred": {"multiple_items_allowed": True, "choices": None}}, "frequency": {"fred": {"multiple_items_allowed": False, "choices": ["a", "q", "m", "w", "d", "wef", "weth", "wew", "wetu", "wem", "wesu", "wesa", "bwew", "bwem"]}}, "aggregation_method": {"fred": {"multiple_items_allowed": False, "choices": ["avg", "sum", "eop"]}}, "transform": {"fred": {"multiple_items_allowed": False, "choices": ["chg", "ch1", "pch", "pc1", "pca", "cch", "cca", "log"]}}}, + info={ + "symbol": { + "fred": {"multiple_items_allowed": True, "choices": None} + }, + "frequency": { + "fred": { + "multiple_items_allowed": False, + "choices": [ + "a", + "q", + "m", + "w", + "d", + "wef", + "weth", + "wew", + "wetu", + "wem", + "wesu", + "wesa", + "bwew", + "bwem", + ], + } + }, + "aggregation_method": { + "fred": { + "multiple_items_allowed": False, + "choices": ["avg", "sum", "eop"], + } + }, + "transform": { + "fred": { + "multiple_items_allowed": False, + "choices": [ + "chg", + "ch1", + "pch", + "pc1", + "pca", + "cch", + "cca", + "log", + ], + } + }, + }, ) ) @@ -1424,12 +2557,36 @@ def gdp(self): @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. @@ -1466,11 +2623,11 @@ def house_price_index( 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 -------- @@ -1498,7 +2655,72 @@ def house_price_index( "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", + ], + } + } + }, ) ) @@ -1510,10 +2732,26 @@ def house_price_index( ) 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. @@ -1548,11 +2786,11 @@ def immediate_interest_rate( 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 -------- @@ -1563,7 +2801,11 @@ def immediate_interest_rate( """ # 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", @@ -1581,7 +2823,64 @@ def immediate_interest_rate( "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", + ], + } + } + }, ) ) @@ -1589,10 +2888,26 @@ def immediate_interest_rate( @validate def indicators( self, - country: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="The country to get data. The country represented by the indicator, if available. Multiple comma separated items allowed for provider(s): econdb, imf.")] = 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["econdb", "imf"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, imf.")] = None, + country: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="The country to get data. The country represented by the indicator, if available. Multiple comma separated items allowed for provider(s): econdb, imf." + ), + ] = 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["econdb", "imf"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, imf." + ), + ] = None, **kwargs ) -> OBBject: """Get economic indicators by country and indicator. @@ -1610,7 +2925,7 @@ def indicators( symbol : Optional[str] Symbol to get data for. The base symbol for the indicator (e.g. GDP, CPI, etc.). Use `available_indicators()` to get a list of available symbols. Multiple comma separated items allowed. (provider: econdb); Symbol to get data for. Use `available_indicators()` to get the list of available symbols. Use 'IRFCL' to get all the data from the set of indicators. Complete tables are available only by single country, and are keyed as described below. The default is 'irfcl_top_lines'. Available presets not listed in `available_indicators()` are: - + 'IRFCL': All the data from the set of indicators. Not compatible with multiple countries. 'irfcl_top_lines': The default, top line items from the IRFCL data. Compatible with multiple countries. 'reserve_assets_and_other_fx_assets': Table I of the IRFCL data. Not compatible with multiple countries. @@ -1622,12 +2937,12 @@ def indicators( 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) @@ -1654,15 +2969,15 @@ def indicators( 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] The scale of the value. (provider: imf) table : Optional[str] @@ -1708,7 +3023,242 @@ def indicators( "end_date": end_date, }, extra_params=kwargs, - info={"country": {"econdb": {"multiple_items_allowed": True, "choices": None}, "imf": {"multiple_items_allowed": True, "choices": ["all", "afghanistan", "albania", "algeria", "american_samoa", "angola", "anguilla", "antigua_and_barbuda", "argentina", "armenia", "aruba", "australia", "austria", "azerbaijan", "bahamas", "bahrain", "bangladesh", "barbados", "belarus", "belgium", "belize", "benin", "bermuda", "bhutan", "bolivia", "bosnia_and_herzegovina", "botswana", "brazil", "brunei_darussalam", "bulgaria", "burkina_faso", "burundi", "cabo_verde", "cambodia", "cameroon", "canada", "central_african_republic", "chad", "chile", "hong_kong", "macao", "china", "colombia", "comoros", "democratic_republic_of_the_congo", "congo", "costa_rica", "ivory_coast", "croatia", "cuba", "curacao", "cyprus", "czech_republic", "denmark", "djibouti", "dominica", "dominican_republic", "ecuador", "egypt", "el_salvador", "equatorial_guinea", "eritrea", "estonia", "eswatini", "ethiopia", "falkland_islands", "faroe_islands", "fiji", "finland", "france", "french_polynesia", "gabon", "gambia", "georgia", "germany", "ghana", "gibraltar", "greece", "greenland", "grenada", "guam", "guatemala", "guinea", "guyana", "haiti", "vatican_city_state", "honduras", "hungary", "iceland", "india", "indonesia", "iran", "iraq", "ireland", "israel", "italy", "jamaica", "japan", "jordan", "kazakhstan", "kenya", "kiribati", "north_korea", "south_korea", "kosovo", "kuwait", "kyrgyzstan", "lao", "latvia", "lebanon", "lesotho", "liberia", "libya", "lithuania", "luxembourg", "madagascar", "malawi", "malaysia", "maldives", "mali", "malta", "marshall_islands", "mauritania", "mauritius", "mexico", "micronesia", "moldova", "mongolia", "montenegro", "montserrat", "morocco", "mozambique", "myanmar", "namibia", "nauru", "nepal", "antilles", "netherlands", "new_caledonia", "new_zealand", "nicaragua", "niger", "nigeria", "north_macedonia", "norway", "oman", "pakistan", "palau", "panama", "papua_new_guinea", "paraguay", "peru", "philippines", "poland", "portugal", "qatar", "romania", "russia", "rwanda", "samoa", "san_marino", "sao_tome_and_principe", "saudi_arabia", "senegal", "serbia_and_montenegro", "serbia", "seychelles", "sierra_leone", "singapore", "sint_maarten", "slovakia", "slovenia", "solomon_islands", "somalia", "south_africa", "south_sudan", "spain", "sri_lanka", "saint_kitts_and_nevis", "saint_lucia", "saint_vincent_and_the_grenadines", "sudan", "suriname", "sweden", "switzerland", "syria", "taiwan", "tajikistan", "tanzania", "thailand", "timor-leste", "togo", "tonga", "trinidad_and_tobago", "tunisia", "turkey", "turkmenistan", "tuvalu", "uganda", "ukraine", "united_arab_emirates", "united_kingdom", "united_states", "uruguay", "uzbekistan", "vanuatu", "venezuela", "viet_nam", "palestine", "yemen", "zambia", "zimbabwe", "euro_area", "europe", "european_union", "unspecified"]}}, "symbol": {"econdb": {"multiple_items_allowed": True, "choices": None}, "imf": {"multiple_items_allowed": True, "choices": None}}, "frequency": {"imf": {"multiple_items_allowed": False, "choices": ["annual", "quarter", "month"]}}}, + info={ + "country": { + "econdb": {"multiple_items_allowed": True, "choices": None}, + "imf": { + "multiple_items_allowed": True, + "choices": [ + "all", + "afghanistan", + "albania", + "algeria", + "american_samoa", + "angola", + "anguilla", + "antigua_and_barbuda", + "argentina", + "armenia", + "aruba", + "australia", + "austria", + "azerbaijan", + "bahamas", + "bahrain", + "bangladesh", + "barbados", + "belarus", + "belgium", + "belize", + "benin", + "bermuda", + "bhutan", + "bolivia", + "bosnia_and_herzegovina", + "botswana", + "brazil", + "brunei_darussalam", + "bulgaria", + "burkina_faso", + "burundi", + "cabo_verde", + "cambodia", + "cameroon", + "canada", + "central_african_republic", + "chad", + "chile", + "hong_kong", + "macao", + "china", + "colombia", + "comoros", + "democratic_republic_of_the_congo", + "congo", + "costa_rica", + "ivory_coast", + "croatia", + "cuba", + "curacao", + "cyprus", + "czech_republic", + "denmark", + "djibouti", + "dominica", + "dominican_republic", + "ecuador", + "egypt", + "el_salvador", + "equatorial_guinea", + "eritrea", + "estonia", + "eswatini", + "ethiopia", + "falkland_islands", + "faroe_islands", + "fiji", + "finland", + "france", + "french_polynesia", + "gabon", + "gambia", + "georgia", + "germany", + "ghana", + "gibraltar", + "greece", + "greenland", + "grenada", + "guam", + "guatemala", + "guinea", + "guyana", + "haiti", + "vatican_city_state", + "honduras", + "hungary", + "iceland", + "india", + "indonesia", + "iran", + "iraq", + "ireland", + "israel", + "italy", + "jamaica", + "japan", + "jordan", + "kazakhstan", + "kenya", + "kiribati", + "north_korea", + "south_korea", + "kosovo", + "kuwait", + "kyrgyzstan", + "lao", + "latvia", + "lebanon", + "lesotho", + "liberia", + "libya", + "lithuania", + "luxembourg", + "madagascar", + "malawi", + "malaysia", + "maldives", + "mali", + "malta", + "marshall_islands", + "mauritania", + "mauritius", + "mexico", + "micronesia", + "moldova", + "mongolia", + "montenegro", + "montserrat", + "morocco", + "mozambique", + "myanmar", + "namibia", + "nauru", + "nepal", + "antilles", + "netherlands", + "new_caledonia", + "new_zealand", + "nicaragua", + "niger", + "nigeria", + "north_macedonia", + "norway", + "oman", + "pakistan", + "palau", + "panama", + "papua_new_guinea", + "paraguay", + "peru", + "philippines", + "poland", + "portugal", + "qatar", + "romania", + "russia", + "rwanda", + "samoa", + "san_marino", + "sao_tome_and_principe", + "saudi_arabia", + "senegal", + "serbia_and_montenegro", + "serbia", + "seychelles", + "sierra_leone", + "singapore", + "sint_maarten", + "slovakia", + "slovenia", + "solomon_islands", + "somalia", + "south_africa", + "south_sudan", + "spain", + "sri_lanka", + "saint_kitts_and_nevis", + "saint_lucia", + "saint_vincent_and_the_grenadines", + "sudan", + "suriname", + "sweden", + "switzerland", + "syria", + "taiwan", + "tajikistan", + "tanzania", + "thailand", + "timor-leste", + "togo", + "tonga", + "trinidad_and_tobago", + "tunisia", + "turkey", + "turkmenistan", + "tuvalu", + "uganda", + "ukraine", + "united_arab_emirates", + "united_kingdom", + "united_states", + "uruguay", + "uzbekistan", + "vanuatu", + "venezuela", + "viet_nam", + "palestine", + "yemen", + "zambia", + "zimbabwe", + "euro_area", + "europe", + "european_union", + "unspecified", + ], + }, + }, + "symbol": { + "econdb": {"multiple_items_allowed": True, "choices": None}, + "imf": {"multiple_items_allowed": True, "choices": None}, + }, + "frequency": { + "imf": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "month"], + } + }, + }, ) ) @@ -1716,15 +3266,31 @@ def indicators( @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 ---------- @@ -1758,11 +3324,11 @@ def interest_rates( 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 -------- @@ -1790,7 +3356,76 @@ def interest_rates( "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"], + } + }, + }, ) ) @@ -1802,9 +3437,20 @@ def interest_rates( ) 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. @@ -1817,7 +3463,7 @@ def long_term_interest_rate( 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 ---------- @@ -1849,11 +3495,11 @@ def long_term_interest_rate( 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 -------- @@ -1863,7 +3509,11 @@ def long_term_interest_rate( """ # 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", @@ -1887,16 +3537,30 @@ def long_term_interest_rate( @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 ---------- @@ -1926,21 +3590,21 @@ def money_measures( 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 -------- @@ -1972,8 +3636,18 @@ def money_measures( @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. @@ -2004,11 +3678,11 @@ def pce( 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] @@ -2044,7 +3718,9 @@ def pce( "date": date, }, extra_params=kwargs, - info={"date": {"fred": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "date": {"fred": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -2052,9 +3728,20 @@ def pce( @validate def port_volume( 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["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, + 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["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 average dwelling times and TEU volumes from the top ports. @@ -2085,13 +3772,13 @@ def port_volume( PortVolume ---------- date : date - The date of the data. + The date of the data. port_code : Optional[str] - Port code. + Port code. port_name : Optional[str] - Port name. + Port name. country : Optional[str] - Country where the port is located. + Country where the port is located. export_dwell_time : Optional[float] EconDB model estimate for the average number of days from when a container enters the terminal gates until it is loaded on a vessel. High dwelling times can indicate vessel delays. (provider: econdb) import_dwell_time : Optional[float] @@ -2129,9 +3816,20 @@ def port_volume( @validate def primary_dealer_fails( 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: """Primary Dealer Statistics for Fails to Deliver and Fails to Receive. @@ -2147,7 +3845,7 @@ def primary_dealer_fails( Near-100 percent pass-through of fails suggests a high degree of collateral re-hypothecation together with the inability or unwillingness to borrow or buy the needed securities." - + Parameters ---------- @@ -2179,9 +3877,9 @@ def primary_dealer_fails( PrimaryDealerFails ------------------ 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. title : Optional[str] Title of the series' symbol. (provider: federal_reserve) value : Optional[Union[int, float]] @@ -2210,7 +3908,27 @@ def primary_dealer_fails( "end_date": end_date, }, extra_params=kwargs, - info={"asset_class": {"federal_reserve": {"multiple_items_allowed": False, "choices": ["all", "treasuries", "tips", "agency", "mbs", "corporate"]}}, "unit": {"federal_reserve": {"multiple_items_allowed": False, "choices": ["value", "percent"]}}}, + info={ + "asset_class": { + "federal_reserve": { + "multiple_items_allowed": False, + "choices": [ + "all", + "treasuries", + "tips", + "agency", + "mbs", + "corporate", + ], + } + }, + "unit": { + "federal_reserve": { + "multiple_items_allowed": False, + "choices": ["value", "percent"], + } + }, + }, ) ) @@ -2218,9 +3936,20 @@ def primary_dealer_fails( @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. @@ -2253,9 +3982,9 @@ def primary_dealer_positioning( 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] @@ -2292,11 +4021,27 @@ def primary_dealer_positioning( @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. @@ -2318,7 +4063,7 @@ def retail_prices( 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 @@ -2348,15 +4093,15 @@ def retail_prices( 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 -------- @@ -2392,7 +4137,12 @@ def retail_prices( @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. @@ -2419,13 +4169,13 @@ def risk_premium( 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 -------- @@ -2443,8 +4193,7 @@ def risk_premium( ("fmp",), ) }, - standard_params={ - }, + standard_params={}, extra_params=kwargs, ) ) @@ -2453,11 +4202,30 @@ def risk_premium( @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. @@ -2492,11 +4260,11 @@ def share_price_index( 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 -------- @@ -2523,7 +4291,72 @@ def share_price_index( "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", + ], + } + } + }, ) ) @@ -2535,9 +4368,20 @@ def share_price_index( ) 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. @@ -2548,7 +4392,7 @@ def short_term_interest_rate( 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 ---------- @@ -2580,11 +4424,11 @@ def short_term_interest_rate( 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 -------- @@ -2594,7 +4438,11 @@ def short_term_interest_rate( """ # 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", @@ -2625,11 +4473,30 @@ def survey(self): @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. @@ -2670,11 +4537,11 @@ def unemployment( 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 -------- @@ -2702,6 +4569,59 @@ def unemployment( "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/openbb/package/economy_gdp.py b/openbb_platform/openbb/package/economy_gdp.py index 968d5ecde59b..d0092c89563f 100644 --- a/openbb_platform/openbb/package/economy_gdp.py +++ b/openbb_platform/openbb/package/economy_gdp.py @@ -25,9 +25,20 @@ def __repr__(self) -> str: @validate def forecast( 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 Forecasted GDP Data. @@ -65,11 +76,11 @@ def forecast( GdpForecast ----------- date : date - The date of the data. + The date of the data. country : str None value : Union[int, float] - Forecasted GDP value for the country and date. + Forecasted GDP value for the country and date. Examples -------- @@ -93,7 +104,69 @@ def forecast( "end_date": end_date, }, extra_params=kwargs, - info={"country": {"oecd": {"multiple_items_allowed": True, "choices": ["argentina", "asia", "australia", "austria", "belgium", "brazil", "bulgaria", "canada", "chile", "china", "colombia", "costa_rica", "croatia", "czech_republic", "denmark", "estonia", "finland", "france", "germany", "greece", "hungary", "iceland", "india", "indonesia", "ireland", "israel", "italy", "japan", "korea", "latvia", "lithuania", "luxembourg", "mexico", "netherlands", "new_zealand", "norway", "peru", "poland", "portugal", "romania", "russia", "slovak_republic", "slovenia", "south_africa", "spain", "sweden", "switzerland", "turkey", "united_kingdom", "united_states", "other_major_oil_producers", "rest_of_the_world", "world", "all"]}}}, + info={ + "country": { + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "argentina", + "asia", + "australia", + "austria", + "belgium", + "brazil", + "bulgaria", + "canada", + "chile", + "china", + "colombia", + "costa_rica", + "croatia", + "czech_republic", + "denmark", + "estonia", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "peru", + "poland", + "portugal", + "romania", + "russia", + "slovak_republic", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + "other_major_oil_producers", + "rest_of_the_world", + "world", + "all", + ], + } + } + }, ) ) @@ -101,9 +174,20 @@ def forecast( @validate def nominal( 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["econdb", "oecd"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, 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["econdb", "oecd"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, oecd." + ), + ] = None, **kwargs ) -> OBBject: """Get Nominal GDP Data. @@ -144,11 +228,11 @@ def nominal( GdpNominal ---------- date : date - The date of the data. + The date of the data. country : Optional[str] - The country represented by the GDP value. + The country represented by the GDP value. value : Union[int, float] - GDP value for the country and date. + GDP value for the country and date. nominal_growth_qoq : Optional[float] Nominal GDP growth rate quarter over quarter. (provider: econdb) nominal_growth_yoy : Optional[float] @@ -176,7 +260,74 @@ def nominal( "end_date": end_date, }, extra_params=kwargs, - info={"country": {"econdb": {"multiple_items_allowed": True, "choices": None}, "oecd": {"multiple_items_allowed": True, "choices": ["oecd", "oecd_26", "oecd_europe", "g7", "g20", "euro_area", "european_union_27", "european_union_15", "nafta", "argentina", "australia", "austria", "belgium", "bulgaria", "brazil", "canada", "chile", "colombia", "costa_rica", "croatia", "czech_republic", "denmark", "estonia", "finland", "france", "germany", "greece", "hungary", "iceland", "india", "indonesia", "ireland", "israel", "italy", "japan", "korea", "latvia", "lithuania", "luxembourg", "mexico", "netherlands", "new_zealand", "norway", "poland", "portugal", "romania", "russia", "saudi_arabia", "slovak_republic", "slovenia", "south_africa", "spain", "sweden", "switzerland", "turkey", "united_kingdom", "united_states", "all"]}}}, + info={ + "country": { + "econdb": {"multiple_items_allowed": True, "choices": None}, + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "oecd", + "oecd_26", + "oecd_europe", + "g7", + "g20", + "euro_area", + "european_union_27", + "european_union_15", + "nafta", + "argentina", + "australia", + "austria", + "belgium", + "bulgaria", + "brazil", + "canada", + "chile", + "colombia", + "costa_rica", + "croatia", + "czech_republic", + "denmark", + "estonia", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "poland", + "portugal", + "romania", + "russia", + "saudi_arabia", + "slovak_republic", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + "all", + ], + }, + } + }, ) ) @@ -184,9 +335,20 @@ def nominal( @validate def real( 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["econdb", "oecd"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, 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["econdb", "oecd"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, oecd." + ), + ] = None, **kwargs ) -> OBBject: """Get Real GDP Data. @@ -223,11 +385,11 @@ def real( GdpReal ------- date : date - The date of the data. + The date of the data. country : Optional[str] - The country represented by the GDP value. + The country represented by the GDP value. value : Union[int, float] - GDP value for the country and date. + GDP value for the country and date. real_growth_qoq : Optional[float] Real GDP growth rate quarter over quarter. (provider: econdb) real_growth_yoy : Optional[float] @@ -255,6 +417,73 @@ def real( "end_date": end_date, }, extra_params=kwargs, - info={"country": {"econdb": {"multiple_items_allowed": True, "choices": None}, "oecd": {"multiple_items_allowed": True, "choices": ["oecd", "oecd_26", "oecd_europe", "g7", "g20", "euro_area", "european_union_27", "european_union_15", "nafta", "argentina", "australia", "austria", "belgium", "bulgaria", "brazil", "canada", "chile", "colombia", "costa_rica", "croatia", "czech_republic", "denmark", "estonia", "finland", "france", "germany", "greece", "hungary", "iceland", "india", "indonesia", "ireland", "israel", "italy", "japan", "korea", "latvia", "lithuania", "luxembourg", "mexico", "netherlands", "new_zealand", "norway", "poland", "portugal", "romania", "russia", "saudi_arabia", "slovak_republic", "slovenia", "south_africa", "spain", "sweden", "switzerland", "turkey", "united_kingdom", "united_states", "all"]}}}, + info={ + "country": { + "econdb": {"multiple_items_allowed": True, "choices": None}, + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "oecd", + "oecd_26", + "oecd_europe", + "g7", + "g20", + "euro_area", + "european_union_27", + "european_union_15", + "nafta", + "argentina", + "australia", + "austria", + "belgium", + "bulgaria", + "brazil", + "canada", + "chile", + "colombia", + "costa_rica", + "croatia", + "czech_republic", + "denmark", + "estonia", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "poland", + "portugal", + "romania", + "russia", + "saudi_arabia", + "slovak_republic", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + "all", + ], + }, + } + }, ) ) diff --git a/openbb_platform/openbb/package/economy_survey.py b/openbb_platform/openbb/package/economy_survey.py index 62b29fe0e8ad..4ed73dac265b 100644 --- a/openbb_platform/openbb/package/economy_survey.py +++ b/openbb_platform/openbb/package/economy_survey.py @@ -29,8 +29,18 @@ def __repr__(self) -> str: @validate def bls_search( self, - query: Annotated[str, OpenBBField(description="The search word(s). Use semi-colon to separate multiple queries as an & operator.")] = "", - provider: Annotated[Optional[Literal["bls"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: bls.")] = None, + query: Annotated[ + str, + OpenBBField( + description="The search word(s). Use semi-colon to separate multiple queries as an & operator." + ), + ] = "", + provider: Annotated[ + Optional[Literal["bls"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: bls." + ), + ] = None, **kwargs ) -> OBBject: """Search BLS surveys by category and keyword or phrase to identify BLS series IDs. @@ -44,31 +54,31 @@ def bls_search( category : Optional[Literal['cpi', 'pce', 'ppi', 'ip', 'jolts', 'nfp', 'cps', 'lfs', 'wages', 'ec', 'sla', 'bed', 'tu']] The category of BLS survey to search within. An empty search query will return all series within the category. Options are: - + cpi - Consumer Price Index - + pce - Personal Consumption Expenditure - + ppi - Producer Price Index - + ip - Industry Productivity - + jolts - Job Openings and Labor Turnover Survey - + nfp - Nonfarm Payrolls - + cps - Current Population Survey - + lfs - Labor Force Statistics - + wages - Wages - + ec - Employer Costs - + sla - State and Local Area Employment - + bed - Business Employment Dynamics - + tu - Time Use (provider: bls) include_extras : bool @@ -93,11 +103,11 @@ def bls_search( BlsSearch --------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. title : Optional[str] - The title of the series. + The title of the series. survey_name : Optional[str] - The name of the survey. + The name of the survey. Examples -------- @@ -121,7 +131,28 @@ def bls_search( "query": query, }, extra_params=kwargs, - info={"category": {"bls": {"multiple_items_allowed": False, "choices": ["cpi", "pce", "ppi", "ip", "jolts", "nfp", "cps", "lfs", "wages", "ec", "sla", "bed", "tu"]}}}, + info={ + "category": { + "bls": { + "multiple_items_allowed": False, + "choices": [ + "cpi", + "pce", + "ppi", + "ip", + "jolts", + "nfp", + "cps", + "lfs", + "wages", + "ec", + "sla", + "bed", + "tu", + ], + } + } + }, ) ) @@ -129,10 +160,26 @@ def bls_search( @validate def bls_series( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): bls.")], - 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["bls"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: bls.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): bls." + ), + ], + 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["bls"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: bls." + ), + ] = None, **kwargs ) -> OBBject: """Get time series data for one, or more, BLS series IDs. @@ -171,13 +218,13 @@ def bls_series( BlsSeries --------- 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. title : Optional[str] - Title of the series. + Title of the series. value : Optional[float] - Observation value for the symbol and date. + Observation value for the symbol and date. change_1_m : Optional[float] One month change in value. (provider: bls) change_3_m : Optional[float] @@ -221,7 +268,9 @@ def bls_series( "end_date": end_date, }, extra_params=kwargs, - info={"symbol": {"bls": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": {"bls": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -229,9 +278,20 @@ def bls_series( @validate def economic_conditions_chicago( 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["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, + 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 The Survey Of Economic Conditions For The Chicago Region. @@ -248,32 +308,32 @@ def economic_conditions_chicago( Frequency aggregation to convert monthly data to lower frequency. None is monthly. (provider: fred) aggregation_method : Optional[Literal['avg', 'sum', 'eop']] A key that indicates the aggregation method used for frequency aggregation. - + 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) @@ -294,25 +354,25 @@ def economic_conditions_chicago( SurveyOfEconomicConditionsChicago --------------------------------- date : date - The date of the data. + The date of the data. activity_index : Optional[float] - Activity Index. + Activity Index. one_year_outlook : Optional[float] - One Year Outlook Index. + One Year Outlook Index. manufacturing_activity : Optional[float] - Manufacturing Activity Index. + Manufacturing Activity Index. non_manufacturing_activity : Optional[float] - Non-Manufacturing Activity Index. + Non-Manufacturing Activity Index. capital_expenditures_expectations : Optional[float] - Capital Expenditures Expectations Index. + Capital Expenditures Expectations Index. hiring_expectations : Optional[float] - Hiring Expectations Index. + Hiring Expectations Index. current_hiring : Optional[float] - Current Hiring Index. + Current Hiring Index. labor_costs : Optional[float] - Labor Costs Index. + Labor Costs Index. non_labor_costs : Optional[float] - Non-Labor Costs Index. + Non-Labor Costs Index. Examples -------- @@ -342,9 +402,20 @@ def economic_conditions_chicago( @validate def manufacturing_outlook_texas( 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["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, + 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 The Manufacturing Outlook Survey For The Texas Region. @@ -360,18 +431,18 @@ def manufacturing_outlook_texas( topic : Union[Literal['business_activity', 'business_outlook', 'capex', 'prices_paid', 'production', 'inventory', 'new_orders', 'new_orders_growth', 'unfilled_orders', 'shipments', 'delivery_time', 'employment', 'wages', 'hours_worked'], str] The topic for the survey response. Multiple comma separated items allowed. (provider: fred) frequency : Optional[Literal['annual', 'quarter']] - + Frequency aggregation to convert monthly data to lower frequency. None is monthly. (provider: fred) aggregation_method : Optional[Literal['avg', 'sum', 'eop']] - + A key that indicates the aggregation method used for frequency aggregation. 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 @@ -401,17 +472,17 @@ def manufacturing_outlook_texas( ManufacturingOutlookTexas ------------------------- date : date - The date of the data. + The date of the data. topic : Optional[str] - Topic of the survey response. + Topic of the survey response. diffusion_index : Optional[float] - Diffusion Index. + Diffusion Index. percent_reporting_increase : Optional[float] - Percent of respondents reporting an increase over the last month. + Percent of respondents reporting an increase over the last month. percent_reporting_decrease : Optional[float] - Percent of respondents reporting a decrease over the last month. + Percent of respondents reporting a decrease over the last month. percent_reporting_no_change : Optional[float] - Percent of respondents reporting no change over the last month. + Percent of respondents reporting no change over the last month. Examples -------- @@ -435,7 +506,29 @@ def manufacturing_outlook_texas( "end_date": end_date, }, extra_params=kwargs, - info={"topic": {"fred": {"multiple_items_allowed": True, "choices": ["business_activity", "business_outlook", "capex", "prices_paid", "production", "inventory", "new_orders", "new_orders_growth", "unfilled_orders", "shipments", "delivery_time", "employment", "wages", "hours_worked"]}}}, + info={ + "topic": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "business_activity", + "business_outlook", + "capex", + "prices_paid", + "production", + "inventory", + "new_orders", + "new_orders_growth", + "unfilled_orders", + "shipments", + "delivery_time", + "employment", + "wages", + "hours_worked", + ], + } + } + }, ) ) @@ -443,8 +536,18 @@ def manufacturing_outlook_texas( @validate def nonfarm_payrolls( 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 Nonfarm Payrolls Survey. @@ -475,11 +578,11 @@ def nonfarm_payrolls( NonFarmPayrolls --------------- 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] @@ -512,7 +615,9 @@ def nonfarm_payrolls( "date": date, }, extra_params=kwargs, - info={"date": {"fred": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "date": {"fred": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -520,9 +625,20 @@ def nonfarm_payrolls( @validate def sloos( 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["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, + 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 Senior Loan Officers Opinion Survey. @@ -538,7 +654,7 @@ def sloos( category : Literal['spreads', 'consumer', 'auto', 'credit_card', 'firms', 'mortgage', 'commercial_real_estate', 'standards', 'demand', 'foreign_banks'] Category of survey response. (provider: fred) transform : Optional[Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']] - + Transformation type None = No transformation chg = Change @@ -568,13 +684,13 @@ def sloos( SeniorLoanOfficerSurvey ----------------------- date : 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. value : float - Survey value. + Survey value. title : Optional[str] - Survey title. + Survey title. Examples -------- @@ -605,9 +721,20 @@ def sloos( @validate def university_of_michigan( 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["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, + 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 University of Michigan Consumer Sentiment and Inflation Expectations Surveys. @@ -624,32 +751,32 @@ def university_of_michigan( Frequency aggregation to convert monthly data to lower frequency. None is monthly. (provider: fred) aggregation_method : Optional[Literal['avg', 'sum', 'eop']] A key that indicates the aggregation method used for frequency aggregation. - + 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) @@ -670,11 +797,11 @@ def university_of_michigan( UniversityOfMichigan -------------------- date : date - The date of the data. + The date of the data. consumer_sentiment : Optional[float] - Index of the results of the University of Michigan's monthly Survey of Consumers, which is used to estimate future spending and saving. (1966:Q1=100). + Index of the results of the University of Michigan's monthly Survey of Consumers, which is used to estimate future spending and saving. (1966:Q1=100). inflation_expectation : Optional[float] - Median expected price change next 12 months, Surveys of Consumers. + Median expected price change next 12 months, Surveys of Consumers. Examples -------- diff --git a/openbb_platform/openbb/package/equity.py b/openbb_platform/openbb/package/equity.py index c54d44388874..b7e92daa4cc4 100644 --- a/openbb_platform/openbb/package/equity.py +++ b/openbb_platform/openbb/package/equity.py @@ -36,7 +36,9 @@ def calendar(self): # pylint: disable=import-outside-toplevel from . import equity_calendar - return equity_calendar.ROUTER_equity_calendar(command_runner=self._command_runner) + return equity_calendar.ROUTER_equity_calendar( + command_runner=self._command_runner + ) @property def compare(self): @@ -50,30 +52,52 @@ def discovery(self): # pylint: disable=import-outside-toplevel from . import equity_discovery - return equity_discovery.ROUTER_equity_discovery(command_runner=self._command_runner) + return equity_discovery.ROUTER_equity_discovery( + command_runner=self._command_runner + ) @property def estimates(self): # pylint: disable=import-outside-toplevel from . import equity_estimates - return equity_estimates.ROUTER_equity_estimates(command_runner=self._command_runner) + return equity_estimates.ROUTER_equity_estimates( + command_runner=self._command_runner + ) @property def fundamental(self): # pylint: disable=import-outside-toplevel from . import equity_fundamental - return equity_fundamental.ROUTER_equity_fundamental(command_runner=self._command_runner) + return equity_fundamental.ROUTER_equity_fundamental( + command_runner=self._command_runner + ) @exception_handler @validate def historical_market_cap( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp.")], - 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"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp." + ), + ], + 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"]], + 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 the historical market cap of a ticker symbol. @@ -106,11 +130,11 @@ def historical_market_cap( HistoricalMarketCap ------------------- 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. market_cap : Union[int, float] - Market capitalization of the security. + Market capitalization of the security. Examples -------- @@ -134,7 +158,9 @@ def historical_market_cap( "end_date": end_date, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -142,7 +168,12 @@ def historical_market_cap( @validate def market_snapshots( self, - provider: Annotated[Optional[Literal["fmp", "intrinio", "polygon"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon.")] = None, + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "polygon"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon." + ), + ] = None, **kwargs ) -> OBBject: """Get an updated equity market snapshot. This includes price data for thousands of stocks. @@ -173,23 +204,23 @@ def market_snapshots( MarketSnapshots --------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. open : Optional[float] - The open price. + The open price. high : Optional[float] - The high price. + The high price. low : Optional[float] - The low price. + The low price. close : Optional[float] - The close price. + The close price. volume : Optional[int] - The trading volume. + The trading volume. prev_close : Optional[float] - The previous close price. + The previous close price. change : Optional[float] - The change in price from the previous close. + The change in price from the previous close. change_percent : Optional[float] - The change in price from the previous close, as a normalized percent. + The change in price from the previous close, as a normalized percent. last_price : Optional[float] The last price of the stock. (provider: fmp); The last trade price. (provider: intrinio) @@ -285,8 +316,7 @@ def market_snapshots( ("fmp", "intrinio", "polygon"), ) }, - standard_params={ - }, + standard_params={}, extra_params=kwargs, ) ) @@ -296,7 +326,9 @@ def ownership(self): # pylint: disable=import-outside-toplevel from . import equity_ownership - return equity_ownership.ROUTER_equity_ownership(command_runner=self._command_runner) + return equity_ownership.ROUTER_equity_ownership( + command_runner=self._command_runner + ) @property def price(self): @@ -309,8 +341,18 @@ def price(self): @validate def profile( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance.")], - provider: Annotated[Optional[Literal["fmp", "intrinio", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance." + ), + ], + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get general information about a company. This includes company name, industry, sector and price data. @@ -339,81 +381,81 @@ def profile( EquityInfo ---------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Common name of the company. + Common name of the company. cik : Optional[str] - Central Index Key (CIK) for the requested entity. + Central Index Key (CIK) for the requested entity. cusip : Optional[str] - CUSIP identifier for the company. + CUSIP identifier for the company. isin : Optional[str] - International Securities Identification Number. + International Securities Identification Number. lei : Optional[str] - Legal Entity Identifier assigned to the company. + Legal Entity Identifier assigned to the company. legal_name : Optional[str] - Official legal name of the company. + Official legal name of the company. stock_exchange : Optional[str] - Stock exchange where the company is traded. + Stock exchange where the company is traded. sic : Optional[int] - Standard Industrial Classification code for the company. + Standard Industrial Classification code for the company. short_description : Optional[str] - Short description of the company. + Short description of the company. long_description : Optional[str] - Long description of the company. + Long description of the company. ceo : Optional[str] - Chief Executive Officer of the company. + Chief Executive Officer of the company. company_url : Optional[str] - URL of the company's website. + URL of the company's website. business_address : Optional[str] - Address of the company's headquarters. + Address of the company's headquarters. mailing_address : Optional[str] - Mailing address of the company. + Mailing address of the company. business_phone_no : Optional[str] - Phone number of the company's headquarters. + Phone number of the company's headquarters. hq_address1 : Optional[str] - Address of the company's headquarters. + Address of the company's headquarters. hq_address2 : Optional[str] - Address of the company's headquarters. + Address of the company's headquarters. hq_address_city : Optional[str] - City of the company's headquarters. + City of the company's headquarters. hq_address_postal_code : Optional[str] - Zip code of the company's headquarters. + Zip code of the company's headquarters. hq_state : Optional[str] - State of the company's headquarters. + State of the company's headquarters. hq_country : Optional[str] - Country of the company's headquarters. + Country of the company's headquarters. inc_state : Optional[str] - State in which the company is incorporated. + State in which the company is incorporated. inc_country : Optional[str] - Country in which the company is incorporated. + Country in which the company is incorporated. employees : Optional[int] - Number of employees working for the company. + Number of employees working for the company. entity_legal_form : Optional[str] - Legal form of the company. + Legal form of the company. entity_status : Optional[str] - Status of the company. + Status of the company. latest_filing_date : Optional[date] - Date of the company's latest filing. + Date of the company's latest filing. irs_number : Optional[str] - IRS number assigned to the company. + IRS number assigned to the company. sector : Optional[str] - Sector in which the company operates. + Sector in which the company operates. industry_category : Optional[str] - Category of industry in which the company operates. + Category of industry in which the company operates. industry_group : Optional[str] - Group of industry in which the company operates. + Group of industry in which the company operates. template : Optional[str] - Template used to standardize the company's financial statements. + Template used to standardize the company's financial statements. standardized_active : Optional[bool] - Whether the company is active or not. + Whether the company is active or not. first_fundamental_date : Optional[date] - Date of the company's first fundamental. + Date of the company's first fundamental. last_fundamental_date : Optional[date] - Date of the company's last fundamental. + Date of the company's last fundamental. first_stock_price_date : Optional[date] - Date of the company's first stock price. + Date of the company's first stock price. last_stock_price_date : Optional[date] - Date of the company's last stock price. + Date of the company's last stock price. is_etf : Optional[bool] If the symbol is an ETF. (provider: fmp) is_actively_trading : Optional[bool] @@ -480,7 +522,13 @@ def profile( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "intrinio": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + } + }, ) ) @@ -488,13 +536,18 @@ def profile( @validate def screener( 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: """Screen for companies meeting various criteria. These criteria include market cap, price, beta, volume, and dividend yield. - + Parameters ---------- @@ -552,9 +605,9 @@ def screener( EquityScreener -------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the company. + Name of the company. market_cap : Optional[int] The market cap of ticker. (provider: fmp) sector : Optional[str] @@ -596,8 +649,7 @@ def screener( ("fmp",), ) }, - standard_params={ - }, + standard_params={}, extra_params=kwargs, ) ) @@ -607,8 +659,15 @@ def screener( def search( self, query: Annotated[str, OpenBBField(description="Search query.")] = "", - is_symbol: Annotated[bool, OpenBBField(description="Whether to search by ticker symbol.")] = False, - provider: Annotated[Optional[Literal["intrinio", "sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio, sec.")] = None, + is_symbol: Annotated[ + bool, OpenBBField(description="Whether to search by ticker symbol.") + ] = False, + provider: Annotated[ + Optional[Literal["intrinio", "sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio, sec." + ), + ] = None, **kwargs ) -> OBBject: """Search for stock symbol, CIK, LEI, or company name. @@ -647,9 +706,9 @@ def search( EquitySearch ------------ symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the company. + Name of the company. cik : Optional[str] ; Central Index Key (provider: sec) diff --git a/openbb_platform/openbb/package/equity_calendar.py b/openbb_platform/openbb/package/equity_calendar.py index c250bd0703b8..2d57eca41b34 100644 --- a/openbb_platform/openbb/package/equity_calendar.py +++ b/openbb_platform/openbb/package/equity_calendar.py @@ -26,9 +26,20 @@ def __repr__(self) -> str: @validate def dividend( 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"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.")] = 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"]], + 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 historical and upcoming dividend payments. Includes dividend amount, ex-dividend and payment dates. @@ -59,19 +70,19 @@ def dividend( CalendarDividend ---------------- ex_dividend_date : date - The ex-dividend date - the date on which the stock begins trading without rights to the dividend. + The ex-dividend date - the date on which the stock begins trading without rights to the dividend. symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. amount : Optional[float] - The dividend amount per share. + The dividend amount per share. name : Optional[str] - Name of the entity. + Name of the entity. record_date : Optional[date] - The record date of ownership for eligibility. + The record date of ownership for eligibility. payment_date : Optional[date] - The payment date of the dividend. + The payment date of the dividend. declaration_date : Optional[date] - Declaration date of the dividend. + Declaration date of the dividend. adjusted_amount : Optional[float] The adjusted-dividend amount. (provider: fmp) label : Optional[str] @@ -105,9 +116,20 @@ def dividend( @validate def earnings( 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"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.")] = 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"]], + 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 historical and upcoming company earnings releases. Includes earnings per share (EPS) and revenue data. @@ -138,15 +160,15 @@ def earnings( CalendarEarnings ---------------- report_date : date - The date of the earnings report. + The date of the earnings report. symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. eps_previous : Optional[float] - The earnings-per-share from the same previously reported period. + The earnings-per-share from the same previously reported period. eps_consensus : Optional[float] - The analyst conesus earnings-per-share estimate. + The analyst conesus earnings-per-share estimate. eps_actual : Optional[float] The actual earnings per share announced. (provider: fmp) revenue_actual : Optional[float] @@ -190,11 +212,27 @@ def earnings( @validate def ipo( self, - symbol: Annotated[Optional[str], OpenBBField(description="Symbol to get data for.")] = 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.")] = 100, - provider: Annotated[Optional[Literal["intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.")] = None, + symbol: Annotated[ + Optional[str], OpenBBField(description="Symbol to get data for.") + ] = 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."), + ] = 100, + provider: Annotated[ + Optional[Literal["intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get historical and upcoming initial public offerings (IPOs). @@ -235,9 +273,9 @@ def ipo( CalendarIpo ----------- symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. ipo_date : Optional[date] - The date of the IPO, when the stock first trades on a major exchange. + The date of the IPO, when the stock first trades on a major exchange. status : Optional[Literal['upcoming', 'priced', 'withdrawn']] The status of the IPO. Upcoming IPOs have not taken place yet but are expected to. Priced IPOs have taken place. Withdrawn IPOs were expected to take place, but were subsequently withdrawn. (provider: intrinio) exchange : Optional[str] @@ -311,9 +349,20 @@ def ipo( @validate def splits( 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"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.")] = 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"]], + 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 historical and upcoming stock split operations. @@ -344,15 +393,15 @@ def splits( CalendarSplits -------------- date : date - The date of the data. + The date of the data. label : str - Label of the stock splits. + Label of the stock splits. symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. numerator : float - Numerator of the stock splits. + Numerator of the stock splits. denominator : float - Denominator of the stock splits. + Denominator of the stock splits. Examples -------- diff --git a/openbb_platform/openbb/package/equity_compare.py b/openbb_platform/openbb/package/equity_compare.py index fbc5a6e73052..3ac686903719 100644 --- a/openbb_platform/openbb/package/equity_compare.py +++ b/openbb_platform/openbb/package/equity_compare.py @@ -23,9 +23,24 @@ def __repr__(self) -> str: @validate def company_facts( self, - symbol: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): sec.")] = None, - fact: Annotated[str, OpenBBField(description="The fact to lookup, typically a GAAP-reporting measure. Choices vary by provider.")] = "", - provider: Annotated[Optional[Literal["sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.")] = None, + symbol: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): sec." + ), + ] = None, + fact: Annotated[ + str, + OpenBBField( + description="The fact to lookup, typically a GAAP-reporting measure. Choices vary by provider." + ), + ] = "", + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, **kwargs ) -> OBBject: """Copmare reported company facts and fundamental data points. @@ -65,21 +80,21 @@ def company_facts( CompareCompanyFacts ------------------- symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. value : float - The reported value of the fact or concept. + The reported value of the fact or concept. reported_date : Optional[date] - The date when the report was filed. + The date when the report was filed. period_beginning : Optional[date] - The start date of the reporting period. + The start date of the reporting period. period_ending : Optional[date] - The end date of the reporting period. + The end date of the reporting period. fiscal_year : Optional[int] - The fiscal year. + The fiscal year. fiscal_period : Optional[str] - The fiscal period of the fiscal year. + The fiscal period of the fiscal year. cik : Optional[Union[int, str]] Central Index Key (CIK) for the requested entity. (provider: sec) location : Optional[str] @@ -118,7 +133,304 @@ def company_facts( "fact": fact, }, extra_params=kwargs, - info={"symbol": {"sec": {"multiple_items_allowed": True, "choices": None}}, "fact": {"sec": {"multiple_items_allowed": False, "choices": ["AccountsPayableCurrent", "AccountsReceivableNet", "AccountsReceivableNetCurrent", "AccrualForTaxesOtherThanIncomeTaxesCurrent", "AccrualForTaxesOtherThanIncomeTaxesCurrentAndNoncurrent", "AccruedIncomeTaxesCurrent", "AccruedIncomeTaxesNoncurrent", "AccruedInsuranceCurrent", "AccruedLiabilitiesCurrent", "AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment", "AccumulatedOtherComprehensiveIncomeLossNetOfTax", "AcquisitionsNetOfCashAcquiredAndPurchasesOfIntangibleAndOtherAssets", "AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue", "AdvertisingExpense", "AllocatedShareBasedCompensationExpense", "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount", "AssetImpairmentCharges", "Assets", "AssetsCurrent", "AssetsNoncurrent", "BuildingsAndImprovementsGross", "CapitalLeaseObligationsCurrent", "CapitalLeaseObligationsNoncurrent", "Cash", "CashAndCashEquivalentsAtCarryingValue", "CashCashEquivalentsAndShortTermInvestments", "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents", "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations", "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect", "CommercialPaper", "CommitmentsAndContingencies", "CommonStockDividendsPerShareCashPaid", "CommonStockDividendsPerShareDeclared", "CommonStocksIncludingAdditionalPaidInCapital", "ComprehensiveIncomeNetOfTax", "ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest", "ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest", "ConstructionInProgressGross", "ContractWithCustomerAssetNet", "ContractWithCustomerLiability", "ContractWithCustomerLiabilityCurrent", "ContractWithCustomerLiabilityNoncurrent", "CostOfGoodsAndServicesSold", "CostOfRevenue", "CurrentFederalTaxExpenseBenefit", "CurrentForeignTaxExpenseBenefit", "CurrentIncomeTaxExpenseBenefit", "CurrentStateAndLocalTaxExpenseBenefit", "DebtInstrumentFaceAmount", "DebtInstrumentFairValue", "DebtLongtermAndShorttermCombinedAmount", "DeferredFederalIncomeTaxExpenseBenefit", "DeferredForeignIncomeTaxExpenseBenefit", "DeferredIncomeTaxExpenseBenefit", "DeferredIncomeTaxLiabilities", "DeferredIncomeTaxLiabilitiesNet", "DeferredIncomeTaxesAndTaxCredits", "DeferredRevenue", "DeferredTaxAssetsGross", "DeferredTaxAssetsLiabilitiesNet", "DeferredTaxAssetsNet", "DeferredTaxLiabilities", "DefinedContributionPlanCostRecognized", "Depreciation", "DepreciationAmortizationAndAccretionNet", "DepreciationAmortizationAndOther", "DepreciationAndAmortization", "DepreciationDepletionAndAmortization", "DerivativeCollateralObligationToReturnCash", "DerivativeCollateralRightToReclaimCash", "DerivativeFairValueOfDerivativeNet", "DerivativeLiabilityCollateralRightToReclaimCashOffset", "DerivativeNotionalAmount", "DistributedEarnings", "Dividends", "DividendsCash", "DividendsPayableAmountPerShare", "DividendsPayableCurrent", "EarningsPerShareBasic", "EarningsPerShareDiluted", "EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents", "EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations", "EmployeeRelatedLiabilitiesCurrent", "EmployeeRelatedLiabilitiesCurrentAndNoncurrent", "EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense", "FinanceLeaseInterestExpense", "FinanceLeaseInterestPaymentOnLiability", "FinanceLeaseLiability", "FinanceLeaseLiabilityCurrent", "FinanceLeaseLiabilityNoncurrent", "FinanceLeaseLiabilityPaymentsDue", "FinanceLeaseLiabilityPaymentsDueAfterYearFive", "FinanceLeaseLiabilityPaymentsDueNextTwelveMonths", "FinanceLeaseLiabilityPaymentsDueYearFive", "FinanceLeaseLiabilityPaymentsDueYearFour", "FinanceLeaseLiabilityPaymentsDueYearThree", "FinanceLeaseLiabilityPaymentsDueYearTwo", "FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear", "FinanceLeaseLiabilityUndiscountedExcessAmount", "FinanceLeasePrincipalPayments", "FinanceLeaseRightOfUseAsset", "FinancingReceivableAllowanceForCreditLosses", "FiniteLivedIntangibleAssetsNet", "FixturesAndEquipmentGross", "GainLossOnInvestments", "GainLossOnInvestmentsAndDerivativeInstruments", "GainLossOnSaleOfBusiness", "GainsLossesOnExtinguishmentOfDebt", "GeneralAndAdministrativeExpense", "Goodwill", "GrossProfit", "ImpairmentOfIntangibleAssetsExcludingGoodwill", "ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill", "IncomeLossFromContinuingOperations", "IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity", "IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest", "IncomeLossFromContinuingOperationsPerBasicShare", "IncomeLossFromContinuingOperationsPerDilutedShare", "IncomeTaxExpenseBenefit", "IncomeTaxesPaid", "IncomeTaxesPaidNet", "IncreaseDecreaseInAccountsAndOtherReceivables", "IncreaseDecreaseInAccountsPayable", "IncreaseDecreaseInAccountsReceivable", "IncreaseDecreaseInAccruedIncomeTaxesPayable", "IncreaseDecreaseInAccruedLiabilities", "IncreaseDecreaseInAccruedTaxesPayable", "IncreaseDecreaseInContractWithCustomerLiability", "IncreaseDecreaseInDeferredIncomeTaxes", "IncreaseDecreaseInInventories", "IncreaseDecreaseInOtherCurrentAssets", "IncreaseDecreaseInOtherCurrentLiabilities", "IncreaseDecreaseInOtherNoncurrentAssets", "IncreaseDecreaseInOtherNoncurrentLiabilities", "IncreaseDecreaseInPensionPlanObligations", "IncrementalCommonSharesAttributableToShareBasedPaymentArrangements", "InterestAndDebtExpense", "InterestExpenseDebt", "InterestIncomeExpenseNet", "InterestPaid", "InterestPaidNet", "InventoryNet", "InvestmentIncomeInterest", "Land", "LeaseAndRentalExpense", "LesseeOperatingLeaseLiabilityPaymentsDue", "LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive", "LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths", "LesseeOperatingLeaseLiabilityPaymentsDueYearFive", "LesseeOperatingLeaseLiabilityPaymentsDueYearFour", "LesseeOperatingLeaseLiabilityPaymentsDueYearThree", "LesseeOperatingLeaseLiabilityPaymentsDueYearTwo", "LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear", "LettersOfCreditOutstandingAmount", "Liabilities", "LiabilitiesAndStockholdersEquity", "LiabilitiesCurrent", "LineOfCredit", "LineOfCreditFacilityMaximumBorrowingCapacity", "LongTermDebt", "LongTermDebtCurrent", "LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive", "LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths", "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive", "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour", "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree", "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo", "LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear", "LongTermDebtNoncurrent", "LongTermInvestments", "LossContingencyEstimateOfPossibleLoss", "MachineryAndEquipmentGross", "MarketableSecuritiesCurrent", "MarketableSecuritiesNoncurrent", "MinorityInterest", "NetCashProvidedByUsedInFinancingActivities", "NetCashProvidedByUsedInInvestingActivities", "NetCashProvidedByUsedInOperatingActivities", "NetIncomeLoss", "NetIncomeLossAttributableToNoncontrollingInterest", "NetIncomeLossAttributableToNonredeemableNoncontrollingInterest", "NetIncomeLossAttributableToRedeemableNoncontrollingInterest", "NoncurrentAssets", "NoncurrentAssets", "NoninterestIncome", "NonoperatingIncomeExpense", "NotesReceivableNet", "OperatingExpenses", "OperatingIncomeLoss", "OperatingLeaseCost", "OperatingLeaseLiability", "OperatingLeaseLiabilityCurrent", "OperatingLeaseLiabilityNoncurrent", "OperatingLeaseRightOfUseAsset", "OtherAccruedLiabilitiesCurrent", "OtherAssetsCurrent", "OtherAssetsNoncurrent", "OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax", "OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax", "OtherComprehensiveIncomeLossDerivativeInstrumentGainLossafterReclassificationandTax", "OtherComprehensiveIncomeLossDerivativeInstrumentGainLossbeforeReclassificationafterTax", "OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax", "OtherComprehensiveIncomeLossNetOfTax", "OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent", "OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax", "OtherIncome", "OtherLiabilitiesCurrent", "OtherLiabilitiesNoncurrent", "OtherLongTermDebt", "OtherNoncashIncomeExpense", "PaymentsForCapitalImprovements", "PaymentsForProceedsFromBusinessesAndInterestInAffiliates", "PaymentsForProceedsFromOtherInvestingActivities", "PaymentsForRent", "PaymentsForRepurchaseOfCommonStock", "PaymentsOfDebtExtinguishmentCosts", "PaymentsOfDividends", "PaymentsOfDividendsMinorityInterest", "PaymentsToAcquireInvestments", "PaymentsToAcquirePropertyPlantAndEquipment", "PreferredStockSharesOutstanding", "PreferredStockValue", "PrepaidExpenseAndOtherAssetsCurrent", "PrepaidExpenseCurrent", "ProceedsFromDebtMaturingInMoreThanThreeMonths", "ProceedsFromDebtNetOfIssuanceCosts", "ProceedsFromDivestitureOfBusinesses", "ProceedsFromInvestments", "ProceedsFromIssuanceOfCommonStock", "ProceedsFromIssuanceOfDebt", "ProceedsFromIssuanceOfLongTermDebt", "ProceedsFromIssuanceOfUnsecuredDebt", "ProceedsFromIssuanceOrSaleOfEquity", "ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities", "ProceedsFromPaymentsForOtherFinancingActivities", "ProceedsFromPaymentsToMinorityShareholders", "ProceedsFromRepaymentsOfShortTermDebt", "ProceedsFromRepaymentsOfShortTermDebtMaturingInThreeMonthsOrLess", "ProceedsFromSaleOfPropertyPlantAndEquipment", "ProceedsFromStockOptionsExercised", "ProfitLoss", "PropertyPlantAndEquipmentGross", "PropertyPlantAndEquipmentNet", "ReceivablesNetCurrent", "RedeemableNoncontrollingInterestEquityCarryingAmount", "RepaymentsOfDebtMaturingInMoreThanThreeMonths", "RepaymentsOfLongTermDebt", "ResearchAndDevelopmentExpense", "RestrictedCash", "RestrictedCashAndCashEquivalents", "RestrictedStockExpense", "RestructuringCharges", "RetainedEarningsAccumulatedDeficit", "RevenueFromContractWithCustomerExcludingAssessedTax", "Revenues", "SecuredLongTermDebt", "SellingAndMarketingExpense", "SellingGeneralAndAdministrativeExpense", "ShareBasedCompensation", "ShortTermBorrowings", "ShortTermInvestments", "StockIssuedDuringPeriodValueNewIssues", "StockOptionPlanExpense", "StockRedeemedOrCalledDuringPeriodValue", "StockRepurchasedAndRetiredDuringPeriodValue", "StockRepurchasedDuringPeriodValue", "StockholdersEquity", "StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest", "StockholdersEquityOther", "TaxesPayableCurrent", "TradingSecuritiesDebt", "TreasuryStockAcquiredAverageCostPerShare", "TreasuryStockSharesAcquired", "UnrealizedGainLossOnInvestments", "UnrecognizedTaxBenefits", "UnsecuredDebt", "VariableLeaseCost", "WeightedAverageNumberDilutedSharesOutstandingAdjustment", "WeightedAverageNumberOfDilutedSharesOutstanding", "WeightedAverageNumberOfSharesOutstandingBasic"]}}, "fiscal_period": {"sec": {"multiple_items_allowed": False, "choices": ["fy", "q1", "q2", "q3", "q4"]}}}, + info={ + "symbol": { + "sec": {"multiple_items_allowed": True, "choices": None} + }, + "fact": { + "sec": { + "multiple_items_allowed": False, + "choices": [ + "AccountsPayableCurrent", + "AccountsReceivableNet", + "AccountsReceivableNetCurrent", + "AccrualForTaxesOtherThanIncomeTaxesCurrent", + "AccrualForTaxesOtherThanIncomeTaxesCurrentAndNoncurrent", + "AccruedIncomeTaxesCurrent", + "AccruedIncomeTaxesNoncurrent", + "AccruedInsuranceCurrent", + "AccruedLiabilitiesCurrent", + "AccumulatedDepreciationDepletionAndAmortizationPropertyPlantAndEquipment", + "AccumulatedOtherComprehensiveIncomeLossNetOfTax", + "AcquisitionsNetOfCashAcquiredAndPurchasesOfIntangibleAndOtherAssets", + "AdjustmentsToAdditionalPaidInCapitalSharebasedCompensationRequisiteServicePeriodRecognitionValue", + "AdvertisingExpense", + "AllocatedShareBasedCompensationExpense", + "AntidilutiveSecuritiesExcludedFromComputationOfEarningsPerShareAmount", + "AssetImpairmentCharges", + "Assets", + "AssetsCurrent", + "AssetsNoncurrent", + "BuildingsAndImprovementsGross", + "CapitalLeaseObligationsCurrent", + "CapitalLeaseObligationsNoncurrent", + "Cash", + "CashAndCashEquivalentsAtCarryingValue", + "CashCashEquivalentsAndShortTermInvestments", + "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents", + "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations", + "CashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsPeriodIncreaseDecreaseIncludingExchangeRateEffect", + "CommercialPaper", + "CommitmentsAndContingencies", + "CommonStockDividendsPerShareCashPaid", + "CommonStockDividendsPerShareDeclared", + "CommonStocksIncludingAdditionalPaidInCapital", + "ComprehensiveIncomeNetOfTax", + "ComprehensiveIncomeNetOfTaxAttributableToNoncontrollingInterest", + "ComprehensiveIncomeNetOfTaxIncludingPortionAttributableToNoncontrollingInterest", + "ConstructionInProgressGross", + "ContractWithCustomerAssetNet", + "ContractWithCustomerLiability", + "ContractWithCustomerLiabilityCurrent", + "ContractWithCustomerLiabilityNoncurrent", + "CostOfGoodsAndServicesSold", + "CostOfRevenue", + "CurrentFederalTaxExpenseBenefit", + "CurrentForeignTaxExpenseBenefit", + "CurrentIncomeTaxExpenseBenefit", + "CurrentStateAndLocalTaxExpenseBenefit", + "DebtInstrumentFaceAmount", + "DebtInstrumentFairValue", + "DebtLongtermAndShorttermCombinedAmount", + "DeferredFederalIncomeTaxExpenseBenefit", + "DeferredForeignIncomeTaxExpenseBenefit", + "DeferredIncomeTaxExpenseBenefit", + "DeferredIncomeTaxLiabilities", + "DeferredIncomeTaxLiabilitiesNet", + "DeferredIncomeTaxesAndTaxCredits", + "DeferredRevenue", + "DeferredTaxAssetsGross", + "DeferredTaxAssetsLiabilitiesNet", + "DeferredTaxAssetsNet", + "DeferredTaxLiabilities", + "DefinedContributionPlanCostRecognized", + "Depreciation", + "DepreciationAmortizationAndAccretionNet", + "DepreciationAmortizationAndOther", + "DepreciationAndAmortization", + "DepreciationDepletionAndAmortization", + "DerivativeCollateralObligationToReturnCash", + "DerivativeCollateralRightToReclaimCash", + "DerivativeFairValueOfDerivativeNet", + "DerivativeLiabilityCollateralRightToReclaimCashOffset", + "DerivativeNotionalAmount", + "DistributedEarnings", + "Dividends", + "DividendsCash", + "DividendsPayableAmountPerShare", + "DividendsPayableCurrent", + "EarningsPerShareBasic", + "EarningsPerShareDiluted", + "EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalents", + "EffectOfExchangeRateOnCashCashEquivalentsRestrictedCashAndRestrictedCashEquivalentsIncludingDisposalGroupAndDiscontinuedOperations", + "EmployeeRelatedLiabilitiesCurrent", + "EmployeeRelatedLiabilitiesCurrentAndNoncurrent", + "EmployeeServiceShareBasedCompensationTaxBenefitFromCompensationExpense", + "FinanceLeaseInterestExpense", + "FinanceLeaseInterestPaymentOnLiability", + "FinanceLeaseLiability", + "FinanceLeaseLiabilityCurrent", + "FinanceLeaseLiabilityNoncurrent", + "FinanceLeaseLiabilityPaymentsDue", + "FinanceLeaseLiabilityPaymentsDueAfterYearFive", + "FinanceLeaseLiabilityPaymentsDueNextTwelveMonths", + "FinanceLeaseLiabilityPaymentsDueYearFive", + "FinanceLeaseLiabilityPaymentsDueYearFour", + "FinanceLeaseLiabilityPaymentsDueYearThree", + "FinanceLeaseLiabilityPaymentsDueYearTwo", + "FinanceLeaseLiabilityPaymentsRemainderOfFiscalYear", + "FinanceLeaseLiabilityUndiscountedExcessAmount", + "FinanceLeasePrincipalPayments", + "FinanceLeaseRightOfUseAsset", + "FinancingReceivableAllowanceForCreditLosses", + "FiniteLivedIntangibleAssetsNet", + "FixturesAndEquipmentGross", + "GainLossOnInvestments", + "GainLossOnInvestmentsAndDerivativeInstruments", + "GainLossOnSaleOfBusiness", + "GainsLossesOnExtinguishmentOfDebt", + "GeneralAndAdministrativeExpense", + "Goodwill", + "GrossProfit", + "ImpairmentOfIntangibleAssetsExcludingGoodwill", + "ImpairmentOfIntangibleAssetsIndefinitelivedExcludingGoodwill", + "IncomeLossFromContinuingOperations", + "IncomeLossFromContinuingOperationsAttributableToNoncontrollingEntity", + "IncomeLossFromContinuingOperationsBeforeIncomeTaxesExtraordinaryItemsNoncontrollingInterest", + "IncomeLossFromContinuingOperationsPerBasicShare", + "IncomeLossFromContinuingOperationsPerDilutedShare", + "IncomeTaxExpenseBenefit", + "IncomeTaxesPaid", + "IncomeTaxesPaidNet", + "IncreaseDecreaseInAccountsAndOtherReceivables", + "IncreaseDecreaseInAccountsPayable", + "IncreaseDecreaseInAccountsReceivable", + "IncreaseDecreaseInAccruedIncomeTaxesPayable", + "IncreaseDecreaseInAccruedLiabilities", + "IncreaseDecreaseInAccruedTaxesPayable", + "IncreaseDecreaseInContractWithCustomerLiability", + "IncreaseDecreaseInDeferredIncomeTaxes", + "IncreaseDecreaseInInventories", + "IncreaseDecreaseInOtherCurrentAssets", + "IncreaseDecreaseInOtherCurrentLiabilities", + "IncreaseDecreaseInOtherNoncurrentAssets", + "IncreaseDecreaseInOtherNoncurrentLiabilities", + "IncreaseDecreaseInPensionPlanObligations", + "IncrementalCommonSharesAttributableToShareBasedPaymentArrangements", + "InterestAndDebtExpense", + "InterestExpenseDebt", + "InterestIncomeExpenseNet", + "InterestPaid", + "InterestPaidNet", + "InventoryNet", + "InvestmentIncomeInterest", + "Land", + "LeaseAndRentalExpense", + "LesseeOperatingLeaseLiabilityPaymentsDue", + "LesseeOperatingLeaseLiabilityPaymentsDueAfterYearFive", + "LesseeOperatingLeaseLiabilityPaymentsDueNextTwelveMonths", + "LesseeOperatingLeaseLiabilityPaymentsDueYearFive", + "LesseeOperatingLeaseLiabilityPaymentsDueYearFour", + "LesseeOperatingLeaseLiabilityPaymentsDueYearThree", + "LesseeOperatingLeaseLiabilityPaymentsDueYearTwo", + "LesseeOperatingLeaseLiabilityPaymentsRemainderOfFiscalYear", + "LettersOfCreditOutstandingAmount", + "Liabilities", + "LiabilitiesAndStockholdersEquity", + "LiabilitiesCurrent", + "LineOfCredit", + "LineOfCreditFacilityMaximumBorrowingCapacity", + "LongTermDebt", + "LongTermDebtCurrent", + "LongTermDebtMaturitiesRepaymentsOfPrincipalAfterYearFive", + "LongTermDebtMaturitiesRepaymentsOfPrincipalInNextTwelveMonths", + "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFive", + "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearFour", + "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearThree", + "LongTermDebtMaturitiesRepaymentsOfPrincipalInYearTwo", + "LongTermDebtMaturitiesRepaymentsOfPrincipalRemainderOfFiscalYear", + "LongTermDebtNoncurrent", + "LongTermInvestments", + "LossContingencyEstimateOfPossibleLoss", + "MachineryAndEquipmentGross", + "MarketableSecuritiesCurrent", + "MarketableSecuritiesNoncurrent", + "MinorityInterest", + "NetCashProvidedByUsedInFinancingActivities", + "NetCashProvidedByUsedInInvestingActivities", + "NetCashProvidedByUsedInOperatingActivities", + "NetIncomeLoss", + "NetIncomeLossAttributableToNoncontrollingInterest", + "NetIncomeLossAttributableToNonredeemableNoncontrollingInterest", + "NetIncomeLossAttributableToRedeemableNoncontrollingInterest", + "NoncurrentAssets", + "NoncurrentAssets", + "NoninterestIncome", + "NonoperatingIncomeExpense", + "NotesReceivableNet", + "OperatingExpenses", + "OperatingIncomeLoss", + "OperatingLeaseCost", + "OperatingLeaseLiability", + "OperatingLeaseLiabilityCurrent", + "OperatingLeaseLiabilityNoncurrent", + "OperatingLeaseRightOfUseAsset", + "OtherAccruedLiabilitiesCurrent", + "OtherAssetsCurrent", + "OtherAssetsNoncurrent", + "OtherComprehensiveIncomeLossAvailableForSaleSecuritiesAdjustmentNetOfTax", + "OtherComprehensiveIncomeLossCashFlowHedgeGainLossAfterReclassificationAndTax", + "OtherComprehensiveIncomeLossDerivativeInstrumentGainLossafterReclassificationandTax", + "OtherComprehensiveIncomeLossDerivativeInstrumentGainLossbeforeReclassificationafterTax", + "OtherComprehensiveIncomeLossForeignCurrencyTransactionAndTranslationAdjustmentNetOfTax", + "OtherComprehensiveIncomeLossNetOfTax", + "OtherComprehensiveIncomeLossNetOfTaxPortionAttributableToParent", + "OtherComprehensiveIncomeUnrealizedHoldingGainLossOnSecuritiesArisingDuringPeriodNetOfTax", + "OtherIncome", + "OtherLiabilitiesCurrent", + "OtherLiabilitiesNoncurrent", + "OtherLongTermDebt", + "OtherNoncashIncomeExpense", + "PaymentsForCapitalImprovements", + "PaymentsForProceedsFromBusinessesAndInterestInAffiliates", + "PaymentsForProceedsFromOtherInvestingActivities", + "PaymentsForRent", + "PaymentsForRepurchaseOfCommonStock", + "PaymentsOfDebtExtinguishmentCosts", + "PaymentsOfDividends", + "PaymentsOfDividendsMinorityInterest", + "PaymentsToAcquireInvestments", + "PaymentsToAcquirePropertyPlantAndEquipment", + "PreferredStockSharesOutstanding", + "PreferredStockValue", + "PrepaidExpenseAndOtherAssetsCurrent", + "PrepaidExpenseCurrent", + "ProceedsFromDebtMaturingInMoreThanThreeMonths", + "ProceedsFromDebtNetOfIssuanceCosts", + "ProceedsFromDivestitureOfBusinesses", + "ProceedsFromInvestments", + "ProceedsFromIssuanceOfCommonStock", + "ProceedsFromIssuanceOfDebt", + "ProceedsFromIssuanceOfLongTermDebt", + "ProceedsFromIssuanceOfUnsecuredDebt", + "ProceedsFromIssuanceOrSaleOfEquity", + "ProceedsFromMaturitiesPrepaymentsAndCallsOfAvailableForSaleSecurities", + "ProceedsFromPaymentsForOtherFinancingActivities", + "ProceedsFromPaymentsToMinorityShareholders", + "ProceedsFromRepaymentsOfShortTermDebt", + "ProceedsFromRepaymentsOfShortTermDebtMaturingInThreeMonthsOrLess", + "ProceedsFromSaleOfPropertyPlantAndEquipment", + "ProceedsFromStockOptionsExercised", + "ProfitLoss", + "PropertyPlantAndEquipmentGross", + "PropertyPlantAndEquipmentNet", + "ReceivablesNetCurrent", + "RedeemableNoncontrollingInterestEquityCarryingAmount", + "RepaymentsOfDebtMaturingInMoreThanThreeMonths", + "RepaymentsOfLongTermDebt", + "ResearchAndDevelopmentExpense", + "RestrictedCash", + "RestrictedCashAndCashEquivalents", + "RestrictedStockExpense", + "RestructuringCharges", + "RetainedEarningsAccumulatedDeficit", + "RevenueFromContractWithCustomerExcludingAssessedTax", + "Revenues", + "SecuredLongTermDebt", + "SellingAndMarketingExpense", + "SellingGeneralAndAdministrativeExpense", + "ShareBasedCompensation", + "ShortTermBorrowings", + "ShortTermInvestments", + "StockIssuedDuringPeriodValueNewIssues", + "StockOptionPlanExpense", + "StockRedeemedOrCalledDuringPeriodValue", + "StockRepurchasedAndRetiredDuringPeriodValue", + "StockRepurchasedDuringPeriodValue", + "StockholdersEquity", + "StockholdersEquityIncludingPortionAttributableToNoncontrollingInterest", + "StockholdersEquityOther", + "TaxesPayableCurrent", + "TradingSecuritiesDebt", + "TreasuryStockAcquiredAverageCostPerShare", + "TreasuryStockSharesAcquired", + "UnrealizedGainLossOnInvestments", + "UnrecognizedTaxBenefits", + "UnsecuredDebt", + "VariableLeaseCost", + "WeightedAverageNumberDilutedSharesOutstandingAdjustment", + "WeightedAverageNumberOfDilutedSharesOutstanding", + "WeightedAverageNumberOfSharesOutstandingBasic", + ], + } + }, + "fiscal_period": { + "sec": { + "multiple_items_allowed": False, + "choices": ["fy", "q1", "q2", "q3", "q4"], + } + }, + }, ) ) @@ -127,14 +439,19 @@ def company_facts( def peers( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - 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 the closest peers for a given company. Peers consist of companies trading on the same exchange, operating within the same sector and with comparable market capitalizations. - + Parameters ---------- @@ -160,7 +477,7 @@ def peers( EquityPeers ----------- peers_list : List[str] - A list of equity peers based on sector, exchange and market cap. + A list of equity peers based on sector, exchange and market cap. Examples -------- diff --git a/openbb_platform/openbb/package/equity_discovery.py b/openbb_platform/openbb/package/equity_discovery.py index 45aec08b8f32..18ff629bc28f 100644 --- a/openbb_platform/openbb/package/equity_discovery.py +++ b/openbb_platform/openbb/package/equity_discovery.py @@ -30,8 +30,18 @@ def __repr__(self) -> str: @validate def active( self, - sort: Annotated[Literal["asc", "desc"], OpenBBField(description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'.")] = "desc", - provider: Annotated[Optional[Literal["yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.")] = None, + sort: Annotated[ + Literal["asc", "desc"], + OpenBBField( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Annotated[ + Optional[Literal["yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get the most actively traded stocks based on volume. @@ -60,17 +70,17 @@ def active( EquityActive ------------ symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. price : float - Last price. + Last price. change : float - Change in price. + Change in price. percent_change : float - Percent change. + Percent change. volume : Union[int, float] - The trading volume. + The trading volume. market_cap : Optional[float] Market Cap displayed in billions. (provider: yfinance) avg_volume_3_months : Optional[float] @@ -106,8 +116,18 @@ def active( @validate def aggressive_small_caps( self, - sort: Annotated[Literal["asc", "desc"], OpenBBField(description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'.")] = "desc", - provider: Annotated[Optional[Literal["yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.")] = None, + sort: Annotated[ + Literal["asc", "desc"], + OpenBBField( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Annotated[ + Optional[Literal["yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get top small cap stocks based on earnings growth. @@ -136,17 +156,17 @@ def aggressive_small_caps( EquityAggressiveSmallCaps ------------------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. price : float - Last price. + Last price. change : float - Change in price. + Change in price. percent_change : float - Percent change. + Percent change. volume : Union[int, float] - The trading volume. + The trading volume. market_cap : Optional[float] Market Cap. (provider: yfinance) avg_volume_3_months : Optional[float] @@ -182,11 +202,29 @@ def aggressive_small_caps( @validate def filings( 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, - form_type: Annotated[Optional[str], OpenBBField(description="Filter by form type. Visit https://www.sec.gov/forms for a list of supported form types.")] = None, - limit: Annotated[int, OpenBBField(description="The number of data entries to return.")] = 100, - 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, + 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, + form_type: Annotated[ + Optional[str], + OpenBBField( + description="Filter by form type. Visit https://www.sec.gov/forms for a list of supported form types." + ), + ] = None, + limit: Annotated[ + int, OpenBBField(description="The number of data entries to return.") + ] = 100, + 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 the URLs to SEC filings reported to EDGAR database, such as 10-K, 10-Q, 8-K, and more. @@ -195,7 +233,7 @@ def filings( Foreign Investment Disclosures and others. The annual 10-K report is required to be filed annually and includes the company's financial statements, management discussion and analysis, and audited financial statements. - + Parameters ---------- @@ -229,17 +267,17 @@ def filings( DiscoveryFilings ---------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. cik : str - Central Index Key (CIK) for the requested entity. + Central Index Key (CIK) for the requested entity. title : str - Title of the filing. + Title of the filing. date : datetime - The date of the data. + The date of the data. form_type : str - The form type of the filing + The form type of the filing link : str - URL to the filing page on the SEC site. + URL to the filing page on the SEC site. Examples -------- @@ -273,8 +311,18 @@ def filings( @validate def gainers( self, - sort: Annotated[Literal["asc", "desc"], OpenBBField(description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'.")] = "desc", - provider: Annotated[Optional[Literal["yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.")] = None, + sort: Annotated[ + Literal["asc", "desc"], + OpenBBField( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Annotated[ + Optional[Literal["yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get the top price gainers in the stock market. @@ -303,17 +351,17 @@ def gainers( EquityGainers ------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. price : float - Last price. + Last price. change : float - Change in price. + Change in price. percent_change : float - Percent change. + Percent change. volume : Union[int, float] - The trading volume. + The trading volume. avg_volume_3_months : Optional[float] Average volume over the last 3 months in millions. (provider: yfinance) market_cap : Optional[float] @@ -349,8 +397,18 @@ def gainers( @validate def growth_tech( self, - sort: Annotated[Literal["asc", "desc"], OpenBBField(description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'.")] = "desc", - provider: Annotated[Optional[Literal["yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.")] = None, + sort: Annotated[ + Literal["asc", "desc"], + OpenBBField( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Annotated[ + Optional[Literal["yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get top tech stocks based on revenue and earnings growth. @@ -379,17 +437,17 @@ def growth_tech( GrowthTechEquities ------------------ symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. price : float - Last price. + Last price. change : float - Change in price. + Change in price. percent_change : float - Percent change. + Percent change. volume : Union[int, float] - The trading volume. + The trading volume. market_cap : Optional[float] Market Cap. (provider: yfinance) avg_volume_3_months : Optional[float] @@ -425,8 +483,18 @@ def growth_tech( @validate def losers( self, - sort: Annotated[Literal["asc", "desc"], OpenBBField(description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'.")] = "desc", - provider: Annotated[Optional[Literal["yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.")] = None, + sort: Annotated[ + Literal["asc", "desc"], + OpenBBField( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Annotated[ + Optional[Literal["yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get the top price losers in the stock market. @@ -455,17 +523,17 @@ def losers( EquityLosers ------------ symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. price : float - Last price. + Last price. change : float - Change in price. + Change in price. percent_change : float - Percent change. + Percent change. volume : Union[int, float] - The trading volume. + The trading volume. market_cap : Optional[float] Market Cap. (provider: yfinance) avg_volume_3_months : Optional[float] @@ -501,8 +569,18 @@ def losers( @validate def undervalued_growth( self, - sort: Annotated[Literal["asc", "desc"], OpenBBField(description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'.")] = "desc", - provider: Annotated[Optional[Literal["yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.")] = None, + sort: Annotated[ + Literal["asc", "desc"], + OpenBBField( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Annotated[ + Optional[Literal["yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get potentially undervalued growth stocks. @@ -531,17 +609,17 @@ def undervalued_growth( EquityUndervaluedGrowth ----------------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. price : float - Last price. + Last price. change : float - Change in price. + Change in price. percent_change : float - Percent change. + Percent change. volume : Union[int, float] - The trading volume. + The trading volume. market_cap : Optional[float] Market Cap. (provider: yfinance) avg_volume_3_months : Optional[float] @@ -577,8 +655,18 @@ def undervalued_growth( @validate def undervalued_large_caps( self, - sort: Annotated[Literal["asc", "desc"], OpenBBField(description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'.")] = "desc", - provider: Annotated[Optional[Literal["yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.")] = None, + sort: Annotated[ + Literal["asc", "desc"], + OpenBBField( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Annotated[ + Optional[Literal["yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get potentially undervalued large cap stocks. @@ -607,17 +695,17 @@ def undervalued_large_caps( EquityUndervaluedLargeCaps -------------------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. price : float - Last price. + Last price. change : float - Change in price. + Change in price. percent_change : float - Percent change. + Percent change. volume : Union[int, float] - The trading volume. + The trading volume. market_cap : Optional[float] Market Cap. (provider: yfinance) avg_volume_3_months : Optional[float] diff --git a/openbb_platform/openbb/package/equity_estimates.py b/openbb_platform/openbb/package/equity_estimates.py index 6dfa5f3453e9..d7ffeee681a7 100644 --- a/openbb_platform/openbb/package/equity_estimates.py +++ b/openbb_platform/openbb/package/equity_estimates.py @@ -29,9 +29,24 @@ def __repr__(self) -> str: @validate def analyst_search( self, - analyst_name: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="Analyst names to return. Omitting will return all available analysts. Multiple comma separated items allowed for provider(s): benzinga.")] = None, - firm_name: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="Firm names to return. Omitting will return all available firms. Multiple comma separated items allowed for provider(s): benzinga.")] = None, - provider: Annotated[Optional[Literal["benzinga"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga.")] = None, + analyst_name: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="Analyst names to return. Omitting will return all available analysts. Multiple comma separated items allowed for provider(s): benzinga." + ), + ] = None, + firm_name: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="Firm names to return. Omitting will return all available firms. Multiple comma separated items allowed for provider(s): benzinga." + ), + ] = None, + provider: Annotated[ + Optional[Literal["benzinga"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga." + ), + ] = None, **kwargs ) -> OBBject: """Search for specific analysts and get their forecast track record. @@ -72,15 +87,15 @@ def analyst_search( AnalystSearch ------------- last_updated : Optional[datetime] - Date of the last update. + Date of the last update. firm_name : Optional[str] - Firm name of the analyst. + Firm name of the analyst. name_first : Optional[str] - Analyst first name. + Analyst first name. name_last : Optional[str] - Analyst last name. + Analyst last name. name_full : str - Analyst full name. + Analyst full name. analyst_id : Optional[str] ID of the analyst. (provider: benzinga) firm_id : Optional[str] @@ -206,7 +221,23 @@ def analyst_search( "firm_name": firm_name, }, extra_params=kwargs, - info={"analyst_name": {"benzinga": {"multiple_items_allowed": True, "choices": None}}, "firm_name": {"benzinga": {"multiple_items_allowed": True, "choices": None}}, "analyst_ids": {"benzinga": {"multiple_items_allowed": True, "choices": None}}, "firm_ids": {"benzinga": {"multiple_items_allowed": True, "choices": None}}, "fields": {"benzinga": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "analyst_name": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "firm_name": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "analyst_ids": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "firm_ids": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "fields": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + }, ) ) @@ -214,8 +245,18 @@ def analyst_search( @validate def consensus( self, - symbol: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance.")] = None, - provider: Annotated[Optional[Literal["fmp", "intrinio", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.")] = None, + symbol: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance." + ), + ] = None, + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get consensus price target and recommendation. @@ -246,17 +287,17 @@ def consensus( PriceTargetConsensus -------------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - The company name + The company name target_high : Optional[float] - High target of the price target consensus. + High target of the price target consensus. target_low : Optional[float] - Low target of the price target consensus. + Low target of the price target consensus. target_consensus : Optional[float] - Consensus target of the price target consensus. + Consensus target of the price target consensus. target_median : Optional[float] - Median target of the price target consensus. + Median target of the price target consensus. standard_deviation : Optional[float] The standard deviation of target price estimates. (provider: intrinio) total_anaylsts : Optional[int] @@ -301,7 +342,13 @@ def consensus( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "intrinio": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + } + }, ) ) @@ -309,8 +356,18 @@ def consensus( @validate def forward_ebitda( self, - symbol: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio.")] = None, - provider: Annotated[Optional[Literal["fmp", "intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.")] = None, + symbol: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio." + ), + ] = None, + provider: Annotated[ + Optional[Literal["fmp", "intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get forward EBITDA estimates. @@ -348,33 +405,33 @@ def forward_ebitda( ForwardEbitdaEstimates ---------------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. last_updated : Optional[date] - The date of the last update. + The date of the last update. period_ending : Optional[date] - The end date of the reporting period. + The end date of the reporting period. fiscal_year : Optional[int] - Fiscal year for the estimate. + Fiscal year for the estimate. fiscal_period : Optional[str] - Fiscal quarter for the estimate. + Fiscal quarter for the estimate. calendar_year : Optional[int] - Calendar year for the estimate. + Calendar year for the estimate. calendar_period : Optional[Union[int, str]] - Calendar quarter for the estimate. + Calendar quarter for the estimate. low_estimate : Optional[int] - The EBITDA estimate low for the period. + The EBITDA estimate low for the period. high_estimate : Optional[int] - The EBITDA estimate high for the period. + The EBITDA estimate high for the period. mean : Optional[int] - The EBITDA estimate mean for the period. + The EBITDA estimate mean for the period. median : Optional[int] - The EBITDA estimate median for the period. + The EBITDA estimate median for the period. standard_deviation : Optional[int] - The EBITDA estimate standard deviation for the period. + The EBITDA estimate standard deviation for the period. number_of_analysts : Optional[int] - Number of analysts providing estimates for the period. + Number of analysts providing estimates for the period. conensus_type : Optional[Literal['ebitda', 'ebit', 'enterprise_value', 'cash_flow_per_share', 'pretax_income']] The type of estimate. (provider: intrinio) @@ -400,7 +457,12 @@ def forward_ebitda( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "intrinio": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + } + }, ) ) @@ -408,8 +470,18 @@ def forward_ebitda( @validate def forward_eps( self, - symbol: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio.")] = None, - provider: Annotated[Optional[Literal["fmp", "intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.")] = None, + symbol: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio." + ), + ] = None, + provider: Annotated[ + Optional[Literal["fmp", "intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get forward EPS estimates. @@ -450,31 +522,31 @@ def forward_eps( ForwardEpsEstimates ------------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. date : date - The date of the data. + The date of the data. fiscal_year : Optional[int] - Fiscal year for the estimate. + Fiscal year for the estimate. fiscal_period : Optional[str] - Fiscal quarter for the estimate. + Fiscal quarter for the estimate. calendar_year : Optional[int] - Calendar year for the estimate. + Calendar year for the estimate. calendar_period : Optional[str] - Calendar quarter for the estimate. + Calendar quarter for the estimate. low_estimate : Optional[float] - Estimated EPS low for the period. + Estimated EPS low for the period. high_estimate : Optional[float] - Estimated EPS high for the period. + Estimated EPS high for the period. mean : Optional[float] - Estimated EPS mean for the period. + Estimated EPS mean for the period. median : Optional[float] - Estimated EPS median for the period. + Estimated EPS median for the period. standard_deviation : Optional[float] - Estimated EPS standard deviation for the period. + Estimated EPS standard deviation for the period. number_of_analysts : Optional[int] - Number of analysts providing estimates for the period. + Number of analysts providing estimates for the period. revisions_change_percent : Optional[float] The earnings per share (EPS) percent change in estimate for the period. (provider: intrinio) mean_1w : Optional[float] @@ -507,7 +579,12 @@ def forward_eps( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "intrinio": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + } + }, ) ) @@ -515,8 +592,18 @@ def forward_eps( @validate def forward_pe( self, - symbol: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio.")] = None, - provider: Annotated[Optional[Literal["intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.")] = None, + symbol: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio." + ), + ] = None, + provider: Annotated[ + Optional[Literal["intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get forward PE estimates. @@ -545,19 +632,19 @@ def forward_pe( ForwardPeEstimates ------------------ symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. year1 : Optional[float] - Estimated PE ratio for the next fiscal year. + Estimated PE ratio for the next fiscal year. year2 : Optional[float] - Estimated PE ratio two fiscal years from now. + Estimated PE ratio two fiscal years from now. year3 : Optional[float] - Estimated PE ratio three fiscal years from now. + Estimated PE ratio three fiscal years from now. year4 : Optional[float] - Estimated PE ratio four fiscal years from now. + Estimated PE ratio four fiscal years from now. year5 : Optional[float] - Estimated PE ratio five fiscal years from now. + Estimated PE ratio five fiscal years from now. peg_ratio_year1 : Optional[float] Estimated Forward PEG ratio for the next fiscal year. (provider: intrinio) eps_ttm : Optional[float] @@ -586,7 +673,11 @@ def forward_pe( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"intrinio": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) @@ -594,8 +685,18 @@ def forward_pe( @validate def forward_sales( self, - symbol: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio.")] = None, - provider: Annotated[Optional[Literal["intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.")] = None, + symbol: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio." + ), + ] = None, + provider: Annotated[ + Optional[Literal["intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get forward sales estimates. @@ -632,31 +733,31 @@ def forward_sales( ForwardSalesEstimates --------------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the entity. + Name of the entity. date : date - The date of the data. + The date of the data. fiscal_year : Optional[int] - Fiscal year for the estimate. + Fiscal year for the estimate. fiscal_period : Optional[str] - Fiscal quarter for the estimate. + Fiscal quarter for the estimate. calendar_year : Optional[int] - Calendar year for the estimate. + Calendar year for the estimate. calendar_period : Optional[str] - Calendar quarter for the estimate. + Calendar quarter for the estimate. low_estimate : Optional[int] - The sales estimate low for the period. + The sales estimate low for the period. high_estimate : Optional[int] - The sales estimate high for the period. + The sales estimate high for the period. mean : Optional[int] - The sales estimate mean for the period. + The sales estimate mean for the period. median : Optional[int] - The sales estimate median for the period. + The sales estimate median for the period. standard_deviation : Optional[int] - The sales estimate standard deviation for the period. + The sales estimate standard deviation for the period. number_of_analysts : Optional[int] - Number of analysts providing estimates for the period. + Number of analysts providing estimates for the period. revisions_1w_up : Optional[int] Number of revisions up in the last week. (provider: intrinio) revisions_1w_down : Optional[int] @@ -697,7 +798,11 @@ def forward_sales( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"intrinio": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) @@ -705,8 +810,18 @@ def forward_sales( @validate def historical( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp.")], - 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, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp." + ), + ], + 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 historical analyst estimates for earnings and revenue. @@ -739,49 +854,49 @@ def historical( AnalystEstimates ---------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. date : date - The date of the data. + The date of the data. estimated_revenue_low : Optional[int] - Estimated revenue low. + Estimated revenue low. estimated_revenue_high : Optional[int] - Estimated revenue high. + Estimated revenue high. estimated_revenue_avg : Optional[int] - Estimated revenue average. + Estimated revenue average. estimated_sga_expense_low : Optional[int] - Estimated SGA expense low. + Estimated SGA expense low. estimated_sga_expense_high : Optional[int] - Estimated SGA expense high. + Estimated SGA expense high. estimated_sga_expense_avg : Optional[int] - Estimated SGA expense average. + Estimated SGA expense average. estimated_ebitda_low : Optional[int] - Estimated EBITDA low. + Estimated EBITDA low. estimated_ebitda_high : Optional[int] - Estimated EBITDA high. + Estimated EBITDA high. estimated_ebitda_avg : Optional[int] - Estimated EBITDA average. + Estimated EBITDA average. estimated_ebit_low : Optional[int] - Estimated EBIT low. + Estimated EBIT low. estimated_ebit_high : Optional[int] - Estimated EBIT high. + Estimated EBIT high. estimated_ebit_avg : Optional[int] - Estimated EBIT average. + Estimated EBIT average. estimated_net_income_low : Optional[int] - Estimated net income low. + Estimated net income low. estimated_net_income_high : Optional[int] - Estimated net income high. + Estimated net income high. estimated_net_income_avg : Optional[int] - Estimated net income average. + Estimated net income average. estimated_eps_avg : Optional[float] - Estimated EPS average. + Estimated EPS average. estimated_eps_high : Optional[float] - Estimated EPS high. + Estimated EPS high. estimated_eps_low : Optional[float] - Estimated EPS low. + Estimated EPS low. number_analyst_estimated_revenue : Optional[int] - Number of analysts who estimated revenue. + Number of analysts who estimated revenue. number_analysts_estimated_eps : Optional[int] - Number of analysts who estimated EPS. + Number of analysts who estimated EPS. Examples -------- @@ -803,7 +918,9 @@ def historical( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -811,9 +928,21 @@ def historical( @validate def price_target( self, - symbol: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): benzinga, fmp.")] = None, - limit: Annotated[int, OpenBBField(description="The number of data entries to return.")] = 200, - provider: Annotated[Optional[Literal["benzinga", "fmp"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp.")] = None, + symbol: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): benzinga, fmp." + ), + ] = None, + limit: Annotated[ + int, OpenBBField(description="The number of data entries to return.") + ] = 200, + provider: Annotated[ + Optional[Literal["benzinga", "fmp"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp." + ), + ] = None, **kwargs ) -> OBBject: """Get analyst price targets by company. @@ -866,37 +995,37 @@ def price_target( PriceTarget ----------- published_date : Union[date, datetime] - Published date of the price target. + Published date of the price target. published_time : Optional[datetime.time] - Time of the original rating, UTC. + Time of the original rating, UTC. symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. exchange : Optional[str] - Exchange where the company is traded. + Exchange where the company is traded. company_name : Optional[str] - Name of company that is the subject of rating. + Name of company that is the subject of rating. analyst_name : Optional[str] - Analyst name. + Analyst name. analyst_firm : Optional[str] - Name of the analyst firm that published the price target. + Name of the analyst firm that published the price target. currency : Optional[str] - Currency the data is denominated in. + Currency the data is denominated in. price_target : Optional[float] - The current price target. + The current price target. adj_price_target : Optional[float] - Adjusted price target for splits and stock dividends. + Adjusted price target for splits and stock dividends. price_target_previous : Optional[float] - Previous price target. + Previous price target. previous_adj_price_target : Optional[float] - Previous adjusted price target. + Previous adjusted price target. price_when_posted : Optional[float] - Price when posted. + Price when posted. rating_current : Optional[str] - The analyst's rating for the company. + The analyst's rating for the company. rating_previous : Optional[str] - Previous analyst rating for the company. + Previous analyst rating for the company. action : Optional[str] - Description of the change in rating from firm's last rating. + Description of the change in rating from firm's last rating. action_change : Optional[Literal['Announces', 'Maintains', 'Lowers', 'Raises', 'Removes', 'Adjusts']] Description of the change in price target from firm's last price target. (provider: benzinga) importance : Optional[Literal[0, 1, 2, 3, 4, 5]] @@ -945,6 +1074,20 @@ def price_target( "limit": limit, }, extra_params=kwargs, - info={"symbol": {"benzinga": {"multiple_items_allowed": True, "choices": None}, "fmp": {"multiple_items_allowed": True, "choices": None}}, "analyst_ids": {"benzinga": {"multiple_items_allowed": True, "choices": None}}, "firm_ids": {"benzinga": {"multiple_items_allowed": True, "choices": None}}, "fields": {"benzinga": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "benzinga": {"multiple_items_allowed": True, "choices": None}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + }, + "analyst_ids": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "firm_ids": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "fields": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + }, ) ) diff --git a/openbb_platform/openbb/package/equity_fundamental.py b/openbb_platform/openbb/package/equity_fundamental.py index 6d89e2ddf218..55da41cb9522 100644 --- a/openbb_platform/openbb/package/equity_fundamental.py +++ b/openbb_platform/openbb/package/equity_fundamental.py @@ -48,8 +48,16 @@ def __repr__(self) -> str: def balance( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - limit: Annotated[Optional[Annotated[int, Ge(ge=0)]], OpenBBField(description="The number of data entries to return.")] = 5, - provider: Annotated[Optional[Literal["fmp", "intrinio", "polygon", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance.")] = None, + limit: Annotated[ + Optional[Annotated[int, Ge(ge=0)]], + OpenBBField(description="The number of data entries to return."), + ] = 5, + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "polygon", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get the balance sheet for a given company. @@ -110,11 +118,11 @@ def balance( BalanceSheet ------------ period_ending : date - The end date of the reporting period. + The end date of the reporting period. fiscal_period : Optional[str] - The fiscal period of the report. + The fiscal period of the report. fiscal_year : Optional[int] - The fiscal year of the fiscal period. + The fiscal year of the fiscal period. filing_date : Optional[date] The date when the filing was made. (provider: fmp) accepted_date : Optional[datetime] @@ -384,7 +392,26 @@ def balance( "limit": limit, }, extra_params=kwargs, - info={"period": {"fmp": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}, "intrinio": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}, "polygon": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}, "yfinance": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}}}, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + "intrinio": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + "polygon": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + } + }, ) ) @@ -393,8 +420,16 @@ def balance( def balance_growth( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - limit: Annotated[Optional[int], OpenBBField(description="The number of data entries to return.")] = 10, - 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, + limit: Annotated[ + Optional[int], + OpenBBField(description="The number of data entries to return."), + ] = 10, + 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 the growth of a company's balance sheet items over time. @@ -427,11 +462,11 @@ def balance_growth( BalanceSheetGrowth ------------------ period_ending : date - The end date of the reporting period. + The end date of the reporting period. fiscal_period : Optional[str] - The fiscal period of the report. + The fiscal period of the report. fiscal_year : Optional[int] - The fiscal year of the fiscal period. + The fiscal year of the fiscal period. symbol : Optional[str] Symbol representing the entity requested in the data. (provider: fmp) growth_cash_and_cash_equivalents : Optional[float] @@ -535,7 +570,14 @@ def balance_growth( "limit": limit, }, extra_params=kwargs, - info={"period": {"fmp": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}}}, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + } + } + }, ) ) @@ -544,8 +586,16 @@ def balance_growth( def cash( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - limit: Annotated[Optional[Annotated[int, Ge(ge=0)]], OpenBBField(description="The number of data entries to return.")] = 5, - provider: Annotated[Optional[Literal["fmp", "intrinio", "polygon", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance.")] = None, + limit: Annotated[ + Optional[Annotated[int, Ge(ge=0)]], + OpenBBField(description="The number of data entries to return."), + ] = 5, + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "polygon", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get the cash flow statement for a given company. @@ -606,11 +656,11 @@ def cash( CashFlowStatement ----------------- period_ending : date - The end date of the reporting period. + The end date of the reporting period. fiscal_period : Optional[str] - The fiscal period of the report. + The fiscal period of the report. fiscal_year : Optional[int] - The fiscal year of the fiscal period. + The fiscal year of the fiscal period. filing_date : Optional[date] The date of the filing. (provider: fmp) accepted_date : Optional[datetime] @@ -790,7 +840,26 @@ def cash( "limit": limit, }, extra_params=kwargs, - info={"period": {"fmp": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}, "intrinio": {"multiple_items_allowed": False, "choices": ["annual", "quarter", "ttm", "ytd"]}, "polygon": {"multiple_items_allowed": False, "choices": ["annual", "quarter", "ttm"]}, "yfinance": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}}}, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + "intrinio": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm", "ytd"], + }, + "polygon": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + } + }, ) ) @@ -799,8 +868,16 @@ def cash( def cash_growth( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - limit: Annotated[Optional[int], OpenBBField(description="The number of data entries to return.")] = 10, - 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, + limit: Annotated[ + Optional[int], + OpenBBField(description="The number of data entries to return."), + ] = 10, + 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 the growth of a company's cash flow statement items over time. @@ -833,11 +910,11 @@ def cash_growth( CashFlowStatementGrowth ----------------------- period_ending : date - The end date of the reporting period. + The end date of the reporting period. fiscal_period : Optional[str] - The fiscal period of the report. + The fiscal period of the report. fiscal_year : Optional[int] - The fiscal year of the fiscal period. + The fiscal year of the fiscal period. symbol : Optional[str] Symbol representing the entity requested in the data. (provider: fmp) growth_net_income : Optional[float] @@ -923,7 +1000,14 @@ def cash_growth( "limit": limit, }, extra_params=kwargs, - info={"period": {"fmp": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}}}, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + } + } + }, ) ) @@ -932,9 +1016,20 @@ def cash_growth( def dividends( 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, - provider: Annotated[Optional[Literal["fmp", "intrinio", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.")] = 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", "intrinio", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get historical dividend data for a given company. @@ -969,9 +1064,9 @@ def dividends( HistoricalDividends ------------------- ex_dividend_date : date - The ex-dividend date - the date on which the stock begins trading without rights to the dividend. + The ex-dividend date - the date on which the stock begins trading without rights to the dividend. amount : float - The dividend amount per share. + The dividend amount per share. label : Optional[str] Label of the historical dividends. (provider: fmp) adj_dividend : Optional[float] @@ -1019,7 +1114,12 @@ def dividends( def employee_count( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - 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 historical employee count data for a given company. @@ -1048,23 +1148,23 @@ def employee_count( HistoricalEmployees ------------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. cik : int - Central Index Key (CIK) for the requested entity. + Central Index Key (CIK) for the requested entity. acceptance_time : datetime - Time of acceptance of the company employee. + Time of acceptance of the company employee. period_of_report : date - Date of reporting of the company employee. + Date of reporting of the company employee. company_name : str - Registered name of the company to retrieve the historical employees of. + Registered name of the company to retrieve the historical employees of. form_type : str - Form type of the company employee. + Form type of the company employee. filing_date : date - Filing date of the company employee + Filing date of the company employee employee_count : int - Count of employees of the company. + Count of employees of the company. source : str - Source URL which retrieves this data for the company. + Source URL which retrieves this data for the company. Examples -------- @@ -1093,10 +1193,24 @@ def employee_count( @validate def filings( self, - symbol: Annotated[Optional[str], OpenBBField(description="Symbol to get data for.")] = None, - form_type: Annotated[Optional[str], OpenBBField(description="Filter by form type. Check the data provider for available types.")] = None, - limit: Annotated[int, OpenBBField(description="The number of data entries to return.")] = 100, - provider: Annotated[Optional[Literal["fmp", "intrinio", "sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, sec.")] = None, + symbol: Annotated[ + Optional[str], OpenBBField(description="Symbol to get data for.") + ] = None, + form_type: Annotated[ + Optional[str], + OpenBBField( + description="Filter by form type. Check the data provider for available types." + ), + ] = None, + limit: Annotated[ + int, OpenBBField(description="The number of data entries to return.") + ] = 100, + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, sec." + ), + ] = None, **kwargs ) -> OBBject: """Get the URLs to SEC filings reported to EDGAR database, such as 10-K, 10-Q, 8-K, and more. @@ -1105,7 +1219,7 @@ def filings( Foreign Investment Disclosures and others. The annual 10-K report is required to be filed annually and includes the company's financial statements, management discussion and analysis, and audited financial statements. - + Parameters ---------- @@ -1145,19 +1259,19 @@ def filings( CompanyFilings -------------- filing_date : date - The date of the filing. + The date of the filing. accepted_date : Optional[datetime] - Accepted date of the filing. + Accepted date of the filing. symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. cik : Optional[str] - Central Index Key (CIK) for the requested entity. + Central Index Key (CIK) for the requested entity. report_type : Optional[str] - Type of filing. + Type of filing. filing_url : Optional[str] - URL to the filing page. + URL to the filing page. report_url : str - URL to the actual report. + URL to the actual report. id : Optional[str] Intrinio ID of the filing. (provider: intrinio) period_end_date : Optional[date] @@ -1227,15 +1341,46 @@ def filings( @validate def historical_attributes( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio.")], - tag: Annotated[Union[str, List[str]], OpenBBField(description="Intrinio data tag ID or code. Multiple comma separated items allowed for provider(s): intrinio.")], - 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, - frequency: Annotated[Optional[Literal["daily", "weekly", "monthly", "quarterly", "yearly"]], OpenBBField(description="The frequency of the data.")] = "yearly", - limit: Annotated[Optional[int], OpenBBField(description="The number of data entries to return.")] = 1000, - tag_type: Annotated[Optional[str], OpenBBField(description="Filter by type, when applicable.")] = None, - sort: Annotated[Optional[Literal["asc", "desc"]], OpenBBField(description="Sort order.")] = "desc", - provider: Annotated[Optional[Literal["intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio." + ), + ], + tag: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Intrinio data tag ID or code. Multiple comma separated items allowed for provider(s): intrinio." + ), + ], + 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, + frequency: Annotated[ + Optional[Literal["daily", "weekly", "monthly", "quarterly", "yearly"]], + OpenBBField(description="The frequency of the data."), + ] = "yearly", + limit: Annotated[ + Optional[int], + OpenBBField(description="The number of data entries to return."), + ] = 1000, + tag_type: Annotated[ + Optional[str], OpenBBField(description="Filter by type, when applicable.") + ] = None, + sort: Annotated[ + Optional[Literal["asc", "desc"]], OpenBBField(description="Sort order.") + ] = "desc", + provider: Annotated[ + Optional[Literal["intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get the historical values of a data tag from Intrinio. @@ -1278,13 +1423,13 @@ def historical_attributes( HistoricalAttributes -------------------- 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. tag : Optional[str] - Tag name for the fetched data. + Tag name for the fetched data. value : Optional[float] - The value of the data. + The value of the data. Examples -------- @@ -1313,7 +1458,14 @@ def historical_attributes( "sort": sort, }, extra_params=kwargs, - info={"symbol": {"intrinio": {"multiple_items_allowed": True, "choices": None}}, "tag": {"intrinio": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + }, + "tag": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + }, + }, ) ) @@ -1322,7 +1474,12 @@ def historical_attributes( def historical_eps( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - 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 historical earnings per share data for a given company. @@ -1353,15 +1510,15 @@ def historical_eps( HistoricalEps ------------- date : Optional[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. announce_time : Optional[str] - Timing of the earnings announcement. + Timing of the earnings announcement. eps_actual : Optional[float] - Actual EPS from the earnings date. + Actual EPS from the earnings date. eps_estimated : Optional[float] - Estimated EPS for the earnings date. + Estimated EPS for the earnings date. revenue_estimated : Optional[float] Estimated consensus revenue for the reporting period. (provider: fmp) revenue_actual : Optional[float] @@ -1401,7 +1558,12 @@ def historical_eps( def historical_splits( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - 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 historical stock splits for a given company. @@ -1430,13 +1592,13 @@ def historical_splits( HistoricalSplits ---------------- date : date - The date of the data. + The date of the data. numerator : Optional[float] - Numerator of the split. + Numerator of the split. denominator : Optional[float] - Denominator of the split. + Denominator of the split. split_ratio : Optional[str] - Split ratio. + Split ratio. Examples -------- @@ -1466,8 +1628,16 @@ def historical_splits( def income( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - limit: Annotated[Optional[Annotated[int, Ge(ge=0)]], OpenBBField(description="The number of data entries to return.")] = 5, - provider: Annotated[Optional[Literal["fmp", "intrinio", "polygon", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance.")] = None, + limit: Annotated[ + Optional[Annotated[int, Ge(ge=0)]], + OpenBBField(description="The number of data entries to return."), + ] = 5, + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "polygon", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get the income statement for a given company. @@ -1528,11 +1698,11 @@ def income( IncomeStatement --------------- period_ending : date - The end date of the reporting period. + The end date of the reporting period. fiscal_period : Optional[str] - The fiscal period of the report. + The fiscal period of the report. fiscal_year : Optional[int] - The fiscal year of the fiscal period. + The fiscal year of the fiscal period. filing_date : Optional[date] The date when the filing was made. (provider: fmp) accepted_date : Optional[datetime] @@ -1806,7 +1976,26 @@ def income( "limit": limit, }, extra_params=kwargs, - info={"period": {"fmp": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}, "intrinio": {"multiple_items_allowed": False, "choices": ["annual", "quarter", "ttm", "ytd"]}, "polygon": {"multiple_items_allowed": False, "choices": ["annual", "quarter", "ttm"]}, "yfinance": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}}}, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + "intrinio": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm", "ytd"], + }, + "polygon": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + } + }, ) ) @@ -1815,8 +2004,16 @@ def income( def income_growth( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - limit: Annotated[Optional[int], OpenBBField(description="The number of data entries to return.")] = 10, - 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, + limit: Annotated[ + Optional[int], + OpenBBField(description="The number of data entries to return."), + ] = 10, + 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 the growth of a company's income statement items over time. @@ -1849,11 +2046,11 @@ def income_growth( IncomeStatementGrowth --------------------- period_ending : date - The end date of the reporting period. + The end date of the reporting period. fiscal_period : Optional[str] - The fiscal period of the report. + The fiscal period of the report. fiscal_year : Optional[int] - The fiscal year of the fiscal period. + The fiscal year of the fiscal period. symbol : Optional[str] Symbol representing the entity requested in the data. (provider: fmp) growth_revenue : Optional[float] @@ -1931,7 +2128,14 @@ def income_growth( "limit": limit, }, extra_params=kwargs, - info={"period": {"fmp": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}}}, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + } + } + }, ) ) @@ -1939,9 +2143,24 @@ def income_growth( @validate def latest_attributes( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio.")], - tag: Annotated[Union[str, List[str]], OpenBBField(description="Intrinio data tag ID or code. Multiple comma separated items allowed for provider(s): intrinio.")], - provider: Annotated[Optional[Literal["intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio." + ), + ], + tag: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Intrinio data tag ID or code. Multiple comma separated items allowed for provider(s): intrinio." + ), + ], + provider: Annotated[ + Optional[Literal["intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get the latest value of a data tag from Intrinio. @@ -1972,11 +2191,11 @@ def latest_attributes( LatestAttributes ---------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. tag : Optional[str] - Tag name for the fetched data. + Tag name for the fetched data. value : Optional[Union[str, float]] - The value of the data. + The value of the data. Examples -------- @@ -1999,7 +2218,14 @@ def latest_attributes( "tag": tag, }, extra_params=kwargs, - info={"symbol": {"intrinio": {"multiple_items_allowed": True, "choices": None}}, "tag": {"intrinio": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + }, + "tag": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + }, + }, ) ) @@ -2008,7 +2234,12 @@ def latest_attributes( def management( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - provider: Annotated[Optional[Literal["fmp", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, yfinance.")] = None, + provider: Annotated[ + Optional[Literal["fmp", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get executive management team data for a given company. @@ -2037,19 +2268,19 @@ def management( KeyExecutives ------------- title : str - Designation of the key executive. + Designation of the key executive. name : str - Name of the key executive. + Name of the key executive. pay : Optional[int] - Pay of the key executive. + Pay of the key executive. currency_pay : Optional[str] - Currency of the pay. + Currency of the pay. gender : Optional[str] - Gender of the key executive. + Gender of the key executive. year_born : Optional[int] - Birth year of the key executive. + Birth year of the key executive. title_since : Optional[int] - Date the tile was held since. + Date the tile was held since. exercised_value : Optional[int] Value of shares exercised. (provider: yfinance) unexercised_value : Optional[int] @@ -2082,8 +2313,18 @@ def management( @validate def management_compensation( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp.")], - 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, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp." + ), + ], + 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 executive management team compensation for a given company over time. @@ -2114,29 +2355,29 @@ def management_compensation( ExecutiveCompensation --------------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. cik : Optional[str] - Central Index Key (CIK) for the requested entity. + Central Index Key (CIK) for the requested entity. company_name : Optional[str] - The name of the company. + The name of the company. industry : Optional[str] - The industry of the company. + The industry of the company. year : Optional[int] - Year of the compensation. + Year of the compensation. name_and_position : Optional[str] - Name and position. + Name and position. salary : Optional[Annotated[float, Ge(ge=0)]] - Salary. + Salary. bonus : Optional[Annotated[float, Ge(ge=0)]] - Bonus payments. + Bonus payments. stock_award : Optional[Annotated[float, Ge(ge=0)]] - Stock awards. + Stock awards. incentive_plan_compensation : Optional[Annotated[float, Ge(ge=0)]] - Incentive plan compensation. + Incentive plan compensation. all_other_compensation : Optional[Annotated[float, Ge(ge=0)]] - All other compensation. + All other compensation. total : Optional[Annotated[float, Ge(ge=0)]] - Total compensation. + Total compensation. filing_date : Optional[date] Date of the filing. (provider: fmp) accepted_date : Optional[datetime] @@ -2164,7 +2405,9 @@ def management_compensation( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -2172,9 +2415,22 @@ def management_compensation( @validate def metrics( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance.")], - limit: Annotated[Optional[int], OpenBBField(description="The number of data entries to return.")] = 100, - provider: Annotated[Optional[Literal["fmp", "intrinio", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance." + ), + ], + limit: Annotated[ + Optional[int], + OpenBBField(description="The number of data entries to return."), + ] = 100, + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get fundamental metrics for a given company. @@ -2209,11 +2465,11 @@ def metrics( KeyMetrics ---------- symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. market_cap : Optional[float] - Market capitalization + Market capitalization pe_ratio : Optional[float] - Price-to-earnings ratio (P/E ratio) + Price-to-earnings ratio (P/E ratio) period_ending : Optional[date] Period ending date. (provider: fmp) fiscal_period : Optional[str] @@ -2458,7 +2714,19 @@ def metrics( "limit": limit, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "intrinio": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}}, "period": {"fmp": {"multiple_items_allowed": False, "choices": ["annual", "quarter"]}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + }, + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + } + }, + }, ) ) @@ -2466,8 +2734,18 @@ def metrics( @validate def multiples( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp.")], - 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, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp." + ), + ], + 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 equity valuation multiples for a given company. @@ -2496,127 +2774,127 @@ def multiples( EquityValuationMultiples ------------------------ symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. revenue_per_share_ttm : Optional[float] - Revenue per share calculated as trailing twelve months. + Revenue per share calculated as trailing twelve months. net_income_per_share_ttm : Optional[float] - Net income per share calculated as trailing twelve months. + Net income per share calculated as trailing twelve months. operating_cash_flow_per_share_ttm : Optional[float] - Operating cash flow per share calculated as trailing twelve months. + Operating cash flow per share calculated as trailing twelve months. free_cash_flow_per_share_ttm : Optional[float] - Free cash flow per share calculated as trailing twelve months. + Free cash flow per share calculated as trailing twelve months. cash_per_share_ttm : Optional[float] - Cash per share calculated as trailing twelve months. + Cash per share calculated as trailing twelve months. book_value_per_share_ttm : Optional[float] - Book value per share calculated as trailing twelve months. + Book value per share calculated as trailing twelve months. tangible_book_value_per_share_ttm : Optional[float] - Tangible book value per share calculated as trailing twelve months. + Tangible book value per share calculated as trailing twelve months. shareholders_equity_per_share_ttm : Optional[float] - Shareholders equity per share calculated as trailing twelve months. + Shareholders equity per share calculated as trailing twelve months. interest_debt_per_share_ttm : Optional[float] - Interest debt per share calculated as trailing twelve months. + Interest debt per share calculated as trailing twelve months. market_cap_ttm : Optional[float] - Market capitalization calculated as trailing twelve months. + Market capitalization calculated as trailing twelve months. enterprise_value_ttm : Optional[float] - Enterprise value calculated as trailing twelve months. + Enterprise value calculated as trailing twelve months. pe_ratio_ttm : Optional[float] - Price-to-earnings ratio (P/E ratio) calculated as trailing twelve months. + Price-to-earnings ratio (P/E ratio) calculated as trailing twelve months. price_to_sales_ratio_ttm : Optional[float] - Price-to-sales ratio calculated as trailing twelve months. + Price-to-sales ratio calculated as trailing twelve months. pocf_ratio_ttm : Optional[float] - Price-to-operating cash flow ratio calculated as trailing twelve months. + Price-to-operating cash flow ratio calculated as trailing twelve months. pfcf_ratio_ttm : Optional[float] - Price-to-free cash flow ratio calculated as trailing twelve months. + Price-to-free cash flow ratio calculated as trailing twelve months. pb_ratio_ttm : Optional[float] - Price-to-book ratio calculated as trailing twelve months. + Price-to-book ratio calculated as trailing twelve months. ptb_ratio_ttm : Optional[float] - Price-to-tangible book ratio calculated as trailing twelve months. + Price-to-tangible book ratio calculated as trailing twelve months. ev_to_sales_ttm : Optional[float] - Enterprise value-to-sales ratio calculated as trailing twelve months. + Enterprise value-to-sales ratio calculated as trailing twelve months. enterprise_value_over_ebitda_ttm : Optional[float] - Enterprise value-to-EBITDA ratio calculated as trailing twelve months. + Enterprise value-to-EBITDA ratio calculated as trailing twelve months. ev_to_operating_cash_flow_ttm : Optional[float] - Enterprise value-to-operating cash flow ratio calculated as trailing twelve months. + Enterprise value-to-operating cash flow ratio calculated as trailing twelve months. ev_to_free_cash_flow_ttm : Optional[float] - Enterprise value-to-free cash flow ratio calculated as trailing twelve months. + Enterprise value-to-free cash flow ratio calculated as trailing twelve months. earnings_yield_ttm : Optional[float] - Earnings yield calculated as trailing twelve months. + Earnings yield calculated as trailing twelve months. free_cash_flow_yield_ttm : Optional[float] - Free cash flow yield calculated as trailing twelve months. + Free cash flow yield calculated as trailing twelve months. debt_to_equity_ttm : Optional[float] - Debt-to-equity ratio calculated as trailing twelve months. + Debt-to-equity ratio calculated as trailing twelve months. debt_to_assets_ttm : Optional[float] - Debt-to-assets ratio calculated as trailing twelve months. + Debt-to-assets ratio calculated as trailing twelve months. net_debt_to_ebitda_ttm : Optional[float] - Net debt-to-EBITDA ratio calculated as trailing twelve months. + Net debt-to-EBITDA ratio calculated as trailing twelve months. current_ratio_ttm : Optional[float] - Current ratio calculated as trailing twelve months. + Current ratio calculated as trailing twelve months. interest_coverage_ttm : Optional[float] - Interest coverage calculated as trailing twelve months. + Interest coverage calculated as trailing twelve months. income_quality_ttm : Optional[float] - Income quality calculated as trailing twelve months. + Income quality calculated as trailing twelve months. dividend_yield_ttm : Optional[float] - Dividend yield calculated as trailing twelve months. + Dividend yield calculated as trailing twelve months. dividend_yield_percentage_ttm : Optional[float] - Dividend yield percentage calculated as trailing twelve months. + Dividend yield percentage calculated as trailing twelve months. dividend_to_market_cap_ttm : Optional[float] - Dividend to market capitalization ratio calculated as trailing twelve months. + Dividend to market capitalization ratio calculated as trailing twelve months. dividend_per_share_ttm : Optional[float] - Dividend per share calculated as trailing twelve months. + Dividend per share calculated as trailing twelve months. payout_ratio_ttm : Optional[float] - Payout ratio calculated as trailing twelve months. + Payout ratio calculated as trailing twelve months. sales_general_and_administrative_to_revenue_ttm : Optional[float] - Sales general and administrative expenses-to-revenue ratio calculated as trailing twelve months. + Sales general and administrative expenses-to-revenue ratio calculated as trailing twelve months. research_and_development_to_revenue_ttm : Optional[float] - Research and development expenses-to-revenue ratio calculated as trailing twelve months. + Research and development expenses-to-revenue ratio calculated as trailing twelve months. intangibles_to_total_assets_ttm : Optional[float] - Intangibles-to-total assets ratio calculated as trailing twelve months. + Intangibles-to-total assets ratio calculated as trailing twelve months. capex_to_operating_cash_flow_ttm : Optional[float] - Capital expenditures-to-operating cash flow ratio calculated as trailing twelve months. + Capital expenditures-to-operating cash flow ratio calculated as trailing twelve months. capex_to_revenue_ttm : Optional[float] - Capital expenditures-to-revenue ratio calculated as trailing twelve months. + Capital expenditures-to-revenue ratio calculated as trailing twelve months. capex_to_depreciation_ttm : Optional[float] - Capital expenditures-to-depreciation ratio calculated as trailing twelve months. + Capital expenditures-to-depreciation ratio calculated as trailing twelve months. stock_based_compensation_to_revenue_ttm : Optional[float] - Stock-based compensation-to-revenue ratio calculated as trailing twelve months. + Stock-based compensation-to-revenue ratio calculated as trailing twelve months. graham_number_ttm : Optional[float] - Graham number calculated as trailing twelve months. + Graham number calculated as trailing twelve months. roic_ttm : Optional[float] - Return on invested capital calculated as trailing twelve months. + Return on invested capital calculated as trailing twelve months. return_on_tangible_assets_ttm : Optional[float] - Return on tangible assets calculated as trailing twelve months. + Return on tangible assets calculated as trailing twelve months. graham_net_net_ttm : Optional[float] - Graham net-net working capital calculated as trailing twelve months. + Graham net-net working capital calculated as trailing twelve months. working_capital_ttm : Optional[float] - Working capital calculated as trailing twelve months. + Working capital calculated as trailing twelve months. tangible_asset_value_ttm : Optional[float] - Tangible asset value calculated as trailing twelve months. + Tangible asset value calculated as trailing twelve months. net_current_asset_value_ttm : Optional[float] - Net current asset value calculated as trailing twelve months. + Net current asset value calculated as trailing twelve months. invested_capital_ttm : Optional[float] - Invested capital calculated as trailing twelve months. + Invested capital calculated as trailing twelve months. average_receivables_ttm : Optional[float] - Average receivables calculated as trailing twelve months. + Average receivables calculated as trailing twelve months. average_payables_ttm : Optional[float] - Average payables calculated as trailing twelve months. + Average payables calculated as trailing twelve months. average_inventory_ttm : Optional[float] - Average inventory calculated as trailing twelve months. + Average inventory calculated as trailing twelve months. days_sales_outstanding_ttm : Optional[float] - Days sales outstanding calculated as trailing twelve months. + Days sales outstanding calculated as trailing twelve months. days_payables_outstanding_ttm : Optional[float] - Days payables outstanding calculated as trailing twelve months. + Days payables outstanding calculated as trailing twelve months. days_of_inventory_on_hand_ttm : Optional[float] - Days of inventory on hand calculated as trailing twelve months. + Days of inventory on hand calculated as trailing twelve months. receivables_turnover_ttm : Optional[float] - Receivables turnover calculated as trailing twelve months. + Receivables turnover calculated as trailing twelve months. payables_turnover_ttm : Optional[float] - Payables turnover calculated as trailing twelve months. + Payables turnover calculated as trailing twelve months. inventory_turnover_ttm : Optional[float] - Inventory turnover calculated as trailing twelve months. + Inventory turnover calculated as trailing twelve months. roe_ttm : Optional[float] - Return on equity calculated as trailing twelve months. + Return on equity calculated as trailing twelve months. capex_per_share_ttm : Optional[float] - Capital expenditures per share calculated as trailing twelve months. + Capital expenditures per share calculated as trailing twelve months. Examples -------- @@ -2638,7 +2916,9 @@ def multiples( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -2647,8 +2927,15 @@ def multiples( def ratios( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - limit: Annotated[int, OpenBBField(description="The number of data entries to return.")] = 12, - provider: Annotated[Optional[Literal["fmp", "intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.")] = None, + limit: Annotated[ + int, OpenBBField(description="The number of data entries to return.") + ] = 12, + provider: Annotated[ + Optional[Literal["fmp", "intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get an extensive set of financial and accounting ratios for a given company over time. @@ -2683,11 +2970,11 @@ def ratios( FinancialRatios --------------- period_ending : str - The date of the data. + The date of the data. fiscal_period : str - Period of the financial ratios. + Period of the financial ratios. fiscal_year : Optional[int] - Fiscal year. + Fiscal year. current_ratio : Optional[float] Current ratio. (provider: fmp) quick_ratio : Optional[float] @@ -2823,7 +3110,18 @@ def ratios( "limit": limit, }, extra_params=kwargs, - info={"period": {"fmp": {"multiple_items_allowed": False, "choices": ["annual", "quarter", "ttm"]}, "intrinio": {"multiple_items_allowed": False, "choices": ["annual", "quarter", "ttm", "ytd"]}}}, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm"], + }, + "intrinio": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm", "ytd"], + }, + } + }, ) ) @@ -2832,10 +3130,27 @@ def ratios( def reported_financials( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - period: Annotated[str, OpenBBField(description="Time period of the data to return.")] = "annual", - statement_type: Annotated[str, OpenBBField(description="The type of financial statement - i.e, balance, income, cash.")] = "balance", - limit: Annotated[Optional[int], OpenBBField(description="The number of data entries to return. Although the response object contains multiple results, because of the variance in the fields, year-to-year and quarter-to-quarter, it is recommended to view results in small chunks.")] = 100, - provider: Annotated[Optional[Literal["intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.")] = None, + period: Annotated[ + str, OpenBBField(description="Time period of the data to return.") + ] = "annual", + statement_type: Annotated[ + str, + OpenBBField( + description="The type of financial statement - i.e, balance, income, cash." + ), + ] = "balance", + limit: Annotated[ + Optional[int], + OpenBBField( + description="The number of data entries to return. Although the response object contains multiple results, because of the variance in the fields, year-to-year and quarter-to-quarter, it is recommended to view results in small chunks." + ), + ] = 100, + provider: Annotated[ + Optional[Literal["intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get financial statements as reported by the company. @@ -2872,11 +3187,11 @@ def reported_financials( ReportedFinancials ------------------ period_ending : date - The ending date of the reporting period. + The ending date of the reporting period. fiscal_period : str - The fiscal period of the report (e.g. FY, Q1, etc.). + The fiscal period of the report (e.g. FY, Q1, etc.). fiscal_year : Optional[int] - The fiscal year of the fiscal period. + The fiscal year of the fiscal period. Examples -------- @@ -2915,7 +3230,12 @@ def reported_financials( def revenue_per_geography( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - 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 the geographic breakdown of revenue for a given company over time. @@ -2946,17 +3266,17 @@ def revenue_per_geography( RevenueGeographic ----------------- period_ending : date - The end date of the reporting period. + The end date of the reporting period. fiscal_period : Optional[str] - The fiscal period of the reporting period. + The fiscal period of the reporting period. fiscal_year : Optional[int] - The fiscal year of the reporting period. + The fiscal year of the reporting period. filing_date : Optional[date] - The filing date of the report. + The filing date of the report. region : Optional[str] - The region represented by the revenue data. + The region represented by the revenue data. revenue : Union[int, float] - The total revenue attributed to the region. + The total revenue attributed to the region. Examples -------- @@ -2979,7 +3299,14 @@ def revenue_per_geography( "symbol": symbol, }, extra_params=kwargs, - info={"period": {"fmp": {"multiple_items_allowed": False, "choices": ["quarter", "annual"]}}}, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["quarter", "annual"], + } + } + }, ) ) @@ -2988,7 +3315,12 @@ def revenue_per_geography( def revenue_per_segment( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - 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 the revenue breakdown by business segment for a given company over time. @@ -3019,17 +3351,17 @@ def revenue_per_segment( RevenueBusinessLine ------------------- period_ending : date - The end date of the reporting period. + The end date of the reporting period. fiscal_period : Optional[str] - The fiscal period of the reporting period. + The fiscal period of the reporting period. fiscal_year : Optional[int] - The fiscal year of the reporting period. + The fiscal year of the reporting period. filing_date : Optional[date] - The filing date of the report. + The filing date of the report. business_line : Optional[str] - The business line represented by the revenue data. + The business line represented by the revenue data. revenue : Union[int, float] - The total revenue attributed to the business line. + The total revenue attributed to the business line. Examples -------- @@ -3052,7 +3384,14 @@ def revenue_per_segment( "symbol": symbol, }, extra_params=kwargs, - info={"period": {"fmp": {"multiple_items_allowed": False, "choices": ["quarter", "annual"]}}}, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["quarter", "annual"], + } + } + }, ) ) @@ -3061,8 +3400,16 @@ def revenue_per_segment( def search_attributes( self, query: Annotated[str, OpenBBField(description="Query to search for.")], - limit: Annotated[Optional[int], OpenBBField(description="The number of data entries to return.")] = 1000, - provider: Annotated[Optional[Literal["intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.")] = None, + limit: Annotated[ + Optional[int], + OpenBBField(description="The number of data entries to return."), + ] = 1000, + provider: Annotated[ + Optional[Literal["intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Search Intrinio data tags to search in latest or historical attributes. @@ -3093,27 +3440,27 @@ def search_attributes( SearchAttributes ---------------- id : str - ID of the financial attribute. + ID of the financial attribute. name : str - Name of the financial attribute. + Name of the financial attribute. tag : str - Tag of the financial attribute. + Tag of the financial attribute. statement_code : str - Code of the financial statement. + Code of the financial statement. statement_type : Optional[str] - Type of the financial statement. + Type of the financial statement. parent_name : Optional[str] - Parent's name of the financial attribute. + Parent's name of the financial attribute. sequence : Optional[int] - Sequence of the financial statement. + Sequence of the financial statement. factor : Optional[str] - Unit of the financial attribute. + Unit of the financial attribute. transaction : Optional[str] - Transaction type (credit/debit) of the financial attribute. + Transaction type (credit/debit) of the financial attribute. type : Optional[str] - Type of the financial attribute. + Type of the financial attribute. unit : Optional[str] - Unit of the financial attribute. + Unit of the financial attribute. Examples -------- @@ -3144,8 +3491,18 @@ def search_attributes( def trailing_dividend_yield( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - limit: Annotated[Optional[int], OpenBBField(description="The number of data entries to return. Default is 252, the number of trading days in a year.")] = 252, - provider: Annotated[Optional[Literal["tiingo"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: tiingo.")] = None, + limit: Annotated[ + Optional[int], + OpenBBField( + description="The number of data entries to return. Default is 252, the number of trading days in a year." + ), + ] = 252, + provider: Annotated[ + Optional[Literal["tiingo"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: tiingo." + ), + ] = None, **kwargs ) -> OBBject: """Get the 1 year trailing dividend yield for a given company over time. @@ -3176,9 +3533,9 @@ def trailing_dividend_yield( TrailingDividendYield --------------------- date : date - The date of the data. + The date of the data. trailing_dividend_yield : float - Trailing dividend yield. + Trailing dividend yield. Examples -------- @@ -3209,9 +3566,24 @@ def trailing_dividend_yield( @validate def transcript( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp.")], - year: Annotated[Union[int, str, List[Union[int, str]]], OpenBBField(description="Year of the earnings call transcript. Multiple comma separated items allowed for provider(s): fmp.")], - 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, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp." + ), + ], + year: Annotated[ + Union[int, str, List[Union[int, str]]], + OpenBBField( + description="Year of the earnings call transcript. Multiple comma separated items allowed for provider(s): fmp." + ), + ], + 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 earnings call transcripts for a given company. @@ -3242,15 +3614,15 @@ def transcript( EarningsCallTranscript ---------------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. quarter : int - Quarter of the earnings call transcript. + Quarter of the earnings call transcript. year : int - Year of the earnings call transcript. + Year of the earnings call transcript. date : datetime - The date of the data. + The date of the data. content : str - Content of the earnings call transcript. + Content of the earnings call transcript. Examples -------- @@ -3273,6 +3645,11 @@ def transcript( "year": year, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}}, "year": {"fmp": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None} + }, + "year": {"fmp": {"multiple_items_allowed": True, "choices": None}}, + }, ) ) diff --git a/openbb_platform/openbb/package/equity_ownership.py b/openbb_platform/openbb/package/equity_ownership.py index a668ec2b8c70..3d51a73e1e76 100644 --- a/openbb_platform/openbb/package/equity_ownership.py +++ b/openbb_platform/openbb/package/equity_ownership.py @@ -27,10 +27,30 @@ def __repr__(self) -> str: @validate def form_13f( self, - symbol: Annotated[str, OpenBBField(description="Symbol to get data for. A CIK or Symbol can be used.")], - date: Annotated[Union[datetime.date, None, str], OpenBBField(description="A specific date to get data for. The date represents the end of the reporting period. All form 13F-HR filings are based on the calendar year and are reported quarterly. If a date is not supplied, the most recent filing is returned. Submissions beginning 2013-06-30 are supported.")] = None, - limit: Annotated[Optional[int], OpenBBField(description="The number of data entries to return. The number of previous filings to return. The date parameter takes priority over this parameter.")] = 1, - provider: Annotated[Optional[Literal["sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.")] = None, + symbol: Annotated[ + str, + OpenBBField( + description="Symbol to get data for. A CIK or Symbol can be used." + ), + ], + date: Annotated[ + Union[datetime.date, None, str], + OpenBBField( + description="A specific date to get data for. The date represents the end of the reporting period. All form 13F-HR filings are based on the calendar year and are reported quarterly. If a date is not supplied, the most recent filing is returned. Submissions beginning 2013-06-30 are supported." + ), + ] = None, + limit: Annotated[ + Optional[int], + OpenBBField( + description="The number of data entries to return. The number of previous filings to return. The date parameter takes priority over this parameter." + ), + ] = 1, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, **kwargs ) -> OBBject: """Get the form 13F. @@ -41,7 +61,7 @@ def form_13f( Managers are required to file Form 13F within 45 days after the last day of the calendar quarter. Most funds wait until the end of this period in order to conceal their investment strategy from competitors and the public. - + Parameters ---------- @@ -71,27 +91,27 @@ def form_13f( Form13FHR --------- period_ending : date - The end-of-quarter date of the filing. + The end-of-quarter date of the filing. issuer : str - The name of the issuer. + The name of the issuer. cusip : str - The CUSIP of the security. + The CUSIP of the security. asset_class : str - The title of the asset class for the security. + The title of the asset class for the security. security_type : Optional[Literal['SH', 'PRN']] - The total number of shares of the class of security or the principal amount of such class. 'SH' for shares. 'PRN' for principal amount. Convertible debt securities are reported as 'PRN'. + The total number of shares of the class of security or the principal amount of such class. 'SH' for shares. 'PRN' for principal amount. Convertible debt securities are reported as 'PRN'. option_type : Optional[Literal['call', 'put']] - Defined when the holdings being reported are put or call options. Only long positions are reported. + Defined when the holdings being reported are put or call options. Only long positions are reported. voting_authority_sole : Optional[int] - The number of shares for which the Manager exercises sole voting authority (none). + The number of shares for which the Manager exercises sole voting authority (none). voting_authority_shared : Optional[int] - The number of shares for which the Manager exercises a defined shared voting authority (none). + The number of shares for which the Manager exercises a defined shared voting authority (none). voting_authority_other : Optional[int] - The number of shares for which the Manager exercises other shared voting authority (none). + The number of shares for which the Manager exercises other shared voting authority (none). principal_amount : int - The total number of shares of the class of security or the principal amount of such class. Only long positions are reported + The total number of shares of the class of security or the principal amount of such class. Only long positions are reported value : int - The fair market value of the holding of the particular class of security. The value reported for options is the fair market value of the underlying security with respect to the number of shares controlled. Values are rounded to the nearest US dollar and use the closing price of the last trading day of the calendar year or quarter. + The fair market value of the holding of the particular class of security. The value reported for options is the fair market value of the underlying security with respect to the number of shares controlled. Values are rounded to the nearest US dollar and use the closing price of the last trading day of the calendar year or quarter. weight : Optional[float] The weight of the security relative to the market value of all securities in the filing , as a normalized percent. (provider: sec) @@ -131,8 +151,15 @@ def form_13f( def insider_trading( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - limit: Annotated[int, OpenBBField(description="The number of data entries to return.")] = 500, - provider: Annotated[Optional[Literal["fmp", "intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.")] = None, + limit: Annotated[ + int, OpenBBField(description="The number of data entries to return.") + ] = 500, + provider: Annotated[ + Optional[Literal["fmp", "intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Get data about trading by a company's management team and board of directors. @@ -173,33 +200,33 @@ def insider_trading( InsiderTrading -------------- symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. company_cik : Optional[Union[int, str]] - CIK number of the company. + CIK number of the company. filing_date : Optional[Union[date, datetime]] - Filing date of the trade. + Filing date of the trade. transaction_date : Optional[date] - Date of the transaction. + Date of the transaction. owner_cik : Optional[Union[int, str]] - Reporting individual's CIK. + Reporting individual's CIK. owner_name : Optional[str] - Name of the reporting individual. + Name of the reporting individual. owner_title : Optional[str] - The title held by the reporting individual. + The title held by the reporting individual. transaction_type : Optional[str] - Type of transaction being reported. + Type of transaction being reported. acquisition_or_disposition : Optional[str] - Acquisition or disposition of the shares. + Acquisition or disposition of the shares. security_type : Optional[str] - The type of security transacted. + The type of security transacted. securities_owned : Optional[float] - Number of securities owned by the reporting individual. + Number of securities owned by the reporting individual. securities_transacted : Optional[float] - Number of securities transacted by the reporting individual. + Number of securities transacted by the reporting individual. transaction_price : Optional[float] - The price of the transaction. + The price of the transaction. filing_url : Optional[str] - Link to the filing. + Link to the filing. form_type : Optional[str] Form type of the insider trading. (provider: fmp) company_name : Optional[str] @@ -253,7 +280,33 @@ def insider_trading( "limit": limit, }, extra_params=kwargs, - info={"transaction_type": {"fmp": {"multiple_items_allowed": False, "choices": ["award", "conversion", "return", "expire_short", "in_kind", "gift", "expire_long", "discretionary", "other", "small", "exempt", "otm", "purchase", "sale", "tender", "will", "itm", "trust"]}}}, + info={ + "transaction_type": { + "fmp": { + "multiple_items_allowed": False, + "choices": [ + "award", + "conversion", + "return", + "expire_short", + "in_kind", + "gift", + "expire_long", + "discretionary", + "other", + "small", + "exempt", + "otm", + "purchase", + "sale", + "tender", + "will", + "itm", + "trust", + ], + } + } + }, ) ) @@ -262,7 +315,12 @@ def insider_trading( def institutional( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - 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 data about institutional ownership for a given company over time. @@ -295,11 +353,11 @@ def institutional( InstitutionalOwnership ---------------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. cik : Optional[str] - Central Index Key (CIK) for the requested entity. + Central Index Key (CIK) for the requested entity. date : date - The date of the data. + The date of the data. investors_holding : Optional[int] Number of investors holding the stock. (provider: fmp) last_investors_holding : Optional[int] @@ -395,9 +453,19 @@ def institutional( def major_holders( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - date: Annotated[Union[datetime.date, None, str], OpenBBField(description="A specific date to get data for.")] = None, - page: Annotated[Optional[int], OpenBBField(description="Page number of the data to fetch.")] = 0, - 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, + date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="A specific date to get data for."), + ] = None, + page: Annotated[ + Optional[int], OpenBBField(description="Page number of the data to fetch.") + ] = 0, + 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 data about major holders for a given company over time. @@ -430,83 +498,83 @@ def major_holders( EquityOwnership --------------- date : date - The date of the data. + The date of the data. cik : int - Central Index Key (CIK) for the requested entity. + Central Index Key (CIK) for the requested entity. filing_date : date - Filing date of the stock ownership. + Filing date of the stock ownership. investor_name : str - Investor name of the stock ownership. + Investor name of the stock ownership. symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. security_name : str - Security name of the stock ownership. + Security name of the stock ownership. type_of_security : str - Type of security of the stock ownership. + Type of security of the stock ownership. security_cusip : str - Security cusip of the stock ownership. + Security cusip of the stock ownership. shares_type : str - Shares type of the stock ownership. + Shares type of the stock ownership. put_call_share : str - Put call share of the stock ownership. + Put call share of the stock ownership. investment_discretion : str - Investment discretion of the stock ownership. + Investment discretion of the stock ownership. industry_title : str - Industry title of the stock ownership. + Industry title of the stock ownership. weight : float - Weight of the stock ownership. + Weight of the stock ownership. last_weight : float - Last weight of the stock ownership. + Last weight of the stock ownership. change_in_weight : float - Change in weight of the stock ownership. + Change in weight of the stock ownership. change_in_weight_percentage : float - Change in weight percentage of the stock ownership. + Change in weight percentage of the stock ownership. market_value : int - Market value of the stock ownership. + Market value of the stock ownership. last_market_value : int - Last market value of the stock ownership. + Last market value of the stock ownership. change_in_market_value : int - Change in market value of the stock ownership. + Change in market value of the stock ownership. change_in_market_value_percentage : float - Change in market value percentage of the stock ownership. + Change in market value percentage of the stock ownership. shares_number : int - Shares number of the stock ownership. + Shares number of the stock ownership. last_shares_number : int - Last shares number of the stock ownership. + Last shares number of the stock ownership. change_in_shares_number : float - Change in shares number of the stock ownership. + Change in shares number of the stock ownership. change_in_shares_number_percentage : float - Change in shares number percentage of the stock ownership. + Change in shares number percentage of the stock ownership. quarter_end_price : float - Quarter end price of the stock ownership. + Quarter end price of the stock ownership. avg_price_paid : float - Average price paid of the stock ownership. + Average price paid of the stock ownership. is_new : bool - Is the stock ownership new. + Is the stock ownership new. is_sold_out : bool - Is the stock ownership sold out. + Is the stock ownership sold out. ownership : float - How much is the ownership. + How much is the ownership. last_ownership : float - Last ownership amount. + Last ownership amount. change_in_ownership : float - Change in ownership amount. + Change in ownership amount. change_in_ownership_percentage : float - Change in ownership percentage. + Change in ownership percentage. holding_period : int - Holding period of the stock ownership. + Holding period of the stock ownership. first_added : date - First added date of the stock ownership. + First added date of the stock ownership. performance : float - Performance of the stock ownership. + Performance of the stock ownership. performance_percentage : float - Performance percentage of the stock ownership. + Performance percentage of the stock ownership. last_performance : float - Last performance of the stock ownership. + Last performance of the stock ownership. change_in_performance : float - Change in performance of the stock ownership. + Change in performance of the stock ownership. is_counted_for_performance : bool - Is the stock ownership counted for performance. + Is the stock ownership counted for performance. Examples -------- @@ -538,8 +606,18 @@ def major_holders( @validate def share_statistics( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): yfinance.")], - provider: Annotated[Optional[Literal["fmp", "intrinio", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): yfinance." + ), + ], + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get data about share float for a given company. @@ -568,17 +646,17 @@ def share_statistics( ShareStatistics --------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. date : Optional[date] - The date of the data. + The date of the data. free_float : Optional[float] - Percentage of unrestricted shares of a publicly-traded company. + Percentage of unrestricted shares of a publicly-traded company. float_shares : Optional[float] - Number of shares available for trading by the general public. + Number of shares available for trading by the general public. outstanding_shares : Optional[float] - Total number of shares of a publicly-traded company. + Total number of shares of a publicly-traded company. source : Optional[str] - Source of the received data. + Source of the received data. adjusted_outstanding_shares : Optional[float] Total number of shares of a publicly-traded company, adjusted for splits. (provider: intrinio) public_float : Optional[float] @@ -624,6 +702,10 @@ def share_statistics( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"yfinance": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "yfinance": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) diff --git a/openbb_platform/openbb/package/equity_price.py b/openbb_platform/openbb/package/equity_price.py index 4a0311b775e2..de0ad1feb12d 100644 --- a/openbb_platform/openbb/package/equity_price.py +++ b/openbb_platform/openbb/package/equity_price.py @@ -26,10 +26,26 @@ def __repr__(self) -> str: @validate def historical( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance.")], - 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", "intrinio", "polygon", "tiingo", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, tiingo, yfinance.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance." + ), + ], + 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", "intrinio", "polygon", "tiingo", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, tiingo, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get historical price data for a given stock. This includes open, high, low, close, and volume. @@ -82,19 +98,19 @@ def historical( EquityHistorical ---------------- date : Union[date, datetime] - The date of the data. + The date of the data. open : float - The open price. + The open price. high : float - The high price. + The high price. low : float - The low price. + The low price. close : float - The close price. + The close price. volume : Optional[Union[int, float]] - The trading volume. + The trading volume. vwap : Optional[float] - Volume Weighted Average Price over the period. + Volume Weighted Average Price over the period. adj_close : Optional[float] The adjusted close price. (provider: fmp, intrinio, tiingo) unadjusted_volume : Optional[float] @@ -157,7 +173,59 @@ def historical( "end_date": end_date, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "polygon": {"multiple_items_allowed": True, "choices": None}, "tiingo": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}}, "interval": {"fmp": {"multiple_items_allowed": False, "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, "intrinio": {"multiple_items_allowed": False, "choices": ["1m", "5m", "10m", "15m", "30m", "60m", "1h", "1d", "1W", "1M", "1Q", "1Y"]}, "tiingo": {"multiple_items_allowed": False, "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, "yfinance": {"multiple_items_allowed": False, "choices": ["1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1W", "1M", "1Q"]}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "tiingo": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + }, + "interval": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "intrinio": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "5m", + "10m", + "15m", + "30m", + "60m", + "1h", + "1d", + "1W", + "1M", + "1Q", + "1Y", + ], + }, + "tiingo": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ], + }, + }, + }, ) ) @@ -166,7 +234,12 @@ def historical( def nbbo( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - provider: Annotated[Optional[Literal["polygon"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: polygon.")] = None, + provider: Annotated[ + Optional[Literal["polygon"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: polygon." + ), + ] = None, **kwargs ) -> OBBject: """Get the National Best Bid and Offer for a given stock. @@ -207,21 +280,21 @@ def nbbo( EquityNBBO ---------- ask_exchange : str - The exchange ID for the ask. + The exchange ID for the ask. ask : float - The last ask price. + The last ask price. ask_size : int - + The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price. - + bid_size : int - The bid size in round lots. + The bid size in round lots. bid : float - The last bid price. + The last bid price. bid_exchange : str - The exchange ID for the bid. + The exchange ID for the bid. tape : Optional[str] The exchange tape. (provider: polygon) conditions : Optional[Union[str, List[int], List[str]]] @@ -264,8 +337,18 @@ def nbbo( @validate def performance( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp.")], - 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, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp." + ), + ], + 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 price performance data for a given stock. This includes price changes for different time periods. @@ -294,39 +377,39 @@ def performance( PricePerformance ---------------- symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. one_day : Optional[float] - One-day return. + One-day return. wtd : Optional[float] - Week to date return. + Week to date return. one_week : Optional[float] - One-week return. + One-week return. mtd : Optional[float] - Month to date return. + Month to date return. one_month : Optional[float] - One-month return. + One-month return. qtd : Optional[float] - Quarter to date return. + Quarter to date return. three_month : Optional[float] - Three-month return. + Three-month return. six_month : Optional[float] - Six-month return. + Six-month return. ytd : Optional[float] - Year to date return. + Year to date return. one_year : Optional[float] - One-year return. + One-year return. two_year : Optional[float] - Two-year return. + Two-year return. three_year : Optional[float] - Three-year return. + Three-year return. four_year : Optional[float] - Four-year + Four-year five_year : Optional[float] - Five-year return. + Five-year return. ten_year : Optional[float] - Ten-year return. + Ten-year return. max : Optional[float] - Return from the beginning of the time series. + Return from the beginning of the time series. Examples -------- @@ -348,7 +431,9 @@ def performance( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -356,8 +441,18 @@ def performance( @validate def quote( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance.")], - provider: Annotated[Optional[Literal["fmp", "intrinio", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance." + ), + ], + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Get the latest quote for a given stock. Quote includes price, volume, and other data. @@ -388,71 +483,71 @@ def quote( EquityQuote ----------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. asset_type : Optional[str] - Type of asset - i.e, stock, ETF, etc. + Type of asset - i.e, stock, ETF, etc. name : Optional[str] - Name of the company or asset. + Name of the company or asset. exchange : Optional[str] - The name or symbol of the venue where the data is from. + The name or symbol of the venue where the data is from. bid : Optional[float] - Price of the top bid order. + Price of the top bid order. bid_size : Optional[int] - This represents the number of round lot orders at the given price. The normal round lot size is 100 shares. A size of 2 means there are 200 shares available at the given price. + This represents the number of round lot orders at the given price. The normal round lot size is 100 shares. A size of 2 means there are 200 shares available at the given price. bid_exchange : Optional[str] - The specific trading venue where the purchase order was placed. + The specific trading venue where the purchase order was placed. ask : Optional[float] - Price of the top ask order. + Price of the top ask order. ask_size : Optional[int] - This represents the number of round lot orders at the given price. The normal round lot size is 100 shares. A size of 2 means there are 200 shares available at the given price. + This represents the number of round lot orders at the given price. The normal round lot size is 100 shares. A size of 2 means there are 200 shares available at the given price. ask_exchange : Optional[str] - The specific trading venue where the sale order was placed. + The specific trading venue where the sale order was placed. quote_conditions : Optional[Union[str, int, List[str], List[int]]] - Conditions or condition codes applicable to the quote. + Conditions or condition codes applicable to the quote. quote_indicators : Optional[Union[str, int, List[str], List[int]]] - Indicators or indicator codes applicable to the participant quote related to the price bands for the issue, or the affect the quote has on the NBBO. + Indicators or indicator codes applicable to the participant quote related to the price bands for the issue, or the affect the quote has on the NBBO. sales_conditions : Optional[Union[str, int, List[str], List[int]]] - Conditions or condition codes applicable to the sale. + Conditions or condition codes applicable to the sale. sequence_number : Optional[int] - The sequence number represents the sequence in which message events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11). + The sequence number represents the sequence in which message events happened. These are increasing and unique per ticker symbol, but will not always be sequential (e.g., 1, 2, 6, 9, 10, 11). market_center : Optional[str] - The ID of the UTP participant that originated the message. + The ID of the UTP participant that originated the message. participant_timestamp : Optional[datetime] - Timestamp for when the quote was generated by the exchange. + Timestamp for when the quote was generated by the exchange. trf_timestamp : Optional[datetime] - Timestamp for when the TRF (Trade Reporting Facility) received the message. + Timestamp for when the TRF (Trade Reporting Facility) received the message. sip_timestamp : Optional[datetime] - Timestamp for when the SIP (Security Information Processor) received the message from the exchange. + Timestamp for when the SIP (Security Information Processor) received the message from the exchange. last_price : Optional[float] - Price of the last trade. + Price of the last trade. last_tick : Optional[str] - Whether the last sale was an up or down tick. + Whether the last sale was an up or down tick. last_size : Optional[int] - Size of the last trade. + Size of the last trade. last_timestamp : Optional[datetime] - Date and Time when the last price was recorded. + Date and Time when the last price was recorded. open : Optional[float] - The open price. + The open price. high : Optional[float] - The high price. + The high price. low : Optional[float] - The low price. + The low price. close : Optional[float] - The close price. + The close price. volume : Optional[Union[int, float]] - The trading volume. + The trading volume. exchange_volume : Optional[Union[int, float]] - Volume of shares exchanged during the trading day on the specific exchange. + Volume of shares exchanged during the trading day on the specific exchange. prev_close : Optional[float] - The previous close price. + The previous close price. change : Optional[float] - Change in price from previous close. + Change in price from previous close. change_percent : Optional[float] - Change in price as a normalized percentage. + Change in price as a normalized percentage. year_high : Optional[float] - The one year high (52W High). + The one year high (52W High). year_low : Optional[float] - The one year low (52W Low). + The one year low (52W Low). price_avg50 : Optional[float] 50 day moving average price. (provider: fmp) price_avg200 : Optional[float] @@ -508,6 +603,12 @@ def quote( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "intrinio": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + } + }, ) ) diff --git a/openbb_platform/openbb/package/equity_shorts.py b/openbb_platform/openbb/package/equity_shorts.py index 5c8d16406fb0..60ff1e40d36c 100644 --- a/openbb_platform/openbb/package/equity_shorts.py +++ b/openbb_platform/openbb/package/equity_shorts.py @@ -23,7 +23,12 @@ def __repr__(self) -> str: def fails_to_deliver( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - provider: Annotated[Optional[Literal["sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.")] = None, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, **kwargs ) -> OBBject: """Get reported Fail-to-deliver (FTD) data. @@ -35,12 +40,12 @@ def fails_to_deliver( provider : Optional[Literal['sec']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec. limit : Optional[int] - + Limit the number of reports to parse, from most recent. Approximately 24 reports per year, going back to 2009. (provider: sec) skip_reports : Optional[int] - + Skip N number of reports from current. A value of 1 will skip the most recent report. (provider: sec) use_cache : Optional[bool] @@ -63,17 +68,17 @@ def fails_to_deliver( EquityFTD --------- settlement_date : Optional[date] - The settlement date of the fail. + The settlement date of the fail. symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. cusip : Optional[str] - CUSIP of the Security. + CUSIP of the Security. quantity : Optional[int] - The number of fails on that settlement date. + The number of fails on that settlement date. price : Optional[float] - The price at the previous closing price from the settlement date. + The price at the previous closing price from the settlement date. description : Optional[str] - The description of the Security. + The description of the Security. Examples -------- diff --git a/openbb_platform/openbb/package/etf.py b/openbb_platform/openbb/package/etf.py index 26110a2ee67a..6b8dbfeae0ee 100644 --- a/openbb_platform/openbb/package/etf.py +++ b/openbb_platform/openbb/package/etf.py @@ -31,8 +31,18 @@ def __repr__(self) -> str: @validate def countries( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. (ETF) Multiple comma separated items allowed for provider(s): fmp.")], - 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, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. (ETF) Multiple comma separated items allowed for provider(s): fmp." + ), + ], + 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: """ETF Country weighting. @@ -61,7 +71,7 @@ def countries( EtfCountries ------------ country : str - The country of the exposure. Corresponding values are normalized percentage points. + The country of the exposure. Corresponding values are normalized percentage points. Examples -------- @@ -83,7 +93,9 @@ def countries( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -91,8 +103,18 @@ def countries( @validate def equity_exposure( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. (Stock) Multiple comma separated items allowed for provider(s): fmp.")], - 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, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. (Stock) Multiple comma separated items allowed for provider(s): fmp." + ), + ], + 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 the exposure to ETFs for a specific stock. @@ -121,15 +143,15 @@ def equity_exposure( EtfEquityExposure ----------------- equity_symbol : str - The symbol of the equity requested. + The symbol of the equity requested. etf_symbol : str - The symbol of the ETF with exposure to the requested equity. + The symbol of the ETF with exposure to the requested equity. shares : Optional[float] - The number of shares held in the ETF. + The number of shares held in the ETF. weight : Optional[float] - The weight of the equity in the ETF, as a normalized percent. + The weight of the equity in the ETF, as a normalized percent. market_value : Optional[Union[int, float]] - The market value of the equity position in the ETF. + The market value of the equity position in the ETF. Examples -------- @@ -153,7 +175,9 @@ def equity_exposure( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -161,10 +185,26 @@ def equity_exposure( @validate def historical( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance.")], - 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", "intrinio", "polygon", "tiingo", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, tiingo, yfinance.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance." + ), + ], + 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", "intrinio", "polygon", "tiingo", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, tiingo, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """ETF Historical Market Price. @@ -217,19 +257,19 @@ def historical( EtfHistorical ------------- date : Union[date, datetime] - The date of the data. + The date of the data. open : float - The open price. + The open price. high : float - The high price. + The high price. low : float - The low price. + The low price. close : float - The close price. + The close price. volume : Optional[Union[int, float]] - The trading volume. + The trading volume. vwap : Optional[float] - Volume Weighted Average Price over the period. + Volume Weighted Average Price over the period. adj_close : Optional[float] The adjusted close price. (provider: fmp, intrinio, tiingo) unadjusted_volume : Optional[float] @@ -294,7 +334,59 @@ def historical( "end_date": end_date, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "polygon": {"multiple_items_allowed": True, "choices": None}, "tiingo": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}}, "interval": {"fmp": {"multiple_items_allowed": False, "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, "intrinio": {"multiple_items_allowed": False, "choices": ["1m", "5m", "10m", "15m", "30m", "60m", "1h", "1d", "1W", "1M", "1Q", "1Y"]}, "tiingo": {"multiple_items_allowed": False, "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, "yfinance": {"multiple_items_allowed": False, "choices": ["1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1W", "1M", "1Q"]}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "tiingo": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + }, + "interval": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "intrinio": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "5m", + "10m", + "15m", + "30m", + "60m", + "1h", + "1d", + "1W", + "1M", + "1Q", + "1Y", + ], + }, + "tiingo": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ], + }, + }, + }, ) ) @@ -302,8 +394,15 @@ def historical( @validate def holdings( self, - symbol: Annotated[str, OpenBBField(description="Symbol to get data for. (ETF)")], - provider: Annotated[Optional[Literal["fmp", "intrinio", "sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, sec.")] = None, + symbol: Annotated[ + str, OpenBBField(description="Symbol to get data for. (ETF)") + ], + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, sec." + ), + ] = None, **kwargs ) -> OBBject: """Get the holdings for an individual ETF. @@ -340,9 +439,9 @@ def holdings( EtfHoldings ----------- symbol : Optional[str] - Symbol representing the entity requested in the data. (ETF) + Symbol representing the entity requested in the data. (ETF) name : Optional[str] - Name of the ETF holding. + Name of the ETF holding. lei : Optional[str] The LEI of the holding. (provider: fmp, sec) title : Optional[str] @@ -554,8 +653,15 @@ def holdings( @validate def holdings_date( self, - symbol: Annotated[str, OpenBBField(description="Symbol to get data for. (ETF)")], - 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, + symbol: Annotated[ + str, OpenBBField(description="Symbol to get data for. (ETF)") + ], + 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: """Use this function to get the holdings dates, if available. @@ -586,7 +692,7 @@ def holdings_date( EtfHoldingsDate --------------- date : date - The date of the data. + The date of the data. Examples -------- @@ -615,8 +721,18 @@ def holdings_date( @validate def info( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. (ETF) Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance.")], - provider: Annotated[Optional[Literal["fmp", "intrinio", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. (ETF) Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance." + ), + ], + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """ETF Information Overview. @@ -645,13 +761,13 @@ def info( EtfInfo ------- symbol : str - Symbol representing the entity requested in the data. (ETF) + Symbol representing the entity requested in the data. (ETF) name : Optional[str] - Name of the ETF. + Name of the ETF. description : Optional[str] - Description of the fund. + Description of the fund. inception_date : Optional[str] - Inception date of the ETF. + Inception date of the ETF. issuer : Optional[str] Company of the ETF. (provider: fmp); Issuer of the ETF. (provider: intrinio) @@ -983,7 +1099,13 @@ def info( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "intrinio": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + } + }, ) ) @@ -991,8 +1113,18 @@ def info( @validate def price_performance( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio.")], - provider: Annotated[Optional[Literal["fmp", "intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio." + ), + ], + provider: Annotated[ + Optional[Literal["fmp", "intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Price performance as a return, over different periods. @@ -1025,39 +1157,39 @@ def price_performance( EtfPricePerformance ------------------- symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. one_day : Optional[float] - One-day return. + One-day return. wtd : Optional[float] - Week to date return. + Week to date return. one_week : Optional[float] - One-week return. + One-week return. mtd : Optional[float] - Month to date return. + Month to date return. one_month : Optional[float] - One-month return. + One-month return. qtd : Optional[float] - Quarter to date return. + Quarter to date return. three_month : Optional[float] - Three-month return. + Three-month return. six_month : Optional[float] - Six-month return. + Six-month return. ytd : Optional[float] - Year to date return. + Year to date return. one_year : Optional[float] - One-year return. + One-year return. two_year : Optional[float] - Two-year return. + Two-year return. three_year : Optional[float] - Three-year return. + Three-year return. four_year : Optional[float] - Four-year + Four-year five_year : Optional[float] - Five-year return. + Five-year return. ten_year : Optional[float] - Ten-year return. + Ten-year return. max : Optional[float] - Return from the beginning of the time series. + Return from the beginning of the time series. max_annualized : Optional[float] Annualized rate of return from inception. (provider: intrinio) volatility_one_year : Optional[float] @@ -1110,7 +1242,12 @@ def price_performance( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "intrinio": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + } + }, ) ) @@ -1119,13 +1256,18 @@ def price_performance( def search( self, query: Annotated[Optional[str], OpenBBField(description="Search query.")] = "", - provider: Annotated[Optional[Literal["fmp", "intrinio"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.")] = None, + provider: Annotated[ + Optional[Literal["fmp", "intrinio"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio." + ), + ] = None, **kwargs ) -> OBBject: """Search for ETFs. An empty query returns the full list of ETFs from the provider. - + Parameters ---------- @@ -1156,9 +1298,9 @@ def search( EtfSearch --------- symbol : str - Symbol representing the entity requested in the data.(ETF) + Symbol representing the entity requested in the data.(ETF) name : Optional[str] - Name of the ETF. + Name of the ETF. market_cap : Optional[float] The market cap of the ETF. (provider: fmp) sector : Optional[str] @@ -1223,8 +1365,15 @@ def search( @validate def sectors( self, - symbol: Annotated[str, OpenBBField(description="Symbol to get data for. (ETF)")], - 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, + symbol: Annotated[ + str, OpenBBField(description="Symbol to get data for. (ETF)") + ], + 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: """ETF Sector weighting. @@ -1253,9 +1402,9 @@ def sectors( EtfSectors ---------- sector : str - Sector of exposure. + Sector of exposure. weight : Optional[float] - Exposure of the ETF to the sector in normalized percentage points. + Exposure of the ETF to the sector in normalized percentage points. Examples -------- diff --git a/openbb_platform/openbb/package/fixedincome.py b/openbb_platform/openbb/package/fixedincome.py index b4adbc6a18a4..484ec2f06fc1 100644 --- a/openbb_platform/openbb/package/fixedincome.py +++ b/openbb_platform/openbb/package/fixedincome.py @@ -31,10 +31,26 @@ def __repr__(self) -> str: @validate def bond_indices( 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, - index_type: Annotated[Literal["yield", "yield_to_worst", "total_return", "oas"], OpenBBField(description="The type of series. OAS is the option-adjusted spread. Default is yield.")] = "yield", - 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, + index_type: Annotated[ + Literal["yield", "yield_to_worst", "total_return", "oas"], + OpenBBField( + description="The type of series. OAS is the option-adjusted spread. Default is yield." + ), + ] = "yield", + 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: """Bond Indices. @@ -54,7 +70,7 @@ def bond_indices( index : str The specific index to query. Used in conjunction with 'category' and 'index_type', default is 'yield_curve'. Multiple comma separated items allowed. (provider: fred) frequency : Optional[Literal['a', 'q', 'm', 'w', 'd', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']] - + Frequency aggregation to convert daily data to lower frequency. None = No change a = Annual @@ -73,7 +89,7 @@ def bond_indices( bwem = Biweekly, Ending Monday (provider: fred) aggregation_method : 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, default is 'avg'. avg = Average @@ -81,7 +97,7 @@ def bond_indices( eop = End of Period (provider: fred) transform : Optional[Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']] - + Transformation type None = No transformation chg = Change @@ -111,11 +127,11 @@ def bond_indices( BondIndices ----------- date : 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. value : float - Index values. + Index values. maturity : Optional[str] The maturity range of the bond index. Only applicable when 'index' is 'yield_curve'. (provider: fred) title : Optional[str] @@ -148,7 +164,40 @@ def bond_indices( "index_type": index_type, }, extra_params=kwargs, - info={"index": {"fred": {"multiple_items_allowed": True, "choices": ["a", "aa", "aaa", "asia", "b", "bb", "bbb", "ccc", "corporate", "crossover", "emea", "high_grade", "high_yield", "latam", "liquid_aaa", "liquid_asia", "liquid_bbb", "liquid_corporate", "liquid_emea", "liquid_latam", "non_financial", "private_sector", "public_sector", "seasoned_corporate", "yield_curve"]}}}, + info={ + "index": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "a", + "aa", + "aaa", + "asia", + "b", + "bb", + "bbb", + "ccc", + "corporate", + "crossover", + "emea", + "high_grade", + "high_yield", + "latam", + "liquid_aaa", + "liquid_asia", + "liquid_bbb", + "liquid_corporate", + "liquid_emea", + "liquid_latam", + "non_financial", + "private_sector", + "public_sector", + "seasoned_corporate", + "yield_curve", + ], + } + } + }, ) ) @@ -157,22 +206,37 @@ def corporate(self): # pylint: disable=import-outside-toplevel from . import fixedincome_corporate - return fixedincome_corporate.ROUTER_fixedincome_corporate(command_runner=self._command_runner) + return fixedincome_corporate.ROUTER_fixedincome_corporate( + command_runner=self._command_runner + ) @property def government(self): # pylint: disable=import-outside-toplevel from . import fixedincome_government - return fixedincome_government.ROUTER_fixedincome_government(command_runner=self._command_runner) + return fixedincome_government.ROUTER_fixedincome_government( + command_runner=self._command_runner + ) @exception_handler @validate def mortgage_indices( 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["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, + 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: """Mortgage Indices. @@ -188,7 +252,7 @@ def mortgage_indices( index : Union[Literal['primary', 'ltv_lte_80', 'ltv_gt_80', 'conforming_30y', 'conforming_30y_na', 'jumbo_30y', 'fha_30y', 'va_30y', 'usda_30y', 'conforming_15y', 'ltv_lte80_fico_ge740', 'ltv_lte80_fico_a720b739', 'ltv_lte80_fico_a700b719', 'ltv_lte80_fico_a680b699', 'ltv_lte80_fico_lt680', 'ltv_gt80_fico_ge740', 'ltv_gt80_fico_a720b739', 'ltv_gt80_fico_a700b719', 'ltv_gt80_fico_a680b699', 'ltv_gt80_fico_lt680'], str] The specific index, or index group, to query. Default is the 'primary' group. Multiple comma separated items allowed. (provider: fred) frequency : Optional[Literal['a', 'q', 'm', 'w', 'd', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']] - + Frequency aggregation to convert daily data to lower frequency. None = No change a = Annual @@ -207,7 +271,7 @@ def mortgage_indices( bwem = Biweekly, Ending Monday (provider: fred) aggregation_method : 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, default is 'avg'. avg = Average @@ -215,7 +279,7 @@ def mortgage_indices( eop = End of Period (provider: fred) transform : Optional[Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']] - + Transformation type None = No transformation chg = Change @@ -245,13 +309,13 @@ def mortgage_indices( MortgageIndices --------------- date : 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. name : Optional[str] - Name of the index. + Name of the index. rate : float - Mortgage rate. + Mortgage rate. Examples -------- @@ -277,7 +341,35 @@ def mortgage_indices( "end_date": end_date, }, extra_params=kwargs, - info={"index": {"fred": {"multiple_items_allowed": True, "choices": ["primary", "ltv_lte_80", "ltv_gt_80", "conforming_30y", "conforming_30y_na", "jumbo_30y", "fha_30y", "va_30y", "usda_30y", "conforming_15y", "ltv_lte80_fico_ge740", "ltv_lte80_fico_a720b739", "ltv_lte80_fico_a700b719", "ltv_lte80_fico_a680b699", "ltv_lte80_fico_lt680", "ltv_gt80_fico_ge740", "ltv_gt80_fico_a720b739", "ltv_gt80_fico_a700b719", "ltv_gt80_fico_a680b699", "ltv_gt80_fico_lt680"]}}}, + info={ + "index": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "primary", + "ltv_lte_80", + "ltv_gt_80", + "conforming_30y", + "conforming_30y_na", + "jumbo_30y", + "fha_30y", + "va_30y", + "usda_30y", + "conforming_15y", + "ltv_lte80_fico_ge740", + "ltv_lte80_fico_a720b739", + "ltv_lte80_fico_a700b719", + "ltv_lte80_fico_a680b699", + "ltv_lte80_fico_lt680", + "ltv_gt80_fico_ge740", + "ltv_gt80_fico_a720b739", + "ltv_gt80_fico_a700b719", + "ltv_gt80_fico_a680b699", + "ltv_gt80_fico_lt680", + ], + } + } + }, ) ) @@ -286,7 +378,9 @@ def rate(self): # pylint: disable=import-outside-toplevel from . import fixedincome_rate - return fixedincome_rate.ROUTER_fixedincome_rate(command_runner=self._command_runner) + return fixedincome_rate.ROUTER_fixedincome_rate( + command_runner=self._command_runner + ) @exception_handler @validate @@ -296,16 +390,27 @@ def rate(self): ) def sofr( 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", "fred"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, 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, + provider: Annotated[ + Optional[Literal["federal_reserve", "fred"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred." + ), + ] = None, **kwargs ) -> OBBject: """Secured Overnight Financing Rate. The Secured Overnight Financing Rate (SOFR) is a broad measure of the cost of borrowing cash overnight collateralizing by Treasury securities. - + Parameters ---------- @@ -316,7 +421,7 @@ def sofr( provider : Optional[Literal['federal_reserve', 'fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred. frequency : Optional[Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']] - + Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly @@ -333,14 +438,14 @@ def sofr( bwem = Biweekly, Ending Monday (provider: fred) aggregation_method : Optional[Literal['avg', 'sum', 'eop']] - + A key that indicates the aggregation method used for frequency aggregation. 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 @@ -370,19 +475,19 @@ def sofr( SOFR ---- date : date - The date of the data. + The date of the data. rate : float - Effective federal funds rate. + Effective federal funds rate. percentile_1 : Optional[float] - 1st percentile of the distribution. + 1st percentile of the distribution. percentile_25 : Optional[float] - 25th percentile of the distribution. + 25th percentile of the distribution. percentile_75 : Optional[float] - 75th percentile of the distribution. + 75th percentile of the distribution. percentile_99 : Optional[float] - 99th percentile of the distribution. + 99th percentile of the distribution. volume : Optional[float] - The trading volume.The notional volume of transactions (Billions of $). + The trading volume.The notional volume of transactions (Billions of $). average_30d : Optional[float] 30-Day Average SOFR (provider: fred) average_90d : Optional[float] @@ -399,7 +504,11 @@ def sofr( """ # noqa: E501 simplefilter("always", DeprecationWarning) - warn("This endpoint is deprecated; use `/fixedincome/rate/sofr` instead. Deprecated in OpenBB Platform V4.2 to be removed in V4.5.", category=DeprecationWarning, stacklevel=2) + warn( + "This endpoint is deprecated; use `/fixedincome/rate/sofr` instead. Deprecated in OpenBB Platform V4.2 to be removed in V4.5.", + category=DeprecationWarning, + stacklevel=2, + ) return self._run( "/fixedincome/sofr", @@ -424,4 +533,6 @@ def spreads(self): # pylint: disable=import-outside-toplevel from . import fixedincome_spreads - return fixedincome_spreads.ROUTER_fixedincome_spreads(command_runner=self._command_runner) + return fixedincome_spreads.ROUTER_fixedincome_spreads( + command_runner=self._command_runner + ) diff --git a/openbb_platform/openbb/package/fixedincome_corporate.py b/openbb_platform/openbb/package/fixedincome_corporate.py index cf4948200e13..ffec185f6e6e 100644 --- a/openbb_platform/openbb/package/fixedincome_corporate.py +++ b/openbb_platform/openbb/package/fixedincome_corporate.py @@ -29,9 +29,20 @@ def __repr__(self) -> str: @validate def commercial_paper( 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["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, + 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: """Commercial Paper. @@ -40,7 +51,7 @@ def commercial_paper( Maturities range up to 270 days but average about 30 days. Many companies use CP to raise cash needed for current transactions, and many find it to be a lower-cost alternative to bank loans. - + Parameters ---------- @@ -55,7 +66,7 @@ def commercial_paper( category : Union[str, Literal['all', 'asset_backed', 'financial', 'nonfinancial', 'a2p2']] The category of asset. Multiple comma separated items allowed. (provider: fred) frequency : Optional[Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']] - + Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly @@ -72,14 +83,14 @@ def commercial_paper( bwem = Biweekly, Ending Monday (provider: fred) aggregation_method : Optional[Literal['avg', 'sum', 'eop']] - + A key that indicates the aggregation method used for frequency aggregation. 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 @@ -109,15 +120,15 @@ def commercial_paper( CommercialPaper --------------- date : 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. maturity : str - Maturity length of the item. + Maturity length of the item. rate : float - Interest rate. + Interest rate. title : Optional[str] - Title of the series. + Title of the series. asset_type : Optional[Literal['asset_backed', 'financial', 'nonfinancial', 'a2p2']] The category of asset. (provider: fred) @@ -143,7 +154,34 @@ def commercial_paper( "end_date": end_date, }, extra_params=kwargs, - info={"maturity": {"fred": {"multiple_items_allowed": True, "choices": ["all", "overnight", "7d", "15d", "30d", "60d", "90d"]}}, "category": {"fred": {"multiple_items_allowed": True, "choices": ["all", "asset_backed", "financial", "nonfinancial", "a2p2"]}}}, + info={ + "maturity": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "all", + "overnight", + "7d", + "15d", + "30d", + "60d", + "90d", + ], + } + }, + "category": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "all", + "asset_backed", + "financial", + "nonfinancial", + "a2p2", + ], + } + }, + }, ) ) @@ -151,8 +189,18 @@ def commercial_paper( @validate def hqm( self, - 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, + 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: """High Quality Market Corporate Bond. @@ -161,7 +209,7 @@ def hqm( corporate bonds rated AAA, AA, or A. The HQM curve contains two regression terms. These terms are adjustment factors that blend AAA, AA, and A bonds into a single HQM yield curve that is the market-weighted average (MWA) quality of high quality bonds. - + Parameters ---------- @@ -189,11 +237,11 @@ def hqm( HighQualityMarketCorporateBond ------------------------------ date : date - The date of the data. + The date of the data. rate : float - Interest rate. + Interest rate. maturity : str - Maturity. + Maturity. Examples -------- @@ -216,7 +264,9 @@ def hqm( "date": date, }, extra_params=kwargs, - info={"date": {"fred": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "date": {"fred": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -228,10 +278,24 @@ def hqm( ) def ice_bofa( 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, - index_type: Annotated[Literal["yield", "yield_to_worst", "total_return", "spread"], OpenBBField(description="The type of series.")] = "yield", - 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, + index_type: Annotated[ + Literal["yield", "yield_to_worst", "total_return", "spread"], + OpenBBField(description="The type of series."), + ] = "yield", + 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: """ICE BofA US Corporate Bond Indices. @@ -241,7 +305,7 @@ def ice_bofa( average of Moody’s, S&P and Fitch), at least 18 months to final maturity at the time of issuance, at least one year remaining term to final maturity as of the rebalance date, a fixed coupon schedule and a minimum amount outstanding of $250 million. The ICE BofA US Corporate Index is a component of the US Corporate Master Index. - + Parameters ---------- @@ -279,9 +343,9 @@ def ice_bofa( ICEBofA ------- date : date - The date of the data. + The date of the data. rate : Optional[float] - ICE BofA US Corporate Bond Indices Rate. + ICE BofA US Corporate Bond Indices Rate. Examples -------- @@ -291,7 +355,11 @@ def ice_bofa( """ # noqa: E501 simplefilter("always", DeprecationWarning) - warn("This endpoint is deprecated; use `/fixedincome/bond_indices` instead. Deprecated in OpenBB Platform V4.2 to be removed in V4.5.", category=DeprecationWarning, stacklevel=2) + warn( + "This endpoint is deprecated; use `/fixedincome/bond_indices` instead. Deprecated in OpenBB Platform V4.2 to be removed in V4.5.", + category=DeprecationWarning, + stacklevel=2, + ) return self._run( "/fixedincome/corporate/ice_bofa", @@ -320,10 +388,23 @@ def ice_bofa( ) def moody( 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, - index_type: Annotated[Literal["aaa", "baa"], OpenBBField(description="The type of series.")] = "aaa", - 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, + index_type: Annotated[ + Literal["aaa", "baa"], OpenBBField(description="The type of series.") + ] = "aaa", + 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: """Moody Corporate Bond Index. @@ -332,7 +413,7 @@ def moody( the performance of all bonds given an Aaa or Baa rating by Moody's Investors Service respectively. These corporate bonds often are used in macroeconomics as an alternative to the federal ten-year Treasury Bill as an indicator of the interest rate. - + Parameters ---------- @@ -364,9 +445,9 @@ def moody( MoodyCorporateBondIndex ----------------------- date : date - The date of the data. + The date of the data. rate : Optional[float] - Moody Corporate Bond Index Rate. + Moody Corporate Bond Index Rate. Examples -------- @@ -376,7 +457,11 @@ def moody( """ # noqa: E501 simplefilter("always", DeprecationWarning) - warn("This endpoint is deprecated; use `/fixedincome/bond_indices` instead. Set `category` to `us` and `index` to `seasoned_corporate`. Deprecated in OpenBB Platform V4.2 to be removed in V4.5.", category=DeprecationWarning, stacklevel=2) + warn( + "This endpoint is deprecated; use `/fixedincome/bond_indices` instead. Set `category` to `us` and `index` to `seasoned_corporate`. Deprecated in OpenBB Platform V4.2 to be removed in V4.5.", + category=DeprecationWarning, + stacklevel=2, + ) return self._run( "/fixedincome/corporate/moody", @@ -401,11 +486,32 @@ def moody( @validate def spot_rates( 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, - maturity: Annotated[Union[float, str, List[Union[float, str]]], OpenBBField(description="Maturities in years. Multiple comma separated items allowed for provider(s): fred.")] = 10.0, - category: Annotated[Union[str, List[str]], OpenBBField(description="Rate category. Options: spot_rate, par_yield. Multiple comma separated items allowed for provider(s): fred.")] = "spot_rate", - 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, + maturity: Annotated[ + Union[float, str, List[Union[float, str]]], + OpenBBField( + description="Maturities in years. Multiple comma separated items allowed for provider(s): fred." + ), + ] = 10.0, + category: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Rate category. Options: spot_rate, par_yield. Multiple comma separated items allowed for provider(s): fred." + ), + ] = "spot_rate", + 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: """Spot Rates. @@ -414,7 +520,7 @@ def spot_rates( This is a zero coupon bond. Because each spot rate pertains to a single cashflow, it is the relevant interest rate concept for discounting a pension liability at the same maturity. - + Parameters ---------- @@ -446,9 +552,9 @@ def spot_rates( SpotRate -------- date : date - The date of the data. + The date of the data. rate : Optional[float] - Spot Rate. + Spot Rate. Examples -------- @@ -474,6 +580,16 @@ def spot_rates( "category": category, }, extra_params=kwargs, - info={"maturity": {"fred": {"multiple_items_allowed": True, "choices": None}}, "category": {"fred": {"multiple_items_allowed": True, "choices": ["par_yield", "spot_rate"]}}}, + info={ + "maturity": { + "fred": {"multiple_items_allowed": True, "choices": None} + }, + "category": { + "fred": { + "multiple_items_allowed": True, + "choices": ["par_yield", "spot_rate"], + } + }, + }, ) ) diff --git a/openbb_platform/openbb/package/fixedincome_government.py b/openbb_platform/openbb/package/fixedincome_government.py index 263db9bf744b..e9c5204b8cfc 100644 --- a/openbb_platform/openbb/package/fixedincome_government.py +++ b/openbb_platform/openbb/package/fixedincome_government.py @@ -28,9 +28,20 @@ def __repr__(self) -> str: @validate def tips_yields( 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["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, + 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 current Treasury inflation-protected securities yields. @@ -98,15 +109,15 @@ def tips_yields( TipsYields ---------- date : 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. due : Optional[date] - The due date (maturation date) of the security. + The due date (maturation date) of the security. name : Optional[str] - The name of the security. + The name of the security. value : Optional[float] - The yield value. + The yield value. Examples -------- @@ -137,9 +148,20 @@ def tips_yields( @validate def treasury_rates( 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", "fmp"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fmp.")] = 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", "fmp"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fmp." + ), + ] = None, **kwargs ) -> OBBject: """Government Treasury Rates. @@ -170,33 +192,33 @@ def treasury_rates( TreasuryRates ------------- date : date - The date of the data. + The date of the data. week_4 : Optional[float] - 4 week Treasury bills rate (secondary market). + 4 week Treasury bills rate (secondary market). month_1 : Optional[float] - 1 month Treasury rate. + 1 month Treasury rate. month_2 : Optional[float] - 2 month Treasury rate. + 2 month Treasury rate. month_3 : Optional[float] - 3 month Treasury rate. + 3 month Treasury rate. month_6 : Optional[float] - 6 month Treasury rate. + 6 month Treasury rate. year_1 : Optional[float] - 1 year Treasury rate. + 1 year Treasury rate. year_2 : Optional[float] - 2 year Treasury rate. + 2 year Treasury rate. year_3 : Optional[float] - 3 year Treasury rate. + 3 year Treasury rate. year_5 : Optional[float] - 5 year Treasury rate. + 5 year Treasury rate. year_7 : Optional[float] - 7 year Treasury rate. + 7 year Treasury rate. year_10 : Optional[float] - 10 year Treasury rate. + 10 year Treasury rate. year_20 : Optional[float] - 20 year Treasury rate. + 20 year Treasury rate. year_30 : Optional[float] - 30 year Treasury rate. + 30 year Treasury rate. Examples -------- @@ -230,9 +252,21 @@ def treasury_rates( ) def us_yield_curve( self, - date: Annotated[Union[datetime.date, None, str], OpenBBField(description="A specific date to get data for. Defaults to the most recent FRED entry.")] = None, - inflation_adjusted: Annotated[Optional[bool], OpenBBField(description="Get inflation adjusted rates.")] = False, - 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[datetime.date, None, str], + OpenBBField( + description="A specific date to get data for. Defaults to the most recent FRED entry." + ), + ] = None, + inflation_adjusted: Annotated[ + Optional[bool], OpenBBField(description="Get inflation adjusted rates.") + ] = False, + 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: """US Yield Curve. Get United States yield curve. @@ -263,9 +297,9 @@ def us_yield_curve( USYieldCurve ------------ maturity : float - Maturity of the treasury rate in years. + Maturity of the treasury rate in years. rate : float - Associated rate given in decimal form (0.05 is 5%) + Associated rate given in decimal form (0.05 is 5%) Examples -------- @@ -275,7 +309,11 @@ def us_yield_curve( """ # noqa: E501 simplefilter("always", DeprecationWarning) - warn("This endpoint will be removed in a future version. Use, `/fixedincome/government/yield_curve`, instead. Deprecated in OpenBB Platform V4.2 to be removed in V4.4.", category=DeprecationWarning, stacklevel=2) + warn( + "This endpoint will be removed in a future version. Use, `/fixedincome/government/yield_curve`, instead. Deprecated in OpenBB Platform V4.2 to be removed in V4.4.", + category=DeprecationWarning, + stacklevel=2, + ) return self._run( "/fixedincome/government/us_yield_curve", @@ -299,8 +337,18 @@ def us_yield_curve( @validate def yield_curve( self, - date: Annotated[Union[str, datetime.date, None, List[Union[str, datetime.date, None]]], OpenBBField(description="A specific date to get data for. By default is the current data. Multiple comma separated items allowed for provider(s): econdb, federal_reserve, fmp, fred.")] = None, - provider: Annotated[Optional[Literal["econdb", "federal_reserve", "fmp", "fred"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, federal_reserve, fmp, fred.")] = None, + date: Annotated[ + Union[str, datetime.date, None, List[Union[str, datetime.date, None]]], + OpenBBField( + description="A specific date to get data for. By default is the current data. Multiple comma separated items allowed for provider(s): econdb, federal_reserve, fmp, fred." + ), + ] = None, + provider: Annotated[ + Optional[Literal["econdb", "federal_reserve", "fmp", "fred"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, federal_reserve, fmp, fred." + ), + ] = None, **kwargs ) -> OBBject: """Get yield curve data by country and date. @@ -335,11 +383,11 @@ def yield_curve( YieldCurve ---------- date : Optional[date] - The date of the data. + The date of the data. maturity : str - Maturity length of the security. + Maturity length of the security. rate : float - The yield as a normalized percent (0.05 is 5%) + The yield as a normalized percent (0.05 is 5%) Examples -------- @@ -364,6 +412,16 @@ def yield_curve( "date": date, }, extra_params=kwargs, - info={"date": {"econdb": {"multiple_items_allowed": True, "choices": None}, "federal_reserve": {"multiple_items_allowed": True, "choices": None}, "fmp": {"multiple_items_allowed": True, "choices": None}, "fred": {"multiple_items_allowed": True, "choices": None}}}, + info={ + "date": { + "econdb": {"multiple_items_allowed": True, "choices": None}, + "federal_reserve": { + "multiple_items_allowed": True, + "choices": None, + }, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "fred": {"multiple_items_allowed": True, "choices": None}, + } + }, ) ) diff --git a/openbb_platform/openbb/package/fixedincome_rate.py b/openbb_platform/openbb/package/fixedincome_rate.py index ae034f122768..83a83ff45c16 100644 --- a/openbb_platform/openbb/package/fixedincome_rate.py +++ b/openbb_platform/openbb/package/fixedincome_rate.py @@ -32,9 +32,20 @@ def __repr__(self) -> str: @validate def ameribor( 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["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, + 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: """AMERIBOR. @@ -42,7 +53,7 @@ def ameribor( AMERIBOR (short for the American interbank offered rate) is a benchmark interest rate that reflects the true cost of short-term interbank borrowing. This rate is based on transactions in overnight unsecured loans conducted on the American Financial Exchange (AFX). - + Parameters ---------- @@ -55,7 +66,7 @@ def ameribor( maturity : Union[Literal['all', 'overnight', 'average_30d', 'average_90d', 'term_30d', 'term_90d'], str] Period of AMERIBOR rate. Multiple comma separated items allowed. (provider: fred) frequency : Optional[Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']] - + Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly @@ -72,14 +83,14 @@ def ameribor( bwem = Biweekly, Ending Monday (provider: fred) aggregation_method : Optional[Literal['avg', 'sum', 'eop']] - + A key that indicates the aggregation method used for frequency aggregation. 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 @@ -109,15 +120,15 @@ def ameribor( Ameribor -------- date : 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. maturity : str - Maturity length of the item. + Maturity length of the item. rate : float - Interest rate. + Interest rate. title : Optional[str] - Title of the series. + Title of the series. Examples -------- @@ -142,7 +153,21 @@ def ameribor( "end_date": end_date, }, extra_params=kwargs, - info={"maturity": {"fred": {"multiple_items_allowed": True, "choices": ["all", "overnight", "average_30d", "average_90d", "term_30d", "term_90d"]}}}, + info={ + "maturity": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "all", + "overnight", + "average_30d", + "average_90d", + "term_30d", + "term_90d", + ], + } + } + }, ) ) @@ -150,9 +175,20 @@ def ameribor( @validate def dpcredit( 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["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, + 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: """Discount Window Primary Credit Rate. @@ -161,7 +197,7 @@ def dpcredit( The rates central banks charge are set to stabilize the economy. In the United States, the Federal Reserve System's Board of Governors set the bank rate, also known as the discount rate. - + Parameters ---------- @@ -191,9 +227,9 @@ def dpcredit( DiscountWindowPrimaryCreditRate ------------------------------- date : date - The date of the data. + The date of the data. rate : Optional[float] - Discount Window Primary Credit Rate. + Discount Window Primary Credit Rate. Examples -------- @@ -224,10 +260,24 @@ def dpcredit( @validate def ecb( 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, - interest_rate_type: Annotated[Literal["deposit", "lending", "refinancing"], OpenBBField(description="The type of interest rate.")] = "lending", - 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, + interest_rate_type: Annotated[ + Literal["deposit", "lending", "refinancing"], + OpenBBField(description="The type of interest rate."), + ] = "lending", + 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: """European Central Bank Interest Rates. @@ -238,7 +288,7 @@ def ecb( the bulk of liquidity to the banking system. - The rate on the deposit facility, which banks may use to make overnight deposits with the Eurosystem. - The rate on the marginal lending facility, which offers overnight credit to banks from the Eurosystem. - + Parameters ---------- @@ -268,9 +318,9 @@ def ecb( EuropeanCentralBankInterestRates -------------------------------- date : date - The date of the data. + The date of the data. rate : Optional[float] - European Central Bank Interest Rate. + European Central Bank Interest Rate. Examples -------- @@ -302,16 +352,27 @@ def ecb( @validate def effr( 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", "fred"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, 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, + provider: Annotated[ + Optional[Literal["federal_reserve", "fred"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred." + ), + ] = None, **kwargs ) -> OBBject: """Fed Funds Rate. Get Effective Federal Funds Rate data. A bank rate is the interest rate a nation's central bank charges to its domestic banks to borrow money. The rates central banks charge are set to stabilize the economy. - + Parameters ---------- @@ -322,7 +383,7 @@ def effr( provider : Optional[Literal['federal_reserve', 'fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred. frequency : Optional[Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']] - + Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly @@ -339,14 +400,14 @@ def effr( bwem = Biweekly, Ending Monday (provider: fred) aggregation_method : Optional[Literal['avg', 'sum', 'eop']] - + A key that indicates the aggregation method used for frequency aggregation. 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 @@ -378,23 +439,23 @@ def effr( FederalFundsRate ---------------- date : date - The date of the data. + The date of the data. rate : float - Effective federal funds rate. + Effective federal funds rate. target_range_upper : Optional[float] - Upper bound of the target range. + Upper bound of the target range. target_range_lower : Optional[float] - Lower bound of the target range. + Lower bound of the target range. percentile_1 : Optional[float] - 1st percentile of the distribution. + 1st percentile of the distribution. percentile_25 : Optional[float] - 25th percentile of the distribution. + 25th percentile of the distribution. percentile_75 : Optional[float] - 75th percentile of the distribution. + 75th percentile of the distribution. percentile_99 : Optional[float] - 99th percentile of the distribution. + 99th percentile of the distribution. volume : Optional[float] - The trading volume.The notional volume of transactions (Billions of $). + The trading volume.The notional volume of transactions (Billions of $). intraday_low : Optional[float] Intraday low. This field is only present for data before 2016. (provider: federal_reserve) intraday_high : Optional[float] @@ -433,7 +494,12 @@ def effr( @validate def effr_forecast( 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: """Fed Funds Rate Projections. @@ -442,7 +508,7 @@ def effr_forecast( projected appropriate target range for the federal funds rate or the projected appropriate target level for the federal funds rate at the end of the specified calendar year or over the longer run. - + Parameters ---------- @@ -468,21 +534,21 @@ def effr_forecast( PROJECTIONS ----------- date : date - The date of the data. + The date of the data. range_high : Optional[float] - High projection of rates. + High projection of rates. central_tendency_high : Optional[float] - Central tendency of high projection of rates. + Central tendency of high projection of rates. median : Optional[float] - Median projection of rates. + Median projection of rates. range_midpoint : Optional[float] - Midpoint projection of rates. + Midpoint projection of rates. central_tendency_midpoint : Optional[float] - Central tendency of midpoint projection of rates. + Central tendency of midpoint projection of rates. range_low : Optional[float] - Low projection of rates. + Low projection of rates. central_tendency_low : Optional[float] - Central tendency of low projection of rates. + Central tendency of low projection of rates. Examples -------- @@ -501,8 +567,7 @@ def effr_forecast( ("fred",), ) }, - standard_params={ - }, + standard_params={}, extra_params=kwargs, ) ) @@ -511,9 +576,20 @@ def effr_forecast( @validate def estr( 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["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, + 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: """Euro Short-Term Rate. @@ -522,7 +598,7 @@ def estr( the euro area. The €STR is published on each TARGET2 business day based on transactions conducted and settled on the previous TARGET2 business day (the reporting date “T”) with a maturity date of T+1 which are deemed to have been executed at arm's length and thus reflect market rates in an unbiased way. - + Parameters ---------- @@ -534,63 +610,63 @@ def estr( The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. frequency : Optional[Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']] Frequency aggregation to convert daily data to lower frequency. - + 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. - + 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) @@ -611,21 +687,21 @@ def estr( EuroShortTermRate ----------------- date : date - The date of the data. + The date of the data. rate : float - Volume-weighted trimmed mean rate. + Volume-weighted trimmed mean rate. percentile_25 : Optional[float] - Rate at 25th percentile of volume. + Rate at 25th percentile of volume. percentile_75 : Optional[float] - Rate at 75th percentile of volume. + Rate at 75th percentile of volume. volume : Optional[float] - The trading volume. (Millions of €EUR). + The trading volume. (Millions of €EUR). transactions : Optional[int] - Number of transactions. + Number of transactions. number_of_banks : Optional[int] - Number of active banks. + Number of active banks. large_bank_share_of_volume : Optional[float] - The percent of volume attributable to the 5 largest active banks. + The percent of volume attributable to the 5 largest active banks. Examples -------- @@ -656,9 +732,20 @@ def estr( @validate def iorb( 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["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, + 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: """Interest on Reserve Balances. @@ -666,7 +753,7 @@ def iorb( Get Interest Rate on Reserve Balances data A bank rate is the interest rate a nation's central bank charges to its domestic banks to borrow money. The rates central banks charge are set to stabilize the economy. In the United States, the Federal Reserve System's Board of Governors set the bank rate, also known as the discount rate. - + Parameters ---------- @@ -694,9 +781,9 @@ def iorb( IORB ---- date : date - The date of the data. + The date of the data. rate : Optional[float] - IORB rate. + IORB rate. Examples -------- @@ -726,9 +813,20 @@ def iorb( @validate def overnight_bank_funding( 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", "fred"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, 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, + provider: Annotated[ + Optional[Literal["federal_reserve", "fred"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred." + ), + ] = None, **kwargs ) -> OBBject: """Overnight Bank Funding. @@ -736,7 +834,7 @@ def overnight_bank_funding( For the United States, the overnight bank funding rate (OBFR) is calculated as a volume-weighted median of overnight federal funds transactions and Eurodollar transactions reported in the FR 2420 Report of Selected Money Market Rates. - + Parameters ---------- @@ -747,7 +845,7 @@ def overnight_bank_funding( provider : Optional[Literal['federal_reserve', 'fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred. frequency : Optional[Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']] - + Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly @@ -764,14 +862,14 @@ def overnight_bank_funding( bwem = Biweekly, Ending Monday (provider: fred) aggregation_method : Optional[Literal['avg', 'sum', 'eop']] - + A key that indicates the aggregation method used for frequency aggregation. 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 @@ -801,19 +899,19 @@ def overnight_bank_funding( OvernightBankFundingRate ------------------------ date : date - The date of the data. + The date of the data. rate : float - Overnight Bank Funding Rate. + Overnight Bank Funding Rate. percentile_1 : Optional[float] - 1st percentile of the distribution. + 1st percentile of the distribution. percentile_25 : Optional[float] - 25th percentile of the distribution. + 25th percentile of the distribution. percentile_75 : Optional[float] - 75th percentile of the distribution. + 75th percentile of the distribution. percentile_99 : Optional[float] - 99th percentile of the distribution. + 99th percentile of the distribution. volume : Optional[float] - The trading volume.The notional volume of transactions (Billions of $). + The trading volume.The notional volume of transactions (Billions of $). revision_indicator : Optional[str] Indicates a revision of the data for that date. (provider: federal_reserve) @@ -845,16 +943,27 @@ def overnight_bank_funding( @validate def sofr( 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", "fred"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, 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, + provider: Annotated[ + Optional[Literal["federal_reserve", "fred"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred." + ), + ] = None, **kwargs ) -> OBBject: """Secured Overnight Financing Rate. The Secured Overnight Financing Rate (SOFR) is a broad measure of the cost of borrowing cash overnight collateralizing by Treasury securities. - + Parameters ---------- @@ -865,7 +974,7 @@ def sofr( provider : Optional[Literal['federal_reserve', 'fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred. frequency : Optional[Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']] - + Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly @@ -882,14 +991,14 @@ def sofr( bwem = Biweekly, Ending Monday (provider: fred) aggregation_method : Optional[Literal['avg', 'sum', 'eop']] - + A key that indicates the aggregation method used for frequency aggregation. 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 @@ -919,19 +1028,19 @@ def sofr( SOFR ---- date : date - The date of the data. + The date of the data. rate : float - Effective federal funds rate. + Effective federal funds rate. percentile_1 : Optional[float] - 1st percentile of the distribution. + 1st percentile of the distribution. percentile_25 : Optional[float] - 25th percentile of the distribution. + 25th percentile of the distribution. percentile_75 : Optional[float] - 75th percentile of the distribution. + 75th percentile of the distribution. percentile_99 : Optional[float] - 99th percentile of the distribution. + 99th percentile of the distribution. volume : Optional[float] - The trading volume.The notional volume of transactions (Billions of $). + The trading volume.The notional volume of transactions (Billions of $). average_30d : Optional[float] 30-Day Average SOFR (provider: fred) average_90d : Optional[float] @@ -969,9 +1078,20 @@ def sofr( @validate def sonia( 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["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, + 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: """Sterling Overnight Index Average. @@ -979,7 +1099,7 @@ def sonia( SONIA (Sterling Overnight Index Average) is an important interest rate benchmark. SONIA is based on actual transactions and reflects the average of the interest rates that banks pay to borrow sterling overnight from other financial institutions and other institutional investors. - + Parameters ---------- @@ -1009,9 +1129,9 @@ def sonia( SONIA ----- date : date - The date of the data. + The date of the data. rate : Optional[float] - SONIA rate. + SONIA rate. Examples -------- diff --git a/openbb_platform/openbb/package/fixedincome_spreads.py b/openbb_platform/openbb/package/fixedincome_spreads.py index ff86c2a66489..85a2afd0e426 100644 --- a/openbb_platform/openbb/package/fixedincome_spreads.py +++ b/openbb_platform/openbb/package/fixedincome_spreads.py @@ -25,10 +25,23 @@ def __repr__(self) -> str: @validate def tcm( 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, - maturity: Annotated[Optional[Literal["3m", "2y"]], OpenBBField(description="The maturity")] = "3m", - 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, + maturity: Annotated[ + Optional[Literal["3m", "2y"]], OpenBBField(description="The maturity") + ] = "3m", + 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: """Treasury Constant Maturity. @@ -37,7 +50,7 @@ def tcm( Constant maturity is the theoretical value of a U.S. Treasury that is based on recent values of auctioned U.S. Treasuries. The value is obtained by the U.S. Treasury on a daily basis through interpolation of the Treasury yield curve which, in turn, is based on closing bid-yields of actively-traded Treasury securities. - + Parameters ---------- @@ -67,9 +80,9 @@ def tcm( TreasuryConstantMaturity ------------------------ date : date - The date of the data. + The date of the data. rate : Optional[float] - TreasuryConstantMaturity Rate. + TreasuryConstantMaturity Rate. Examples -------- @@ -101,10 +114,24 @@ def tcm( @validate def tcm_effr( 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, - maturity: Annotated[Optional[Literal["10y", "5y", "1y", "6m", "3m"]], OpenBBField(description="The maturity")] = "10y", - 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, + maturity: Annotated[ + Optional[Literal["10y", "5y", "1y", "6m", "3m"]], + OpenBBField(description="The maturity"), + ] = "10y", + 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: """Select Treasury Constant Maturity. @@ -113,7 +140,7 @@ def tcm_effr( Constant maturity is the theoretical value of a U.S. Treasury that is based on recent values of auctioned U.S. Treasuries. The value is obtained by the U.S. Treasury on a daily basis through interpolation of the Treasury yield curve which, in turn, is based on closing bid-yields of actively-traded Treasury securities. - + Parameters ---------- @@ -143,9 +170,9 @@ def tcm_effr( SelectedTreasuryConstantMaturity -------------------------------- date : date - The date of the data. + The date of the data. rate : Optional[float] - Selected Treasury Constant Maturity Rate. + Selected Treasury Constant Maturity Rate. Examples -------- @@ -177,10 +204,23 @@ def tcm_effr( @validate def treasury_effr( 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, - maturity: Annotated[Optional[Literal["3m", "6m"]], OpenBBField(description="The maturity")] = "3m", - 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, + maturity: Annotated[ + Optional[Literal["3m", "6m"]], OpenBBField(description="The maturity") + ] = "3m", + 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: """Select Treasury Bill. @@ -190,7 +230,7 @@ def treasury_effr( auctioned U.S. Treasuries. The value is obtained by the U.S. Treasury on a daily basis through interpolation of the Treasury yield curve which, in turn, is based on closing bid-yields of actively-traded Treasury securities. - + Parameters ---------- @@ -220,9 +260,9 @@ def treasury_effr( SelectedTreasuryBill -------------------- date : date - The date of the data. + The date of the data. rate : Optional[float] - SelectedTreasuryBill Rate. + SelectedTreasuryBill Rate. Examples -------- diff --git a/openbb_platform/openbb/package/index.py b/openbb_platform/openbb/package/index.py index 26b770421b36..d2f99f2cdd11 100644 --- a/openbb_platform/openbb/package/index.py +++ b/openbb_platform/openbb/package/index.py @@ -24,7 +24,12 @@ def __repr__(self) -> str: @validate def available( self, - provider: Annotated[Optional[Literal["fmp", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, yfinance.")] = None, + provider: Annotated[ + Optional[Literal["fmp", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """All indices available from a given provider. @@ -51,9 +56,9 @@ def available( AvailableIndices ---------------- name : Optional[str] - Name of the index. + Name of the index. currency : Optional[str] - Currency the index is traded in. + Currency the index is traded in. stock_exchange : Optional[str] Stock exchange where the index is listed. (provider: fmp) exchange_short_name : Optional[str] @@ -80,8 +85,7 @@ def available( ("fmp", "yfinance"), ) }, - standard_params={ - }, + standard_params={}, extra_params=kwargs, ) ) @@ -91,7 +95,12 @@ def available( def constituents( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - 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 Index Constituents. @@ -120,9 +129,9 @@ def constituents( IndexConstituents ----------------- symbol : str - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. name : Optional[str] - Name of the constituent company in the index. + Name of the constituent company in the index. sector : Optional[str] Sector the constituent company in the index belongs to. (provider: fmp) sub_sector : Optional[str] diff --git a/openbb_platform/openbb/package/index_price.py b/openbb_platform/openbb/package/index_price.py index 1dc0f1052dc1..00106a55368a 100644 --- a/openbb_platform/openbb/package/index_price.py +++ b/openbb_platform/openbb/package/index_price.py @@ -23,10 +23,26 @@ def __repr__(self) -> str: @validate def historical( self, - symbol: Annotated[Union[str, List[str]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, polygon, yfinance.")], - 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", "intrinio", "polygon", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance.")] = None, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, polygon, yfinance." + ), + ], + 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", "intrinio", "polygon", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Historical Index Levels. @@ -65,17 +81,17 @@ def historical( IndexHistorical --------------- date : Union[date, datetime] - The date of the data. + The date of the data. open : Optional[Annotated[float, Strict(strict=True)]] - The open price. + The open price. high : Optional[Annotated[float, Strict(strict=True)]] - The high price. + The high price. low : Optional[Annotated[float, Strict(strict=True)]] - The low price. + The low price. close : Optional[Annotated[float, Strict(strict=True)]] - The close price. + The close price. volume : Optional[int] - The trading volume. + The trading volume. vwap : Optional[float] Volume Weighted Average Price over the period. (provider: fmp) change : Optional[float] @@ -109,6 +125,37 @@ def historical( "end_date": end_date, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}, "intrinio": {"multiple_items_allowed": True, "choices": None}, "polygon": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}}, "interval": {"fmp": {"multiple_items_allowed": False, "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, "yfinance": {"multiple_items_allowed": False, "choices": ["1m", "2m", "5m", "15m", "30m", "60m", "90m", "1h", "1d", "5d", "1W", "1M", "1Q"]}}}, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + }, + "interval": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ], + }, + }, + }, ) ) diff --git a/openbb_platform/openbb/package/news.py b/openbb_platform/openbb/package/news.py index aac9dba06847..cfc65f924683 100644 --- a/openbb_platform/openbb/package/news.py +++ b/openbb_platform/openbb/package/news.py @@ -25,11 +25,32 @@ def __repr__(self) -> str: @validate def company( self, - symbol: Annotated[Union[str, None, List[Optional[str]]], OpenBBField(description="Symbol to get data for. Multiple comma separated items allowed for provider(s): benzinga, fmp, intrinio, polygon, tiingo, yfinance.")] = 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[Annotated[int, Ge(ge=0)]], OpenBBField(description="The number of data entries to return.")] = 2500, - provider: Annotated[Optional[Literal["benzinga", "fmp", "intrinio", "polygon", "tiingo", "yfinance"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp, intrinio, polygon, tiingo, yfinance.")] = None, + symbol: Annotated[ + Union[str, None, List[Optional[str]]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): benzinga, fmp, intrinio, polygon, tiingo, yfinance." + ), + ] = 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[Annotated[int, Ge(ge=0)]], + OpenBBField(description="The number of data entries to return."), + ] = 2500, + provider: Annotated[ + Optional[ + Literal["benzinga", "fmp", "intrinio", "polygon", "tiingo", "yfinance"] + ], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp, intrinio, polygon, tiingo, yfinance." + ), + ] = None, **kwargs ) -> OBBject: """Company News. Get news for one or more companies. @@ -112,17 +133,17 @@ def company( CompanyNews ----------- date : datetime - The date of the data. Here it is the published date of the article. + The date of the data. Here it is the published date of the article. title : str - Title of the article. + Title of the article. text : Optional[str] - Text/body of the article. + Text/body of the article. images : Optional[List[Dict[str, str]]] - Images associated with the article. + Images associated with the article. url : str - URL to the article. + URL to the article. symbols : Optional[str] - Symbols associated with the article. + Symbols associated with the article. id : Optional[str] Article ID. (provider: benzinga, intrinio, polygon) author : Optional[str] @@ -150,7 +171,7 @@ def company( word_count : Optional[int] The word count of the news article. (provider: intrinio) business_relevance : Optional[float] - How strongly correlated the news article is to the business (provider: intrinio) + How strongly correlated the news article is to the business (provider: intrinio) sentiment : Optional[str] The sentiment of the news article - i.e, negative, positive. (provider: intrinio) sentiment_confidence : Optional[float] @@ -194,7 +215,14 @@ def company( "provider": self._get_provider( provider, "news.company", - ("benzinga", "fmp", "intrinio", "polygon", "tiingo", "yfinance"), + ( + "benzinga", + "fmp", + "intrinio", + "polygon", + "tiingo", + "yfinance", + ), ) }, standard_params={ @@ -204,7 +232,39 @@ def company( "limit": limit, }, extra_params=kwargs, - info={"symbol": {"benzinga": {"multiple_items_allowed": True, "choices": None}, "fmp": {"multiple_items_allowed": True, "choices": None}, "intrinio": {"multiple_items_allowed": True, "choices": None}, "polygon": {"multiple_items_allowed": True, "choices": None}, "tiingo": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}}, "order": {"polygon": {"multiple_items_allowed": False, "choices": ["asc", "desc"]}}, "source": {"intrinio": {"multiple_items_allowed": False, "choices": ["yahoo", "moody", "moody_us_news", "moody_us_press_releases"]}}, "sentiment": {"intrinio": {"multiple_items_allowed": False, "choices": ["positive", "neutral", "negative"]}}}, + info={ + "symbol": { + "benzinga": {"multiple_items_allowed": True, "choices": None}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "tiingo": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + }, + "order": { + "polygon": { + "multiple_items_allowed": False, + "choices": ["asc", "desc"], + } + }, + "source": { + "intrinio": { + "multiple_items_allowed": False, + "choices": [ + "yahoo", + "moody", + "moody_us_news", + "moody_us_press_releases", + ], + } + }, + "sentiment": { + "intrinio": { + "multiple_items_allowed": False, + "choices": ["positive", "neutral", "negative"], + } + }, + }, ) ) @@ -212,10 +272,26 @@ def company( @validate def world( self, - limit: Annotated[int, OpenBBField(description="The number of data entries to return. The number of articles to return.")] = 2500, - 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["benzinga", "fmp", "intrinio", "tiingo"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp, intrinio, tiingo.")] = None, + limit: Annotated[ + int, + OpenBBField( + description="The number of data entries to return. The number of articles to return." + ), + ] = 2500, + 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["benzinga", "fmp", "intrinio", "tiingo"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp, intrinio, tiingo." + ), + ] = None, **kwargs ) -> OBBject: """World News. Global news data. @@ -293,15 +369,15 @@ def world( WorldNews --------- date : datetime - The date of the data. The published date of the article. + The date of the data. The published date of the article. title : str - Title of the article. + Title of the article. images : Optional[List[Dict[str, str]]] - Images associated with the article. + Images associated with the article. text : Optional[str] - Text/body of the article. + Text/body of the article. url : Optional[str] - URL to the article. + URL to the article. id : Optional[str] Article ID. (provider: benzinga, intrinio) author : Optional[str] @@ -327,7 +403,7 @@ def world( word_count : Optional[int] The word count of the news article. (provider: intrinio) business_relevance : Optional[float] - How strongly correlated the news article is to the business (provider: intrinio) + How strongly correlated the news article is to the business (provider: intrinio) sentiment : Optional[str] The sentiment of the news article - i.e, negative, positive. (provider: intrinio) sentiment_confidence : Optional[float] diff --git a/openbb_platform/openbb/package/regulators.py b/openbb_platform/openbb/package/regulators.py index 0bca3efe9c6f..f309425d2784 100644 --- a/openbb_platform/openbb/package/regulators.py +++ b/openbb_platform/openbb/package/regulators.py @@ -18,7 +18,9 @@ def cftc(self): # pylint: disable=import-outside-toplevel from . import regulators_cftc - return regulators_cftc.ROUTER_regulators_cftc(command_runner=self._command_runner) + return regulators_cftc.ROUTER_regulators_cftc( + command_runner=self._command_runner + ) @property def sec(self): diff --git a/openbb_platform/openbb/package/regulators_cftc.py b/openbb_platform/openbb/package/regulators_cftc.py index 1f8e4d536275..16fa23718997 100644 --- a/openbb_platform/openbb/package/regulators_cftc.py +++ b/openbb_platform/openbb/package/regulators_cftc.py @@ -24,10 +24,28 @@ def __repr__(self) -> str: @validate def cot( self, - id: Annotated[str, OpenBBField(description="A string with the CFTC market code or other identifying string, such as the contract market name, commodity name, or commodity group - i.e, 'gold' or 'japanese yen'.Default report is Fed Funds Futures. Use the 'cftc_market_code' for an exact match.")] = "045601", - start_date: Annotated[Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format. Default is the most recent report.")] = 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["cftc"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: cftc.")] = None, + id: Annotated[ + str, + OpenBBField( + description="A string with the CFTC market code or other identifying string, such as the contract market name, commodity name, or commodity group - i.e, 'gold' or 'japanese yen'.Default report is Fed Funds Futures. Use the 'cftc_market_code' for an exact match." + ), + ] = "045601", + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField( + description="Start date of the data, in YYYY-MM-DD format. Default is the most recent report." + ), + ] = 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["cftc"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: cftc." + ), + ] = None, **kwargs ) -> OBBject: """Get Commitment of Traders Reports. @@ -72,37 +90,37 @@ def cot( COT --- date : date - The date of the data. + The date of the data. report_week : Optional[str] - Report week for the year. + Report week for the year. market_and_exchange_names : Optional[str] - Market and exchange names. + Market and exchange names. cftc_contract_market_code : Optional[str] - CFTC contract market code. + CFTC contract market code. cftc_market_code : Optional[str] - CFTC market code. + CFTC market code. cftc_region_code : Optional[str] - CFTC region code. + CFTC region code. cftc_commodity_code : Optional[str] - CFTC commodity code. + CFTC commodity code. cftc_contract_market_code_quotes : Optional[str] - CFTC contract market code quotes. + CFTC contract market code quotes. cftc_market_code_quotes : Optional[str] - CFTC market code quotes. + CFTC market code quotes. cftc_commodity_code_quotes : Optional[str] - CFTC commodity code quotes. + CFTC commodity code quotes. cftc_subgroup_code : Optional[str] - CFTC subgroup code. + CFTC subgroup code. commodity : Optional[str] - Commodity. + Commodity. commodity_group : Optional[str] - Commodity group name. + Commodity group name. commodity_subgroup : Optional[str] - Commodity subgroup name. + Commodity subgroup name. futonly_or_combined : Optional[str] - If the report is futures-only or combined. + If the report is futures-only or combined. contract_units : Optional[str] - Contract units. + Contract units. Examples -------- @@ -133,7 +151,19 @@ def cot( "end_date": end_date, }, extra_params=kwargs, - info={"report_type": {"cftc": {"multiple_items_allowed": False, "choices": ["legacy", "disaggregated", "financial", "supplemental"]}}}, + info={ + "report_type": { + "cftc": { + "multiple_items_allowed": False, + "choices": [ + "legacy", + "disaggregated", + "financial", + "supplemental", + ], + } + } + }, ) ) @@ -142,13 +172,18 @@ def cot( def cot_search( self, query: Annotated[str, OpenBBField(description="Search query.")] = "", - provider: Annotated[Optional[Literal["cftc"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: cftc.")] = None, + provider: Annotated[ + Optional[Literal["cftc"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: cftc." + ), + ] = None, **kwargs ) -> OBBject: """Get the current Commitment of Traders Reports. Search a list of the current Commitment of Traders Reports series information. - + Parameters ---------- @@ -174,17 +209,17 @@ def cot_search( COTSearch --------- code : str - CFTC market contract code of the report. + CFTC market contract code of the report. name : str - Name of the underlying asset. + Name of the underlying asset. category : Optional[str] - Category of the underlying asset. + Category of the underlying asset. subcategory : Optional[str] - Subcategory of the underlying asset. + Subcategory of the underlying asset. units : Optional[str] - The units for one contract. + The units for one contract. symbol : Optional[str] - Symbol representing the entity requested in the data. + Symbol representing the entity requested in the data. commodity : Optional[str] Name of the commodity. (provider: cftc) diff --git a/openbb_platform/openbb/package/regulators_sec.py b/openbb_platform/openbb/package/regulators_sec.py index 4e38788cfbcf..9e6ee52b9fd6 100644 --- a/openbb_platform/openbb/package/regulators_sec.py +++ b/openbb_platform/openbb/package/regulators_sec.py @@ -28,7 +28,12 @@ def __repr__(self) -> str: def cik_map( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - provider: Annotated[Optional[Literal["sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.")] = None, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, **kwargs ) -> OBBject: """Map a ticker symbol to a CIK number. @@ -59,7 +64,7 @@ def cik_map( CikMap ------ cik : Optional[Union[int, str]] - Central Index Key (CIK) for the requested entity. + Central Index Key (CIK) for the requested entity. Examples -------- @@ -89,7 +94,12 @@ def cik_map( def institutions_search( self, query: Annotated[str, OpenBBField(description="Search query.")] = "", - provider: Annotated[Optional[Literal["sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.")] = None, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, **kwargs ) -> OBBject: """Search SEC-regulated institutions by name and return a list of results with CIK numbers. @@ -152,7 +162,12 @@ def institutions_search( @validate def rss_litigation( self, - provider: Annotated[Optional[Literal["sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.")] = None, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, **kwargs ) -> OBBject: """Get the RSS feed that provides links to litigation releases concerning civil lawsuits brought by the Commission in federal court. @@ -205,8 +220,7 @@ def rss_litigation( ("sec",), ) }, - standard_params={ - }, + standard_params={}, extra_params=kwargs, ) ) @@ -216,7 +230,12 @@ def rss_litigation( def schema_files( self, query: Annotated[str, OpenBBField(description="Search query.")] = "", - provider: Annotated[Optional[Literal["sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.")] = None, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, **kwargs ) -> OBBject: """Use tool for navigating the directory of SEC XML schema files by year. @@ -297,7 +316,12 @@ def schema_files( def sic_search( self, query: Annotated[str, OpenBBField(description="Search query.")] = "", - provider: Annotated[Optional[Literal["sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.")] = None, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, **kwargs ) -> OBBject: """Search for Industry Titles, Reporting Office, and SIC Codes. An empty query string returns all results. @@ -363,8 +387,18 @@ def sic_search( def symbol_map( self, query: Annotated[str, OpenBBField(description="Search query.")], - use_cache: Annotated[Optional[bool], OpenBBField(description="Whether or not to use cache. If True, cache will store for seven days.")] = True, - provider: Annotated[Optional[Literal["sec"]], OpenBBField(description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.")] = None, + use_cache: Annotated[ + Optional[bool], + OpenBBField( + description="Whether or not to use cache. If True, cache will store for seven days." + ), + ] = True, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, **kwargs ) -> OBBject: """Map a CIK number to a ticker symbol, leading 0s can be omitted or included.