From b9044b3fc730275c5846ce15a720a8f2db184c6d Mon Sep 17 00:00:00 2001 From: Diogo Sousa Date: Fri, 21 Jul 2023 13:56:47 +0100 Subject: [PATCH] publish package folder --- .gitignore | 1 - .../app/static/package/__init__.py | 1 + .../openbb_core/app/static/package/crypto.py | 119 + .../openbb_core/app/static/package/economy.py | 1038 +++++++ .../app/static/package/fixedincome.py | 118 + .../openbb_core/app/static/package/forex.py | 159 + .../app/static/package/module_map.json | 192 ++ .../openbb_core/app/static/package/news.py | 144 + .../openbb_core/app/static/package/root.py | 47 + .../openbb_core/app/static/package/stocks.py | 553 ++++ .../app/static/package/stocks_ca.py | 240 ++ .../app/static/package/stocks_dd.py | 93 + .../app/static/package/stocks_disc.py | 315 ++ .../app/static/package/stocks_dps.py | 213 ++ .../app/static/package/stocks_fa.py | 2559 +++++++++++++++++ .../app/static/package/stocks_gov.py | 198 ++ .../app/static/package/stocks_ins.py | 283 ++ .../app/static/package/stocks_options.py | 264 ++ 18 files changed, 6536 insertions(+), 1 deletion(-) create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/__init__.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/crypto.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/economy.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/fixedincome.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/forex.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/module_map.json create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/news.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/root.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/stocks.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_ca.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_dd.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_disc.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_dps.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_fa.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_gov.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_ins.py create mode 100644 openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_options.py diff --git a/.gitignore b/.gitignore index b534e2432fe..0cc14efea4c 100644 --- a/.gitignore +++ b/.gitignore @@ -72,7 +72,6 @@ custom_imports/*/*.csv # cache cache/ -openbb_sdk/sdk/core/openbb_core/app/static/package/ # lightning logs lightning_logs/ diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/__init__.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/__init__.py new file mode 100644 index 00000000000..3d627c7ba62 --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/__init__.py @@ -0,0 +1 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/crypto.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/crypto.py new file mode 100644 index 00000000000..beb48305792 --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/crypto.py @@ -0,0 +1,119 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import datetime +import typing +from typing import Literal, Optional, Union + +from pydantic import validate_arguments + +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_crypto(Container): + @filter_call + @validate_arguments + def load( + self, + symbol: str, + start_date: Union[datetime.date, None, str] = None, + end_date: Union[datetime.date, None, str] = None, + chart: bool = False, + provider: Optional[Literal["fmp", "polygon"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Crypto Intraday Price. + + Available providers: fmp, polygon + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + start_date : Optional[date] + The start date of the stock data from which to retrieve the data. + end_date : Optional[date] + The end date of the stock data up to which to retrieve the data. + + + Returns + ------- + date : datetime + The date of the stock. + open : PositiveFloat + The open price of the stock. + high : PositiveFloat + The high price of the stock. + low : PositiveFloat + The low price of the stock. + close : PositiveFloat + The close price of the stock. + adj_close : Optional[PositiveFloat] + The adjusted close price of the stock. + volume : PositiveFloat + The volume of the stock. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/#Cryptocurrencies + + Parameter + --------- + timeseries : Optional[int] + The number of days to look back. + serietype : Optional[Literal["line"]] + The type of the series. Only "line" is supported. + + + Returns + ------- + Documentation not available. + + + polygon + ======= + + Source: https://polygon.io/docs/crypto/get_v2_aggs_ticker__cryptoticker__range__multiplier___timespan___from___to + + Parameters + ---------- + timespan : Timespan, optional + The timespan of the query, by default Timespan.day + sort : Literal["asc", "desc"], optional + The sort order of the query, by default "desc" + limit : PositiveInt, optional + The limit of the query, by default 49999 + adjusted : bool, optional + Whether the query is adjusted, by default True + multiplier : PositiveInt, optional + The multiplier of the query, by default 1 + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "start_date": start_date, + "end_date": end_date, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/crypto/load", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/economy.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/economy.py new file mode 100644 index 00000000000..9678655907e --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/economy.py @@ -0,0 +1,1038 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import datetime +import typing +from typing import List, Literal, Optional, Union + +from pydantic import validate_arguments + +import openbb_core.app.model.command_context +import openbb_core.app.model.results.empty +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_economy(Container): + @filter_call + @validate_arguments + def corecpi( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """CORECPI.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/corecpi", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def const( + self, + index: Literal["nasdaq", "sp500", "dowjones"] = "dowjones", + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """ + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + index : Literal['nasdaq', 'sp500', 'dowjones'] + The index for which we want to fetch the constituents. Default is 'dowjones'. + + + Returns + ------- + symbol : str + The symbol of the constituent company in the index. + name : str + The name of the constituent company in the index. + sector : str + The sector the constituent company in the index belongs to. + subSector : str + The sub-sector the constituent company in the index belongs to. + headQuarter : str + The location of the headquarter of the constituent company in the index. + dateFirstAdded : date + The date the constituent company was added to the index. + cik : int + The Central Index Key of the constituent company in the index. + founded : date + The founding year of the constituent company in the index. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/list-of-dow-companies-api/ + https://site.financialmodelingprep.com/developer/docs/list-of-sp-500-companies-api/ + https://site.financialmodelingprep.com/developer/docs/list-of-nasdaq-companies-api/ + + Parameter + --------- + All fields are standardized. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "index": index, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/const", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def cpi( + self, + countries: List[ + Literal[ + "australia", + "austria", + "belgium", + "brazil", + "bulgaria", + "canada", + "chile", + "china", + "croatia", + "cyprus", + "czech_republic", + "denmark", + "estonia", + "euro_area", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "malta", + "mexico", + "netherlands", + "new_zealand", + "norway", + "poland", + "portugal", + "romania", + "russian_federation", + "slovak_republic", + "slovakia", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + ] + ], + units: Literal["growth_previous", "growth_same", "index_2015"] = "growth_same", + frequency: Literal["monthly", "quarterly", "annual"] = "monthly", + harmonized: bool = False, + start_date: Union[datetime.date, None, str] = None, + end_date: Union[datetime.date, None, str] = None, + chart: bool = False, + provider: Optional[Literal["fred"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """CPI. + + Available providers: fred, + + Standard + ======== + When other provders are added, this will probably need less strict types + + Parameter + --------- + countries: List[CPI_COUNTRIES] + The country or countries you want to see. + units: List[CPI_UNITS] + The units you want to see, can be "growth_previous", "growth_same" or "index_2015". + frequency: List[CPI_FREQUENCY] + The frequency you want to see, either "annual", monthly" or "quarterly". + harmonized: bool + Whether you wish to obtain harmonized data. + start_date: Optional[date] + Start date, formatted YYYY-MM-DD + end_date: Optional[date] + End date, formatted YYYY-MM-DD + + + Returns + ------- + Documentation not available. + + + fred + ==== + When other provders are added, this will probably need less strict types + + Parameter + --------- + countries: List[CPI_COUNTRIES] + The country or countries you want to see. + units: List[CPI_UNITS] + The units you want to see, can be "growth_previous", "growth_same" or "index_2015". + frequency: List[CPI_FREQUENCY] + The frequency you want to see, either "annual", monthly" or "quarterly". + harmonized: bool + Whether you wish to obtain harmonized data. + start_date: Optional[date] + Start date, formatted YYYY-MM-DD + end_date: Optional[date] + End date, formatted YYYY-MM-DD + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "countries": countries, + "units": units, + "frequency": frequency, + "harmonized": harmonized, + "start_date": start_date, + "end_date": end_date, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/cpi", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def cpi_options( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Get the options for v3 cpi(options=True)""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/cpi_options", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def index( + self, + symbol: str, + chart: bool = False, + provider: Optional[Literal["fmp", "polygon"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Get OHLCV data for an index. + + Available providers: fmp, polygon + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the index. + + + Returns + ------- + open : PositiveFloat + The open price of the stock. + high : PositiveFloat + The high price of the stock. + low : PositiveFloat + The low price of the stock. + close : PositiveFloat + The close price of the stock. + date : datetime + The date of the stock. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/#Historical-stock-index-prices + + Parameter + --------- + interval : Literal['1min', '5min', '15min', '30min', '1hour', '4hour'] + The interval of the index data to fetch. Default is '1hour`. + + + polygon + ======= + + Source: https://polygon.io/docs/indices/getting-started + + Parameters + ---------- + start_date : Union[date, datetime] + The start date of the query. + end_date : Union[date, datetime] + The end date of the query. + timespan : Timespan, optional + The timespan of the query, by default Timespan.day + sort : Literal["asc", "desc"], optional + The sort order of the query, by default "desc" + limit : PositiveInt, optional + The limit of the query, by default 49999 + adjusted : bool, optional + Whether the query is adjusted, by default True + multiplier : PositiveInt, optional + The multiplier of the query, by default 1 + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/index", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def available_indices( + self, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs + ) -> CommandOutput[typing.List]: + """AVAILABLE_INDICES. + + Available providers: fmp, + + Standard + ======== + + + Returns the major indices from Dow Jones, Nasdaq and, S&P 500. + + Returns + ------- + symbol : str + The symbol of the index. + name : Optional[str] + The name of the index. + currency : Optional[str] + The currency the index is traded in. + stock_exchange : str + The stock exchange where the index is listed. + exchange_short_name : str + The short name of the stock exchange where the index is listed. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/#Historical-stock-index-prices + + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={}, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/available_indices", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def risk( + self, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs + ) -> CommandOutput[typing.List]: + """Market Risk Premium. + + Available providers: fmp, + + Standard + ======== + + + Returns + ------- + country : str + continent : str + totalEquityRiskPremium : PositiveFloat + countryRiskPremium : PositiveFloat + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/market-risk-premium-api/ + + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={}, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/risk", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def macro( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Query EconDB for macro data.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/macro", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def macro_countries( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """MACRO_COUNTRIES.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/macro_countries", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def macro_parameters( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """MACRO_PARAMETERS.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/macro_parameters", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def balance( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """BALANCE.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/balance", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def bigmac( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """BIGMAC.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/bigmac", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def country_codes( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """COUNTRY_CODES.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/country_codes", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def currencies( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """CURRENCIES.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/currencies", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def debt( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """DEBT.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/debt", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def events( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """EVENTS.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/events", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def fgdp( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """FGDP.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/fgdp", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def fred( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """FRED.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/fred", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def fred_search( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """FRED Search (was fred_notes).""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/fred_search", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def futures( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """FUTURES. 2 sources""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/futures", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def gdp( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """GDP.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/gdp", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def glbonds( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """GLBONDS.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/glbonds", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def indices( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """INDICES.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/indices", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def overview( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """OVERVIEW.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/overview", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def perfmap( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """PERFMAP.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/perfmap", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def performance( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """PERFORMANCE.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/performance", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def revenue( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """REVENUE.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/revenue", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def rgdp( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """RGDP.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/rgdp", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def rtps( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """RTPS.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/rtps", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def search_index( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """SEARCH_INDEX.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/search_index", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def spending( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """SPENDING.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/spending", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def trust( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """TRUST.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/trust", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def usbonds( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """USBONDS.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/usbonds", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def valuation( + self, + chart: bool = False, + provider: Optional[Literal["polygon", "fred", "fmp", "benzinga"]] = None, + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """VALUATION.""" + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + chart=chart, + ) + + o = self._command_runner_session.run( + "/economy/valuation", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/fixedincome.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/fixedincome.py new file mode 100644 index 00000000000..61aa265788a --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/fixedincome.py @@ -0,0 +1,118 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import typing +from typing import Literal, Optional + +from pydantic import validate_arguments + +import openbb_core.app.model.command_context +import openbb_core.app.model.results.empty +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_fixedincome(Container): + @filter_call + @validate_arguments + def treasury( + self, + start_date: Optional[str] = None, + end_date: Optional[str] = "2023-07-21", + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Get treasury rates. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + start_date : Optional[str] + Start date of the data, default is None. + end_date : Optional[str] + End date of the data, default is today. + + + Returns + ------- + date : dateType + The date of the treasury rates. + month_1 : float + The 1 month treasury rate. + month_2 : float + The 2 month treasury rate. + month_3 : float + The 3 month treasury rate. + month_6 : float + The 6 month treasury rate. + year_1 : float + The 1 year treasury rate. + year_2 : float + The 2 year treasury rate. + year_3 : float + The 3 year treasury rate. + year_5 : float + The 5 year treasury rate. + year_7 : float + The 7 year treasury rate. + year_10 : float + The 10 year treasury rate. + year_20 : float + The 20 year treasury rate. + year_30 : float + The 30 year treasury rate. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/treasury-rates-api/ + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "start_date": start_date, + "end_date": end_date, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/fixedincome/treasury", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def ycrv( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Yield curve.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/fixedincome/ycrv", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/forex.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/forex.py new file mode 100644 index 00000000000..d94e6428ddc --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/forex.py @@ -0,0 +1,159 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import typing +from typing import Literal, Optional + +from pydantic import validate_arguments + +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_forex(Container): + @filter_call + @validate_arguments + def pairs( + self, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs + ) -> CommandOutput[typing.List]: + """Forex Available Pairs. + + Available providers: fmp, + + Standard + ======== + + + Returns + ------- + symbol : str + The symbol of the currency pair. + name : str + The name of the currency pair separated by '/'. + currency : str + The base currency of the currency pair. + stock_exchange : Optional[str] + The stock exchange of the currency pair. + exchange_short_name : Optional[str] + The short name of the stock exchange of the currency pair. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/#Historical-Forex-Price + + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={}, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/forex/pairs", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def load( + self, + symbol: str, + chart: bool = False, + provider: Optional[Literal["fmp", "polygon"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Forex Intraday Price. + + Available providers: fmp, polygon + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the forex currency pair. + + + Returns + ------- + date : datetime + The date of the forex currency pair. + open : PositiveFloat + The open price of the forex currency pair. + high : PositiveFloat + The high price of the forex currency pair. + low : PositiveFloat + The low price of the forex currency pair. + close : PositiveFloat + The close price of the forex currency pair. + adj_close : Optional[PositiveFloat] + The adjusted close price of the forex currency pair. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/#Historical-Forex-Price + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + + + polygon + ======= + + Source: https://polygon.io/docs/forex/get_v2_aggs_ticker__forexticker__range__multiplier___timespan___from___to + + Parameters + ---------- + stocksTicker : str + The ticker symbol of the stocks to fetch. + start_date : Union[date, datetime], optional + The start date of the query. + end_date : Union[date, datetime], optional + The end date of the query. + timespan : Timespan, optional + The timespan of the query, by default Timespan.day + sort : Literal["asc", "desc"], optional + The sort order of the query, by default "desc" + limit : PositiveInt, optional + The limit of the query, by default 49999 + adjusted : bool, optional + Whether the query is adjusted, by default True + multiplier : PositiveInt, optional + The multiplier of the query, by default 1 + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/forex/load", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/module_map.json b/openbb_sdk/sdk/core/openbb_core/app/static/package/module_map.json new file mode 100644 index 00000000000..b940d94ba00 --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/module_map.json @@ -0,0 +1,192 @@ +{ + "crypto_load": "/crypto/load", + "root": "", + "crypto": "/crypto", + "economy_corecpi": "/economy/corecpi", + "economy": "/economy", + "economy_const": "/economy/const", + "economy_cpi": "/economy/cpi", + "economy_cpi_options": "/economy/cpi_options", + "economy_index": "/economy/index", + "economy_available_indices": "/economy/available_indices", + "economy_risk": "/economy/risk", + "economy_macro": "/economy/macro", + "economy_macro_countries": "/economy/macro_countries", + "economy_macro_parameters": "/economy/macro_parameters", + "economy_balance": "/economy/balance", + "economy_bigmac": "/economy/bigmac", + "economy_country_codes": "/economy/country_codes", + "economy_currencies": "/economy/currencies", + "economy_debt": "/economy/debt", + "economy_events": "/economy/events", + "economy_fgdp": "/economy/fgdp", + "economy_fred": "/economy/fred", + "economy_fred_search": "/economy/fred_search", + "economy_futures": "/economy/futures", + "economy_gdp": "/economy/gdp", + "economy_glbonds": "/economy/glbonds", + "economy_indices": "/economy/indices", + "economy_overview": "/economy/overview", + "economy_perfmap": "/economy/perfmap", + "economy_performance": "/economy/performance", + "economy_revenue": "/economy/revenue", + "economy_rgdp": "/economy/rgdp", + "economy_rtps": "/economy/rtps", + "economy_search_index": "/economy/search_index", + "economy_spending": "/economy/spending", + "economy_trust": "/economy/trust", + "economy_usbonds": "/economy/usbonds", + "economy_valuation": "/economy/valuation", + "fixedincome_treasury": "/fixedincome/treasury", + "fixedincome": "/fixedincome", + "fixedincome_ycrv": "/fixedincome/ycrv", + "forex_pairs": "/forex/pairs", + "forex": "/forex", + "forex_load": "/forex/load", + "news_globalnews": "/news/globalnews", + "news": "/news", + "news_sectornews": "/news/sectornews", + "stocks_fa_analysis": "/stocks/fa/analysis", + "stocks": "/stocks", + "stocks_fa": "/stocks/fa", + "stocks_fa_balance": "/stocks/fa/balance", + "stocks_fa_cal": "/stocks/fa/cal", + "stocks_fa_cash": "/stocks/fa/cash", + "stocks_fa_comp": "/stocks/fa/comp", + "stocks_fa_comsplit": "/stocks/fa/comsplit", + "stocks_fa_customer": "/stocks/fa/customer", + "stocks_fa_dcfc": "/stocks/fa/dcfc", + "stocks_fa_divs": "/stocks/fa/divs", + "stocks_fa_dupont": "/stocks/fa/dupont", + "stocks_fa_earning": "/stocks/fa/earning", + "stocks_fa_emp": "/stocks/fa/emp", + "stocks_fa_enterprise": "/stocks/fa/enterprise", + "stocks_fa_epsfc": "/stocks/fa/epsfc", + "stocks_fa_est": "/stocks/fa/est", + "stocks_fa_fama_coe": "/stocks/fa/fama_coe", + "stocks_fa_fama_raw": "/stocks/fa/fama_raw", + "stocks_fa_fraud": "/stocks/fa/fraud", + "stocks_fa_growth": "/stocks/fa/growth", + "stocks_fa_historical_5": "/stocks/fa/historical_5", + "stocks_fa_income": "/stocks/fa/income", + "stocks_fa_ins": "/stocks/fa/ins", + "stocks_fa_key": "/stocks/fa/key", + "stocks_fa_metrics": "/stocks/fa/metrics", + "stocks_fa_mgmt": "/stocks/fa/mgmt", + "stocks_fa_mktcap": "/stocks/fa/mktcap", + "stocks_fa_news": "/stocks/fa/news", + "stocks_fa_overview": "/stocks/fa/overview", + "stocks_fa_own": "/stocks/fa/own", + "stocks_fa_pt": "/stocks/fa/pt", + "stocks_fa_pta": "/stocks/fa/pta", + "stocks_fa_rating": "/stocks/fa/rating", + "stocks_fa_ratios": "/stocks/fa/ratios", + "stocks_fa_revfc": "/stocks/fa/revfc", + "stocks_fa_revgeo": "/stocks/fa/revgeo", + "stocks_fa_revseg": "/stocks/fa/revseg", + "stocks_fa_rot": "/stocks/fa/rot", + "stocks_fa_score": "/stocks/fa/score", + "stocks_fa_sec": "/stocks/fa/sec", + "stocks_fa_shares": "/stocks/fa/shares", + "stocks_fa_shrs": "/stocks/fa/shrs", + "stocks_fa_split": "/stocks/fa/split", + "stocks_fa_supplier": "/stocks/fa/supplier", + "stocks_fa_transcript": "/stocks/fa/transcript", + "stocks_ca_get": "/stocks/ca/get", + "stocks_ca": "/stocks/ca", + "stocks_ca_balance": "/stocks/ca/balance", + "stocks_ca_cashflow": "/stocks/ca/cashflow", + "stocks_ca_hcorr": "/stocks/ca/hcorr", + "stocks_ca_hist": "/stocks/ca/hist", + "stocks_ca_income": "/stocks/ca/income", + "stocks_ca_scorr": "/stocks/ca/scorr", + "stocks_ca_screener": "/stocks/ca/screener", + "stocks_ca_sentiment": "/stocks/ca/sentiment", + "stocks_ca_similar": "/stocks/ca/similar", + "stocks_ca_volume": "/stocks/ca/volume", + "stocks_dd_sec": "/stocks/dd/sec", + "stocks_dd": "/stocks/dd", + "stocks_dps_psi": "/stocks/dps/psi", + "stocks_dps": "/stocks/dps", + "stocks_dps_ctb": "/stocks/dps/ctb", + "stocks_dps_dpotc": "/stocks/dps/dpotc", + "stocks_dps_ftd": "/stocks/dps/ftd", + "stocks_dps_hsi": "/stocks/dps/hsi", + "stocks_dps_pos": "/stocks/dps/pos", + "stocks_dps_prom": "/stocks/dps/prom", + "stocks_dps_psi_q": "/stocks/dps/psi_q", + "stocks_dps_psi_sg": "/stocks/dps/psi_sg", + "stocks_dps_shorted": "/stocks/dps/shorted", + "stocks_dps_sidtc": "/stocks/dps/sidtc", + "stocks_dps_spos": "/stocks/dps/spos", + "stocks_disc_active": "/stocks/disc/active", + "stocks_disc": "/stocks/disc", + "stocks_disc_arkord": "/stocks/disc/arkord", + "stocks_disc_asc": "/stocks/disc/asc", + "stocks_disc_dividends": "/stocks/disc/dividends", + "stocks_disc_filings": "/stocks/disc/filings", + "stocks_disc_fipo": "/stocks/disc/fipo", + "stocks_disc_gainers": "/stocks/disc/gainers", + "stocks_disc_gtech": "/stocks/disc/gtech", + "stocks_disc_hotpenny": "/stocks/disc/hotpenny", + "stocks_disc_ipo": "/stocks/disc/ipo", + "stocks_disc_losers": "/stocks/disc/losers", + "stocks_disc_lowfloat": "/stocks/disc/lowfloat", + "stocks_disc_pipo": "/stocks/disc/pipo", + "stocks_disc_rtat": "/stocks/disc/rtat", + "stocks_disc_trending": "/stocks/disc/trending", + "stocks_disc_ugs": "/stocks/disc/ugs", + "stocks_disc_ulc": "/stocks/disc/ulc", + "stocks_disc_upcoming": "/stocks/disc/upcoming", + "stocks_gov_contracts": "/stocks/gov/contracts", + "stocks_gov": "/stocks/gov", + "stocks_gov_government_trading": "/stocks/gov/government_trading", + "stocks_gov_gtrades": "/stocks/gov/gtrades", + "stocks_gov_histcont": "/stocks/gov/histcont", + "stocks_gov_lastcontracts": "/stocks/gov/lastcontracts", + "stocks_gov_lasttrades": "/stocks/gov/lasttrades", + "stocks_gov_lobbying": "/stocks/gov/lobbying", + "stocks_gov_qtrcontracts": "/stocks/gov/qtrcontracts", + "stocks_gov_topbuys": "/stocks/gov/topbuys", + "stocks_gov_toplobbying": "/stocks/gov/toplobbying", + "stocks_gov_topsells": "/stocks/gov/topsells", + "stocks_ins_act": "/stocks/ins/act", + "stocks_ins": "/stocks/ins", + "stocks_ins_blcp": "/stocks/ins/blcp", + "stocks_ins_blcs": "/stocks/ins/blcs", + "stocks_ins_blip": "/stocks/ins/blip", + "stocks_ins_blis": "/stocks/ins/blis", + "stocks_ins_blop": "/stocks/ins/blop", + "stocks_ins_blos": "/stocks/ins/blos", + "stocks_ins_filt": "/stocks/ins/filt", + "stocks_ins_lcb": "/stocks/ins/lcb", + "stocks_ins_lins": "/stocks/ins/lins", + "stocks_ins_lip": "/stocks/ins/lip", + "stocks_ins_lis": "/stocks/ins/lis", + "stocks_ins_lit": "/stocks/ins/lit", + "stocks_ins_lpsb": "/stocks/ins/lpsb", + "stocks_ins_print_insider_data": "/stocks/ins/print_insider_data", + "stocks_ins_stats": "/stocks/ins/stats", + "stocks_options_chains": "/stocks/options/chains", + "stocks_options": "/stocks/options", + "stocks_options_dte": "/stocks/options/dte", + "stocks_options_eodchain": "/stocks/options/eodchain", + "stocks_options_expirations": "/stocks/options/expirations", + "stocks_options_grhist": "/stocks/options/grhist", + "stocks_options_hist": "/stocks/options/hist", + "stocks_options_info": "/stocks/options/info", + "stocks_options_last_price": "/stocks/options/last_price", + "stocks_options_oi": "/stocks/options/oi", + "stocks_options_pcr": "/stocks/options/pcr", + "stocks_options_price": "/stocks/options/price", + "stocks_options_unu": "/stocks/options/unu", + "stocks_options_voi": "/stocks/options/voi", + "stocks_options_vol": "/stocks/options/vol", + "stocks_options_vsurf": "/stocks/options/vsurf", + "stocks_load": "/stocks/load", + "stocks_news": "/stocks/news", + "stocks_multiples": "/stocks/multiples", + "stocks_tob": "/stocks/tob", + "stocks_quote": "/stocks/quote", + "stocks_search": "/stocks/search" +} \ No newline at end of file diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/news.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/news.py new file mode 100644 index 00000000000..6513d921a3a --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/news.py @@ -0,0 +1,144 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import typing +from typing import Literal, Optional + +import pydantic +from pydantic import validate_arguments + +import openbb_core.app.model.command_context +import openbb_core.app.model.results.empty +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_news(Container): + @filter_call + @validate_arguments + def globalnews( + self, + page: pydantic.types.NonNegativeInt = 0, + chart: bool = False, + provider: Optional[Literal["benzinga", "fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Global News. + + Available providers: benzinga, fmp + + Standard + ======== + + Parameter + --------- + page : NonNegativeInt + The page of the global news to be retrieved. + + + Returns + ------- + date : datetime + The published date of the news. + title : str + The title of the news. + image : Optional[str] + The image URL of the news. + text : str + The text/body of the news. + url : str + The URL of the news. + + benzinga + ======== + + Source: https://docs.benzinga.io/benzinga/newsfeed-v2.html + + Parameter + --------- + pageSize : int (default: 15) + The number of results to return per page. + displayOutput : str (default: "headline") + The type of data to return. Options are "headline", "summary", "full", "all". + date : Optional[datetime] + The date of the news to retrieve. + dateFrom : Optional[datetime] + The start date of the news to retrieve. + dateTo : Optional[datetime] + The end date of the news to retrieve. + updatedSince : Optional[int] + The number of seconds since the news was updated. + publishedSince : Optional[int] + The number of seconds since the news was published. + sort : Optional[str] + The order in which to sort the news. Options are: + "published_at", "updated_at", "title", "author", "channel", "ticker", "topic", "content_type". + isin : Optional[str] + The ISIN of the news to retrieve. + cusip : Optional[str] + The CUSIP of the news to retrieve. + tickers : Optional[str] + The tickers of the news to retrieve. + channels : Optional[str] + The channels of the news to retrieve. + topics : Optional[str] + The topics of the news to retrieve. + authors : Optional[str] + The authors of the news to retrieve. + content_types : Optional[str] + The content types of the news to retrieve. + + + Returns + ------- + Documentation not available. + + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/general-news-api/ + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "page": page, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/news/globalnews", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def sectornews( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Sector news.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/news/sectornews", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/root.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/root.py new file mode 100644 index 00000000000..f224aa2ce7b --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/root.py @@ -0,0 +1,47 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + + + +from openbb_core.app.static.container import Container + + +class Root(Container): + @property + def crypto(self): # route = "/crypto" + from openbb_core.app.static.package import crypto + + return crypto.CLASS_crypto(command_runner_session=self._command_runner_session) + + @property + def economy(self): # route = "/economy" + from openbb_core.app.static.package import economy + + return economy.CLASS_economy( + command_runner_session=self._command_runner_session + ) + + @property + def fixedincome(self): # route = "/fixedincome" + from openbb_core.app.static.package import fixedincome + + return fixedincome.CLASS_fixedincome( + command_runner_session=self._command_runner_session + ) + + @property + def forex(self): # route = "/forex" + from openbb_core.app.static.package import forex + + return forex.CLASS_forex(command_runner_session=self._command_runner_session) + + @property + def news(self): # route = "/news" + from openbb_core.app.static.package import news + + return news.CLASS_news(command_runner_session=self._command_runner_session) + + @property + def stocks(self): # route = "/stocks" + from openbb_core.app.static.package import stocks + + return stocks.CLASS_stocks(command_runner_session=self._command_runner_session) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks.py new file mode 100644 index 00000000000..b2be2bb758d --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks.py @@ -0,0 +1,553 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import datetime +import typing +from typing import Literal, Optional, Union + +from pydantic import validate_arguments + +import openbb_core.app.model.command_context +import openbb_core.app.model.results.empty +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_stocks(Container): + @property + def fa(self): # route = "/stocks/fa" + from openbb_core.app.static.package import stocks_fa + + return stocks_fa.CLASS_stocks_fa( + command_runner_session=self._command_runner_session + ) + + @property + def ca(self): # route = "/stocks/ca" + from openbb_core.app.static.package import stocks_ca + + return stocks_ca.CLASS_stocks_ca( + command_runner_session=self._command_runner_session + ) + + @property + def dd(self): # route = "/stocks/dd" + from openbb_core.app.static.package import stocks_dd + + return stocks_dd.CLASS_stocks_dd( + command_runner_session=self._command_runner_session + ) + + @property + def dps(self): # route = "/stocks/dps" + from openbb_core.app.static.package import stocks_dps + + return stocks_dps.CLASS_stocks_dps( + command_runner_session=self._command_runner_session + ) + + @property + def disc(self): # route = "/stocks/disc" + from openbb_core.app.static.package import stocks_disc + + return stocks_disc.CLASS_stocks_disc( + command_runner_session=self._command_runner_session + ) + + @property + def gov(self): # route = "/stocks/gov" + from openbb_core.app.static.package import stocks_gov + + return stocks_gov.CLASS_stocks_gov( + command_runner_session=self._command_runner_session + ) + + @property + def ins(self): # route = "/stocks/ins" + from openbb_core.app.static.package import stocks_ins + + return stocks_ins.CLASS_stocks_ins( + command_runner_session=self._command_runner_session + ) + + @property + def options(self): # route = "/stocks/options" + from openbb_core.app.static.package import stocks_options + + return stocks_options.CLASS_stocks_options( + command_runner_session=self._command_runner_session + ) + + @filter_call + @validate_arguments + def load( + self, + symbol: str, + start_date: Union[datetime.date, None, str] = None, + end_date: Union[datetime.date, None, str] = None, + chart: bool = False, + provider: Optional[Literal["fmp", "polygon"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Load stock data for a specific ticker. + + Available providers: fmp, polygon + + Standard + ======== + Parameter + --------- + symbol : str + The symbol of the company. + start_date : Optional[date] + The start date of the stock data from which to retrieve the data. + end_date : Optional[date] + The end date of the stock data up to which to retrieve the data. + + + Returns + ------- + date : datetime + The date of the stock. + open : PositiveFloat + The open price of the stock. + high : PositiveFloat + The high price of the stock. + low : PositiveFloat + The low price of the stock. + close : PositiveFloat + The close price of the stock. + adj_close : Optional[PositiveFloat] + The adjusted close price of the stock. + volume : PositiveFloat + The volume of the stock. + + fmp + === + + Source: https://financialmodelingprep.com/developer/docs/#Stock-Historical-Price + + Parameter + --------- + timeseries : Optional[int] + The number of days to look back. + series_type : Optional[Literal["line"]] + The type of the series. Only "line" is supported. + + + Returns + ------- + Documentation not available. + + + polygon + ======= + + Source: https://polygon.io/docs/stocks/getting-started + + Parameters + ---------- + timespan : Timespan, optional + The timespan of the query, by default Timespan.day + sort : Literal["asc", "desc"], optional + The sort order of the query, by default "desc" + limit : PositiveInt, optional + The limit of the query, by default 49999 + adjusted : bool, optional + Whether the query is adjusted, by default True + multiplier : PositiveInt, optional + The multiplier of the query, by default 1 + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "start_date": start_date, + "end_date": end_date, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/load", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def news( + self, + symbols: str, + page: int = 0, + chart: bool = False, + provider: Optional[Literal["benzinga", "fmp", "polygon"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Get news for one or more stock tickers. + + Available providers: benzinga, fmp, polygon + + Standard + ======== + + + Parameter + --------- + symbols : str + The symbols of the company. + page : int + The page of the stock news to be retrieved. + + + Returns + ------- + date : date + The published date of the news. + title : str + The title of the news. + image : Optional[str] + The image URL of the news. + text : str + The text/body of the news. + url : str + The URL of the news. + + benzinga + ======== + + Source: https://docs.benzinga.io/benzinga/newsfeed-v2.html + + Parameter + --------- + symbols: str + The symbols of the companies. + pageSize : int (default: 15) + The number of results to return per page. + headline : str + The type of data to return. Options are "headline", "summary", "full", "all". + date : Optional[datetime] + The date of the news to retrieve. + dateFrom : Optional[datetime] + The start date of the news to retrieve. + dateTo : Optional[datetime] + The end date of the news to retrieve. + updatedSince : Optional[int] + The number of seconds since the news was updated. + publishedSince : Optional[int] + The number of seconds since the news was published. + sort : Optional[str] + The order in which to sort the news. Options are: + "published_at", "updated_at", "title", "author", "channel", "ticker", "topic", "content_type". + isin : Optional[str] + The ISIN of the news to retrieve. + cusip : Optional[str] + The CUSIP of the news to retrieve. + channels : Optional[str] + The channels of the news to retrieve. + topics : Optional[str] + The topics of the news to retrieve. + authors : Optional[str] + The authors of the news to retrieve. + content_types : Optional[str] + The content types of the news to retrieve. + + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/stock-news-api/ + + Parameter + --------- + limit : Optional[int] + The limit of the data to retrieve. + + + Returns + ------- + Documentation not available. + + + polygon + ======= + + Source: https://polygon.io/docs/stocks/get_v2_reference_news + + Parameters + ---------- + symbol : str + The symbol of the stocks to fetch. + ticker_lt : str, optional + Less than, by default None + ticker_lte : str, optional + Less than or equal, by default None + ticker_gt : str, optional + Greater than, by default None + ticker_gte : str, optional + Greater than or equal, by default None + published_utc : str, optional + The published date of the query, by default None + published_utc_lt : str, optional + Less than, by default None + published_utc_lte : str, optional + Less than or equal, by default None + published_utc_gt : str, optional + Greater than, by default None + published_utc_gte : str, optional + Greater than or equal, by default None + order : Literal["asc", "desc"], optional + The sort order of the query, by default None + limit : int, optional + The limit of the query, by default 100 + sort : str, optional + The sort of the query, by default None + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbols": symbols, + "page": page, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/news", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def multiples( + self, + symbol: str, + limit: Optional[int] = None, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Get valuation multiples for a stock ticker. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + limit : Optional[int] + The limit of the key metrics ttm to be returned. + + + Returns + ------- + revenue_per_share_ttm: Optional[float] + The revenue per share of the stock calculated as trailing twelve months. + net_income_per_share_ttm: Optional[float] + The net income per share of the stock calculated as trailing twelve months. + operating_cash_flow_per_share_ttm: Optional[float] + The operating cash flow per share of the stock calculated as trailing twelve months. + free_cash_flow_per_share_ttm: Optional[float] + The free cash flow per share of the stock calculated as trailing twelve months. + cash_per_share_ttm: Optional[float] + The cash per share of the stock calculated as trailing twelve months. + book_value_per_share_ttm: Optional[float] + The book value per share of the stock calculated as trailing twelve months. + tangible_book_value_per_share_ttm: Optional[float] + The tangible book value per share of the stock calculated as trailing twelve months. + shareholders_equity_per_share_ttm: Optional[float] + The shareholders equity per share of the stock calculated as trailing twelve months. + interest_debt_per_share_ttm: Optional[float] + The interest debt per share of the stock calculated as trailing twelve months. + market_cap_ttm: Optional[float] + The market cap of the stock calculated as trailing twelve months. + enterprise_value_ttm: Optional[float] + The enterprise value of the stock calculated as trailing twelve months. + pe_ratio_ttm: Optional[float] + The PE ratio of the stock calculated as trailing twelve months. + price_to_sales_ratio_ttm: Optional[float] + The price to sales ratio of the stock calculated as trailing twelve months. + pocf_ratio_ttm: Optional[float] + The POCF ratio of the stock calculated as trailing twelve months. + pfcf_ratio_ttm: Optional[float] + The PFCF ratio of the stock calculated as trailing twelve months. + pb_ratio_ttm: Optional[float] + The PB ratio of the stock calculated as trailing twelve months. + ptb_ratio_ttm: Optional[float] + The PTB ratio of the stock calculated as trailing twelve months. + ev_to_sales_ttm: Optional[float] + The EV to sales of the stock calculated as trailing twelve months. + enterprise_value_over_ebitda_ttm: Optional[float] + The enterprise value over EBITDA of the stock calculated as trailing twelve months. + ev_to_operating_cash_flow_ttm: Optional[float] + The EV to operating cash flow of the stock calculated as trailing twelve months. + ev_to_free_cash_flow_ttm: Optional[float] + The EV to free cash flow of the stock calculated as trailing twelve months. + earnings_yield_ttm: Optional[float] + The earnings yield of the stock calculated as trailing twelve months. + free_cash_flow_yield_ttm: Optional[float] + The free cash flow yield of the stock calculated as trailing twelve months. + debt_to_equity_ttm: Optional[float] + The debt to equity of the stock calculated as trailing twelve months. + debt_to_assets_ttm: Optional[float] + The debt to assets of the stock calculated as trailing twelve months. + net_debt_to_ebitda_ttm: Optional[float] + The net debt to EBITDA of the stock calculated as trailing twelve months. + current_ratio_ttm: Optional[float] + The current ratio of the stock calculated as trailing twelve months. + interest_coverage_ttm: Optional[float] + The interest coverage of the stock calculated as trailing twelve months. + income_quality_ttm: Optional[float] + The income quality of the stock calculated as trailing twelve months. + dividend_yield_ttm: Optional[float] + The dividend yield of the stock calculated as trailing twelve months. + payout_ratio_ttm: Optional[float] + The payout ratio of the stock calculated as trailing twelve months. + sales_general_and_administrative_to_revenue_ttm: Optional[float] + The sales general and administrative to revenue of the stock calculated as trailing twelve months. + research_and_development_to_revenue_ttm: Optional[float] + The research and development to revenue of the stock calculated as trailing twelve months. + intangibles_to_total_assets_ttm: Optional[float] + The intangibles to total assets of the stock calculated as trailing twelve months. + capex_to_operating_cash_flow_ttm: Optional[float] + The capex to operating cash flow of the stock calculated as trailing twelve months. + capex_to_revenue_ttm: Optional[float] + The capex to revenue of the stock calculated as trailing twelve months. + capex_to_depreciation_ttm: Optional[float] + The capex to depreciation of the stock calculated as trailing twelve months. + stock_based_compensation_to_revenue_ttm: Optional[float] + The stock based compensation to revenue of the stock calculated as trailing twelve months. + graham_number_ttm: Optional[float] + The graham number of the stock calculated as trailing twelve months. + roic_ttm: Optional[float] + The ROIC of the stock calculated as trailing twelve months. + return_on_tangible_assets_ttm: Optional[float] + The return on tangible assets of the stock calculated as trailing twelve months. + graham_net_net_ttm: Optional[float] + The graham net net of the stock calculated as trailing twelve months. + working_capital_ttm: Optional[float] + The working capital of the stock calculated as trailing twelve months. + tangible_asset_value_ttm: Optional[float] + The tangible asset value of the stock calculated as trailing twelve months. + net_current_asset_value_ttm: Optional[float] + The net current asset value of the stock calculated as trailing twelve months. + invested_capital_ttm: Optional[float] + The invested capital of the stock calculated as trailing twelve months. + average_receivables_ttm: Optional[float] + The average receivables of the stock calculated as trailing twelve months. + average_payables_ttm: Optional[float] + The average payables of the stock calculated as trailing twelve months. + average_inventory_ttm: Optional[float] + The average inventory of the stock calculated as trailing twelve months. + days_sales_outstanding_ttm: Optional[float] + The days sales outstanding of the stock calculated as trailing twelve months. + days_payables_outstanding_ttm: Optional[float] + The days payables outstanding of the stock calculated as trailing twelve months. + days_of_inventory_on_hand_ttm: Optional[float] + The days of inventory on hand of the stock calculated as trailing twelve months. + receivables_turnover_ttm: Optional[float] + The receivables turnover of the stock calculated as trailing twelve months. + payables_turnover_ttm: Optional[float] + The payables turnover of the stock calculated as trailing twelve months. + inventory_turnover_ttm: Optional[float] + The inventory turnover of the stock calculated as trailing twelve months. + roe_ttm: Optional[float] + The ROE of the stock calculated as trailing twelve months. + capex_per_share_ttm: Optional[float] + The capex per share of the stock calculated as trailing twelve months. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/#Company-Key-Metrics + + Parameter + --------- + All fields are standardized. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "limit": limit, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/multiples", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def tob( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """View top of book for loaded ticker (US exchanges only).""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/tob", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def quote( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """View the current price for a specific stock ticker.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/quote", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def search( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Search a specific stock ticker for analysis.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/search", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_ca.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_ca.py new file mode 100644 index 00000000000..3f7d604c51b --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_ca.py @@ -0,0 +1,240 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import typing +from typing import Literal, Optional + +from pydantic import validate_arguments + +import openbb_core.app.model.command_context +import openbb_core.app.model.results.empty +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_stocks_ca(Container): + @filter_call + @validate_arguments + def get( + self, + symbol: str, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Company peers. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol: str + The symbol of the company. + + + Returns + ------- + symbol : str + The symbol of the company to retrieve the stock peers of. + peers_list : List[str] + A list of stock peers based on sector, exchange and market cap + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/#Stock-Peers + + Parameter + --------- + All fields are standardized. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ca/get", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def balance( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Company balance sheet.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ca/balance", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def cashflow( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Company cashflow.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ca/cashflow", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def hcorr( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Company historical correlation.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ca/hcorr", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def hist( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Company historical prices.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ca/hist", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def income( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Company income statement.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ca/income", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def scorr( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Company sector correlation.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ca/scorr", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def screener( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Company screener.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ca/screener", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def sentiment( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Company sentiment.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ca/sentiment", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def similar( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Company similar.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ca/similar", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def volume( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Company volume.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ca/volume", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_dd.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_dd.py new file mode 100644 index 00000000000..2a7e32659d4 --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_dd.py @@ -0,0 +1,93 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import typing +from typing import Literal, Optional + +from pydantic import validate_arguments + +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_stocks_dd(Container): + @filter_call + @validate_arguments + def sec( + self, + symbol: str, + type: Optional[str] = None, + page: Optional[int] = 0, + limit: Optional[int] = None, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """SEC Filings. + + Available providers: fmp, + + Standard + ======== + Parameter + --------- + symbol : str + The symbol of the company. + type : str + The type of the SEC filing form. (full list: https://www.sec.gov/forms) + page : int + The page of the results. + limit : int + The limit of the results. + + + Returns + ------- + symbol : str + The symbol of the stock. + filling_date : date + The filling date of the SEC filing. + accepted_date : date + The accepted date of the SEC filing. + cik : str + The CIK of the SEC filing. + type : str + The type of the SEC filing. + link : str + The link of the SEC filing. + final_link : str + The final link of the SEC filing. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/sec-filings-api/ + + Parameter + --------- + The type of the SEC filing form. (full list: https://www.sec.gov/forms) + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "type": type, + "page": page, + "limit": limit, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dd/sec", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_disc.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_disc.py new file mode 100644 index 00000000000..102a31df05e --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_disc.py @@ -0,0 +1,315 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + + +from pydantic import validate_arguments + +import openbb_core.app.model.results.empty +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_stocks_disc(Container): + @filter_call + @validate_arguments + def active( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Most active stocks by intraday trade volumes.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/active", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def arkord( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Order by ARK INvestment Management LLC.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/arkord", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def asc( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Small cap stocks with revenue and earnings growth more than 25%.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/asc", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def dividends( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/dividends", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def filings( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """The most-recent form submissions to the SEC.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/filings", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def fipo( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Future IPOs dates.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/fipo", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def gainers( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Show latest top gainers.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/gainers", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def gtech( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Tech stocks with revenue and earnings growth more than 25%.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/gtech", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def hotpenny( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Today's hot penny stocks.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/hotpenny", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def ipo( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/ipo", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def losers( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Show latest top losers.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/losers", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def lowfloat( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Low float stocks under 10M shares float.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/lowfloat", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def pipo( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Past IPOs dates.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/pipo", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def rtat( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Top 10 retail traded stocks per day.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/rtat", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def trending( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Trending news.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/trending", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def ugs( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Undervalued stocks with revenue and earnings growth above 25%.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/ugs", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def ulc( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Potentially undervalued large cap stocks.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/ulc", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def upcoming( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Upcoming earnings release dates.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/disc/upcoming", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_dps.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_dps.py new file mode 100644 index 00000000000..2c003020af9 --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_dps.py @@ -0,0 +1,213 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + + +from pydantic import validate_arguments + +import openbb_core.app.model.results.empty +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_stocks_dps(Container): + @filter_call + @validate_arguments + def psi( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Price vs short interest volume""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/psi", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def ctb( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Cost to borrow of stocks.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/ctb", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def dpotc( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Dark pools (ATS) vs OTC data.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/dpotc", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def ftd( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Fails-to-deliver data.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/ftd", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def hsi( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Show top high short interest stocks of over 20% ratio.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/hsi", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def pos( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Dark pool short position.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/pos", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def prom( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Promising tickers based on dark pool shares regression.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/prom", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def psi_q( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/psi_q", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def psi_sg( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/psi_sg", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def shorted( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Most shorted stocks.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/shorted", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def sidtc( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Short interest and days to cover.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/sidtc", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def spos( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Net short vs position.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/dps/spos", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_fa.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_fa.py new file mode 100644 index 00000000000..29e20e6e579 --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_fa.py @@ -0,0 +1,2559 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import datetime +import typing +from typing import List, Literal, Optional, Union + +import openbb_provider +from pydantic import validate_arguments + +import openbb_core.app.model.command_context +import openbb_core.app.model.results.empty +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_stocks_fa(Container): + @filter_call + @validate_arguments + def analysis( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Analyse SEC filings with the help of machine learning.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/analysis", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def balance( + self, + symbol: str, + period: Literal["annually", "quarterly"] = "annually", + chart: bool = False, + provider: Optional[Literal["fmp", "polygon"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Balance Sheet. + + Available providers: fmp, polygon + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + period : Literal["annually", "quarterly"] + The period of the balance sheet. + + + Returns + ------- + date : date + The date of the balance sheet. + cik : Optional[int] + The CIK of the company. + cash_and_cash_equivalents : Optional[int] + The cash and cash equivalents of the balance sheet. + short_term_investments : Optional[int] + The short term investments of the balance sheet. + cash_and_short_term_investments : Optional[int] + The cash and short term investments of the balance sheet. + net_receivables : Optional[int] + The net receivables of the balance sheet. + inventory : Optional[int] + The inventory of the balance sheet. + other_current_assets : Optional[int] + The other current assets of the balance sheet. + current_assets : Optional[int] + The current assets of the balance sheet. + long_term_investments : Optional[int] + The long term investments of the balance sheet. + property_plant_equipment_net : Optional[int] + The property plant equipment net of the balance sheet. + other_non_current_assets : Optional[int] + The other non current assets of the balance sheet. + noncurrent_assets : Optional[int] + The non current assets of the balance sheet. + assets : Optional[int] + The assets of the balance sheet. + accounts_payable : Optional[int] + The accounts payable of the balance sheet. + other_current_liabilities : Optional[int] + The other current liabilities of the balance sheet. + deferred_revenue : Optional[int] + The deferred revenue of the balance sheet. + current_liabilities : Optional[int] + The current liabilities of the balance sheet. + long_term_debt : Optional[int] + The long term debt of the balance sheet. + other_non_current_liabilities : Optional[int] + The other non current liabilities of the balance sheet. + noncurrent_liabilities : Optional[int] + The non current liabilities of the balance sheet. + liabilities : Optional[int] + The liabilities of the balance sheet. + common_stock : Optional[int] + The common stock of the balance sheet. + retained_earnings : Optional[int] + The retained earnings of the balance sheet. + accumulated_other_comprehensive_income_loss : Optional[int] + The accumulated other comprehensive income loss of the balance sheet. + total_equity : Optional[int] + The total equity of the balance sheet. + total_liabilities_and_stockholders_equity : Optional[int] + The total liabilities and stockholders equity of the balance sheet. + + fmp + === + + Source: https://financialmodelingprep.com/developer/docs/#Balance-Sheet + + Parameter + --------- + cik : Optional[str] + The CIK of the company if symbol is not provided. + limit : Optional[NonNegativeInt] + The limit of the balance sheet. + + + Returns + ------- + Documentation not available. + + + polygon + ======= + + Source: https://polygon.io/docs/stocks#!/get_vx_reference_financials + + Parameter + --------- + cik : Optional[str] + The CIK of the company if no symbol is provided. + company_name : Optional[str] + The name of the company. + company_name_search : Optional[str] + The name of the company to search. + sic : Optional[str] + The Standard Industrial Classification (SIC) of the company. + filing_date : Optional[date] + The filing date of the financial statement. + filing_date_lt : Optional[date] + The filing date less than the given date. + filing_date_lte : Optional[date] + The filing date less than or equal to the given date. + filing_date_gt : Optional[date] + The filing date greater than the given date. + filing_date_gte : Optional[date] + The filing date greater than or equal to the given date. + period_of_report_date : Optional[date] + The period of report date of the financial statement. + period_of_report_date_lt : Optional[date] + The period of report date less than the given date. + period_of_report_date_lte : Optional[date] + The period of report date less than or equal to the given date. + period_of_report_date_gt : Optional[date] + The period of report date greater than the given date. + period_of_report_date_gte : Optional[date] + The period of report date greater than or equal to the given date. + timeframe : Optional[Literal["annual", "quarterly", "ttm"]] + The timeframe of the financial statement. + include_sources : Optional[bool] + Whether to include the sources of the financial statement. + order : Optional[Literal["asc", "desc"]] + The order of the financial statement. + limit : Optional[PositiveInt] + The limit of the financial statement. + sort : Optional[Literal["filing_date", "period_of_report_date"]] + The sort of the financial statement. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "period": period, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/balance", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def cal( + self, + start_date: Union[datetime.date, None, str] = datetime.date(2023, 6, 20), + end_date: Union[datetime.date, None, str] = datetime.date(2023, 7, 20), + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Show Dividend Calendar for a given start and end dates. + + Available providers: fmp, + + Standard + ======== + + The maximum time interval between the start and end date can be 3 months. + Default value for time interval is 1 month. + + Parameter + --------- + start_date : date + The starting date to fetch the dividend calendar from. Default value is the + previous day from the last month. + end_date : date + The ending date to fetch the dividend calendar till. Default value is the + previous day from the current month. + + + Returns + ------- + date : dateType + The date of the dividend in the calendar. + label : str + The date in human readable form in the calendar. + adjDividend : Optional[NonNegativeFloat] + The adjusted dividend on a date in the calendar. + symbol : str + The symbol of the company for which the dividend is returned in the calendar. + dividend : Optional[NonNegativeFloat] + The dividend amount in the calendar. + recordDate : Optional[dateType] + The record date of the dividend in the calendar. + paymentDate : Optional[dateType] + The payment date of the dividend in the calendar. + declarationDate : Optional[dateType] + The declaration date of the dividend in the calendar. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/dividend-calendar-api/ + + The maximum time interval between the start and end date can be 3 months. + Default value for time interval is 1 month. + + Parameter + --------- + All fields are standardized. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "start_date": start_date, + "end_date": end_date, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/cal", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def cash( + self, + symbol: str, + period: Literal["annually", "quarterly"] = "annually", + chart: bool = False, + provider: Optional[Literal["fmp", "polygon"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Cash Flow Statement. + + Available providers: fmp, polygon + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + period : Literal["annually", "quarterly"] + The period of the income statement. + + + Returns + ------- + date : date + The date of the cash flow statement. + symbol : str + The symbol of the company. + currency : Optional[str] + The currency of the cash flow statement. + cik : Optional[int] + The Central Index Key (CIK) of the company. + period : Optional[str] + The period of the cash flow statement. + cash_at_beginning_of_period : Optional[int] + The cash at the beginning of the period. + net_income : Optional[int] + The net income. + depreciation_and_amortization : Optional[int] + The depreciation and amortization. + stock_based_compensation : Optional[int] + The stock based compensation. + accounts_receivables : Optional[int] + The accounts receivables. + inventory : Optional[int] + The inventory. + accounts_payables : Optional[int] + The accounts payables. + net_cash_flow_from_operating_activities : Optional[int] + The net cash flow from operating activities. + purchases_of_investments : Optional[int] + The purchases of investments. + sales_maturities_of_investments : Optional[int] + The sales maturities of investments. + investments_in_property_plant_and_equipment : Optional[int] + The investments in property plant and equipment. + net_cash_flow_from_investing_activities : Optional[int] + The net cash flow from investing activities. + dividends_paid : Optional[int] + The dividends paid. + common_stock_repurchased : Optional[int] + The common stock repurchased. + debt_repayment : Optional[int] + The debt repayment. + other_financing_activities : Optional[int] + The other financing activities. + net_cash_flow_from_financing_activities : Optional[int] + The net cash flow from financing activities. + net_cash_flow : Optional[int] + The net cash flow. + cash_at_end_of_period : Optional[int] + The cash at the end of the period. + + fmp + === + + Source: https://financialmodelingprep.com/developer/docs/#Cash-Flow-Statement + + Parameter + --------- + cik : Optional[str] + The CIK of the company if symbol is not provided. + limit : Optional[NonNegativeInt] + The limit of the cash flow statement. + + + Returns + ------- + Documentation not available. + + + polygon + ======= + + Source: https://polygon.io/docs/stocks#!/get_vx_reference_financials + + Parameter + --------- + cik : Optional[str] + The CIK of the company if no symbol is provided. + company_name : Optional[str] + The name of the company. + company_name_search : Optional[str] + The name of the company to search. + sic : Optional[str] + The Standard Industrial Classification (SIC) of the company. + filing_date : Optional[date] + The filing date of the financial statement. + filing_date_lt : Optional[date] + The filing date less than the given date. + filing_date_lte : Optional[date] + The filing date less than or equal to the given date. + filing_date_gt : Optional[date] + The filing date greater than the given date. + filing_date_gte : Optional[date] + The filing date greater than or equal to the given date. + period_of_report_date : Optional[date] + The period of report date of the financial statement. + period_of_report_date_lt : Optional[date] + The period of report date less than the given date. + period_of_report_date_lte : Optional[date] + The period of report date less than or equal to the given date. + period_of_report_date_gt : Optional[date] + The period of report date greater than the given date. + period_of_report_date_gte : Optional[date] + The period of report date greater than or equal to the given date. + timeframe : Optional[Literal["annual", "quarterly", "ttm"]] + The timeframe of the financial statement. + include_sources : Optional[bool] + Whether to include the sources of the financial statement. + order : Optional[Literal["asc", "desc"]] + The order of the financial statement. + limit : Optional[PositiveInt] + The limit of the financial statement. + sort : Optional[Literal["filing_date", "period_of_report_date"]] + The sort of the financial statement. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "period": period, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/cash", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def comp( + self, + symbol: str, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Executive Compensation. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + + + Returns + ------- + cik : Optional[str] + The Central Index Key (CIK) of the company. + symbol : str + The symbol of the company. + filing_date : dateType + The date of the filing. + accepted_date : dateType + The date the filing was accepted. + name_and_position : str + The name and position of the executive. + year : int + The year of the compensation. + salary : float + The salary of the executive. + bonus : float + The bonus of the executive. + stock_award : float + The stock award of the executive. + incentive_plan_compensation : float + The incentive plan compensation of the executive. + all_other_compensation : float + The all other compensation of the executive. + total : float + The total compensation of the executive. + url : str + The URL of the filing. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/executive-compensation-api/ + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/comp", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def comsplit( + self, + start_date: Union[datetime.date, None, str] = None, + end_date: Union[datetime.date, None, str] = None, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Stock Split Calendar. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + start_date : date + The start date of the stock splits from which to retrieve the data. + end_date : date + The end date of the stock splits up to which to retrieve the data. + + + Returns + ------- + date : date + The date of the stock splits. + label : str + The label of the stock splits. + symbol : str + The symbol of the company. + numerator : float + The numerator of the stock splits. + denominator : float + The denominator of the stock splits. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/stock-split-calendar-api/ + + Parameter + --------- + All fields are standardized. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "start_date": start_date, + "end_date": end_date, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/comsplit", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def customer( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """List of customers of the company.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/customer", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def dcfc( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Determine the (historical) discounted cash flow.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/dcfc", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def divs( + self, + symbol: str, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Historical Dividends. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + + + Returns + ------- + date : date + The date of the historical dividends. + label : str + The label of the historical dividends. + adj_dividend : float + The adjusted dividend of the historical dividends. + dividend : float + The dividend of the historical dividends. + record_date : date + The record date of the historical dividends. + payment_date : date + The payment date of the historical dividends. + declaration_date : date + The declaration date of the historical dividends. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/#Historical-Dividends + + Parameter + --------- + All fields are standardized. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/divs", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def dupont( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Detailed breakdown for Return on Equity (RoE).""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/dupont", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def earning( + self, + symbol: str, + limit: Optional[int] = None, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Earnings Calendar. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + limit : int + + + Returns + ------- + symbol : str + The symbol of the asset. + date : date + The date of the earnings calendar. + eps : float + The EPS of the earnings calendar. + eps_estimated : float + The estimated EPS of the earnings calendar. + time : str + The time of the earnings calendar. + revenue : int + The revenue of the earnings calendar. + revenue_estimated : int + The estimated revenue of the earnings calendar. + updated_from_date : date + The updated from date of the earnings calendar. + fiscal_date_ending : date + The fiscal date ending of the earnings calendar. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/earnings-calendar-api/ + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "limit": limit, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/earning", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def emp( + self, + symbol: str, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Number of Employees. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + + + Returns + ------- + symbol : str + The symbol of the company to retrieve the historical employees of. + cik : int + The CIK of the company to retrieve the historical employees of. + acceptance_time : datetime + The time of acceptance of the company employee. + period_of_report : date + The date of reporting of the company employee. + company_name : str + The registered name of the company to retrieve the historical employees of. + form_type : float + The form type of the company employee. + filing_date : date + The filing date of the company employee + employee_count : int + The count of employees of the company. + source : str + The source URL which retrieves this data for the company. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/historical-numer-of-employees-api/ + + Parameter + --------- + All fields are standardized. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/emp", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def enterprise( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Enterprise value.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/enterprise", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def epsfc( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Earnings Estimate by Analysts - EPS.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/epsfc", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def est( + self, + symbol: str, + period: Literal["quarter", "annual"] = "annual", + limit: int = 30, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Analyst Estimates. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + period : Literal["quarter", "annual"] + The period of the analyst estimates. + limit : int + The limit of the analyst estimates. + + + Returns + ------- + symbol : str + The symbol of the asset. + date : date + The date of the analyst estimates. + estimated_revenue_low : int + The estimated revenue low of the analyst estimates. + estimated_revenue_high : int + The estimated revenue high of the analyst estimates. + estimated_revenue_avg : int + The estimated revenue average of the analyst estimates. + estimated_ebitda_low : int + The estimated EBITDA low of the analyst estimates. + estimated_ebitda_high : int + The estimated EBITDA high of the analyst estimates. + estimated_ebitda_avg : int + The estimated EBITDA average of the analyst estimates. + estimated_ebit_low : int + The estimated EBIT low of the analyst estimates. + estimated_ebit_high : int + The estimated EBIT high of the analyst estimates. + estimated_ebit_avg : int + The estimated EBIT average of the analyst estimates. + estimated_net_income_low : int + The estimated net income low of the analyst estimates. + estimated_net_income_high : int + The estimated net income high of the analyst estimates. + estimated_net_income_avg : int + The estimated net income average of the analyst estimates. + estimated_sga_expense_low : int + The estimated SGA expense low of the analyst estimates. + estimated_sga_expense_high : int + The estimated SGA expense high of the analyst estimates. + estimated_sga_expense_avg : int + The estimated SGA expense average of the analyst estimates. + estimated_eps_avg : float + The estimated EPS average of the analyst estimates. + estimated_eps_high : float + The estimated EPS high of the analyst estimates. + estimated_eps_low : float + The estimated EPS low of the analyst estimates. + number_analyst_estimated_revenue : int + The number of analysts who estimated revenue of the analyst estimates. + number_analysts_estimated_eps : int + The number of analysts who estimated EPS of the analyst estimates. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/analyst-estimates-api/ + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "period": period, + "limit": limit, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/est", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def fama_coe( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Fama French 3 Factor Model - Coefficient of Earnings.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/fama_coe", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def fama_raw( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Fama French 3 Factor Model - Raw Data.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/fama_raw", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def fraud( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Key fraud ratios including M-score, Z-score and McKee.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/fraud", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def growth( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Growth of financial statement items and ratios.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/growth", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def historical_5( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/historical_5", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def income( + self, + symbol: str, + period: Literal["annually", "quarterly"] = "annually", + chart: bool = False, + provider: Optional[Literal["fmp", "polygon"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Income Statement. + + Available providers: fmp, polygon + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + period : Literal["annually", "quarterly"] + The period of the income statement. + + + Returns + ------- + date : date + The date of the income statement. + symbol : str + The symbol of the company. + currency : Optional[str] + The currency of the income statement. + cik : Optional[int] + The Central Index Key (CIK) of the company. + filing_date : date + The filing date of the income statement. + accepted_date : Optional[date] + The accepted date of the income statement. + period : Optional[str] + The period of the income statement. + revenue : Optional[int] + The revenue of the income statement. + cost_of_revenue : Optional[int] + The cost of revenue of the income statement. + gross_profit : Optional[int] + The gross profit of the income statement. + research_and_development_expenses : Optional[int] + The research and development expenses of the income statement. + general_and_administrative_expenses : Optional[int] + The general and administrative expenses of the income statement. + selling_and_marketing_expenses : Optional[float] + The selling and marketing expenses of the income statement. + selling_general_and_administrative_expenses : Optional[int] + The selling, general and administrative expenses of the income statement. + other_expenses : Optional[int] + The other expenses of the income statement. + operating_expenses : Optional[int] + The operating expenses of the income statement. + depreciation_and_amortization : Optional[int] + The depreciation and amortization of the income statement. + ebitda : Optional[int] + The earnings before interest, taxes, depreciation and amortization of the income statement. + operating_income : Optional[int] + The operating income of the income statement. + interest_income : Optional[int] + The interest income of the income statement. + interest_expense : Optional[int] + The interest expense of the income statement. + total_other_income_expenses_net : Optional[int] + The total other income expenses net of the income statement. + income_before_tax : Optional[int] + The income before tax of the income statement. + income_tax_expense : Optional[int] + The income tax expense of the income statement. + net_income : Optional[int] + The net income of the income statement. + eps : Optional[float] + The earnings per share of the income statement. + eps_diluted : Optional[float] + The diluted earnings per share of the income statement. + weighted_average_shares_outstanding : Optional[int] + The weighted average shares outstanding of the income statement. + weighted_average_shares_outstanding_dil : Optional[int] + The weighted average shares outstanding diluted of the income statement. + + fmp + === + + Source: https://financialmodelingprep.com/developer/docs/#Income-Statement + + Parameter + --------- + cik : Optional[str] + The CIK of the company if no symbol is provided. + limit : Optional[NonNegativeInt] + The limit of the income statement. + + + Returns + ------- + Documentation not available. + + + polygon + ======= + + Source: https://polygon.io/docs/stocks#!/get_vx_reference_financials + + Parameter + --------- + cik : Optional[str] + The CIK of the company if no symbol is provided. + company_name : Optional[str] + The name of the company. + company_name_search : Optional[str] + The name of the company to search. + sic : Optional[str] + The Standard Industrial Classification (SIC) of the company. + filing_date : Optional[date] + The filing date of the financial statement. + filing_date_lt : Optional[date] + The filing date less than the given date. + filing_date_lte : Optional[date] + The filing date less than or equal to the given date. + filing_date_gt : Optional[date] + The filing date greater than the given date. + filing_date_gte : Optional[date] + The filing date greater than or equal to the given date. + period_of_report_date : Optional[date] + The period of report date of the financial statement. + period_of_report_date_lt : Optional[date] + The period of report date less than the given date. + period_of_report_date_lte : Optional[date] + The period of report date less than or equal to the given date. + period_of_report_date_gt : Optional[date] + The period of report date greater than the given date. + period_of_report_date_gte : Optional[date] + The period of report date greater than or equal to the given date. + timeframe : Optional[Literal["annual", "quarterly", "ttm"]] + The timeframe of the financial statement. + include_sources : Optional[bool] + Whether to include the sources of the financial statement. + order : Optional[Literal["asc", "desc"]] + The order of the financial statement. + limit : Optional[PositiveInt] + The limit of the financial statement. + sort : Optional[Literal["filing_date", "period_of_report_date"]] + The sort of the financial statement. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "period": period, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/income", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def ins( + self, + transactionType: List[ + openbb_provider.models.stock_insider_trading.TransactionTypes + ] = [], + symbol: Optional[str] = None, + reportingCik: Optional[int] = None, + companyCik: Optional[int] = None, + page: int = 0, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Stock Insider Trading. + + Available providers: fmp, + + Standard + ======== + + + Parameter + --------- + transactionType : List[TransactionTypes] + The type of the transaction. Possible values are: + A-Award, C-Conversion, D-Return, E-ExpireShort, F-InKind, G-Gift, H-ExpireLong + I-Discretionary, J-Other, L-Small, M-Exempt, O-OutOfTheMoneym P-Purchase + S-Sale, U-Tender, W-Will, X-InTheMoney, Z-Trust + symbol : Optional[str] + The symbol of the company. + reportingCik : Optional[int] + The CIK of the reporting owner. + companyCik : Optional[int] + The CIK of the company owner. + page: int + The page number to get + + + Returns + ------- + symbol : str + The symbol of the asset. + filingDate : datetime + The filing date of the stock insider trading. + transactionDate : date + The transaction date of the stock insider trading. + reportingCik : int + The reporting CIK of the stock insider trading. + transactionType : str + The transaction type of the stock insider trading. + securitiesOwned : int + The securities owned of the stock insider trading. + companyCik : int + The company CIK of the stock insider trading. + reportingName : str + The reporting name of the stock insider trading. + typeOfOwner : str + The type of owner of the stock insider trading. + acquistionOrDisposition : str + The acquistion or disposition of the stock insider trading. + formType : str + The form type of the stock insider trading. + securitiesTransacted : float + The securities transacted of the stock insider trading. + price : float + The price of the stock insider trading. + securityName : str + The security name of the stock insider trading. + link : str + The link of the stock insider trading. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/#Stock-Insider-Trading + + Parameter + --------- + The type of the transaction. Possible values are: + A-Award, C-Conversion, D-Return, E-ExpireShort, F-InKind, G-Gift, H-ExpireLong + I-Discretionary, J-Other, L-Small, M-Exempt, O-OutOfTheMoneym P-Purchase + S-Sale, U-Tender, W-Will, X-InTheMoney, Z-Trust + companyCik: Optional[str] + The CIK of the company owner. + page: int + The page number to get + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "transactionType": transactionType, + "symbol": symbol, + "reportingCik": reportingCik, + "companyCik": companyCik, + "page": page, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/ins", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def key( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/key", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def metrics( + self, + symbol: str, + period: Literal["annually", "quarterly"] = "annually", + limit: Optional[int] = None, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Key Metrics. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + + + Returns + ------- + symbol : str + The symbol of the stock. + date : DateType + The date of the key metrics. + period : str + The period of the key metrics. + revenue_per_share : float + The revenue per share of the stock. + net_income_per_share : float + The net income per share of the stock. + operating_cash_flow_per_share : float + The operating cash flow per share of the stock. + free_cash_flow_per_share : float + The free cash flow per share of the stock. + cash_per_share : float + The cash per share of the stock. + book_value_per_share : float + The book value per share of the stock. + tangible_book_value_per_share : float + The tangible book value per share of the stock. + shareholders_equity_per_share : float + The shareholders equity per share of the stock. + interest_debt_per_share : float + The interest debt per share of the stock. + market_cap : float + The market cap of the stock. + enterprise_value : float + The enterprise value of the stock. + pe_ratio : float + The PE ratio of the stock. + price_to_sales_ratio : float + The price to sales ratio of the stock. + pocf_ratio : float + The POCF ratio of the stock. + pfcf_ratio : float + The PFCF ratio of the stock. + pb_ratio : float + The PB ratio of the stock. + ptb_ratio : float + The PTB ratio of the stock. + ev_to_sales : float + The EV to sales of the stock. + enterprise_value_over_ebitda : float + The enterprise value over EBITDA of the stock. + ev_to_operating_cash_flow : float + The EV to operating cash flow of the stock. + ev_to_free_cash_flow : float + The EV to free cash flow of the stock. + earnings_yield : float + The earnings yield of the stock. + free_cash_flow_yield : float + The free cash flow yield of the stock. + debt_to_equity : float + The debt to equity of the stock. + debt_to_assets : float + The debt to assets of the stock. + net_debt_to_ebitda : float + The net debt to EBITDA of the stock. + current_ratio : float + The current ratio of the stock. + interest_coverage : float + The interest coverage of the stock. + income_quality : float + The income quality of the stock. + dividend_yield : float + The dividend yield of the stock. + payout_ratio : float + The payout ratio of the stock. + sales_general_and_administrative_to_revenue : float + The sales general and administrative to revenue of the stock. + research_and_developement_to_revenue : float + The research and development to revenue of the stock. + intangibles_to_total_assets : float + The intangibles to total assets of the stock. + capex_to_operating_cash_flow : float + The capex to operating cash flow of the stock. + capex_to_revenue : float + The capex to revenue of the stock. + capex_to_depreciation : float + The capex to depreciation of the stock. + stock_based_compensation_to_revenue : float + The stock based compensation to revenue of the stock. + graham_number : float + The graham number of the stock. + roic : float + The ROIC of the stock. + return_on_tangible_assets : float + The return on tangible assets of the stock. + graham_net_net : float + The graham net net of the stock. + working_capital : float + The working capital of the stock. + tangible_asset_value : float + The tangible asset value of the stock. + net_current_asset_value : float + The net current asset value of the stock. + invested_capital : float + The invested capital of the stock. + average_receivables : float + The average receivables of the stock. + average_payables : float + The average payables of the stock. + average_inventory : float + The average inventory of the stock. + days_sales_outstanding : float + The days sales outstanding of the stock. + days_payables_outstanding : float + The days payables outstanding of the stock. + days_of_inventory_on_hand : float + The days of inventory on hand of the stock. + receivables_turnover : float + The receivables turnover of the stock. + payables_turnover : float + The payables turnover of the stock. + inventory_turnover : float + The inventory turnover of the stock. + roe : float + The ROE of the stock. + capex_per_share : float + The capex per share of the stock. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/company-key-metrics-api/ + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "period": period, + "limit": limit, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/metrics", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def mgmt( + self, + symbol: str, + key_executive_name: Optional[str] = None, + key_executive_title: Optional[str] = None, + key_executive_title_since: Optional[datetime.datetime] = None, + key_executive_year_born: Optional[datetime.datetime] = None, + key_executive_gender: Optional[str] = None, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Key Executives. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + key_executive_name : Optional[str] + The name of the key executive to be retrieved. + key_executive_title : Optional[str] + The title of the key executive to be retrieved. + key_executive_title_since : Optional[datetime] + The period since the position of the key executive to be retrieved. + key_executive_year_born : Optional[datetime] + The year born of the key executive to be retrieved. + key_executive_gender: Optional[str] + The gender of the key executive to be retrieved. + + + Returns + ------- + name : Optional[str] + The name of the key executive. + title : Optional[str] + The title of the key executive. + title_since : Optional[datetime] + The title since of the key executive. + year_born : Optional[datetime] + The year born of the key executive. + gender : Optional[str] + The gender of the key executive. + + fmp + === + + Source: https://financialmodelingprep.com/developer/docs/#Key-Executives + + Parameter + --------- + key_executive_gender: Optional[str] + The gender of the key executive. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "key_executive_name": key_executive_name, + "key_executive_title": key_executive_title, + "key_executive_title_since": key_executive_title_since, + "key_executive_year_born": key_executive_year_born, + "key_executive_gender": key_executive_gender, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/mgmt", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def mktcap( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Obtain the market capitalization or enterprise value.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/mktcap", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def news( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/news", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def overview( + self, + symbol: str, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Company Overview. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + + + Returns + ------- + symbol : str + The symbol of the company. + price : float + The price of the company. + beta : float + The beta of the company. + vol_avg : int + The volume average of the company. + mkt_cap : int + The market capitalization of the company. + last_div : float + The last dividend of the company. + range : str + The range of the company. + changes : float + The changes of the company. + company_name : str + The company name of the company. + currency : str + The currency of the company. + cik : Optional[str] + The CIK of the company. + isin : Optional[str] + The ISIN of the company. + cusip : Optional[str] + The CUSIP of the company. + exchange : str + The exchange of the company. + exchange_short_name : str + The exchange short name of the company. + industry : str + The industry of the company. + website : str + The website of the company. + description : str + The description of the company. + ceo : str + The CEO of the company. + sector : str + The sector of the company. + country : str + The country of the company. + full_time_employees : str + The full time employees of the company. + phone : str + The phone of the company. + address : str + The address of the company. + city : str + The city of the company. + state : str + The state of the company. + zip : str + The zip of the company. + dcf_diff : float + The discounted cash flow difference of the company. + dcf : float + The discounted cash flow of the company. + image : str + The image of the company. + ipo_date : date + The IPO date of the company. + default_image : bool + If the image is the default image. + is_etf : bool + If the company is an ETF. + is_actively_trading : bool + If the company is actively trading. + is_adr : bool + If the company is an ADR. + is_fund : bool + If the company is a fund. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/companies-key-stats-free-api/ + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/overview", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def own( + self, + symbol: str, + include_current_quarter: bool = False, + date: Optional[datetime.date] = None, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Institutional Ownership. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + include_current_quarter : bool + Whether to include the current quarter. Default is False. + date : Optional[dateType] + A specific date to get data for. + + + Returns + ------- + symbol : str + The symbol of the company. + cik : str + The CIK of the company. + date : dateType + The date of the institutional ownership. + investors_holding : int + The number of investors holding the stock. + last_investors_holding : int + The number of investors holding the stock in the last quarter. + investors_holding_change : int + The change in the number of investors holding the stock. + number_of_13f_shares : int + The number of 13F shares. + last_number_of_13f_shares : int + The number of 13F shares in the last quarter. + number_of_13f_shares_change : int + The change in the number of 13F shares. + total_invested : float + The total amount invested. + last_total_invested : float + The total amount invested in the last quarter. + total_invested_change : float + The change in the total amount invested. + ownership_percent : float + The ownership percent. + last_ownership_percent : float + The ownership percent in the last quarter. + ownership_percent_change : float + The change in the ownership percent. + new_positions : int + The number of new positions. + last_new_positions : int + The number of new positions in the last quarter. + new_positions_change : int + The change in the number of new positions. + increased_positions : int + The number of increased positions. + last_increased_positions : int + The number of increased positions in the last quarter. + increased_positions_change : int + The change in the number of increased positions. + closed_positions : int + The number of closed positions. + last_closed_positions : int + The number of closed positions in the last quarter. + closed_positions_change : int + The change in the number of closed positions. + reduced_positions : int + The number of reduced positions. + last_reduced_positions : int + The number of reduced positions in the last quarter. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/institutional-stock-ownership-api/ + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "include_current_quarter": include_current_quarter, + "date": date, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/own", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def pt( + self, + symbol: str, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Price Target Consensus. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + + + Returns + ------- + symbol : str + The symbol of the asset. + target_high : float + The high target of the price target consensus. + target_low : float + The low target of the price target consensus. + target_consensus : float + The consensus target of the price target consensus. + target_median : float + The median target of the price target consensus. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/price-target-consensus-api/ + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/pt", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def pta( + self, + symbol: str, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Price Target. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + + + Returns + ------- + symbol : str + The symbol of the asset. + published_date : datetime + The published date of the price target. + news_url : str + The news URL of the price target. + news_title : str + The news title of the price target. + analyst_name : str + The analyst name of the price target. + price_target : float + The price target of the price target. + adj_price_target : float + The adjusted price target of the price target. + price_when_posted : float + The price when posted of the price target. + news_publisher : str + The news publisher of the price target. + news_base_url : str + The news base URL of the price target. + analyst_company : str + The analyst company of the price target. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/#Price-Target + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/pta", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def rating( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Analyst prices and ratings over time of the company.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/rating", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def ratios( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Extensive set of ratios over time.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/ratios", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def revfc( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Earning Estimate by Analysts - Revenue.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/revfc", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def revgeo( + self, + symbol: str, + period: Literal["quarterly", "annually"] = "quarterly", + structure: Literal["hierarchical", "flat"] = "flat", + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Revenue Geographic. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + period : Literal["quarterly", "annually"] + The period of the income statement. + structure : Literal["hierarchical", "flat"] + The structure of the revenue geographic. Should always be flat. + + + Returns + ------- + date : date + The date of the revenue. + americas : Optional[int] + The revenue of the America segment. + europe : Optional[int] + The revenue of the Europe segment. + greater_china : Optional[int] + The revenue of the Greater China segment. + japan : Optional[int] + The revenue of the Japan segment. + rest_of_asia_pacific : Optional[int] + The revenue of the Rest of Asia Pacific segment. + + fmp + === + + Source: https://financialmodelingprep.com/developer/docs/#Revenue-Geographic-Segmentation + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "period": period, + "structure": structure, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/revgeo", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def revseg( + self, + symbol: str, + period: Literal["quarterly", "annually"] = "quarterly", + structure: Literal["hierarchical", "flat"] = "flat", + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Revenue Business Line. + + Available providers: fmp, + + Standard + ======== + + + Parameter + --------- + symbol : str + The symbol of the company. + period : Literal["quarterly", "annually"] + The period of the income statement. + structure : Literal["hierarchical", "flat"] + The structure of the revenue business line. Should always be flat. + + + Returns + ------- + date : date + The date of the revenue. + data_and_service : Dict[str, int] + The data and service of the revenue. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/sales-revenue-by-segments-api/ + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "period": period, + "structure": structure, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/revseg", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def rot( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Number of analyst ratings over time on a monthly basis.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/rot", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def score( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Value investing scores for any time period.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/score", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def sec( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/sec", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def shares( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/shares", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def shrs( + self, + symbol: str, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Share Statistics. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + + + Returns + ------- + symbol : str + The symbol of the company. + date : dateType + The date of the share statistics. + free_float : float + The free float of the company. + float_shares : float + The float shares of the company. + outstanding_shares : float + The outstanding shares of the company. + source : str + The source of the data. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/shares-float-api/ + + Parameter + --------- + All fields are standardized. + + + Returns + ------- + Documentation not available. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/shrs", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def split( + self, + symbol: str, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Historical Stock Splits. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + + + Returns + ------- + date : date + The date of the historical stock splits. + label : str + The label of the historical stock splits. + numerator : float + The numerator of the historical stock splits. + denominator : float + The denominator of the historical stock splits. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/historical-stock-splits-api/ + + Parameter + --------- + All fields are standardized. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/split", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def supplier( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """List of suppliers of the company.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/supplier", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def transcript( + self, + symbol: str, + year: int, + chart: bool = False, + provider: Optional[Literal["fmp"]] = None, + **kwargs + ) -> CommandOutput[typing.List]: + """Earnings Call Transcript. + + Available providers: fmp, + + Standard + ======== + + Parameter + --------- + symbol : str + The symbol of the company. + year : int + The year of the earnings call transcript. + + + Returns + ------- + symbol : str + The symbol of the asset. + quarter : int + The quarter of the earnings call transcript. + year : int + The year of the earnings call transcript. + date : datetime + The date of the earnings call transcript. + content : str + The content of the earnings call transcript. + + fmp + === + + Source: https://site.financialmodelingprep.com/developer/docs/earnings-calendar-api/ + + Parameter + --------- + All fields are standardized. + """ + inputs = filter_inputs( + provider_choices={ + "provider": provider, + }, + standard_params={ + "symbol": symbol, + "year": year, + }, + extra_params=kwargs, + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/fa/transcript", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_gov.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_gov.py new file mode 100644 index 00000000000..dd8dcd12eb0 --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_gov.py @@ -0,0 +1,198 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + + +from pydantic import validate_arguments + +import openbb_core.app.model.results.empty +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_stocks_gov(Container): + @filter_call + @validate_arguments + def contracts( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Return government contracts.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/gov/contracts", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def government_trading( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Return government trading.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/gov/government_trading", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def gtrades( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Return government trades.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/gov/gtrades", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def histcont( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Historical quarterly government contracts.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/gov/histcont", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def lastcontracts( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Return last government contracts given out.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/gov/lastcontracts", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def lasttrades( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Last trades.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/gov/lasttrades", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def lobbying( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Corporate lobbying details.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/gov/lobbying", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def qtrcontracts( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Quarterly government contracts analysis.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/gov/qtrcontracts", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def topbuys( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Show most purchased stocks.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/gov/topbuys", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def toplobbying( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Top corporate lobbying tickers.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/gov/toplobbying", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def topsells( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Show most sold stocks.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/gov/topsells", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_ins.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_ins.py new file mode 100644 index 00000000000..7626488acd4 --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_ins.py @@ -0,0 +1,283 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + + +from pydantic import validate_arguments + +import openbb_core.app.model.results.empty +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_stocks_ins(Container): + @filter_call + @validate_arguments + def act( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Insider activity over time.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/act", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def blcp( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Big latest CEO/CFO purchaces ($25k+).""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/blcp", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def blcs( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Big latest CEO/CFO sales ($100k+).""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/blcs", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def blip( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Big latest insider purchaces ($25+).""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/blip", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def blis( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Big latest insider sales ($100k+).""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/blis", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def blop( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Big latest officer purchaces ($25k+).""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/blop", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def blos( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Big latest officer sales ($100k+).""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/blos", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def filt( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Filter insiders based on preset.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/filt", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def lcb( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Latest cluster buys.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/lcb", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def lins( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Last insider trading of the company.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/lins", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def lip( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Latest insider purchaces.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/lip", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def lis( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Latest insider sales.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/lis", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def lit( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Latest insider trading (all filings).""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/lit", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def lpsb( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Latest penny stock buys.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/lpsb", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def print_insider_data( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Print insider data.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/print_insider_data", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def stats( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Insider stats of the company.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/ins/stats", + **inputs, + ).output + + return filter_output(o) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_options.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_options.py new file mode 100644 index 00000000000..3af5f2e87e8 --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks_options.py @@ -0,0 +1,264 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + + +from pydantic import validate_arguments + +import openbb_core.app.model.results.empty +from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.static.container import Container +from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output + + +class CLASS_stocks_options(Container): + @filter_call + @validate_arguments + def chains( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Return options chains with greeks.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/chains", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def dte( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/dte", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def eodchain( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Gets option chain at a specific date.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/eodchain", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def expirations( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Return options expirations.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/expirations", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def grhist( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Plot option greek history.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/grhist", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def hist( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Plot option history.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/hist", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def info( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Display option information (volatility, IV rank, etc.).""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/info", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def last_price( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Return last price of an option.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/last_price", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def oi( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Plot option open interest.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/oi", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def pcr( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Display put/call ratio for ticker.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/pcr", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def price( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/price", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def unu( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Show unusual options activity.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/unu", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def voi( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Plot volume and open interest.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/voi", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def vol( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Plot volume.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/vol", + **inputs, + ).output + + return filter_output(o) + + @filter_call + @validate_arguments + def vsurf( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + """Show 3D volatility surface.""" + inputs = filter_inputs( + chart=chart, + ) + + o = self._command_runner_session.run( + "/stocks/options/vsurf", + **inputs, + ).output + + return filter_output(o)