From 4e935aafac65de948b9b7e193455a2f2ed8e72f3 Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Tue, 12 Sep 2023 13:58:58 +0200 Subject: [PATCH] Small cleanup --- openbb_sdk/openbb/package/__extensions__.py | 7 - openbb_sdk/openbb/package/crypto.py | 28 +- openbb_sdk/openbb/package/economy.py | 86 ++-- openbb_sdk/openbb/package/extension_map.json | 36 +- openbb_sdk/openbb/package/fixedincome.py | 98 ++-- openbb_sdk/openbb/package/forex.py | 54 +- openbb_sdk/openbb/package/futures.py | 40 +- openbb_sdk/openbb/package/module_map.json | 15 - openbb_sdk/openbb/package/news.py | 50 +- openbb_sdk/openbb/package/qa.py | 2 +- openbb_sdk/openbb/package/stocks.py | 238 +++------ openbb_sdk/openbb/package/stocks_ca.py | 12 +- openbb_sdk/openbb/package/stocks_dd.py | 26 +- openbb_sdk/openbb/package/stocks_fa.py | 461 +++++++++--------- openbb_sdk/openbb/package/stocks_options.py | 51 +- openbb_sdk/openbb/package/ta.py | 6 +- .../tests/test_provider_field_dupes.py | 12 +- 17 files changed, 531 insertions(+), 691 deletions(-) diff --git a/openbb_sdk/openbb/package/__extensions__.py b/openbb_sdk/openbb/package/__extensions__.py index 445cb6fa972..b72edde1849 100644 --- a/openbb_sdk/openbb/package/__extensions__.py +++ b/openbb_sdk/openbb/package/__extensions__.py @@ -7,7 +7,6 @@ from openbb_core.app.static.container import Container class Extensions(Container): """ /crypto - /econometrics /economy /fixedincome /forex @@ -27,12 +26,6 @@ class Extensions(Container): return crypto.CLASS_crypto(command_runner=self._command_runner) - @property - def econometrics(self): # route = "/econometrics" - from . import econometrics - - return econometrics.CLASS_econometrics(command_runner=self._command_runner) - @property def economy(self): # route = "/economy" from . import economy diff --git a/openbb_sdk/openbb/package/crypto.py b/openbb_sdk/openbb/package/crypto.py index b6d602bd724..3937c437fac 100644 --- a/openbb_sdk/openbb/package/crypto.py +++ b/openbb_sdk/openbb/package/crypto.py @@ -1,14 +1,14 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### import datetime -from typing import List, Literal, Union +from typing import List, Literal, Optional, Union -import typing_extensions from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.model.obbject import OBBject from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_inputs from pydantic import validate_arguments +from typing_extensions import Annotated class CLASS_crypto(Container): @@ -22,26 +22,26 @@ class CLASS_crypto(Container): @validate_arguments def load( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fmp", "polygon", "yfinance"], None] = None, + provider: Optional[Literal["fmp", "polygon", "yfinance"]] = None, **kwargs ) -> OBBject[List]: - """Crypto Historical Price. + r"""Crypto Historical Price. Parameters ---------- @@ -51,11 +51,11 @@ class CLASS_crypto(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fmp', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['fmp', 'polygon', 'yfinance']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. - timeseries : Union[pydantic.types.NonNegativeInt, NoneType] + timeseries : Optional[pydantic.types.NonNegativeInt] Number of days to look back. (provider: fmp) timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] Timespan of the data. (provider: polygon) @@ -67,9 +67,9 @@ class CLASS_crypto(Container): Whether the data is adjusted. (provider: polygon) multiplier : PositiveInt Multiplier of the timespan. (provider: polygon) - interval : Union[Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo'], NoneType] + interval : Optional[Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo']] Data granularity. (provider: yfinance) - period : Union[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max'], NoneType] + period : Optional[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']] Period of the data to return. (provider: yfinance) prepost : bool Include Pre and Post market data. (provider: yfinance) @@ -83,7 +83,7 @@ class CLASS_crypto(Container): OBBject results : List[CryptoHistorical] Serializable results. - provider : Union[Literal['fmp', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['fmp', 'polygon', 'yfinance']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -115,11 +115,11 @@ class CLASS_crypto(Container): change : Optional[float] Change in the price of the symbol from the previous day. (provider: fmp) change_percent : Optional[float] - Change \\% in the price of the symbol. (provider: fmp) + Change \% in the price of the symbol. (provider: fmp) label : Optional[str] Human readable format of the date. (provider: fmp) change_over_time : Optional[float] - Change \\% in the price of the symbol over a period of time. (provider: fmp) + Change \% in the price of the symbol over a period of time. (provider: fmp) n : Optional[PositiveInt] Number of transactions for the symbol in the time period. (provider: polygon) """ # noqa: E501 diff --git a/openbb_sdk/openbb/package/economy.py b/openbb_sdk/openbb/package/economy.py index 12b5d5c5e98..a25ad79064b 100644 --- a/openbb_sdk/openbb/package/economy.py +++ b/openbb_sdk/openbb/package/economy.py @@ -1,14 +1,14 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### import datetime -from typing import List, Literal, Union +from typing import List, Literal, Optional, Union -import typing_extensions from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.model.obbject import OBBject from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_inputs from pydantic import validate_arguments +from typing_extensions import Annotated class CLASS_economy(Container): @@ -27,13 +27,13 @@ class CLASS_economy(Container): @validate_arguments def available_indices( - self, provider: Union[Literal["cboe", "fmp", "yfinance"], None] = None, **kwargs + self, provider: Optional[Literal["cboe", "fmp", "yfinance"]] = None, **kwargs ) -> OBBject[List]: """Lists of available indices from a provider. Parameters ---------- - provider : Union[Literal['cboe', 'fmp', 'yfinance'], NoneType] + provider : Optional[Literal['cboe', 'fmp', 'yfinance']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'cboe' if there is no default. @@ -45,7 +45,7 @@ class CLASS_economy(Container): OBBject results : List[AvailableIndices] Serializable results. - provider : Union[Literal['cboe', 'fmp', 'yfinance'], NoneType] + provider : Optional[Literal['cboe', 'fmp', 'yfinance']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -105,13 +105,13 @@ class CLASS_economy(Container): @validate_arguments def const( self, - index: typing_extensions.Annotated[ + index: Annotated[ Literal["nasdaq", "sp500", "dowjones"], OpenBBCustomParameter( description="Index for which we want to fetch the constituents." ), ] = "dowjones", - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Get the constituents of an index. @@ -120,7 +120,7 @@ class CLASS_economy(Container): ---------- index : Literal['nasdaq', 'sp500', 'dowjones'] Index for which we want to fetch the constituents. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -130,7 +130,7 @@ class CLASS_economy(Container): OBBject results : List[MajorIndicesConstituents] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -176,7 +176,7 @@ class CLASS_economy(Container): @validate_arguments def cpi( self, - countries: typing_extensions.Annotated[ + countries: Annotated[ List[ Literal[ "australia", @@ -232,33 +232,33 @@ class CLASS_economy(Container): ], OpenBBCustomParameter(description="The country or countries to get data."), ], - units: typing_extensions.Annotated[ + units: Annotated[ Literal["growth_previous", "growth_same", "index_2015"], OpenBBCustomParameter(description="The data units."), ] = "growth_same", - frequency: typing_extensions.Annotated[ + frequency: Annotated[ Literal["monthly", "quarter", "annual"], OpenBBCustomParameter(description="The data time frequency."), ] = "monthly", - harmonized: typing_extensions.Annotated[ + harmonized: Annotated[ bool, OpenBBCustomParameter( description="Whether you wish to obtain harmonized data." ), ] = False, - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fred"], None] = None, + provider: Optional[Literal["fred"]] = None, **kwargs ) -> OBBject[List]: """CPI. @@ -277,7 +277,7 @@ class CLASS_economy(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fred' if there is no default. @@ -287,7 +287,7 @@ class CLASS_economy(Container): OBBject results : List[CPI] Serializable results. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -330,23 +330,23 @@ class CLASS_economy(Container): @validate_arguments def european_index( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["cboe"], None] = None, + provider: Optional[Literal["cboe"]] = None, **kwargs ) -> OBBject[List]: """Get historical close values for select European indices. @@ -359,11 +359,11 @@ class CLASS_economy(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['cboe'], NoneType] + provider : Optional[Literal['cboe']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'cboe' if there is no default. - interval : Union[Literal['1d', '1m'], NoneType] + interval : Optional[Literal['1d', '1m']] Data granularity. (provider: cboe) Returns @@ -371,7 +371,7 @@ class CLASS_economy(Container): OBBject results : List[EuropeanIndexHistorical] Serializable results. - provider : Union[Literal['cboe'], NoneType] + provider : Optional[Literal['cboe']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -415,11 +415,11 @@ class CLASS_economy(Container): @validate_arguments def european_index_constituents( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["cboe"], None] = None, + provider: Optional[Literal["cboe"]] = None, **kwargs ) -> OBBject[List]: """Get current levels for constituents of select European indices. @@ -428,7 +428,7 @@ class CLASS_economy(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['cboe'], NoneType] + provider : Optional[Literal['cboe']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'cboe' if there is no default. @@ -438,7 +438,7 @@ class CLASS_economy(Container): OBBject results : List[EuropeanIndexConstituents] Serializable results. - provider : Union[Literal['cboe'], NoneType] + provider : Optional[Literal['cboe']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -498,26 +498,26 @@ class CLASS_economy(Container): @validate_arguments def index( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["cboe", "fmp", "polygon", "yfinance"], None] = None, + provider: Optional[Literal["cboe", "fmp", "polygon", "yfinance"]] = None, **kwargs ) -> OBBject[List]: - """Get historical levels for an index. + r"""Get historical levels for an index. Parameters ---------- @@ -527,13 +527,13 @@ class CLASS_economy(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['cboe', 'fmp', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['cboe', 'fmp', 'polygon', 'yfinance']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'cboe' if there is no default. interval : Union[Literal['1d', '1m'], NoneType, Literal['1min', '5min', '15min', '30min', '1hour', '4hour', '1day'], Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo']] Data granularity. (provider: cboe, fmp, yfinance) - timeseries : Union[pydantic.types.NonNegativeInt, NoneType] + timeseries : Optional[pydantic.types.NonNegativeInt] Number of days to look back. (provider: fmp) timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] Timespan of the data. (provider: polygon) @@ -545,7 +545,7 @@ class CLASS_economy(Container): Whether the data is adjusted. (provider: polygon) multiplier : PositiveInt Multiplier of the timespan. (provider: polygon) - period : Union[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max'], NoneType] + period : Optional[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']] Period of the data to return. (provider: yfinance) prepost : bool Include Pre and Post market data. (provider: yfinance) @@ -559,7 +559,7 @@ class CLASS_economy(Container): OBBject results : List[MajorIndicesHistorical] Serializable results. - provider : Union[Literal['cboe', 'fmp', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['cboe', 'fmp', 'polygon', 'yfinance']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -595,11 +595,11 @@ class CLASS_economy(Container): change : Optional[float] Change in the price of the symbol from the previous day. (provider: fmp) change_percent : Optional[float] - Change \\% in the price of the symbol. (provider: fmp) + Change \% in the price of the symbol. (provider: fmp) label : Optional[str] Human readable format of the date. (provider: fmp) change_over_time : Optional[float] - Change \\% in the price of the symbol over a period of time. (provider: fmp) + Change \% in the price of the symbol over a period of time. (provider: fmp) """ # noqa: E501 inputs = filter_inputs( @@ -621,13 +621,13 @@ class CLASS_economy(Container): @validate_arguments def risk( - self, provider: Union[Literal["fmp"], None] = None, **kwargs + self, provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Market Risk Premium. Parameters ---------- - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -637,7 +637,7 @@ class CLASS_economy(Container): OBBject results : List[RiskPremium] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. diff --git a/openbb_sdk/openbb/package/extension_map.json b/openbb_sdk/openbb/package/extension_map.json index b11b4e0560d..cf5a80bf118 100644 --- a/openbb_sdk/openbb/package/extension_map.json +++ b/openbb_sdk/openbb/package/extension_map.json @@ -1,26 +1,22 @@ { "openbb_core_extension": [ - "crypto@0.1.0a0", - "econometrics@0.1.0a0", - "economy@0.1.0a0", - "fixedincome@0.1.0a0", - "forex@0.1.0a0", - "futures@0.1.0a0", - "news@0.1.0a0", - "openbb_charting@0.1.0a1", - "qa@0.1.0a0", - "stocks@0.1.0a0", - "ta@0.1.0a0" + "crypto@0.1.1", + "economy@0.1.1", + "fixedincome@0.1.1", + "forex@0.1.1", + "futures@0.1.1", + "news@0.1.1", + "openbb_charting@0.1.0", + "qa@0.1.0", + "stocks@0.1.0", + "ta@0.1.0" ], "openbb_provider_extension": [ - "alpha_vantage@0.1.0a0", - "benzinga@0.1.0a0", - "cboe@0.1.0a0", - "fmp@0.1.0a0", - "fred@0.1.0a0", - "intrinio@0.1.0a0", - "polygon@0.1.0a0", - "quandl@0.1.0a0", - "yfinance@0.1.0a0" + "benzinga@0.1.1", + "cboe@0.1.1", + "fmp@0.1.1", + "fred@0.1.1", + "polygon@0.1.1", + "yfinance@0.1.1" ] } \ No newline at end of file diff --git a/openbb_sdk/openbb/package/fixedincome.py b/openbb_sdk/openbb/package/fixedincome.py index 50bf2542345..c1854d40f13 100644 --- a/openbb_sdk/openbb/package/fixedincome.py +++ b/openbb_sdk/openbb/package/fixedincome.py @@ -1,14 +1,14 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### import datetime -from typing import List, Literal, Union +from typing import List, Literal, Optional, Union -import typing_extensions from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.model.obbject import OBBject from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_inputs from pydantic import validate_arguments +from typing_extensions import Annotated class CLASS_fixedincome(Container): @@ -30,19 +30,19 @@ class CLASS_fixedincome(Container): @validate_arguments def ameribor( self, - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fred"], None] = None, + provider: Optional[Literal["fred"]] = None, **kwargs ) -> OBBject[List]: """ @@ -56,7 +56,7 @@ class CLASS_fixedincome(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fred' if there is no default. @@ -68,7 +68,7 @@ class CLASS_fixedincome(Container): OBBject results : List[AMERIBOR] Serializable results. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -103,19 +103,19 @@ class CLASS_fixedincome(Container): @validate_arguments def estr( self, - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fred"], None] = None, + provider: Optional[Literal["fred"]] = None, **kwargs ) -> OBBject[List]: """ @@ -130,7 +130,7 @@ class CLASS_fixedincome(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fred' if there is no default. @@ -142,7 +142,7 @@ class CLASS_fixedincome(Container): OBBject results : List[ESTR] Serializable results. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -177,19 +177,19 @@ class CLASS_fixedincome(Container): @validate_arguments def fed( self, - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fred"], None] = None, + provider: Optional[Literal["fred"]] = None, **kwargs ) -> OBBject[List]: """ @@ -204,7 +204,7 @@ class CLASS_fixedincome(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fred' if there is no default. @@ -216,7 +216,7 @@ class CLASS_fixedincome(Container): OBBject results : List[FEDFUNDS] Serializable results. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -251,19 +251,19 @@ class CLASS_fixedincome(Container): @validate_arguments def iorb( self, - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fred"], None] = None, + provider: Optional[Literal["fred"]] = None, **kwargs ) -> OBBject[List]: """ @@ -278,7 +278,7 @@ class CLASS_fixedincome(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fred' if there is no default. @@ -288,7 +288,7 @@ class CLASS_fixedincome(Container): OBBject results : List[IORB] Serializable results. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -322,7 +322,7 @@ class CLASS_fixedincome(Container): @validate_arguments def projections( - self, provider: Union[Literal["fred"], None] = None, **kwargs + self, provider: Optional[Literal["fred"]] = None, **kwargs ) -> OBBject[List]: """ Get Effective Federal Funds Rate data. A bank rate is the interest rate a nation's central bank charges to its @@ -332,7 +332,7 @@ class CLASS_fixedincome(Container): Parameters ---------- - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fred' if there is no default. @@ -344,7 +344,7 @@ class CLASS_fixedincome(Container): OBBject results : List[PROJECTIONS] Serializable results. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -388,19 +388,19 @@ class CLASS_fixedincome(Container): @validate_arguments def sofr( self, - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fred"], None] = None, + provider: Optional[Literal["fred"]] = None, **kwargs ) -> OBBject[List]: """Get United States yield curve. @@ -411,7 +411,7 @@ class CLASS_fixedincome(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fred' if there is no default. @@ -423,7 +423,7 @@ class CLASS_fixedincome(Container): OBBject results : List[SOFR] Serializable results. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -458,19 +458,19 @@ class CLASS_fixedincome(Container): @validate_arguments def sonia( self, - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fred"], None] = None, + provider: Optional[Literal["fred"]] = None, **kwargs ) -> OBBject[List]: """ @@ -484,7 +484,7 @@ class CLASS_fixedincome(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fred' if there is no default. @@ -496,7 +496,7 @@ class CLASS_fixedincome(Container): OBBject results : List[SONIA] Serializable results. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -531,19 +531,19 @@ class CLASS_fixedincome(Container): @validate_arguments def treasury( self, - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Get treasury rates. @@ -554,7 +554,7 @@ class CLASS_fixedincome(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -564,7 +564,7 @@ class CLASS_fixedincome(Container): OBBject results : List[TreasuryRates] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -621,28 +621,28 @@ class CLASS_fixedincome(Container): @validate_arguments def ycrv( self, - date: typing_extensions.Annotated[ - Union[datetime.date, None], + date: Annotated[ + Optional[datetime.date], OpenBBCustomParameter( description="Date to get Yield Curve data. Defaults to the most recent FRED entry." ), ] = None, - inflation_adjusted: typing_extensions.Annotated[ - Union[bool, None], + inflation_adjusted: Annotated[ + Optional[bool], OpenBBCustomParameter(description="Get inflation adjusted rates."), ] = False, - provider: Union[Literal["fred"], None] = None, + provider: Optional[Literal["fred"]] = None, **kwargs ) -> OBBject[List]: """Get United States yield curve. Parameters ---------- - date : Union[datetime.date, NoneType] + date : Optional[datetime.date] Date to get Yield Curve data. Defaults to the most recent FRED entry. - inflation_adjusted : Union[bool, NoneType] + inflation_adjusted : Optional[bool] Get inflation adjusted rates. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fred' if there is no default. @@ -652,7 +652,7 @@ class CLASS_fixedincome(Container): OBBject results : List[USYieldCurve] Serializable results. - provider : Union[Literal['fred'], NoneType] + provider : Optional[Literal['fred']] Provider name. warnings : Optional[List[Warning_]] List of warnings. diff --git a/openbb_sdk/openbb/package/forex.py b/openbb_sdk/openbb/package/forex.py index aaf80df5186..06050e6f06d 100644 --- a/openbb_sdk/openbb/package/forex.py +++ b/openbb_sdk/openbb/package/forex.py @@ -1,14 +1,14 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### import datetime -from typing import List, Literal, Union +from typing import List, Literal, Optional, Union -import typing_extensions from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.model.obbject import OBBject from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_inputs from pydantic import validate_arguments +from typing_extensions import Annotated class CLASS_forex(Container): @@ -23,26 +23,26 @@ class CLASS_forex(Container): @validate_arguments def load( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fmp", "polygon", "yfinance"], None] = None, + provider: Optional[Literal["fmp", "polygon", "yfinance"]] = None, **kwargs ) -> OBBject[List]: - """Forex Intraday Price. + r"""Forex Intraday Price. Parameters ---------- @@ -52,7 +52,7 @@ class CLASS_forex(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fmp', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['fmp', 'polygon', 'yfinance']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -66,9 +66,9 @@ class CLASS_forex(Container): Whether the data is adjusted. (provider: polygon) multiplier : PositiveInt Multiplier of the timespan. (provider: polygon) - interval : Union[Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo'], NoneType] + interval : Optional[Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo']] Data granularity. (provider: yfinance) - period : Union[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max'], NoneType] + period : Optional[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']] Period of the data to return. (provider: yfinance) prepost : bool Include Pre and Post market data. (provider: yfinance) @@ -82,7 +82,7 @@ class CLASS_forex(Container): OBBject results : List[ForexHistorical] Serializable results. - provider : Union[Literal['fmp', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['fmp', 'polygon', 'yfinance']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -114,11 +114,11 @@ class CLASS_forex(Container): change : Optional[float] Change in the price of the symbol from the previous day. (provider: fmp) change_percent : Optional[float] - Change \\% in the price of the symbol. (provider: fmp) + Change \% in the price of the symbol. (provider: fmp) label : Optional[str] Human readable format of the date. (provider: fmp) change_over_time : Optional[float] - Change \\% in the price of the symbol over a period of time. (provider: fmp) + Change \% in the price of the symbol over a period of time. (provider: fmp) n : Optional[PositiveInt] Number of transactions for the symbol in the time period. (provider: polygon) """ # noqa: E501 @@ -142,31 +142,29 @@ class CLASS_forex(Container): @validate_arguments def pairs( - self, - provider: Union[Literal["fmp", "intrinio", "polygon"], None] = None, - **kwargs + self, provider: Optional[Literal["fmp", "polygon"]] = None, **kwargs ) -> OBBject[List]: """Forex Available Pairs. Parameters ---------- - provider : Union[Literal['fmp', 'intrinio', 'polygon'], NoneType] + provider : Optional[Literal['fmp', 'polygon']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. - symbol : Union[str, NoneType] + symbol : Optional[str] Symbol of the pair to search. (provider: polygon) - date : Union[datetime.date, NoneType] + date : Optional[datetime.date] A specific date to get data for. (provider: polygon) - search : Union[str, NoneType] + search : Optional[str] Search for terms within the ticker and/or company name. (provider: polygon) - active : Union[Literal[True, False], NoneType] + active : Optional[Literal[True, False]] Specify if the tickers returned should be actively traded on the queried date. (provider: polygon) - order : Union[Literal['asc', 'desc'], NoneType] + order : Optional[Literal['asc', 'desc']] Order data by ascending or descending. (provider: polygon) - sort : Union[Literal['ticker', 'name', 'market', 'locale', 'currency_symbol', 'currency_name', 'base_currency_symbol', 'base_currency_name', 'last_updated_utc', 'delisted_utc'], NoneType] + sort : Optional[Literal['ticker', 'name', 'market', 'locale', 'currency_symbol', 'currency_name', 'base_currency_symbol', 'base_currency_name', 'last_updated_utc', 'delisted_utc']] Sort field used for ordering. (provider: polygon) - limit : Union[pydantic.types.PositiveInt, NoneType] + limit : Optional[pydantic.types.PositiveInt] The number of data entries to return. (provider: polygon) Returns @@ -174,7 +172,7 @@ class CLASS_forex(Container): OBBject results : List[ForexPairs] Serializable results. - provider : Union[Literal['fmp', 'intrinio', 'polygon'], NoneType] + provider : Optional[Literal['fmp', 'polygon']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -195,12 +193,6 @@ class CLASS_forex(Container): Stock exchange of the currency pair. (provider: fmp) exchange_short_name : Optional[str] Short name of the stock exchange of the currency pair. (provider: fmp) - code : Optional[str] - Code of the currency pair. (provider: intrinio) - base_currency : Optional[str] - ISO 4217 currency code of the base currency. (provider: intrinio) - quote_currency : Optional[str] - ISO 4217 currency code of the quote currency. (provider: intrinio) market : Optional[str] The name of the trading market. Always 'fx'. (provider: polygon) locale : Optional[str] diff --git a/openbb_sdk/openbb/package/futures.py b/openbb_sdk/openbb/package/futures.py index 3993a774d40..b5ffdb711e7 100644 --- a/openbb_sdk/openbb/package/futures.py +++ b/openbb_sdk/openbb/package/futures.py @@ -1,14 +1,14 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### import datetime -from typing import List, Literal, Union +from typing import List, Literal, Optional, Union -import typing_extensions from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.model.obbject import OBBject from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_inputs from pydantic import validate_arguments +from typing_extensions import Annotated class CLASS_futures(Container): @@ -23,15 +23,15 @@ class CLASS_futures(Container): @validate_arguments def curve( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - date: typing_extensions.Annotated[ - Union[datetime.date, None], + date: Annotated[ + Optional[datetime.date], OpenBBCustomParameter(description="Historical date to search curve for."), ] = None, - provider: Union[Literal["cboe", "yfinance"], None] = None, + provider: Optional[Literal["cboe", "yfinance"]] = None, **kwargs ) -> OBBject[List]: """Futures Historical Price. @@ -40,9 +40,9 @@ class CLASS_futures(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - date : Union[datetime.date, NoneType] + date : Optional[datetime.date] Historical date to search curve for. - provider : Union[Literal['cboe', 'yfinance'], NoneType] + provider : Optional[Literal['cboe', 'yfinance']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'cboe' if there is no default. @@ -52,7 +52,7 @@ class CLASS_futures(Container): OBBject results : List[FuturesCurve] Serializable results. - provider : Union[Literal['cboe', 'yfinance'], NoneType] + provider : Optional[Literal['cboe', 'yfinance']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -89,27 +89,27 @@ class CLASS_futures(Container): @validate_arguments def load( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - expiration: typing_extensions.Annotated[ - Union[str, None], + expiration: Annotated[ + Optional[str], OpenBBCustomParameter(description="Future expiry date with format YYYY-MM"), ] = None, - provider: Union[Literal["yfinance"], None] = None, + provider: Optional[Literal["yfinance"]] = None, **kwargs ) -> OBBject[List]: """Futures Historical Price. @@ -122,15 +122,15 @@ class CLASS_futures(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - expiration : Union[str, NoneType] + expiration : Optional[str] Future expiry date with format YYYY-MM - provider : Union[Literal['yfinance'], NoneType] + provider : Optional[Literal['yfinance']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'yfinance' if there is no default. - interval : Union[Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo'], NoneType] + interval : Optional[Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo']] Data granularity. (provider: yfinance) - period : Union[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max'], NoneType] + period : Optional[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']] Period of the data to return. (provider: yfinance) prepost : bool Include Pre and Post market data. (provider: yfinance) @@ -144,7 +144,7 @@ class CLASS_futures(Container): OBBject results : List[FuturesHistorical] Serializable results. - provider : Union[Literal['yfinance'], NoneType] + provider : Optional[Literal['yfinance']] Provider name. warnings : Optional[List[Warning_]] List of warnings. diff --git a/openbb_sdk/openbb/package/module_map.json b/openbb_sdk/openbb/package/module_map.json index c407a2f8167..a75cc7694c9 100644 --- a/openbb_sdk/openbb/package/module_map.json +++ b/openbb_sdk/openbb/package/module_map.json @@ -2,21 +2,6 @@ "__extensions__": "", "crypto": "/crypto", "crypto_load": "/crypto/load", - "econometrics": "/econometrics", - "econometrics_bgot": "/econometrics/bgot", - "econometrics_coint": "/econometrics/coint", - "econometrics_corr": "/econometrics/corr", - "econometrics_dwat": "/econometrics/dwat", - "econometrics_granger": "/econometrics/granger", - "econometrics_ols": "/econometrics/ols", - "econometrics_ols_summary": "/econometrics/ols_summary", - "econometrics_panelbols": "/econometrics/panelbols", - "econometrics_panelfd": "/econometrics/panelfd", - "econometrics_panelfmac": "/econometrics/panelfmac", - "econometrics_panelols": "/econometrics/panelols", - "econometrics_panelpols": "/econometrics/panelpols", - "econometrics_panelre": "/econometrics/panelre", - "econometrics_unitroot": "/econometrics/unitroot", "economy": "/economy", "economy_available_indices": "/economy/available_indices", "economy_const": "/economy/const", diff --git a/openbb_sdk/openbb/package/news.py b/openbb_sdk/openbb/package/news.py index ca86b4f4bae..9567a3d6a2f 100644 --- a/openbb_sdk/openbb/package/news.py +++ b/openbb_sdk/openbb/package/news.py @@ -1,14 +1,14 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### -from typing import List, Literal, Union +from typing import List, Literal, Optional import pydantic -import typing_extensions from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.model.obbject import OBBject from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_inputs from pydantic import validate_arguments +from typing_extensions import Annotated class CLASS_news(Container): @@ -22,11 +22,11 @@ class CLASS_news(Container): @validate_arguments def globalnews( self, - page: typing_extensions.Annotated[ + page: Annotated[ pydantic.types.NonNegativeInt, OpenBBCustomParameter(description="Page of the global news."), ] = 0, - provider: Union[Literal["benzinga", "fmp", "intrinio"], None] = None, + provider: Optional[Literal["benzinga", "fmp"]] = None, **kwargs ) -> OBBject[List]: """Global News. @@ -35,7 +35,7 @@ class CLASS_news(Container): ---------- page : NonNegativeInt Page of the global news. - provider : Union[Literal['benzinga', 'fmp', 'intrinio'], NoneType] + provider : Optional[Literal['benzinga', 'fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'benzinga' if there is no default. @@ -43,45 +43,39 @@ class CLASS_news(Container): Number of results to return per page. (provider: benzinga) display_output : Literal['headline', 'summary', 'full', 'all'] Type of data to return. (provider: benzinga) - date : Union[datetime.datetime, NoneType] + date : Optional[datetime.datetime] Date of the news to retrieve. (provider: benzinga) - date_from : Union[datetime.datetime, NoneType] + date_from : Optional[datetime.datetime] Start date of the news to retrieve. (provider: benzinga) - date_to : Union[datetime.datetime, NoneType] + date_to : Optional[datetime.datetime] End date of the news to retrieve. (provider: benzinga) - updated_since : Union[int, NoneType] + updated_since : Optional[int] Number of seconds since the news was updated. (provider: benzinga) - published_since : Union[int, NoneType] + published_since : Optional[int] Number of seconds since the news was published. (provider: benzinga) - sort : Union[Literal['published_at', 'updated_at', 'title', 'author', 'channel', 'ticker', 'topic', 'content_type'], NoneType] + sort : Optional[Literal['published_at', 'updated_at', 'title', 'author', 'channel', 'ticker', 'topic', 'content_type']] Order in which to sort the news. (provider: benzinga) - isin : Union[str, NoneType] + isin : Optional[str] The ISIN of the news to retrieve. (provider: benzinga) - cusip : Union[str, NoneType] + cusip : Optional[str] The CUSIP of the news to retrieve. (provider: benzinga) - tickers : Union[str, NoneType] + tickers : Optional[str] Tickers of the news to retrieve. (provider: benzinga) - channels : Union[str, NoneType] + channels : Optional[str] Channels of the news to retrieve. (provider: benzinga) - topics : Union[str, NoneType] + topics : Optional[str] Topics of the news to retrieve. (provider: benzinga) - authors : Union[str, NoneType] + authors : Optional[str] Authors of the news to retrieve. (provider: benzinga) - content_types : Union[str, NoneType] + content_types : Optional[str] Content types of the news to retrieve. (provider: benzinga) - next_page : str - Token to get the next page of data from a previous API call. (provider: intrinio) - limit : Union[int, NoneType] - The number of data entries to return. (provider: intrinio) - all_pages : Union[bool, NoneType] - Returns all pages of data from the API call at once. (provider: intrinio) Returns ------- OBBject results : List[GlobalNews] Serializable results. - provider : Union[Literal['benzinga', 'fmp', 'intrinio'], NoneType] + provider : Optional[Literal['benzinga', 'fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -111,11 +105,7 @@ class CLASS_news(Container): teaser : Optional[str] Teaser of the news. (provider: benzinga) site : Optional[str] - Site of the news. (provider: fmp) - id : Optional[str] - Article ID. (provider: intrinio) - company : Optional[Mapping[str, Any]] - Company details related to the news article. (provider: intrinio)""" # noqa: E501 + Site of the news. (provider: fmp)""" # noqa: E501 inputs = filter_inputs( provider_choices={ diff --git a/openbb_sdk/openbb/package/qa.py b/openbb_sdk/openbb/package/qa.py index 108f406bfe5..93b458a101a 100644 --- a/openbb_sdk/openbb/package/qa.py +++ b/openbb_sdk/openbb/package/qa.py @@ -337,7 +337,7 @@ class CLASS_qa(Container): self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], target: str, - fuller_reg: Literal["c", "ct", "ctt", "nc", "c"] = "c", + fuller_reg: Literal["c", "ct", "ctt", "nc"] = "c", kpss_reg: Literal["c", "ct"] = "c", ) -> OBBject[openbb_qa.qa_models.UnitRootModel]: """Unit Root Test. diff --git a/openbb_sdk/openbb/package/stocks.py b/openbb_sdk/openbb/package/stocks.py index 49e3d986071..bca1afff86c 100644 --- a/openbb_sdk/openbb/package/stocks.py +++ b/openbb_sdk/openbb/package/stocks.py @@ -1,16 +1,15 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### import datetime -from typing import List, Literal, Union +from typing import List, Literal, Optional, Union import pydantic -import pydantic.main -import typing_extensions from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.model.obbject import OBBject from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_inputs -from pydantic import BaseModel, validate_arguments +from pydantic import validate_arguments +from typing_extensions import Annotated class CLASS_stocks(Container): @@ -51,11 +50,11 @@ class CLASS_stocks(Container): @validate_arguments def info( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["cboe"], None] = None, + provider: Optional[Literal["cboe"]] = None, **kwargs ) -> OBBject[List]: """Get general price and performance metrics of a stock. @@ -64,7 +63,7 @@ class CLASS_stocks(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['cboe'], NoneType] + provider : Optional[Literal['cboe']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'cboe' if there is no default. @@ -74,7 +73,7 @@ class CLASS_stocks(Container): OBBject results : List[StockInfo] Serializable results. - provider : Union[Literal['cboe'], NoneType] + provider : Optional[Literal['cboe']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -166,30 +165,27 @@ class CLASS_stocks(Container): @validate_arguments def load( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, chart: bool = False, - provider: Union[ - Literal["alpha_vantage", "cboe", "fmp", "intrinio", "polygon", "yfinance"], - None, - ] = None, + provider: Optional[Literal["cboe", "fmp", "polygon", "yfinance"]] = None, **kwargs ) -> OBBject[List]: - """Load stock data for a specific ticker. + r"""Load stock data for a specific ticker. Parameters ---------- @@ -201,46 +197,26 @@ class CLASS_stocks(Container): End date of the data, in YYYY-MM-DD format. chart : bool Whether to create a chart or not, by default False. - provider : Union[Literal['alpha_vantage', 'cboe', 'fmp', 'intrinio', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['cboe', 'fmp', 'polygon', 'yfinance']] The provider to use for the query, by default None. - If None, the provider specified in defaults is selected or 'alpha_vantage' if there is + If None, the provider specified in defaults is selected or 'cboe' if there is no default. - period : Union[Literal['intraday', 'daily', 'weekly', 'monthly'], Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max'], NoneType] - Period of the data to return. (provider: alpha_vantage, yfinance) - interval : Union[Literal['1min', '5min', '15min', '30min', '60min'], NoneType, Literal['1d', '1m'], Literal['1min', '5min', '15min', '30min', '1hour', '4hour', '1day'], Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo']] - Data granularity. (provider: alpha_vantage, cboe, fmp, yfinance) - adjusted : Union[bool, NoneType] - Output time series is adjusted by historical split and dividend events. (provider: alpha_vantage, polygon) - extended_hours : Union[bool, NoneType] - Extended trading hours during pre-market and after-hours. (provider: alpha_vantage) - month : Union[str, NoneType] - Query a specific month in history (in YYYY-MM format). (provider: alpha_vantage) - outputsize : Union[Literal['compact', 'full'], NoneType] - Compact returns only the latest 100 data points in the intraday time series; full returns trailing 30 days of the most recent intraday data if the month parameter (see above) is not specified, or the full intraday data for a specific month in history if the month parameter is specified. (provider: alpha_vantage) - timeseries : Union[pydantic.types.NonNegativeInt, NoneType] + interval : Union[Literal['1d', '1m'], NoneType, Literal['1min', '5min', '15min', '30min', '1hour', '4hour', '1day'], Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1wk', '1mo', '3mo']] + Data granularity. (provider: cboe, fmp, yfinance) + timeseries : Optional[pydantic.types.NonNegativeInt] Number of days to look back. (provider: fmp) - timezone : Union[Literal['Africa/Algiers', 'Africa/Cairo', 'Africa/Casablanca', 'Africa/Harare', 'Africa/Johannesburg', 'Africa/Monrovia', 'Africa/Nairobi', 'America/Argentina/Buenos_Aires', 'America/Bogota', 'America/Caracas', 'America/Chicago', 'America/Chihuahua', 'America/Denver', 'America/Godthab', 'America/Guatemala', 'America/Guyana', 'America/Halifax', 'America/Indiana/Indianapolis', 'America/Juneau', 'America/La_Paz', 'America/Lima', 'America/Lima', 'America/Los_Angeles', 'America/Mazatlan', 'America/Mexico_City', 'America/Mexico_City', 'America/Monterrey', 'America/Montevideo', 'America/New_York', 'America/Phoenix', 'America/Regina', 'America/Santiago', 'America/Sao_Paulo', 'America/St_Johns', 'America/Tijuana', 'Asia/Almaty', 'Asia/Baghdad', 'Asia/Baku', 'Asia/Bangkok', 'Asia/Bangkok', 'Asia/Chongqing', 'Asia/Colombo', 'Asia/Dhaka', 'Asia/Dhaka', 'Asia/Hong_Kong', 'Asia/Irkutsk', 'Asia/Jakarta', 'Asia/Jerusalem', 'Asia/Kabul', 'Asia/Kamchatka', 'Asia/Karachi', 'Asia/Karachi', 'Asia/Kathmandu', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Kolkata', 'Asia/Krasnoyarsk', 'Asia/Kuala_Lumpur', 'Asia/Kuwait', 'Asia/Magadan', 'Asia/Muscat', 'Asia/Muscat', 'Asia/Novosibirsk', 'Asia/Rangoon', 'Asia/Riyadh', 'Asia/Seoul', 'Asia/Shanghai', 'Asia/Singapore', 'Asia/Srednekolymsk', 'Asia/Taipei', 'Asia/Tashkent', 'Asia/Tbilisi', 'Asia/Tehran', 'Asia/Tokyo', 'Asia/Tokyo', 'Asia/Tokyo', 'Asia/Ulaanbaatar', 'Asia/Urumqi', 'Asia/Vladivostok', 'Asia/Yakutsk', 'Asia/Yekaterinburg', 'Asia/Yerevan', 'Atlantic/Azores', 'Atlantic/Cape_Verde', 'Atlantic/South_Georgia', 'Australia/Adelaide', 'Australia/Brisbane', 'Australia/Darwin', 'Australia/Hobart', 'Australia/Melbourne', 'Australia/Melbourne', 'Australia/Perth', 'Australia/Sydney', 'Etc/UTC', 'UTC', 'Europe/Amsterdam', 'Europe/Athens', 'Europe/Belgrade', 'Europe/Berlin', 'Europe/Berlin', 'Europe/Bratislava', 'Europe/Brussels', 'Europe/Bucharest', 'Europe/Budapest', 'Europe/Copenhagen', 'Europe/Dublin', 'Europe/Helsinki', 'Europe/Istanbul', 'Europe/Kaliningrad', 'Europe/Kiev', 'Europe/Lisbon', 'Europe/Ljubljana', 'Europe/London', 'Europe/London', 'Europe/Madrid', 'Europe/Minsk', 'Europe/Moscow', 'Europe/Moscow', 'Europe/Paris', 'Europe/Prague', 'Europe/Riga', 'Europe/Rome', 'Europe/Samara', 'Europe/Sarajevo', 'Europe/Skopje', 'Europe/Sofia', 'Europe/Stockholm', 'Europe/Tallinn', 'Europe/Vienna', 'Europe/Vilnius', 'Europe/Volgograd', 'Europe/Warsaw', 'Europe/Zagreb', 'Pacific/Apia', 'Pacific/Auckland', 'Pacific/Auckland', 'Pacific/Chatham', 'Pacific/Fakaofo', 'Pacific/Fiji', 'Pacific/Guadalcanal', 'Pacific/Guam', 'Pacific/Honolulu', 'Pacific/Majuro', 'Pacific/Midway', 'Pacific/Midway', 'Pacific/Noumea', 'Pacific/Pago_Pago', 'Pacific/Port_Moresby', 'Pacific/Tongatapu'], NoneType] - Returns trading times in this timezone. (provider: intrinio) - source : Union[Literal['realtime', 'delayed', 'nasdaq_basic'], NoneType] - The source of the data. (provider: intrinio) - start_time : Union[datetime.time, NoneType] - Return intervals starting at the specified time on the `start_date` formatted as 'hh:mm:ss'. (provider: intrinio) - end_time : Union[datetime.time, NoneType] - Return intervals stopping at the specified time on the `end_date` formatted as 'hh:mm:ss'. (provider: intrinio) - interval_size : Union[Literal['1m', '5m', '10m', '15m', '30m', '60m', '1h'], NoneType] - The data time frequency. (provider: intrinio) - limit : Union[pydantic.types.NonNegativeInt, NoneType, pydantic.types.PositiveInt] - The number of data entries to return. (provider: intrinio, polygon) - next_page : Union[str, NoneType] - Token to get the next page of data from a previous API call. (provider: intrinio) - all_pages : Union[bool, NoneType] - Returns all pages of data from the API call at once. (provider: intrinio) timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] Timespan of the data. (provider: polygon) sort : Literal['asc', 'desc'] Sort order of the data. (provider: polygon) + limit : PositiveInt + The number of data entries to return. (provider: polygon) + adjusted : bool + Output time series is adjusted by historical split and dividend events. (provider: polygon) multiplier : PositiveInt Multiplier of the timespan. (provider: polygon) + period : Optional[Literal['1d', '5d', '1mo', '3mo', '6mo', '1y', '2y', '5y', '10y', 'ytd', 'max']] + Period of the data to return. (provider: yfinance) prepost : bool Include Pre and Post market data. (provider: yfinance) adjust : bool @@ -253,7 +229,7 @@ class CLASS_stocks(Container): OBBject results : List[StockHistorical] Serializable results. - provider : Union[Literal['alpha_vantage', 'cboe', 'fmp', 'intrinio', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['cboe', 'fmp', 'polygon', 'yfinance']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -278,12 +254,6 @@ class CLASS_stocks(Container): The volume of the symbol. vwap : Optional[PositiveFloat] Volume Weighted Average Price of the symbol. - adjusted_close : Optional[PositiveFloat] - The adjusted close price of the symbol. (provider: alpha_vantage) - dividend_amount : Optional[NonNegativeFloat] - Dividend amount paid for the corresponding date. (provider: alpha_vantage) - split_coefficient : Optional[NonNegativeFloat] - Split coefficient for the corresponding date. (provider: alpha_vantage) calls_volume : Optional[float] Number of calls traded during the most recent trading period. Only valid if interval is 1m. (provider: cboe) puts_volume : Optional[float] @@ -295,19 +265,13 @@ class CLASS_stocks(Container): unadjusted_volume : Optional[float] Unadjusted volume of the symbol. (provider: fmp) change : Optional[float] - Change in the price of the symbol from the previous day. (provider: fmp, intrinio) + Change in the price of the symbol from the previous day. (provider: fmp) change_percent : Optional[float] - Change \\% in the price of the symbol. (provider: fmp) + Change \% in the price of the symbol. (provider: fmp) label : Optional[str] Human readable format of the date. (provider: fmp) change_over_time : Optional[float] - Change \\% in the price of the symbol over a period of time. (provider: fmp) - close_time : Optional[datetime] - The timestamp that represents the end of the interval span. (provider: intrinio) - interval : Optional[str] - The data time frequency. (provider: intrinio) - average : Optional[float] - Average trade price of an individual stock during the interval. (provider: intrinio) + Change \% in the price of the symbol over a period of time. (provider: fmp) transactions : Optional[PositiveInt] Number of transactions for the symbol in the time period. (provider: polygon) """ # noqa: E501 @@ -333,16 +297,16 @@ class CLASS_stocks(Container): @validate_arguments def multiples( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - limit: typing_extensions.Annotated[ - Union[int, None], + limit: Annotated[ + Optional[int], OpenBBCustomParameter(description="The number of data entries to return."), ] = 100, chart: bool = False, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Get valuation multiples for a stock ticker. @@ -351,11 +315,11 @@ class CLASS_stocks(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - limit : Union[int, NoneType] + limit : Optional[int] The number of data entries to return. chart : bool Whether to create a chart or not, by default False. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -365,7 +329,7 @@ class CLASS_stocks(Container): OBBject results : List[StockMultiples] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -517,23 +481,21 @@ class CLASS_stocks(Container): @validate_arguments def news( self, - symbols: typing_extensions.Annotated[ + symbols: Annotated[ str, OpenBBCustomParameter(description="Symbol to get data for.") ], - page: typing_extensions.Annotated[ + page: Annotated[ int, OpenBBCustomParameter( description="Page of the stock news to be retrieved." ), ] = 0, - limit: typing_extensions.Annotated[ - Union[pydantic.types.NonNegativeInt, None], + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], OpenBBCustomParameter(description="Number of results to return per page."), ] = 15, chart: bool = False, - provider: Union[ - Literal["benzinga", "fmp", "intrinio", "polygon", "yfinance"], None - ] = None, + provider: Optional[Literal["benzinga", "fmp", "polygon", "yfinance"]] = None, **kwargs ) -> OBBject[List]: """Get news for one or more stock tickers. @@ -544,63 +506,59 @@ class CLASS_stocks(Container): Symbol to get data for. page : int Page of the stock news to be retrieved. - limit : Union[pydantic.types.NonNegativeInt, NoneType] + limit : Optional[pydantic.types.NonNegativeInt] Number of results to return per page. chart : bool Whether to create a chart or not, by default False. - provider : Union[Literal['benzinga', 'fmp', 'intrinio', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['benzinga', 'fmp', 'polygon', 'yfinance']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'benzinga' if there is no default. display_output : Literal['headline', 'summary', 'full', 'all'] Type of data to return. (provider: benzinga) - date : Union[datetime.datetime, NoneType] + date : Optional[datetime.datetime] Date of the news to retrieve. (provider: benzinga) - date_from : Union[datetime.datetime, NoneType] + date_from : Optional[datetime.datetime] Start date of the news to retrieve. (provider: benzinga) - date_to : Union[datetime.datetime, NoneType] + date_to : Optional[datetime.datetime] End date of the news to retrieve. (provider: benzinga) - updated_since : Union[int, NoneType] + updated_since : Optional[int] Number of seconds since the news was updated. (provider: benzinga) - published_since : Union[int, NoneType] + published_since : Optional[int] Number of seconds since the news was published. (provider: benzinga) sort : Union[Literal['published_at', 'updated_at', 'title', 'author', 'channel', 'ticker', 'topic', 'content_type'], NoneType, str] Order in which to sort the news. (provider: benzinga, polygon) - isin : Union[str, NoneType] + isin : Optional[str] The ISIN of the news to retrieve. (provider: benzinga) - cusip : Union[str, NoneType] + cusip : Optional[str] The CUSIP of the news to retrieve. (provider: benzinga) - channels : Union[str, NoneType] + channels : Optional[str] Channels of the news to retrieve. (provider: benzinga) - topics : Union[str, NoneType] + topics : Optional[str] Topics of the news to retrieve. (provider: benzinga) - authors : Union[str, NoneType] + authors : Optional[str] Authors of the news to retrieve. (provider: benzinga) - content_types : Union[str, NoneType] + content_types : Optional[str] Content types of the news to retrieve. (provider: benzinga) - next_page : Union[str, NoneType] - Token to get the next page of data from a previous API call. (provider: intrinio) - all_pages : Union[bool, NoneType] - Returns all pages of data from the API call at once. (provider: intrinio) - ticker_lt : Union[str, NoneType] + ticker_lt : Optional[str] Less than. (provider: polygon) - ticker_lte : Union[str, NoneType] + ticker_lte : Optional[str] Less than or equal. (provider: polygon) - ticker_gt : Union[str, NoneType] + ticker_gt : Optional[str] Greater than. (provider: polygon) - ticker_gte : Union[str, NoneType] + ticker_gte : Optional[str] Greater than or equal. (provider: polygon) - published_utc : Union[str, NoneType] + published_utc : Optional[str] Published date of the query. (provider: polygon) - published_utc_lt : Union[str, NoneType] + published_utc_lt : Optional[str] Less than. (provider: polygon) - published_utc_lte : Union[str, NoneType] + published_utc_lte : Optional[str] Less than or equal. (provider: polygon) - published_utc_gt : Union[str, NoneType] + published_utc_gt : Optional[str] Greater than. (provider: polygon) - published_utc_gte : Union[str, NoneType] + published_utc_gte : Optional[str] Greater than or equal. (provider: polygon) - order : Union[Literal['asc', 'desc'], NoneType] + order : Optional[Literal['asc', 'desc']] Sort order of the query. (provider: polygon) Returns @@ -608,7 +566,7 @@ class CLASS_stocks(Container): OBBject results : List[StockNews] Serializable results. - provider : Union[Literal['benzinga', 'fmp', 'intrinio', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['benzinga', 'fmp', 'polygon', 'yfinance']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -643,12 +601,12 @@ class CLASS_stocks(Container): URL to the image of the news source. (provider: fmp) site : Optional[str] Name of the news source. (provider: fmp) - id : Optional[str] - Article ID. (provider: intrinio, polygon) amp_url : Optional[str] AMP URL. (provider: polygon) author : Optional[str] Author of the article. (provider: polygon) + id : Optional[str] + Article ID. (provider: polygon) image_url : Optional[str] Image URL. (provider: polygon) keywords : Optional[List[str]] @@ -693,32 +651,30 @@ class CLASS_stocks(Container): @validate_arguments def quote( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["fmp", "intrinio"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs - ) -> OBBject[BaseModel]: + ) -> OBBject[List]: """Load stock data for a specific ticker. Parameters ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['fmp', 'intrinio'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. - source : Literal['iex', 'bats', 'bats_delayed', 'utp_delayed', 'cta_a_delayed', 'cta_b_delayed', 'intrinio_mx', 'intrinio_mx_plus', 'delayed_sip'] - Source of the data. (provider: intrinio) Returns ------- OBBject results : List[StockQuote] Serializable results. - provider : Union[Literal['fmp', 'intrinio'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -772,47 +728,7 @@ class CLASS_stocks(Container): earnings_announcement : Optional[str] Earnings announcement date of the stock. (provider: fmp) shares_outstanding : Optional[int] - Number of shares outstanding of the stock. (provider: fmp) - last_price : Optional[float] - Price of the last trade. (provider: intrinio) - last_time : Optional[datetime] - Date and Time when the last trade occurred. (provider: intrinio) - last_size : Optional[int] - Size of the last trade. (provider: intrinio) - bid_price : Optional[float] - Price of the top bid order. (provider: intrinio) - bid_size : Optional[int] - Size of the top bid order. (provider: intrinio) - ask_price : Optional[float] - Price of the top ask order. (provider: intrinio) - ask_size : Optional[int] - Size of the top ask order. (provider: intrinio) - open_price : Optional[float] - Open price for the trading day. (provider: intrinio) - close_price : Optional[float] - Closing price for the trading day (IEX source only). (provider: intrinio) - high_price : Optional[float] - High Price for the trading day. (provider: intrinio) - low_price : Optional[float] - Low Price for the trading day. (provider: intrinio) - exchange_volume : Optional[int] - Number of shares exchanged during the trading day on the exchange. (provider: intrinio) - market_volume : Optional[int] - Number of shares exchanged during the trading day for the whole market. (provider: intrinio) - updated_on : Optional[datetime] - Date and Time when the data was last updated. (provider: intrinio) - source : Optional[str] - Source of the data. (provider: intrinio) - listing_venue : Optional[str] - Listing venue where the trade took place (SIP source only). (provider: intrinio) - sales_conditions : Optional[str] - Indicates any sales condition modifiers associated with the trade. (provider: intrinio) - quote_conditions : Optional[str] - Indicates any quote condition modifiers associated with the trade. (provider: intrinio) - market_center_code : Optional[str] - Market center character code. (provider: intrinio) - is_darkpool : Optional[bool] - Whether or not the current trade is from a darkpool. (provider: intrinio)""" # noqa: E501 + Number of shares outstanding of the stock. (provider: fmp)""" # noqa: E501 inputs = filter_inputs( provider_choices={ @@ -832,14 +748,12 @@ class CLASS_stocks(Container): @validate_arguments def search( self, - query: typing_extensions.Annotated[ - str, OpenBBCustomParameter(description="Search query.") - ] = "", - ticker: typing_extensions.Annotated[ + query: Annotated[str, OpenBBCustomParameter(description="Search query.")] = "", + ticker: Annotated[ bool, OpenBBCustomParameter(description="Whether to search by ticker symbol."), ] = False, - provider: Union[Literal["cboe"], None] = None, + provider: Optional[Literal["cboe"]] = None, **kwargs ) -> OBBject[List]: """Search for a company or stock ticker. @@ -850,7 +764,7 @@ class CLASS_stocks(Container): Search query. ticker : bool Whether to search by ticker symbol. - provider : Union[Literal['cboe'], NoneType] + provider : Optional[Literal['cboe']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'cboe' if there is no default. @@ -860,7 +774,7 @@ class CLASS_stocks(Container): OBBject results : List[StockSearch] Serializable results. - provider : Union[Literal['cboe'], NoneType] + provider : Optional[Literal['cboe']] Provider name. warnings : Optional[List[Warning_]] List of warnings. diff --git a/openbb_sdk/openbb/package/stocks_ca.py b/openbb_sdk/openbb/package/stocks_ca.py index ba6d82e77ad..8c8d05c9d06 100644 --- a/openbb_sdk/openbb/package/stocks_ca.py +++ b/openbb_sdk/openbb/package/stocks_ca.py @@ -1,13 +1,13 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### -from typing import List, Literal, Union +from typing import List, Literal, Optional, Union -import typing_extensions from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.model.obbject import OBBject from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_inputs from pydantic import BaseModel, validate_arguments +from typing_extensions import Annotated class CLASS_stocks_ca(Container): @@ -21,11 +21,11 @@ class CLASS_stocks_ca(Container): @validate_arguments def peers( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[BaseModel]: """Company peers. @@ -34,7 +34,7 @@ class CLASS_stocks_ca(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -44,7 +44,7 @@ class CLASS_stocks_ca(Container): OBBject results : List[StockPeers] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. diff --git a/openbb_sdk/openbb/package/stocks_dd.py b/openbb_sdk/openbb/package/stocks_dd.py index 08d0e5aee52..2656ec811bf 100644 --- a/openbb_sdk/openbb/package/stocks_dd.py +++ b/openbb_sdk/openbb/package/stocks_dd.py @@ -1,13 +1,13 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### -from typing import List, Literal, Union +from typing import List, Literal, Optional, Union -import typing_extensions from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.model.obbject import OBBject from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_inputs from pydantic import validate_arguments +from typing_extensions import Annotated class CLASS_stocks_dd(Container): @@ -21,11 +21,11 @@ class CLASS_stocks_dd(Container): @validate_arguments def sec( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - type: typing_extensions.Annotated[ + type: Annotated[ Literal[ "1", "1-A", @@ -130,15 +130,15 @@ class CLASS_stocks_dd(Container): ], OpenBBCustomParameter(description="Type of the SEC filing form."), ] = "10-K", - page: typing_extensions.Annotated[ - Union[int, None], + page: Annotated[ + Optional[int], OpenBBCustomParameter(description="Page number of the results."), ] = 0, - limit: typing_extensions.Annotated[ - Union[int, None], + limit: Annotated[ + Optional[int], OpenBBCustomParameter(description="The number of data entries to return."), ] = 100, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """SEC Filings. @@ -149,11 +149,11 @@ class CLASS_stocks_dd(Container): Symbol to get data for. type : Literal['1', '1-A', '1-E', '1-K', '1-N', '1-SA', '1-U', '1-Z', '10', '10-D', '10-K', '10-M', '10-Q', '11-K', '12b-25', '13F', '13H', '144', '15', '15F', '17-H', '18', '18-K', '19b-4', '19b-4(e)', '19b-7', '2-E', '20-F', '24F-2', '25', '3', '4', '40-F', '5', '6-K', '7-M', '8-A', '8-K', '8-M', '9-M', 'ABS-15G', 'ABS-EE', 'ABS DD-15E', 'ADV', 'ADV-E', 'ADV-H', 'ADV-NR', 'ADV-W', 'ATS', 'ATS-N', 'ATS-R', 'BD', 'BD-N', 'BDW', 'C', 'CA-1', 'CB', 'CFPORTAL', 'CRS', 'CUSTODY', 'D', 'F-1', 'F-10', 'F-3', 'F-4', 'F-6', 'F-7', 'F-8', 'F-80', 'F-N', 'F-X', 'ID', 'MA', 'MA-I', 'MA-NR', 'MA-W', 'MSD', 'MSDW', 'N-14', 'N-17D-1', 'N-17f-1', 'N-17f-2', 'N-18f-1', 'N-1A', 'N-2', 'N-23c-3', 'N-27D-1', 'N-3', 'N-4', 'N-5', 'N-54A', 'N-54C', 'N-6', 'N-6EI-1', 'N-6F', 'N-8A', 'N-8B-2', 'N-8B-4', 'N-8F', 'N-CEN'] Type of the SEC filing form. - page : Union[int, NoneType] + page : Optional[int] Page number of the results. - limit : Union[int, NoneType] + limit : Optional[int] The number of data entries to return. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -163,7 +163,7 @@ class CLASS_stocks_dd(Container): OBBject results : List[SECFilings] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. diff --git a/openbb_sdk/openbb/package/stocks_fa.py b/openbb_sdk/openbb/package/stocks_fa.py index ccbf8cdc115..1f6f8a404f9 100644 --- a/openbb_sdk/openbb/package/stocks_fa.py +++ b/openbb_sdk/openbb/package/stocks_fa.py @@ -1,16 +1,16 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### import datetime -from typing import List, Literal, Union +from typing import List, Literal, Optional, Union import pydantic import pydantic.main -import typing_extensions from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.model.obbject import OBBject from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_inputs from pydantic import BaseModel, validate_arguments +from typing_extensions import Annotated class CLASS_stocks_fa(Container): @@ -50,19 +50,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def balance( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - period: typing_extensions.Annotated[ + period: Annotated[ Literal["annual", "quarter"], OpenBBCustomParameter(description="Period of the data to return."), ] = "annual", - limit: typing_extensions.Annotated[ - Union[pydantic.types.NonNegativeInt, None], + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], OpenBBCustomParameter(description="The number of data entries to return."), ] = 12, - provider: Union[Literal["fmp", "intrinio", "polygon", "yfinance"], None] = None, + provider: Optional[Literal["fmp", "polygon", "yfinance"]] = None, **kwargs ) -> OBBject[List]: """Balance Sheet. @@ -73,47 +73,43 @@ class CLASS_stocks_fa(Container): Symbol to get data for. period : Literal['annual', 'quarter'] Period of the data to return. - limit : Union[pydantic.types.NonNegativeInt, NoneType] + limit : Optional[pydantic.types.NonNegativeInt] The number of data entries to return. - provider : Union[Literal['fmp', 'intrinio', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['fmp', 'polygon', 'yfinance']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. - type : Literal['reported', 'standardized'] - Type of the statement to be fetched. (provider: intrinio) - year : Union[int, NoneType] - Year of the statement to be fetched. (provider: intrinio) - company_name : Union[str, NoneType] + company_name : Optional[str] Name of the company. (provider: polygon) - company_name_search : Union[str, NoneType] + company_name_search : Optional[str] Name of the company to search. (provider: polygon) - sic : Union[str, NoneType] + sic : Optional[str] The Standard Industrial Classification (SIC) of the company. (provider: polygon) - filing_date : Union[datetime.date, NoneType] + filing_date : Optional[datetime.date] Filing date of the financial statement. (provider: polygon) - filing_date_lt : Union[datetime.date, NoneType] + filing_date_lt : Optional[datetime.date] Filing date less than the given date. (provider: polygon) - filing_date_lte : Union[datetime.date, NoneType] + filing_date_lte : Optional[datetime.date] Filing date less than or equal to the given date. (provider: polygon) - filing_date_gt : Union[datetime.date, NoneType] + filing_date_gt : Optional[datetime.date] Filing date greater than the given date. (provider: polygon) - filing_date_gte : Union[datetime.date, NoneType] + filing_date_gte : Optional[datetime.date] Filing date greater than or equal to the given date. (provider: polygon) - period_of_report_date : Union[datetime.date, NoneType] + period_of_report_date : Optional[datetime.date] Period of report date of the financial statement. (provider: polygon) - period_of_report_date_lt : Union[datetime.date, NoneType] + period_of_report_date_lt : Optional[datetime.date] Period of report date less than the given date. (provider: polygon) - period_of_report_date_lte : Union[datetime.date, NoneType] + period_of_report_date_lte : Optional[datetime.date] Period of report date less than or equal to the given date. (provider: polygon) - period_of_report_date_gt : Union[datetime.date, NoneType] + period_of_report_date_gt : Optional[datetime.date] Period of report date greater than the given date. (provider: polygon) - period_of_report_date_gte : Union[datetime.date, NoneType] + period_of_report_date_gte : Optional[datetime.date] Period of report date greater than or equal to the given date. (provider: polygon) - include_sources : Union[bool, NoneType] + include_sources : Optional[bool] Whether to include the sources of the financial statement. (provider: polygon) - order : Union[Literal['asc', 'desc'], NoneType] + order : Optional[Literal['asc', 'desc']] Order of the financial statement. (provider: polygon) - sort : Union[Literal['filing_date', 'period_of_report_date'], NoneType] + sort : Optional[Literal['filing_date', 'period_of_report_date']] Sort of the financial statement. (provider: polygon) Returns @@ -121,7 +117,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[BalanceSheet] Serializable results. - provider : Union[Literal['fmp', 'intrinio', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['fmp', 'polygon', 'yfinance']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -261,15 +257,15 @@ class CLASS_stocks_fa(Container): @validate_arguments def balance_growth( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - limit: typing_extensions.Annotated[ + limit: Annotated[ int, OpenBBCustomParameter(description="The number of data entries to return."), ] = 10, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Balance Sheet Statement Growth. @@ -280,7 +276,7 @@ class CLASS_stocks_fa(Container): Symbol to get data for. limit : int The number of data entries to return. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -290,7 +286,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[BalanceSheetGrowth] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -405,19 +401,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def cal( self, - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Show Dividend Calendar for a given start and end dates. @@ -428,7 +424,7 @@ class CLASS_stocks_fa(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -438,7 +434,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[DividendCalendar] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -485,19 +481,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def cash( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - period: typing_extensions.Annotated[ + period: Annotated[ Literal["annual", "quarter"], OpenBBCustomParameter(description="Period of the data to return."), ] = "annual", - limit: typing_extensions.Annotated[ - Union[pydantic.types.NonNegativeInt, None], + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], OpenBBCustomParameter(description="The number of data entries to return."), ] = 12, - provider: Union[Literal["fmp", "intrinio", "polygon", "yfinance"], None] = None, + provider: Optional[Literal["fmp", "polygon", "yfinance"]] = None, **kwargs ) -> OBBject[List]: """Cash Flow Statement. @@ -508,47 +504,43 @@ class CLASS_stocks_fa(Container): Symbol to get data for. period : Literal['annual', 'quarter'] Period of the data to return. - limit : Union[pydantic.types.NonNegativeInt, NoneType] + limit : Optional[pydantic.types.NonNegativeInt] The number of data entries to return. - provider : Union[Literal['fmp', 'intrinio', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['fmp', 'polygon', 'yfinance']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. - type : Literal['reported', 'standardized'] - Type of the statement to be fetched. (provider: intrinio) - year : Union[int, NoneType] - Year of the statement to be fetched. (provider: intrinio) - company_name : Union[str, NoneType] + company_name : Optional[str] Name of the company. (provider: polygon) - company_name_search : Union[str, NoneType] + company_name_search : Optional[str] Name of the company to search. (provider: polygon) - sic : Union[str, NoneType] + sic : Optional[str] The Standard Industrial Classification (SIC) of the company. (provider: polygon) - filing_date : Union[datetime.date, NoneType] + filing_date : Optional[datetime.date] Filing date of the financial statement. (provider: polygon) - filing_date_lt : Union[datetime.date, NoneType] + filing_date_lt : Optional[datetime.date] Filing date less than the given date. (provider: polygon) - filing_date_lte : Union[datetime.date, NoneType] + filing_date_lte : Optional[datetime.date] Filing date less than or equal to the given date. (provider: polygon) - filing_date_gt : Union[datetime.date, NoneType] + filing_date_gt : Optional[datetime.date] Filing date greater than the given date. (provider: polygon) - filing_date_gte : Union[datetime.date, NoneType] + filing_date_gte : Optional[datetime.date] Filing date greater than or equal to the given date. (provider: polygon) - period_of_report_date : Union[datetime.date, NoneType] + period_of_report_date : Optional[datetime.date] Period of report date of the financial statement. (provider: polygon) - period_of_report_date_lt : Union[datetime.date, NoneType] + period_of_report_date_lt : Optional[datetime.date] Period of report date less than the given date. (provider: polygon) - period_of_report_date_lte : Union[datetime.date, NoneType] + period_of_report_date_lte : Optional[datetime.date] Period of report date less than or equal to the given date. (provider: polygon) - period_of_report_date_gt : Union[datetime.date, NoneType] + period_of_report_date_gt : Optional[datetime.date] Period of report date greater than the given date. (provider: polygon) - period_of_report_date_gte : Union[datetime.date, NoneType] + period_of_report_date_gte : Optional[datetime.date] Period of report date greater than or equal to the given date. (provider: polygon) - include_sources : Union[bool, NoneType] + include_sources : Optional[bool] Whether to include the sources of the financial statement. (provider: polygon) - order : Union[Literal['asc', 'desc'], NoneType] + order : Optional[Literal['asc', 'desc']] Order of the financial statement. (provider: polygon) - sort : Union[Literal['filing_date', 'period_of_report_date'], NoneType] + sort : Optional[Literal['filing_date', 'period_of_report_date']] Sort of the financial statement. (provider: polygon) Returns @@ -556,7 +548,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[CashFlowStatement] Serializable results. - provider : Union[Literal['fmp', 'intrinio', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['fmp', 'polygon', 'yfinance']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -682,15 +674,15 @@ class CLASS_stocks_fa(Container): @validate_arguments def cash_growth( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - limit: typing_extensions.Annotated[ + limit: Annotated[ int, OpenBBCustomParameter(description="The number of data entries to return."), ] = 10, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Cash Flow Statement Growth. @@ -701,7 +693,7 @@ class CLASS_stocks_fa(Container): Symbol to get data for. limit : int The number of data entries to return. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -711,7 +703,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[CashFlowStatementGrowth] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -808,11 +800,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def comp( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Executive Compensation. @@ -821,7 +813,7 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -831,7 +823,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[ExecutiveCompensation] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -887,19 +879,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def comsplit( self, - start_date: typing_extensions.Annotated[ + start_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="Start date of the data, in YYYY-MM-DD format." ), ] = None, - end_date: typing_extensions.Annotated[ + end_date: Annotated[ Union[datetime.date, None, str], OpenBBCustomParameter( description="End date of the data, in YYYY-MM-DD format." ), ] = None, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Stock Split Calendar. @@ -910,7 +902,7 @@ class CLASS_stocks_fa(Container): Start date of the data, in YYYY-MM-DD format. end_date : Union[datetime.date, NoneType, str] End date of the data, in YYYY-MM-DD format. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -920,7 +912,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[StockSplitCalendar] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -961,11 +953,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def divs( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Historical Dividends. @@ -974,7 +966,7 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -984,7 +976,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[HistoricalDividends] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -1028,15 +1020,15 @@ class CLASS_stocks_fa(Container): @validate_arguments def earning( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - limit: typing_extensions.Annotated[ - Union[int, None], + limit: Annotated[ + Optional[int], OpenBBCustomParameter(description="The number of data entries to return."), ] = 50, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Earnings Calendar. @@ -1045,9 +1037,9 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - limit : Union[int, NoneType] + limit : Optional[int] The number of data entries to return. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -1057,7 +1049,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[EarningsCalendar] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -1106,11 +1098,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def emp( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Number of Employees. @@ -1119,7 +1111,7 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -1129,7 +1121,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[HistoricalEmployees] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -1177,19 +1169,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def est( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - period: typing_extensions.Annotated[ - Literal["quarter", "annual"], + period: Annotated[ + Literal["annual", "quarter"], OpenBBCustomParameter(description="Period of the data to return."), ] = "annual", - limit: typing_extensions.Annotated[ + limit: Annotated[ int, OpenBBCustomParameter(description="The number of data entries to return."), ] = 30, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Analyst Estimates. @@ -1198,11 +1190,11 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - period : Literal['quarter', 'annual'] + period : Literal['annual', 'quarter'] Period of the data to return. limit : int The number of data entries to return. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -1212,7 +1204,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[AnalystEstimates] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -1288,19 +1280,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def income( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - period: typing_extensions.Annotated[ + period: Annotated[ Literal["annual", "quarter"], OpenBBCustomParameter(description="Period of the data to return."), ] = "annual", - limit: typing_extensions.Annotated[ - Union[pydantic.types.NonNegativeInt, None], + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], OpenBBCustomParameter(description="The number of data entries to return."), ] = 12, - provider: Union[Literal["fmp", "intrinio", "polygon", "yfinance"], None] = None, + provider: Optional[Literal["fmp", "polygon", "yfinance"]] = None, **kwargs ) -> OBBject[List]: """Income Statement. @@ -1311,47 +1303,43 @@ class CLASS_stocks_fa(Container): Symbol to get data for. period : Literal['annual', 'quarter'] Period of the data to return. - limit : Union[pydantic.types.NonNegativeInt, NoneType] + limit : Optional[pydantic.types.NonNegativeInt] The number of data entries to return. - provider : Union[Literal['fmp', 'intrinio', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['fmp', 'polygon', 'yfinance']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. - type : Literal['reported', 'standardized'] - Type of the statement to be fetched. (provider: intrinio) - year : Union[int, NoneType] - Year of the statement to be fetched. (provider: intrinio) - company_name : Union[str, NoneType] + company_name : Optional[str] Name of the company. (provider: polygon) - company_name_search : Union[str, NoneType] + company_name_search : Optional[str] Name of the company to search. (provider: polygon) - sic : Union[str, NoneType] + sic : Optional[str] The Standard Industrial Classification (SIC) of the company. (provider: polygon) - filing_date : Union[datetime.date, NoneType] + filing_date : Optional[datetime.date] Filing date of the financial statement. (provider: polygon) - filing_date_lt : Union[datetime.date, NoneType] + filing_date_lt : Optional[datetime.date] Filing date less than the given date. (provider: polygon) - filing_date_lte : Union[datetime.date, NoneType] + filing_date_lte : Optional[datetime.date] Filing date less than or equal to the given date. (provider: polygon) - filing_date_gt : Union[datetime.date, NoneType] + filing_date_gt : Optional[datetime.date] Filing date greater than the given date. (provider: polygon) - filing_date_gte : Union[datetime.date, NoneType] + filing_date_gte : Optional[datetime.date] Filing date greater than or equal to the given date. (provider: polygon) - period_of_report_date : Union[datetime.date, NoneType] + period_of_report_date : Optional[datetime.date] Period of report date of the financial statement. (provider: polygon) - period_of_report_date_lt : Union[datetime.date, NoneType] + period_of_report_date_lt : Optional[datetime.date] Period of report date less than the given date. (provider: polygon) - period_of_report_date_lte : Union[datetime.date, NoneType] + period_of_report_date_lte : Optional[datetime.date] Period of report date less than or equal to the given date. (provider: polygon) - period_of_report_date_gt : Union[datetime.date, NoneType] + period_of_report_date_gt : Optional[datetime.date] Period of report date greater than the given date. (provider: polygon) - period_of_report_date_gte : Union[datetime.date, NoneType] + period_of_report_date_gte : Optional[datetime.date] Period of report date greater than or equal to the given date. (provider: polygon) - include_sources : Union[bool, NoneType] + include_sources : Optional[bool] Whether to include the sources of the financial statement. (provider: polygon) - order : Union[Literal['asc', 'desc'], NoneType] + order : Optional[Literal['asc', 'desc']] Order of the financial statement. (provider: polygon) - sort : Union[Literal['filing_date', 'period_of_report_date'], NoneType] + sort : Optional[Literal['filing_date', 'period_of_report_date']] Sort of the financial statement. (provider: polygon) Returns @@ -1359,7 +1347,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[IncomeStatement] Serializable results. - provider : Union[Literal['fmp', 'intrinio', 'polygon', 'yfinance'], NoneType] + provider : Optional[Literal['fmp', 'polygon', 'yfinance']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -1475,19 +1463,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def income_growth( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - limit: typing_extensions.Annotated[ + limit: Annotated[ int, OpenBBCustomParameter(description="The number of data entries to return."), ] = 10, - period: typing_extensions.Annotated[ + period: Annotated[ Literal["annual", "quarter"], OpenBBCustomParameter(description="Period of the data to return."), ] = "annual", - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Income Statement Growth. @@ -1500,7 +1488,7 @@ class CLASS_stocks_fa(Container): The number of data entries to return. period : Literal['annual', 'quarter'] Period of the data to return. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -1510,7 +1498,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[IncomeStatementGrowth] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -1600,12 +1588,12 @@ class CLASS_stocks_fa(Container): @validate_arguments def ins( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - transactionType: typing_extensions.Annotated[ - Union[ + transactionType: Annotated[ + Optional[ List[ Literal[ "A-Award", @@ -1627,24 +1615,23 @@ class CLASS_stocks_fa(Container): "X-InTheMoney", "Z-Trust", ] - ], - None, + ] ], OpenBBCustomParameter(description="Type of the transaction."), ] = ["P-Purchase"], - reportingCik: typing_extensions.Annotated[ - Union[int, None], + reportingCik: Annotated[ + Optional[int], OpenBBCustomParameter(description="CIK of the reporting owner."), ] = None, - companyCik: typing_extensions.Annotated[ - Union[int, None], + companyCik: Annotated[ + Optional[int], OpenBBCustomParameter(description="CIK of the company owner."), ] = None, - page: typing_extensions.Annotated[ - Union[int, None], + page: Annotated[ + Optional[int], OpenBBCustomParameter(description="Page number of the data to fetch."), ] = 0, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Stock Insider Trading. @@ -1653,15 +1640,15 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - transactionType : Union[List[Literal['A-Award', 'C-Conversion', 'D-Return', 'E-ExpireShort', 'F-InKind', 'G-Gift', 'H-ExpireLong', 'I-Discretionary', 'J-Other', 'L-Small', 'M-Exempt', 'O-OutOfTheMoney', 'P-Purchase', 'S-Sale', 'U-Tender', 'W-Will', 'X-InTheMoney', 'Z-Trust']], NoneType] + transactionType : Optional[List[Literal['A-Award', 'C-Conversion', 'D-Return', 'E-ExpireShort', 'F-InKind', 'G-Gift', 'H-ExpireLong', 'I-Discretionary', 'J-Other', 'L-Small', 'M-Exempt', 'O-OutOfTheMoney', 'P-Purchase', 'S-Sale', 'U-Tender', 'W-Will', 'X-InTheMoney', 'Z-Trust']]] Type of the transaction. - reportingCik : Union[int, NoneType] + reportingCik : Optional[int] CIK of the reporting owner. - companyCik : Union[int, NoneType] + companyCik : Optional[int] CIK of the company owner. - page : Union[int, NoneType] + page : Optional[int] Page number of the data to fetch. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -1671,7 +1658,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[StockInsiderTrading] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -1735,18 +1722,18 @@ class CLASS_stocks_fa(Container): @validate_arguments def ins_own( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - include_current_quarter: typing_extensions.Annotated[ + include_current_quarter: Annotated[ bool, OpenBBCustomParameter(description="Include current quarter data.") ] = False, - date: typing_extensions.Annotated[ - Union[datetime.date, None], + date: Annotated[ + Optional[datetime.date], OpenBBCustomParameter(description="A specific date to get data for."), ] = None, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Institutional Ownership. @@ -1757,9 +1744,9 @@ class CLASS_stocks_fa(Container): Symbol to get data for. include_current_quarter : bool Include current quarter data. - date : Union[datetime.date, NoneType] + date : Optional[datetime.date] A specific date to get data for. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -1769,7 +1756,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[InstitutionalOwnership] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -1874,19 +1861,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def metrics( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - period: typing_extensions.Annotated[ + period: Annotated[ Literal["annual", "quarter"], OpenBBCustomParameter(description="Period of the data to return."), ] = "annual", - limit: typing_extensions.Annotated[ - Union[int, None], + limit: Annotated[ + Optional[int], OpenBBCustomParameter(description="The number of data entries to return."), ] = 100, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Key Metrics. @@ -1897,9 +1884,9 @@ class CLASS_stocks_fa(Container): Symbol to get data for. period : Literal['annual', 'quarter'] Period of the data to return. - limit : Union[int, NoneType] + limit : Optional[int] The number of data entries to return. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -1909,7 +1896,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[KeyMetrics] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -2061,11 +2048,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def mgmt( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Key Executives. @@ -2074,7 +2061,7 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -2084,7 +2071,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[KeyExecutives] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -2128,11 +2115,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def overview( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[BaseModel]: """Company Overview. @@ -2141,7 +2128,7 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -2151,7 +2138,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[CompanyOverview] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -2253,19 +2240,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def own( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - date: typing_extensions.Annotated[ - Union[datetime.date, None], + date: Annotated[ + Optional[datetime.date], OpenBBCustomParameter(description="A specific date to get data for."), ] = None, - page: typing_extensions.Annotated[ - Union[int, None], + page: Annotated[ + Optional[int], OpenBBCustomParameter(description="Page number of the data to fetch."), ] = 0, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Stock Ownership. @@ -2274,11 +2261,11 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - date : Union[datetime.date, NoneType] + date : Optional[datetime.date] A specific date to get data for. - page : Union[int, NoneType] + page : Optional[int] Page number of the data to fetch. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -2288,7 +2275,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[StockOwnership] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -2398,11 +2385,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def pt( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[BaseModel]: """Price Target Consensus. @@ -2411,7 +2398,7 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -2421,7 +2408,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[PriceTargetConsensus] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -2461,11 +2448,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def pta( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Price Target. @@ -2474,7 +2461,7 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -2486,7 +2473,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[PriceTarget] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -2544,19 +2531,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def ratios( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - period: typing_extensions.Annotated[ + period: Annotated[ Literal["annual", "quarter"], OpenBBCustomParameter(description="Period of the data to return."), ] = "annual", - limit: typing_extensions.Annotated[ - Union[pydantic.types.NonNegativeInt, None], + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], OpenBBCustomParameter(description="The number of data entries to return."), ] = 12, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Extensive set of ratios over time. @@ -2567,9 +2554,9 @@ class CLASS_stocks_fa(Container): Symbol to get data for. period : Literal['annual', 'quarter'] Period of the data to return. - limit : Union[pydantic.types.NonNegativeInt, NoneType] + limit : Optional[pydantic.types.NonNegativeInt] The number of data entries to return. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -2579,7 +2566,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[FinancialRatios] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -2725,19 +2712,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def revgeo( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - period: typing_extensions.Annotated[ - Literal["quarter", "annual"], + period: Annotated[ + Literal["annual", "quarter"], OpenBBCustomParameter(description="Period of the data to return."), ] = "annual", - structure: typing_extensions.Annotated[ + structure: Annotated[ Literal["hierarchical", "flat"], OpenBBCustomParameter(description="Structure of the returned data."), ] = "flat", - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Revenue Geographic. @@ -2746,11 +2733,11 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - period : Literal['quarter', 'annual'] + period : Literal['annual', 'quarter'] Period of the data to return. structure : Literal['hierarchical', 'flat'] Structure of the returned data. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -2760,7 +2747,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[RevenueGeographic] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -2806,19 +2793,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def revseg( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - period: typing_extensions.Annotated[ - Literal["quarter", "annual"], + period: Annotated[ + Literal["annual", "quarter"], OpenBBCustomParameter(description="Period of the data to return."), ] = "annual", - structure: typing_extensions.Annotated[ + structure: Annotated[ Literal["hierarchical", "flat"], OpenBBCustomParameter(description="Structure of the returned data."), ] = "flat", - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Revenue Business Line. @@ -2827,11 +2814,11 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - period : Literal['quarter', 'annual'] + period : Literal['annual', 'quarter'] Period of the data to return. structure : Literal['hierarchical', 'flat'] Structure of the returned data. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -2841,7 +2828,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[RevenueBusinessLine] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -2877,11 +2864,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def shrs( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Share Statistics. @@ -2890,7 +2877,7 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -2900,7 +2887,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[ShareStatistics] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -2942,11 +2929,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def split( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Historical Stock Splits. @@ -2955,7 +2942,7 @@ class CLASS_stocks_fa(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -2965,7 +2952,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[HistoricalStockSplits] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -3003,21 +2990,21 @@ class CLASS_stocks_fa(Container): @validate_arguments def transcript( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - year: typing_extensions.Annotated[ + year: Annotated[ int, OpenBBCustomParameter(description="Year of the earnings call transcript."), ], - quarter: typing_extensions.Annotated[ + quarter: Annotated[ Literal[1, 2, 3, 4], OpenBBCustomParameter( description="Quarter of the earnings call transcript." ), ] = 1, - provider: Union[Literal["fmp"], None] = None, + provider: Optional[Literal["fmp"]] = None, **kwargs ) -> OBBject[List]: """Earnings Call Transcript. @@ -3030,7 +3017,7 @@ class CLASS_stocks_fa(Container): Year of the earnings call transcript. quarter : Literal[1, 2, 3, 4] Quarter of the earnings call transcript. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'fmp' if there is no default. @@ -3040,7 +3027,7 @@ class CLASS_stocks_fa(Container): OBBject results : List[EarningsCallTranscript] Serializable results. - provider : Union[Literal['fmp'], NoneType] + provider : Optional[Literal['fmp']] Provider name. warnings : Optional[List[Warning_]] List of warnings. diff --git a/openbb_sdk/openbb/package/stocks_options.py b/openbb_sdk/openbb/package/stocks_options.py index 9363e2ddc7b..8b5fc5dc315 100644 --- a/openbb_sdk/openbb/package/stocks_options.py +++ b/openbb_sdk/openbb/package/stocks_options.py @@ -1,13 +1,13 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### -from typing import List, Literal, Union +from typing import List, Literal, Optional, Union -import typing_extensions from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.model.obbject import OBBject from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_inputs from pydantic import validate_arguments +from typing_extensions import Annotated class CLASS_stocks_options(Container): @@ -21,11 +21,11 @@ class CLASS_stocks_options(Container): @validate_arguments def chains( self, - symbol: typing_extensions.Annotated[ + symbol: Annotated[ Union[str, List[str]], OpenBBCustomParameter(description="Symbol to get data for."), ], - provider: Union[Literal["cboe", "intrinio"], None] = None, + provider: Optional[Literal["cboe"]] = None, **kwargs ) -> OBBject[List]: """Get the complete options chain for a ticker. @@ -34,19 +34,17 @@ class CLASS_stocks_options(Container): ---------- symbol : Union[str, List[str]] Symbol to get data for. - provider : Union[Literal['cboe', 'intrinio'], NoneType] + provider : Optional[Literal['cboe']] The provider to use for the query, by default None. If None, the provider specified in defaults is selected or 'cboe' if there is no default. - date : Union[datetime.date, str, NoneType] - Date for which the options chains are returned. (provider: intrinio) Returns ------- OBBject results : List[OptionsChains] Serializable results. - provider : Union[Literal['cboe', 'intrinio'], NoneType] + provider : Optional[Literal['cboe']] Provider name. warnings : Optional[List[Warning_]] List of warnings. @@ -80,11 +78,11 @@ class CLASS_stocks_options(Container): theoretical : Optional[float] Theoretical value of the option. (provider: cboe) open : Optional[float] - Opening price of the option. (provider: cboe, intrinio) + Opening price of the option. (provider: cboe) high : Optional[float] - High price of the option. (provider: cboe, intrinio) + High price of the option. (provider: cboe) low : Optional[float] - Low price of the option. (provider: cboe, intrinio) + Low price of the option. (provider: cboe) last_trade_price : Optional[float] Last trade price of the option. (provider: cboe) tick : Optional[str] @@ -96,40 +94,21 @@ class CLASS_stocks_options(Container): change_percent : Optional[float] Change, in percent, of the option. (provider: cboe) implied_volatility : Optional[float] - Implied volatility of the option. (provider: cboe, intrinio) + Implied volatility of the option. (provider: cboe) delta : Optional[float] - Delta of the option. (provider: cboe, intrinio) + Delta of the option. (provider: cboe) gamma : Optional[float] - Gamma of the option. (provider: cboe, intrinio) + Gamma of the option. (provider: cboe) vega : Optional[float] - Vega of the option. (provider: cboe, intrinio) + Vega of the option. (provider: cboe) theta : Optional[float] - Theta of the option. (provider: cboe, intrinio) + Theta of the option. (provider: cboe) rho : Optional[float] Rho of the option. (provider: cboe) last_trade_timestamp : Optional[datetime] Last trade timestamp of the option. (provider: cboe) dte : Optional[int] - Days to expiration for the option. (provider: cboe, intrinio) - mark : Optional[float] - The mid-price between the latest bid-ask spread. (provider: intrinio) - open_bid : Optional[float] - The lowest bid price for the option that day. (provider: intrinio) - open_ask : Optional[float] - The lowest ask price for the option that day. (provider: intrinio) - bid_low : Optional[float] - The lowest bid price for the option that day. (provider: intrinio) - ask_low : Optional[float] - The lowest ask price for the option that day. (provider: intrinio) - bid_high : Optional[float] - The highest bid price for the option that day. (provider: intrinio) - ask_high : Optional[float] - The highest ask price for the option that day. (provider: intrinio) - close : Optional[float] - Close price for the option that day. (provider: intrinio) - eod_date : Optional[date] - Historical date for which the options chains data is from. (provider: intrinio) - """ # noqa: E501 + Days to expiration for the option. (provider: cboe)""" # noqa: E501 inputs = filter_inputs( provider_choices={ diff --git a/openbb_sdk/openbb/package/ta.py b/openbb_sdk/openbb/package/ta.py index be11bdd7747..3cfc2d7a1e8 100644 --- a/openbb_sdk/openbb/package/ta.py +++ b/openbb_sdk/openbb/package/ta.py @@ -1,6 +1,6 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### -from typing import List, Literal, Union +from typing import List, Literal, Optional, Union import openbb_provider import pandas @@ -783,8 +783,8 @@ class CLASS_ta(Container): index: str = "date", close_column: Literal["close", "adj_close"] = "close", period: pydantic.types.PositiveInt = 120, - start_date: Union[str, None] = None, - end_date: Union[str, None] = None, + start_date: Optional[str] = None, + end_date: Optional[str] = None, ) -> OBBject[List]: """Create Fibonacci Retracement Levels. diff --git a/openbb_sdk/providers/tests/test_provider_field_dupes.py b/openbb_sdk/providers/tests/test_provider_field_dupes.py index 67afbf6b85c..144b65d4107 100644 --- a/openbb_sdk/providers/tests/test_provider_field_dupes.py +++ b/openbb_sdk/providers/tests/test_provider_field_dupes.py @@ -1,3 +1,4 @@ +"""Test for duplicate fields in the provider models.""" import fnmatch import glob import importlib @@ -55,8 +56,9 @@ def get_subclasses_w_keys(module: object, cls: Type) -> Dict[Type, List[str]]: def get_subclasses( python_files: List[str], package_name: str, cls: Type -) -> Dict[str, Type]: - """ +) -> Dict[Type, List[str]]: + """Get subclasses of a class defined in a list of python files. + Given a list of python files, and a class, return a dictionary of subclasses of that class that are defined in those files. @@ -113,12 +115,14 @@ def child_parent_map(map_: Dict, parents: Dict, module: object) -> None: class ProviderFieldDupesTest(unittest.TestCase): + """Test for duplicate fields in the provider models.""" + def test_provider_field_dupes(self): - """ + """Check for duplicate fields in the provider models. + This function checks for duplicate fields in the provider models and identifies the fields that should be standardized. """ - standard_models_directory = os.path.dirname(standard_models.__file__) standard_models_files = glob.glob( os.path.join(standard_models_directory, "*.py")