diff options
Diffstat (limited to 'openbb_platform/openbb/package/equity_discovery.py')
-rw-r--r-- | openbb_platform/openbb/package/equity_discovery.py | 546 |
1 files changed, 546 insertions, 0 deletions
diff --git a/openbb_platform/openbb/package/equity_discovery.py b/openbb_platform/openbb/package/equity_discovery.py index 0df5fc8ed8f..2eed49a0023 100644 --- a/openbb_platform/openbb/package/equity_discovery.py +++ b/openbb_platform/openbb/package/equity_discovery.py @@ -13,13 +13,174 @@ from typing_extensions import Annotated class ROUTER_equity_discovery(Container): """/equity/discovery + active + aggressive_small_caps filings + gainers + growth_tech + losers + undervalued_growth + undervalued_large_caps """ def __repr__(self) -> str: return self.__doc__ or "" @validate + def active( + self, + sort: Annotated[ + str, + OpenBBCustomParameter( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Optional[Literal["yfinance"]] = None, + **kwargs + ) -> OBBject: + """Get the most active Equities. + + Parameters + ---------- + sort : str + Sort order. Possible values: 'asc', 'desc'. Default: 'desc'. + 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. + + Returns + ------- + OBBject + results : List[EquityActive] + Serializable results. + provider : Optional[Literal['yfinance']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra: Dict[str, Any] + Extra info. + + EquityActive + ------------ + symbol : str + Symbol representing the entity requested in the data. + name : str + Name of the entity. + price : float + Last price. + change : float + Change in price value. + percent_change : float + Percent change. + volume : float + The trading volume. + market_cap : Optional[str] + Market Cap displayed in billions. (provider: yfinance) + avg_volume_3_months : Optional[float] + Average volume over the last 3 months in millions. (provider: yfinance) + pe_ratio_ttm : Optional[float] + PE Ratio (TTM). (provider: yfinance) + + Example + ------- + >>> from openbb import obb + >>> obb.equity.discovery.active(sort="desc") + """ # noqa: E501 + + return self._run( + "/equity/discovery/active", + **filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "sort": sort, + }, + extra_params=kwargs, + ) + ) + + @validate + def aggressive_small_caps( + self, + sort: Annotated[ + str, + OpenBBCustomParameter( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Optional[Literal["yfinance"]] = None, + **kwargs + ) -> OBBject: + """Get aggressive small cap Equities. + + Parameters + ---------- + sort : str + Sort order. Possible values: 'asc', 'desc'. Default: 'desc'. + 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. + + Returns + ------- + OBBject + results : List[EquityAggressiveSmallCaps] + Serializable results. + provider : Optional[Literal['yfinance']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra: Dict[str, Any] + Extra info. + + EquityAggressiveSmallCaps + ------------------------- + symbol : str + Symbol representing the entity requested in the data. + name : str + Name of the entity. + price : float + Last price. + change : float + Change in price value. + percent_change : float + Percent change. + volume : float + The trading volume. + market_cap : Optional[str] + Market Cap. (provider: yfinance) + avg_volume_3_months : Optional[float] + Average volume over the last 3 months in millions. (provider: yfinance) + pe_ratio_ttm : Optional[float] + PE Ratio (TTM). (provider: yfinance) + + Example + ------- + >>> from openbb import obb + >>> obb.equity.discovery.aggressive_small_caps(sort="desc") + """ # noqa: E501 + + return self._run( + "/equity/discovery/aggressive_small_caps", + **filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "sort": sort, + }, + extra_params=kwargs, + ) + ) + + @validate def filings( self, start_date: Annotated[ @@ -116,3 +277,388 @@ class ROUTER_equity_discovery(Container): extra_params=kwargs, ) ) + + @validate + def gainers( + self, + sort: Annotated[ + str, + OpenBBCustomParameter( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Optional[Literal["yfinance"]] = None, + **kwargs + ) -> OBBject: + """Get the top Equity gainers. + + Parameters + ---------- + sort : str + Sort order. Possible values: 'asc', 'desc'. Default: 'desc'. + 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. + + Returns + ------- + OBBject + results : List[EquityGainers] + Serializable results. + provider : Optional[Literal['yfinance']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra: Dict[str, Any] + Extra info. + + EquityGainers + ------------- + symbol : str + Symbol representing the entity requested in the data. + name : str + Name of the entity. + price : float + Last price. + change : float + Change in price value. + percent_change : float + Percent change. + volume : float + The trading volume. + market_cap : Optional[str] + Market Cap. (provider: yfinance) + avg_volume_3_months : Optional[float] + Average volume over the last 3 months in millions. (provider: yfinance) + pe_ratio_ttm : Optional[float] + PE Ratio (TTM). (provider: yfinance) + + Example + ------- + >>> from openbb import obb + >>> obb.equity.discovery.gainers(sort="desc") + """ # noqa: E501 + + return self._run( + "/equity/discovery/gainers", + **filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "sort": sort, + }, + extra_params=kwargs, + ) + ) + + @validate + def growth_tech( + self, + sort: Annotated[ + str, + OpenBBCustomParameter( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Optional[Literal["yfinance"]] = None, + **kwargs + ) -> OBBject: + """Get growth tech Equities. + + Parameters + ---------- + sort : str + Sort order. Possible values: 'asc', 'desc'. Default: 'desc'. + 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. + + Returns + ------- + OBBject + results : List[GrowthTechEquities] + Serializable results. + provider : Optional[Literal['yfinance']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra: Dict[str, Any] + Extra info. + + GrowthTechEquities + ------------------ + symbol : str + Symbol representing the entity requested in the data. + name : str + Name of the entity. + price : float + Last price. + change : float + Change in price value. + percent_change : float + Percent change. + volume : float + The trading volume. + market_cap : Optional[str] + Market Cap. (provider: yfinance) + avg_volume_3_months : Optional[float] + Average volume over the last 3 months in millions. (provider: yfinance) + pe_ratio_ttm : Optional[float] + PE Ratio (TTM). (provider: yfinance) + + Example + ------- + >>> from openbb import obb + >>> obb.equity.discovery.growth_tech(sort="desc") + """ # noqa: E501 + + return self._run( + "/equity/discovery/growth_tech", + **filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "sort": sort, + }, + extra_params=kwargs, + ) + ) + + @validate + def losers( + self, + sort: Annotated[ + str, + OpenBBCustomParameter( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Optional[Literal["yfinance"]] = None, + **kwargs + ) -> OBBject: + """Get the top Equity losers. + + Parameters + ---------- + sort : str + Sort order. Possible values: 'asc', 'desc'. Default: 'desc'. + 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. + + Returns + ------- + OBBject + results : List[EquityLosers] + Serializable results. + provider : Optional[Literal['yfinance']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra: Dict[str, Any] + Extra info. + + EquityLosers + ------------ + symbol : str + Symbol representing the entity requested in the data. + name : str + Name of the entity. + price : float + Last price. + change : float + Change in price value. + percent_change : float + Percent change. + volume : float + The trading volume. + market_cap : Optional[str] + Market Cap. (provider: yfinance) + avg_volume_3_months : Optional[float] + Average volume over the last 3 months in millions. (provider: yfinance) + pe_ratio_ttm : Optional[float] + PE Ratio (TTM). (provider: yfinance) + + Example + ------- + >>> from openbb import obb + >>> obb.equity.discovery.losers(sort="desc") + """ # noqa: E501 + + return self._run( + "/equity/discovery/losers", + **filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "sort": sort, + }, + extra_params=kwargs, + ) + ) + + @validate + def undervalued_growth( + self, + sort: Annotated[ + str, + OpenBBCustomParameter( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Optional[Literal["yfinance"]] = None, + **kwargs + ) -> OBBject: + """Get undervalued growth Equities. + + Parameters + ---------- + sort : str + Sort order. Possible values: 'asc', 'desc'. Default: 'desc'. + 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. + + Returns + ------- + OBBject + results : List[EquityUndervaluedGrowth] + Serializable results. + provider : Optional[Literal['yfinance']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra: Dict[str, Any] + Extra info. + + EquityUndervaluedGrowth + ----------------------- + symbol : str + Symbol representing the entity requested in the data. + name : str + Name of the entity. + price : float + Last price. + change : float + Change in price value. + percent_change : float + Percent change. + volume : float + The trading volume. + market_cap : Optional[str] + Market Cap. (provider: yfinance) + avg_volume_3_months : Optional[float] + Average volume over the last 3 months in millions. (provider: yfinance) + pe_ratio_ttm : Optional[float] + PE Ratio (TTM). (provider: yfinance) + + Example + ------- + >>> from openbb import obb + >>> obb.equity.discovery.undervalued_growth(sort="desc") + """ # noqa: E501 + + return self._run( + "/equity/discovery/undervalued_growth", + **filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "sort": sort, + }, + extra_params=kwargs, + ) + ) + + @validate + def undervalued_large_caps( + self, + sort: Annotated[ + str, + OpenBBCustomParameter( + description="Sort order. Possible values: 'asc', 'desc'. Default: 'desc'." + ), + ] = "desc", + provider: Optional[Literal["yfinance"]] = None, + **kwargs + ) -> OBBject: + """Get undervalued large cap Equities. + + Parameters + ---------- + sort : str + Sort order. Possible values: 'asc', 'desc'. Default: 'desc'. + 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. + + Returns + ------- + OBBject + results : List[EquityUndervaluedLargeCaps] + Serializable results. + provider : Optional[Literal['yfinance']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra: Dict[str, Any] + Extra info. + + EquityUndervaluedLargeCaps + -------------------------- + symbol : str + Symbol representing the entity requested in the data. + name : str + Name of the entity. + price : float + Last price. + change : float + Change in price value. + percent_change : float + Percent change. + volume : float + The trading volume. + market_cap : Optional[float] + Market Cap. (provider: yfinance) + avg_volume_3_months : Optional[float] + Average volume over the last 3 months in millions. (provider: yfinance) + pe_ratio_ttm : Optional[float] + PE Ratio (TTM). (provider: yfinance) + + Example + ------- + >>> from openbb import obb + >>> obb.equity.discovery.undervalued_large_caps(sort="desc") + """ # noqa: E501 + + return self._run( + "/equity/discovery/undervalued_large_caps", + **filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "sort": sort, + }, + extra_params=kwargs, + ) + ) |