From 74a7fcb41600bd0d5e47436c131e036fb86047e0 Mon Sep 17 00:00:00 2001 From: teh_coderer Date: Tue, 8 Aug 2023 07:14:09 -0700 Subject: [PATCH 1/7] fix conflict docstrings (#5293) --- .../behavioural_analysis/reddit_view.py | 4 +- openbb_terminal/fixedincome/fred_view.py | 4 +- openbb_terminal/forecast/brnn_view.py | 127 +++++++++--------- openbb_terminal/forecast/expo_view.py | 97 +++++++------ 4 files changed, 111 insertions(+), 121 deletions(-) diff --git a/openbb_terminal/common/behavioural_analysis/reddit_view.py b/openbb_terminal/common/behavioural_analysis/reddit_view.py index 8fc49af7506..2855c5349cc 100644 --- a/openbb_terminal/common/behavioural_analysis/reddit_view.py +++ b/openbb_terminal/common/behavioural_analysis/reddit_view.py @@ -282,8 +282,8 @@ def display_redditsent( Optionally specify the name of the sheet the data is exported to. export: str Format to export data - external_axes: Optional[List[plt.Axes]] - If supplied, expect 1 external axis + external_axes : bool, optional + Whether to return the figure object or not, by default False """ fig = OpenBBFigure() diff --git a/openbb_terminal/fixedincome/fred_view.py b/openbb_terminal/fixedincome/fred_view.py index 97b279c0128..b5ba7cb9b0a 100644 --- a/openbb_terminal/fixedincome/fred_view.py +++ b/openbb_terminal/fixedincome/fred_view.py @@ -975,8 +975,8 @@ def display_yield_curve( ---------- date: str Date to get curve for. If None, gets most recent date (format yyyy-mm-dd) - external_axes : Optional[List[plt.Axes]], optional - External axes (1 axis is expected in the list), by default None + external_axes : bool, optional + Whether to return the figure object or not, by default False raw : bool Output only raw data export : str diff --git a/openbb_terminal/forecast/brnn_view.py b/openbb_terminal/forecast/brnn_view.py index 9fcf49e5428..b59c06abefc 100644 --- a/openbb_terminal/forecast/brnn_view.py +++ b/openbb_terminal/forecast/brnn_view.py @@ -48,72 +48,67 @@ def display_brnn_forecast( ) -> Union[OpenBBFigure, None]: """Display BRNN forecast - Parameters - ---------- - data: Union[pd.Series, pd.DataFrame] - Input Data - target_column: str - Target column to forecast. Defaults to "close". - dataset_name: str - The name of the ticker to be predicted - n_predict: int - Days to predict. Defaults to 5. - train_split: float - Train/val split. Defaults to 0.85. - past_covariates: str - Multiple secondary columns to factor in when forecasting. Defaults to None. - forecast_horizon: int - Forecast horizon when performing historical forecasting. Defaults to 5. - input_chunk_length: int - Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. - output_chunk_length: int - The length of the forecast of the model. Defaults to 5. - model_type: str - Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". - n_rnn_layers: int - Number of layers in the RNN module. Defaults to 1. - dropout: float - Fraction of neurons affected by Dropout. Defaults to 0.0. - batch_size: int - Number of time series (input and output sequences) used in each training pass. Defaults to 32. - n_epochs: int - Number of epochs over which to train the model. Defaults to 101. - learning_rate: float - Defaults to 1e-3. - model_save_name: str - Name for model. Defaults to "brnn_model". - force_reset: bool - If set to True, any previously-existing model with the same name will be reset - (all checkpoints will be discarded). Defaults to True. - save_checkpoints: bool - Whether or not to automatically save the untrained model and checkpoints from training. - Defaults to True. - sheet_name: str - Optionally specify the name of the sheet the data is exported to. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - <<<<<<< HEAD - external_axes : bool, optional - Whether to return the figure object or not, by default False - ======= - export_pred_raw: bool - Whether to export the raw predicted values. Defaults to False. - metric: str - The metric to use for the model. Defaults to "mape". - external_axes: Optional[List[plt.axes]] - External axes to plot on - >>>>>>> OpenBBTerminal-main + Parameters + ---------- + data: Union[pd.Series, pd.DataFrame] + Input Data + target_column: str + Target column to forecast. Defaults to "close". + dataset_name: str + The name of the ticker to be predicted + n_predict: int + Days to predict. Defaults to 5. + train_split: float + Train/val split. Defaults to 0.85. + past_covariates: str + Multiple secondary columns to factor in when forecasting. Defaults to None. + forecast_horizon: int + Forecast horizon when performing historical forecasting. Defaults to 5. + input_chunk_length: int + Number of past time steps that are fed to the forecasting module at prediction time. Defaults to 14. + output_chunk_length: int + The length of the forecast of the model. Defaults to 5. + model_type: str + Either a string specifying the RNN module type ("RNN", "LSTM" or "GRU"). Defaults to "LSTM". + n_rnn_layers: int + Number of layers in the RNN module. Defaults to 1. + dropout: float + Fraction of neurons affected by Dropout. Defaults to 0.0. + batch_size: int + Number of time series (input and output sequences) used in each training pass. Defaults to 32. + n_epochs: int + Number of epochs over which to train the model. Defaults to 101. + learning_rate: float + Defaults to 1e-3. + model_save_name: str + Name for model. Defaults to "brnn_model". + force_reset: bool + If set to True, any previously-existing model with the same name will be reset + (all checkpoints will be discarded). Defaults to True. + save_checkpoints: bool + Whether or not to automatically save the untrained model and checkpoints from training. + Defaults to True. + sheet_name: str + Optionally specify the name of the sheet the data is exported to. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + export_pred_raw: bool + Whether to export the raw predicted values. Defaults to False. + metric: str + The metric to use for the model. Defaults to "mape". + external_axes : bool, optional + Whether to return the figure object or not, by default False """ data = helpers.clean_data( data, start_date, end_date, target_column, past_covariates diff --git a/openbb_terminal/forecast/expo_view.py b/openbb_terminal/forecast/expo_view.py index 7231cd76aed..ab6d82b30b4 100644 --- a/openbb_terminal/forecast/expo_view.py +++ b/openbb_terminal/forecast/expo_view.py @@ -41,57 +41,52 @@ def display_expo_forecast( ) -> Union[OpenBBFigure, None]: """Display Probabilistic Exponential Smoothing forecast - Parameters - ---------- - data : Union[pd.Series, np.array] - Data to forecast - dataset_name: str - The name of the ticker to be predicted - target_column: Optional[str]: - Target column to forecast. Defaults to "close". - trend: str - Trend component. One of [N, A, M] - Defaults to ADDITIVE. - seasonal: str - Seasonal component. One of [N, A, M] - Defaults to ADDITIVE. - seasonal_periods: int - Number of seasonal periods in a year - If not set, inferred from frequency of the series. - dampen: str - Dampen the function - n_predict: int - Number of days to forecast - start_window: float - Size of sliding window from start of timeseries and onwards - forecast_horizon: int - Number of days to forecast when backtesting and retraining historical - sheet_name: str - Optionally specify the name of the sheet the data is exported to. - export: str - Format to export data - residuals: bool - Whether to show residuals for the model. Defaults to False. - forecast_only: bool - Whether to only show dates in the forecasting range. Defaults to False. - start_date: Optional[datetime] - The starting date to perform analysis, data before this is trimmed. Defaults to None. - end_date: Optional[datetime] - The ending date to perform analysis, data after this is trimmed. Defaults to None. - naive: bool - Whether to show the naive baseline. This just assumes the closing price will be the same - as the previous day's closing price. Defaults to False. - <<<<<<< HEAD - external_axes : bool, optional - Whether to return the figure object or not, by default False - ======= - export_pred_raw: bool - Whether to export the raw predicted values. Defaults to False. - metric: str - The metric to use when backtesting. Defaults to "mape". - external_axes: Optional[List[plt.axes]] - External axes to plot on - >>>>>>> OpenBBTerminal-main + Parameters + ---------- + data : Union[pd.Series, np.array] + Data to forecast + dataset_name: str + The name of the ticker to be predicted + target_column: Optional[str]: + Target column to forecast. Defaults to "close". + trend: str + Trend component. One of [N, A, M] + Defaults to ADDITIVE. + seasonal: str + Seasonal component. One of [N, A, M] + Defaults to ADDITIVE. + seasonal_periods: int + Number of seasonal periods in a year + If not set, inferred from frequency of the series. + dampen: str + Dampen the function + n_predict: int + Number of days to forecast + start_window: float + Size of sliding window from start of timeseries and onwards + forecast_horizon: int + Number of days to forecast when backtesting and retraining historical + sheet_name: str + Optionally specify the name of the sheet the data is exported to. + export: str + Format to export data + residuals: bool + Whether to show residuals for the model. Defaults to False. + forecast_only: bool + Whether to only show dates in the forecasting range. Defaults to False. + start_date: Optional[datetime] + The starting date to perform analysis, data before this is trimmed. Defaults to None. + end_date: Optional[datetime] + The ending date to perform analysis, data after this is trimmed. Defaults to None. + naive: bool + Whether to show the naive baseline. This just assumes the closing price will be the same + as the previous day's closing price. Defaults to False. + export_pred_raw: bool + Whether to export the raw predicted values. Defaults to False. + metric: str + The metric to use when backtesting. Defaults to "mape". + external_axes : bool, optional + Whether to return the figure object or not, by default False """ data = helpers.clean_data(data, start_date, end_date, target_column, None) if not helpers.check_data(data, target_column, None): From 9348f098a53bc30ee0b6533d24bf936cd8fb612f Mon Sep 17 00:00:00 2001 From: Henrique Joaquim Date: Tue, 8 Aug 2023 15:18:57 +0100 Subject: [PATCH 2/7] [SDK v4] General improvements related with the charting extension (#5283) * introducing fig on the chart model * charting manager to expect fig and content. also, adding a 1st example of its usage for stocks/load route * leveraging fig.show on command output * introducing the render_chart function * using render_chart() on the command output * drop to_plotly_json function * a way of removing fields from the api only * remove references to to_plotly_json * fix charting_router to use new convention on returning fig and content * adjustments on the builder script * ruff and black * typo * stocks_news chart implementation * repr on chart model * adding table style config * removing to_plotly_json from the charting manager * typo and a little change on the way to_table behaves so we can leverage inheritance * introducing OpenBBFigureTable as a workarround to have tables on the sdk * renaming to to_chart * multiples implementation * black --- .../charting/openbb_charting/__init__.py | 2 +- .../charting/openbb_charting/builder.py | 9 +- .../openbb_charting/charting_router.py | 868 +++++++++++------- .../openbb_charting/core/chart_style.py | 2 +- .../openbb_charting/core/openbb_figure.py | 8 +- .../core/openbb_figure_table.py | 95 ++ .../core/{to_plotly_json.py => to_chart.py} | 10 +- .../{dark.pltstyle => dark.pltstyle.json} | 0 .../{light.pltstyle => light.pltstyle.json} | 0 .../styles/default/tables.pltstyle.json | 102 ++ .../core/openbb_core/api/router/commands.py | 51 +- .../core/openbb_core/app/charting_manager.py | 41 +- .../openbb_core/app/model/charts/chart.py | 46 +- .../app/model/charts/charting_settings.py | 7 +- .../openbb_core/app/model/command_output.py | 46 +- .../core/openbb_core/app/model/preferences.py | 1 + openbb_sdk/sdk/provider/README.md | 2 +- 17 files changed, 887 insertions(+), 403 deletions(-) create mode 100644 openbb_sdk/extensions/charting/openbb_charting/core/openbb_figure_table.py rename openbb_sdk/extensions/charting/openbb_charting/core/{to_plotly_json.py => to_chart.py} (88%) rename openbb_sdk/extensions/charting/openbb_charting/styles/default/{dark.pltstyle => dark.pltstyle.json} (100%) rename openbb_sdk/extensions/charting/openbb_charting/styles/default/{light.pltstyle => light.pltstyle.json} (100%) create mode 100644 openbb_sdk/extensions/charting/openbb_charting/styles/default/tables.pltstyle.json diff --git a/openbb_sdk/extensions/charting/openbb_charting/__init__.py b/openbb_sdk/extensions/charting/openbb_charting/__init__.py index 9d60f0e2e6f..494d7d40b75 100644 --- a/openbb_sdk/extensions/charting/openbb_charting/__init__.py +++ b/openbb_sdk/extensions/charting/openbb_charting/__init__.py @@ -3,4 +3,4 @@ from openbb_charting.core.backend import ( create_backend, get_backend, ) -from openbb_charting.core.to_plotly_json import to_plotly_json +from openbb_charting.core.to_chart import to_chart diff --git a/openbb_sdk/extensions/charting/openbb_charting/builder.py b/openbb_sdk/extensions/charting/openbb_charting/builder.py index 75b5710f8bc..90351e6bd5d 100644 --- a/openbb_sdk/extensions/charting/openbb_charting/builder.py +++ b/openbb_sdk/extensions/charting/openbb_charting/builder.py @@ -1,9 +1,12 @@ from inspect import getmembers, isfunction from typing import List +from openbb_charting import charting_router from openbb_core.app.router import RouterLoader -CHARTING_ROUTER = "./charting_router.py" +# refers to the root of the repo, not the root of the extension +# this script should be run from the root of the repo +CHARTING_ROUTER = "openbb_sdk/extensions/charting/openbb_charting/charting_router.py" def get_routes() -> List[str]: @@ -18,15 +21,13 @@ def create_charting_functions_w_routes(routes_to_add: List[str]): f.write( f""" -def {route}(**kwargs): +def {route}(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `{original_route}` does not have a charting function") """ ) def get_charting_functions() -> List[str]: - from . import charting_router # pylint: disable=import-outside-toplevel - functions = getmembers(charting_router, isfunction) if functions: return [function[0] for function in functions] diff --git a/openbb_sdk/extensions/charting/openbb_charting/charting_router.py b/openbb_sdk/extensions/charting/openbb_charting/charting_router.py index 59f640d8f32..10d1b9fcf1a 100644 --- a/openbb_sdk/extensions/charting/openbb_charting/charting_router.py +++ b/openbb_sdk/extensions/charting/openbb_charting/charting_router.py @@ -1,3 +1,7 @@ +from typing import Any, Dict, Tuple + +from openbb_charting.core.openbb_figure import OpenBBFigure +from openbb_charting.core.openbb_figure_table import OpenBBFigureTable from openbb_charting.core.plotly_ta.ta_class import PlotlyTA from openbb_core.app.model.charts.chart import ChartFormat from openbb_core.app.router import Router @@ -14,1645 +18,1801 @@ CHART_FORMAT = ChartFormat.plotly # pylint: disable=too-many-lines -def crypto_load(**kwargs): +def crypto_load(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `crypto/load` does not have a charting function") -def economy_corecpi(**kwargs): +def economy_corecpi(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/corecpi` does not have a charting function" ) -def economy_cpi(**kwargs): +def economy_cpi(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `economy/cpi` does not have a charting function") -def economy_cpi_options(**kwargs): +def economy_cpi_options(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/cpi/options` does not have a charting function" ) -def economy_index(**kwargs): +def economy_index(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/index` does not have a charting function" ) -def economy_available_indices(**kwargs): +def economy_available_indices(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/available/indices` does not have a charting function" ) -def economy_macro(**kwargs): +def economy_macro(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/macro` does not have a charting function" ) -def economy_macro_countries(**kwargs): +def economy_macro_countries(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/macro/countries` does not have a charting function" ) -def economy_macro_parameters(**kwargs): +def economy_macro_parameters(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/macro/parameters` does not have a charting function" ) -def economy_balance(**kwargs): +def economy_balance(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/balance` does not have a charting function" ) -def economy_bigmac(**kwargs): +def economy_bigmac(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/bigmac` does not have a charting function" ) -def economy_country_codes(**kwargs): +def economy_country_codes(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/country/codes` does not have a charting function" ) -def economy_currencies(**kwargs): +def economy_currencies(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/currencies` does not have a charting function" ) -def economy_debt(**kwargs): +def economy_debt(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/debt` does not have a charting function" ) -def economy_events(**kwargs): +def economy_events(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/events` does not have a charting function" ) -def economy_fgdp(**kwargs): +def economy_fgdp(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/fgdp` does not have a charting function" ) -def economy_fred(**kwargs): +def economy_fred(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/fred` does not have a charting function" ) -def economy_fred_search(**kwargs): +def economy_fred_search(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/fred/search` does not have a charting function" ) -def economy_futures(**kwargs): +def economy_futures(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/futures` does not have a charting function" ) -def economy_gdp(**kwargs): +def economy_gdp(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `economy/gdp` does not have a charting function") -def economy_glbonds(**kwargs): +def economy_glbonds(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/glbonds` does not have a charting function" ) -def economy_indices(**kwargs): +def economy_indices(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/indices` does not have a charting function" ) -def economy_overview(**kwargs): +def economy_overview(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/overview` does not have a charting function" ) -def economy_perfmap(**kwargs): +def economy_perfmap(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/perfmap` does not have a charting function" ) -def economy_performance(**kwargs): +def economy_performance(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/performance` does not have a charting function" ) -def economy_revenue(**kwargs): +def economy_revenue(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/revenue` does not have a charting function" ) -def economy_rgdp(**kwargs): +def economy_rgdp(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/rgdp` does not have a charting function" ) -def economy_rtps(**kwargs): +def economy_rtps(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/rtps` does not have a charting function" ) -def economy_search_index(**kwargs): +def economy_search_index(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/search/index` does not have a charting function" ) -def economy_spending(**kwargs): +def economy_spending(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/spending` does not have a charting function" ) -def economy_trust(**kwargs): +def economy_trust(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/trust` does not have a charting function" ) -def economy_usbonds(**kwargs): +def economy_usbonds(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/usbonds` does not have a charting function" ) -def economy_valuation(**kwargs): +def economy_valuation(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `economy/valuation` does not have a charting function" ) -def fixedincome_treasury(**kwargs): +def fixedincome_treasury(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `fixedincome/treasury` does not have a charting function" ) -def fixedincome_ycrv(**kwargs): +def fixedincome_ycrv(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `fixedincome/ycrv` does not have a charting function" ) -def forex_load(**kwargs): +def forex_load(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `forex/load` does not have a charting function") -def news_globalnews(**kwargs): +def news_globalnews(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `news/globalnews` does not have a charting function" ) -def news_sectornews(**kwargs): +def news_sectornews(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `news/sectornews` does not have a charting function" ) -def providers_benzinga_global_news_standardized(**kwargs): +def providers_benzinga_global_news_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/benzinga/global/news/standardized` does not have a charting function" ) -def providers_benzinga_stock_news_standardized(**kwargs): +def providers_benzinga_stock_news_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/benzinga/stock/news/standardized` does not have a charting function" ) -def providers_fmp_key_executives_standardized(**kwargs): +def providers_fmp_key_executives_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/key/executives/standardized` does not have a charting function" ) -def providers_fmp_stock_eod_standardized(**kwargs): +def providers_fmp_stock_eod_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/stock/eod/standardized` does not have a charting function" ) -def providers_fmp_global_news_standardized(**kwargs): +def providers_fmp_global_news_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/global/news/standardized` does not have a charting function" ) -def providers_fmp_stock_news_standardized(**kwargs): +def providers_fmp_stock_news_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/stock/news/standardized` does not have a charting function" ) -def providers_fmp_income_statement_standardized(**kwargs): +def providers_fmp_income_statement_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/income/statement/standardized` does not have a charting function" ) -def providers_fmp_balance_sheet_standardized(**kwargs): +def providers_fmp_balance_sheet_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/balance/sheet/standardized` does not have a charting function" ) -def providers_fmp_cash_flow_statement_standardized(**kwargs): +def providers_fmp_cash_flow_statement_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/cash/flow/statement/standardized` does not have a charting function" ) -def providers_fmp_share_statistics_standardized(**kwargs): +def providers_fmp_share_statistics_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/share/statistics/standardized` does not have a charting function" ) -def providers_fmp_major_indices_eod_standardized(**kwargs): +def providers_fmp_major_indices_eod_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/major/indices/eod/standardized` does not have a charting function" ) -def providers_fmp_revenue_geographic_standardized(**kwargs): +def providers_fmp_revenue_geographic_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/revenue/geographic/standardized` does not have a charting function" ) -def providers_fmp_revenue_business_line_standardized(**kwargs): +def providers_fmp_revenue_business_line_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/revenue/business/line/standardized` does not have a charting function" ) -def providers_fmp_institutional_ownership_standardized(**kwargs): +def providers_fmp_institutional_ownership_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/institutional/ownership/standardized` does not have a charting function" ) -def providers_fmp_company_overview_standardized(**kwargs): +def providers_fmp_company_overview_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/company/overview/standardized` does not have a charting function" ) -def providers_fmp_stock_insider_trading_standardized(**kwargs): +def providers_fmp_stock_insider_trading_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/stock/insider/trading/standardized` does not have a charting function" ) -def providers_fmp_stock_ownership_standardized(**kwargs): +def providers_fmp_stock_ownership_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/stock/ownership/standardized` does not have a charting function" ) -def providers_fmp_e_s_g_score_standardized(**kwargs): +def providers_fmp_e_s_g_score_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/e/s/g/score/standardized` does not have a charting function" ) -def providers_fmp_e_s_g_sector_standardized(**kwargs): +def providers_fmp_e_s_g_sector_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/e/s/g/sector/standardized` does not have a charting function" ) -def providers_fmp_e_s_g_risk_rating_standardized(**kwargs): +def providers_fmp_e_s_g_risk_rating_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/e/s/g/risk/rating/standardized` does not have a charting function" ) -def providers_fmp_stock_price_standardized(**kwargs): +def providers_fmp_stock_price_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/stock/price/standardized` does not have a charting function" ) -def providers_fmp_price_target_consensus_standardized(**kwargs): +def providers_fmp_price_target_consensus_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/price/target/consensus/standardized` does not have a charting function" ) -def providers_fmp_price_target_standardized(**kwargs): +def providers_fmp_price_target_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/price/target/standardized` does not have a charting function" ) -def providers_fmp_analyst_estimates_standardized(**kwargs): +def providers_fmp_analyst_estimates_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/analyst/estimates/standardized` does not have a charting function" ) -def providers_fmp_earnings_calendar_standardized(**kwargs): +def providers_fmp_earnings_calendar_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/earnings/calendar/standardized` does not have a charting function" ) -def providers_fmp_earnings_call_transcript_standardized(**kwargs): +def providers_fmp_earnings_call_transcript_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/earnings/call/transcript/standardized` does not have a charting function" ) -def providers_fmp_historical_stock_splits_standardized(**kwargs): +def providers_fmp_historical_stock_splits_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/historical/stock/splits/standardized` does not have a charting function" ) -def providers_fmp_historical_dividends_standardized(**kwargs): +def providers_fmp_historical_dividends_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/historical/dividends/standardized` does not have a charting function" ) -def providers_fmp_key_metrics_standardized(**kwargs): +def providers_fmp_key_metrics_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/key/metrics/standardized` does not have a charting function" ) -def providers_fmp_s_e_c_filings_standardized(**kwargs): +def providers_fmp_s_e_c_filings_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/s/e/c/filings/standardized` does not have a charting function" ) -def providers_fmp_treasury_rates_standardized(**kwargs): +def providers_fmp_treasury_rates_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/treasury/rates/standardized` does not have a charting function" ) -def providers_fmp_executive_compensation_standardized(**kwargs): +def providers_fmp_executive_compensation_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/executive/compensation/standardized` does not have a charting function" ) -def providers_fmp_crypto_price_standardized(**kwargs): +def providers_fmp_crypto_price_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/crypto/price/standardized` does not have a charting function" ) -def providers_fmp_crypto_eod_standardized(**kwargs): +def providers_fmp_crypto_eod_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/crypto/eod/standardized` does not have a charting function" ) -def providers_fmp_major_indices_price_standardized(**kwargs): +def providers_fmp_major_indices_price_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/major/indices/price/standardized` does not have a charting function" ) -def providers_fmp_forex_eod_standardized(**kwargs): +def providers_fmp_forex_eod_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/forex/eod/standardized` does not have a charting function" ) -def providers_polygon_stock_eod_standardized(**kwargs): +def providers_polygon_stock_eod_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/stock/eod/standardized` does not have a charting function" ) -def providers_polygon_stock_news_standardized(**kwargs): +def providers_polygon_stock_news_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/stock/news/standardized` does not have a charting function" ) -def providers_polygon_balance_sheet_standardized(**kwargs): +def providers_polygon_balance_sheet_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/balance/sheet/standardized` does not have a charting function" ) -def providers_polygon_income_statement_standardized(**kwargs): +def providers_polygon_income_statement_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/income/statement/standardized` does not have a charting function" ) -def providers_polygon_cash_flow_statement_standardized(**kwargs): +def providers_polygon_cash_flow_statement_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/cash/flow/statement/standardized` does not have a charting function" ) -def providers_polygon_stock_price_standardized(**kwargs): +def providers_polygon_stock_price_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/stock/price/standardized` does not have a charting function" ) -def providers_polygon_crypto_price_standardized(**kwargs): +def providers_polygon_crypto_price_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/crypto/price/standardized` does not have a charting function" ) -def providers_polygon_crypto_eod_standardized(**kwargs): +def providers_polygon_crypto_eod_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/crypto/eod/standardized` does not have a charting function" ) -def providers_polygon_major_indices_eod_standardized(**kwargs): +def providers_polygon_major_indices_eod_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/major/indices/eod/standardized` does not have a charting function" ) -def providers_polygon_major_indices_price_standardized(**kwargs): +def providers_polygon_major_indices_price_standardized( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/major/indices/price/standardized` does not have a charting function" ) -def providers_benzinga_global_news_simple(**kwargs): +def providers_benzinga_global_news_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/benzinga/global/news/simple` does not have a charting function" ) -def providers_benzinga_stock_news_simple(**kwargs): +def providers_benzinga_stock_news_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/benzinga/stock/news/simple` does not have a charting function" ) -def providers_fmp_key_executives_simple(**kwargs): +def providers_fmp_key_executives_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/key/executives/simple` does not have a charting function" ) -def providers_fmp_stock_eod_simple(**kwargs): +def providers_fmp_stock_eod_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/stock/eod/simple` does not have a charting function" ) -def providers_fmp_global_news_simple(**kwargs): +def providers_fmp_global_news_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/global/news/simple` does not have a charting function" ) -def providers_fmp_stock_news_simple(**kwargs): +def providers_fmp_stock_news_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/stock/news/simple` does not have a charting function" ) -def providers_fmp_income_statement_simple(**kwargs): +def providers_fmp_income_statement_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/income/statement/simple` does not have a charting function" ) -def providers_fmp_balance_sheet_simple(**kwargs): +def providers_fmp_balance_sheet_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/balance/sheet/simple` does not have a charting function" ) -def providers_fmp_cash_flow_statement_simple(**kwargs): +def providers_fmp_cash_flow_statement_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/cash/flow/statement/simple` does not have a charting function" ) -def providers_fmp_share_statistics_simple(**kwargs): +def providers_fmp_share_statistics_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/share/statistics/simple` does not have a charting function" ) -def providers_fmp_major_indices_eod_simple(**kwargs): +def providers_fmp_major_indices_eod_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/major/indices/eod/simple` does not have a charting function" ) -def providers_fmp_revenue_geographic_simple(**kwargs): +def providers_fmp_revenue_geographic_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/revenue/geographic/simple` does not have a charting function" ) -def providers_fmp_revenue_business_line_simple(**kwargs): +def providers_fmp_revenue_business_line_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/revenue/business/line/simple` does not have a charting function" ) -def providers_fmp_institutional_ownership_simple(**kwargs): +def providers_fmp_institutional_ownership_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/institutional/ownership/simple` does not have a charting function" ) -def providers_fmp_company_overview_simple(**kwargs): +def providers_fmp_company_overview_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/company/overview/simple` does not have a charting function" ) -def providers_fmp_stock_insider_trading_simple(**kwargs): +def providers_fmp_stock_insider_trading_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/stock/insider/trading/simple` does not have a charting function" ) -def providers_fmp_stock_ownership_simple(**kwargs): +def providers_fmp_stock_ownership_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/stock/ownership/simple` does not have a charting function" ) -def providers_fmp_e_s_g_score_simple(**kwargs): +def providers_fmp_e_s_g_score_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/e/s/g/score/simple` does not have a charting function" ) -def providers_fmp_e_s_g_sector_simple(**kwargs): +def providers_fmp_e_s_g_sector_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/e/s/g/sector/simple` does not have a charting function" ) -def providers_fmp_e_s_g_risk_rating_simple(**kwargs): +def providers_fmp_e_s_g_risk_rating_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/e/s/g/risk/rating/simple` does not have a charting function" ) -def providers_fmp_stock_price_simple(**kwargs): +def providers_fmp_stock_price_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/stock/price/simple` does not have a charting function" ) -def providers_fmp_price_target_consensus_simple(**kwargs): +def providers_fmp_price_target_consensus_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/price/target/consensus/simple` does not have a charting function" ) -def providers_fmp_price_target_simple(**kwargs): +def providers_fmp_price_target_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/price/target/simple` does not have a charting function" ) -def providers_fmp_analyst_estimates_simple(**kwargs): +def providers_fmp_analyst_estimates_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/analyst/estimates/simple` does not have a charting function" ) -def providers_fmp_earnings_calendar_simple(**kwargs): +def providers_fmp_earnings_calendar_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/earnings/calendar/simple` does not have a charting function" ) -def providers_fmp_earnings_call_transcript_simple(**kwargs): +def providers_fmp_earnings_call_transcript_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/earnings/call/transcript/simple` does not have a charting function" ) -def providers_fmp_historical_stock_splits_simple(**kwargs): +def providers_fmp_historical_stock_splits_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/historical/stock/splits/simple` does not have a charting function" ) -def providers_fmp_historical_dividends_simple(**kwargs): +def providers_fmp_historical_dividends_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/historical/dividends/simple` does not have a charting function" ) -def providers_fmp_key_metrics_simple(**kwargs): +def providers_fmp_key_metrics_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/key/metrics/simple` does not have a charting function" ) -def providers_fmp_s_e_c_filings_simple(**kwargs): +def providers_fmp_s_e_c_filings_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/s/e/c/filings/simple` does not have a charting function" ) -def providers_fmp_treasury_rates_simple(**kwargs): +def providers_fmp_treasury_rates_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/treasury/rates/simple` does not have a charting function" ) -def providers_fmp_executive_compensation_simple(**kwargs): +def providers_fmp_executive_compensation_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/executive/compensation/simple` does not have a charting function" ) -def providers_fmp_crypto_price_simple(**kwargs): +def providers_fmp_crypto_price_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/crypto/price/simple` does not have a charting function" ) -def providers_fmp_crypto_eod_simple(**kwargs): +def providers_fmp_crypto_eod_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/crypto/eod/simple` does not have a charting function" ) -def providers_fmp_major_indices_price_simple(**kwargs): +def providers_fmp_major_indices_price_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/major/indices/price/simple` does not have a charting function" ) -def providers_fmp_forex_eod_simple(**kwargs): +def providers_fmp_forex_eod_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/fmp/forex/eod/simple` does not have a charting function" ) -def providers_polygon_stock_eod_simple(**kwargs): +def providers_polygon_stock_eod_simple(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/stock/eod/simple` does not have a charting function" ) -def providers_polygon_stock_news_simple(**kwargs): +def providers_polygon_stock_news_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/stock/news/simple` does not have a charting function" ) -def providers_polygon_balance_sheet_simple(**kwargs): +def providers_polygon_balance_sheet_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/balance/sheet/simple` does not have a charting function" ) -def providers_polygon_income_statement_simple(**kwargs): +def providers_polygon_income_statement_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/income/statement/simple` does not have a charting function" ) -def providers_polygon_cash_flow_statement_simple(**kwargs): +def providers_polygon_cash_flow_statement_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/cash/flow/statement/simple` does not have a charting function" ) -def providers_polygon_stock_price_simple(**kwargs): +def providers_polygon_stock_price_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/stock/price/simple` does not have a charting function" ) -def providers_polygon_crypto_price_simple(**kwargs): +def providers_polygon_crypto_price_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/crypto/price/simple` does not have a charting function" ) -def providers_polygon_crypto_eod_simple(**kwargs): +def providers_polygon_crypto_eod_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/crypto/eod/simple` does not have a charting function" ) -def providers_polygon_major_indices_eod_simple(**kwargs): +def providers_polygon_major_indices_eod_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/major/indices/eod/simple` does not have a charting function" ) -def providers_polygon_major_indices_price_simple(**kwargs): +def providers_polygon_major_indices_price_simple( + **kwargs, +) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `providers/polygon/major/indices/price/simple` does not have a charting function" ) -def qa_normality(**kwargs): +def qa_normality(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `qa/normality` does not have a charting function" ) -def qa_capm(**kwargs): +def qa_capm(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/capm` does not have a charting function") -def qa_qqplot(**kwargs): +def qa_qqplot(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/qqplot` does not have a charting function") -def qa_om(**kwargs): +def qa_om(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/om` does not have a charting function") -def qa_kurtosis(**kwargs): +def qa_kurtosis(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/kurtosis` does not have a charting function") -def qa_pick(**kwargs): +def qa_pick(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/pick` does not have a charting function") -def qa_spread(**kwargs): +def qa_spread(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/spread` does not have a charting function") -def qa_rolling(**kwargs): +def qa_rolling(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/rolling` does not have a charting function") -def qa_var(**kwargs): +def qa_var(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/var` does not have a charting function") -def qa_line(**kwargs): +def qa_line(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/line` does not have a charting function") -def qa_hist(**kwargs): +def qa_hist(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/hist` does not have a charting function") -def qa_unitroot(**kwargs): +def qa_unitroot(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/unitroot` does not have a charting function") -def qa_beta(**kwargs): +def qa_beta(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/beta` does not have a charting function") -def qa_sh(**kwargs): +def qa_sh(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/sh` does not have a charting function") -def qa_so(**kwargs): +def qa_so(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/so` does not have a charting function") -def qa_cusum(**kwargs): +def qa_cusum(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/cusum` does not have a charting function") -def qa_raw(**kwargs): +def qa_raw(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/raw` does not have a charting function") -def qa_cdf(**kwargs): +def qa_cdf(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/cdf` does not have a charting function") -def qa_decompose(**kwargs): +def qa_decompose(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `qa/decompose` does not have a charting function" ) -def qa_skew(**kwargs): +def qa_skew(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/skew` does not have a charting function") -def qa_quantile(**kwargs): +def qa_quantile(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/quantile` does not have a charting function") -def qa_bw(**kwargs): +def qa_bw(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/bw` does not have a charting function") -def qa_es(**kwargs): +def qa_es(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/es` does not have a charting function") -def qa_acf(**kwargs): +def qa_acf(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/acf` does not have a charting function") -def qa_summary(**kwargs): +def qa_summary(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `qa/summary` does not have a charting function") -def stocks_fa_balance(**kwargs): +def stocks_fa_balance(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/balance` does not have a charting function" ) -def stocks_fa_cash(**kwargs): +def stocks_fa_cash(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/cash` does not have a charting function" ) -def stocks_fa_comp(**kwargs): +def stocks_fa_comp(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/comp` does not have a charting function" ) -def stocks_fa_earning(**kwargs): +def stocks_fa_earning(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/earning` does not have a charting function" ) -def stocks_fa_emp(**kwargs): +def stocks_fa_emp(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/emp` does not have a charting function" ) -def stocks_fa_est(**kwargs): +def stocks_fa_est(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/est` does not have a charting function" ) -def stocks_fa_income(**kwargs): +def stocks_fa_income(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/income` does not have a charting function" ) -def stocks_fa_ins(**kwargs): +def stocks_fa_ins(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/ins` does not have a charting function" ) -def stocks_fa_metrics(**kwargs): +def stocks_fa_metrics(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/metrics` does not have a charting function" ) -def stocks_fa_mgmt(**kwargs): +def stocks_fa_mgmt(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/mgmt` does not have a charting function" ) -def stocks_fa_overview(**kwargs): +def stocks_fa_overview(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/overview` does not have a charting function" ) -def stocks_fa_own(**kwargs): +def stocks_fa_own(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/own` does not have a charting function" ) -def stocks_fa_pta(**kwargs): +def stocks_fa_pta(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/pta` does not have a charting function" ) -def stocks_fa_pt(**kwargs): +def stocks_fa_pt(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/pt` does not have a charting function" ) -def stocks_fa_revgeo(**kwargs): +def stocks_fa_revgeo(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/revgeo` does not have a charting function" ) -def stocks_fa_revseg(**kwargs): +def stocks_fa_revseg(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/revseg` does not have a charting function" ) -def stocks_fa_shrs(**kwargs): +def stocks_fa_shrs(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/shrs` does not have a charting function" ) -def stocks_fa_shares(**kwargs): +def stocks_fa_shares(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/shares` does not have a charting function" ) -def stocks_fa_transcript(**kwargs): +def stocks_fa_transcript(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/transcript` does not have a charting function" ) -def stocks_fa_split(**kwargs): +def stocks_fa_split(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/split` does not have a charting function" ) -def stocks_fa_cal(**kwargs): +def stocks_fa_cal(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/cal` does not have a charting function" ) -def stocks_fa_customer(**kwargs): +def stocks_fa_customer(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/customer` does not have a charting function" ) -def stocks_fa_divs(**kwargs): +def stocks_fa_divs(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/divs` does not have a charting function" ) -def stocks_fa_dcfc(**kwargs): +def stocks_fa_dcfc(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/dcfc` does not have a charting function" ) -def stocks_fa_dupont(**kwargs): +def stocks_fa_dupont(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/dupont` does not have a charting function" ) -def stocks_fa_enterprise(**kwargs): +def stocks_fa_enterprise(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/enterprise` does not have a charting function" ) -def stocks_fa_epsfc(**kwargs): +def stocks_fa_epsfc(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/epsfc` does not have a charting function" ) -def stocks_fa_analysis(**kwargs): +def stocks_fa_analysis(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/analysis` does not have a charting function" ) -def stocks_fa_fama_coe(**kwargs): +def stocks_fa_fama_coe(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/fama/coe` does not have a charting function" ) -def stocks_fa_fama_raw(**kwargs): +def stocks_fa_fama_raw(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/fama/raw` does not have a charting function" ) -def stocks_fa_fraud(**kwargs): +def stocks_fa_fraud(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/fraud` does not have a charting function" ) -def stocks_fa_growth(**kwargs): +def stocks_fa_growth(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/growth` does not have a charting function" ) -def stocks_fa_historical_5(**kwargs): +def stocks_fa_historical_5(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/historical/5` does not have a charting function" ) -def stocks_fa_key(**kwargs): +def stocks_fa_key(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/key` does not have a charting function" ) -def stocks_fa_mktcap(**kwargs): +def stocks_fa_mktcap(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/mktcap` does not have a charting function" ) -def stocks_fa_news(**kwargs): +def stocks_fa_news(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/news` does not have a charting function" ) -def stocks_fa_rating(**kwargs): +def stocks_fa_rating(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/rating` does not have a charting function" ) -def stocks_fa_ratios(**kwargs): +def stocks_fa_ratios(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/ratios` does not have a charting function" ) -def stocks_fa_revfc(**kwargs): +def stocks_fa_revfc(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/revfc` does not have a charting function" ) -def stocks_fa_rot(**kwargs): +def stocks_fa_rot(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/rot` does not have a charting function" ) -def stocks_fa_score(**kwargs): +def stocks_fa_score(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/score` does not have a charting function" ) -def stocks_fa_sec(**kwargs): +def stocks_fa_sec(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/sec` does not have a charting function" ) -def stocks_fa_supplier(**kwargs): +def stocks_fa_supplier(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/fa/supplier` does not have a charting function" ) -def stocks_ca_get(**kwargs): +def stocks_ca_get(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ca/get` does not have a charting function" ) -def stocks_ca_balance(**kwargs): +def stocks_ca_balance(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ca/balance` does not have a charting function" ) -def stocks_ca_cashflow(**kwargs): +def stocks_ca_cashflow(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ca/cashflow` does not have a charting function" ) -def stocks_ca_hcorr(**kwargs): +def stocks_ca_hcorr(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ca/hcorr` does not have a charting function" ) -def stocks_ca_hist(**kwargs): +def stocks_ca_hist(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ca/hist` does not have a charting function" ) -def stocks_ca_income(**kwargs): +def stocks_ca_income(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ca/income` does not have a charting function" ) -def stocks_ca_scorr(**kwargs): +def stocks_ca_scorr(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ca/scorr` does not have a charting function" ) -def stocks_ca_screener(**kwargs): +def stocks_ca_screener(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ca/screener` does not have a charting function" ) -def stocks_ca_sentiment(**kwargs): +def stocks_ca_sentiment(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ca/sentiment` does not have a charting function" ) -def stocks_ca_similar(**kwargs): +def stocks_ca_similar(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ca/similar` does not have a charting function" ) -def stocks_ca_volume(**kwargs): +def stocks_ca_volume(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ca/volume` does not have a charting function" ) -def stocks_dd_sec(**kwargs): +def stocks_dd_sec(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dd/sec` does not have a charting function" ) -def stocks_dps_psi(**kwargs): +def stocks_dps_psi(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/psi` does not have a charting function" ) -def stocks_dps_ctb(**kwargs): +def stocks_dps_ctb(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/ctb` does not have a charting function" ) -def stocks_dps_dpotc(**kwargs): +def stocks_dps_dpotc(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/dpotc` does not have a charting function" ) -def stocks_dps_ftd(**kwargs): +def stocks_dps_ftd(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/ftd` does not have a charting function" ) -def stocks_dps_hsi(**kwargs): +def stocks_dps_hsi(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/hsi` does not have a charting function" ) -def stocks_dps_pos(**kwargs): +def stocks_dps_pos(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/pos` does not have a charting function" ) -def stocks_dps_prom(**kwargs): +def stocks_dps_prom(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/prom` does not have a charting function" ) -def stocks_dps_psi_q(**kwargs): +def stocks_dps_psi_q(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/psi/q` does not have a charting function" ) -def stocks_dps_psi_sg(**kwargs): +def stocks_dps_psi_sg(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/psi/sg` does not have a charting function" ) -def stocks_dps_shorted(**kwargs): +def stocks_dps_shorted(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/shorted` does not have a charting function" ) -def stocks_dps_sidtc(**kwargs): +def stocks_dps_sidtc(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/sidtc` does not have a charting function" ) -def stocks_dps_spos(**kwargs): +def stocks_dps_spos(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/dps/spos` does not have a charting function" ) -def stocks_disc_active(**kwargs): +def stocks_disc_active(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/active` does not have a charting function" ) -def stocks_disc_arkord(**kwargs): +def stocks_disc_arkord(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/arkord` does not have a charting function" ) -def stocks_disc_asc(**kwargs): +def stocks_disc_asc(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/asc` does not have a charting function" ) -def stocks_disc_dividends(**kwargs): +def stocks_disc_dividends(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/dividends` does not have a charting function" ) -def stocks_disc_filings(**kwargs): +def stocks_disc_filings(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/filings` does not have a charting function" ) -def stocks_disc_fipo(**kwargs): +def stocks_disc_fipo(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/fipo` does not have a charting function" ) -def stocks_disc_gainers(**kwargs): +def stocks_disc_gainers(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/gainers` does not have a charting function" ) -def stocks_disc_gtech(**kwargs): +def stocks_disc_gtech(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/gtech` does not have a charting function" ) -def stocks_disc_hotpenny(**kwargs): +def stocks_disc_hotpenny(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/hotpenny` does not have a charting function" ) -def stocks_disc_ipo(**kwargs): +def stocks_disc_ipo(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/ipo` does not have a charting function" ) -def stocks_disc_losers(**kwargs): +def stocks_disc_losers(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/losers` does not have a charting function" ) -def stocks_disc_lowfloat(**kwargs): +def stocks_disc_lowfloat(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/lowfloat` does not have a charting function" ) -def stocks_disc_pipo(**kwargs): +def stocks_disc_pipo(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/pipo` does not have a charting function" ) -def stocks_disc_rtat(**kwargs): +def stocks_disc_rtat(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/rtat` does not have a charting function" ) -def stocks_disc_trending(**kwargs): +def stocks_disc_trending(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/trending` does not have a charting function" ) -def stocks_disc_ugs(**kwargs): +def stocks_disc_ugs(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/ugs` does not have a charting function" ) -def stocks_disc_ulc(**kwargs): +def stocks_disc_ulc(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/ulc` does not have a charting function" ) -def stocks_disc_upcoming(**kwargs): +def stocks_disc_upcoming(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/disc/upcoming` does not have a charting function" ) -def stocks_gov_contracts(**kwargs): +def stocks_gov_contracts(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/gov/contracts` does not have a charting function" ) -def stocks_gov_government_trading(**kwargs): +def stocks_gov_government_trading(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/gov/government/trading` does not have a charting function" ) -def stocks_gov_gtrades(**kwargs): +def stocks_gov_gtrades(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/gov/gtrades` does not have a charting function" ) -def stocks_gov_histcont(**kwargs): +def stocks_gov_histcont(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/gov/histcont` does not have a charting function" ) -def stocks_gov_lastcontracts(**kwargs): +def stocks_gov_lastcontracts(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/gov/lastcontracts` does not have a charting function" ) -def stocks_gov_lasttrades(**kwargs): +def stocks_gov_lasttrades(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/gov/lasttrades` does not have a charting function" ) -def stocks_gov_lobbying(**kwargs): +def stocks_gov_lobbying(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/gov/lobbying` does not have a charting function" ) -def stocks_gov_qtrcontracts(**kwargs): +def stocks_gov_qtrcontracts(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/gov/qtrcontracts` does not have a charting function" ) -def stocks_gov_topbuys(**kwargs): +def stocks_gov_topbuys(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/gov/topbuys` does not have a charting function" ) -def stocks_gov_toplobbying(**kwargs): +def stocks_gov_toplobbying(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/gov/toplobbying` does not have a charting function" ) -def stocks_gov_topsells(**kwargs): +def stocks_gov_topsells(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/gov/topsells` does not have a charting function" ) -def stocks_ins_act(**kwargs): +def stocks_ins_act(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/act` does not have a charting function" ) -def stocks_ins_blcp(**kwargs): +def stocks_ins_blcp(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/blcp` does not have a charting function" ) -def stocks_ins_blcs(**kwargs): +def stocks_ins_blcs(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/blcs` does not have a charting function" ) -def stocks_ins_blip(**kwargs): +def stocks_ins_blip(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/blip` does not have a charting function" ) -def stocks_ins_blis(**kwargs): +def stocks_ins_blis(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/blis` does not have a charting function" ) -def stocks_ins_blop(**kwargs): +def stocks_ins_blop(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/blop` does not have a charting function" ) -def stocks_ins_blos(**kwargs): +def stocks_ins_blos(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/blos` does not have a charting function" ) -def stocks_ins_filter(**kwargs): +def stocks_ins_filter(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/filter` does not have a charting function" ) -def stocks_ins_lcb(**kwargs): +def stocks_ins_lcb(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/lcb` does not have a charting function" ) -def stocks_ins_lins(**kwargs): +def stocks_ins_lins(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/lins` does not have a charting function" ) -def stocks_ins_lip(**kwargs): +def stocks_ins_lip(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/lip` does not have a charting function" ) -def stocks_ins_lis(**kwargs): +def stocks_ins_lis(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/lis` does not have a charting function" ) -def stocks_ins_lit(**kwargs): +def stocks_ins_lit(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/lit` does not have a charting function" ) -def stocks_ins_lpsb(**kwargs): +def stocks_ins_lpsb(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/lpsb` does not have a charting function" ) -def stocks_ins_print_insider_data(**kwargs): +def stocks_ins_print_insider_data(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/print/insider/data` does not have a charting function" ) -def stocks_ins_stats(**kwargs): +def stocks_ins_stats(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/ins/stats` does not have a charting function" ) -def stocks_options_chains(**kwargs): +def stocks_options_chains(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/chains` does not have a charting function" ) -def stocks_options_dte(**kwargs): +def stocks_options_dte(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/dte` does not have a charting function" ) -def stocks_options_eodchain(**kwargs): +def stocks_options_eodchain(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/eodchain` does not have a charting function" ) -def stocks_options_expirations(**kwargs): +def stocks_options_expirations(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/expirations` does not have a charting function" ) -def stocks_options_grhist(**kwargs): +def stocks_options_grhist(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/grhist` does not have a charting function" ) -def stocks_options_hist(**kwargs): +def stocks_options_hist(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/hist` does not have a charting function" ) -def stocks_options_info(**kwargs): +def stocks_options_info(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/info` does not have a charting function" ) -def stocks_options_last_price(**kwargs): +def stocks_options_last_price(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/last/price` does not have a charting function" ) -def stocks_options_oi(**kwargs): +def stocks_options_oi(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/oi` does not have a charting function" ) -def stocks_options_pcr(**kwargs): +def stocks_options_pcr(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/pcr` does not have a charting function" ) -def stocks_options_price(**kwargs): +def stocks_options_price(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/price` does not have a charting function" ) -def stocks_options_unu(**kwargs): +def stocks_options_unu(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/unu` does not have a charting function" ) -def stocks_options_voi(**kwargs): +def stocks_options_voi(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/voi` does not have a charting function" ) -def stocks_options_vol(**kwargs): +def stocks_options_vol(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/vol` does not have a charting function" ) -def stocks_options_vsurf(**kwargs): +def stocks_options_vsurf(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/options/vsurf` does not have a charting function" ) -def stocks_load(**kwargs): +def stocks_load(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: def handle_indicators(ma): k = {} if ma: @@ -1674,25 +1834,35 @@ def stocks_load(**kwargs): symbol=f"{symbol} historical data", prepost=prepost, ) + content = fig.show(external=True).to_plotly_json() - return fig.show(external=True).to_plotly_json() + return fig, content -def stocks_news(**kwargs): - raise NotImplementedError("Command `stocks/news` does not have a charting function") +def stocks_news(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: + data = basemodel_to_df( + kwargs["command_output_item"], index=kwargs.get("index", "date") + ) + standard_params = kwargs["standard_params"].__dict__ + columnwidth = standard_params.get("columnwidth", None) + + tbl_fig = OpenBBFigureTable(tabular_data=data, columnwidth=columnwidth) + content = tbl_fig.to_table().show(external=True).to_plotly_json() + + return tbl_fig, content -def stocks_tob(**kwargs): +def stocks_tob(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `stocks/tob` does not have a charting function") -def stocks_quote(**kwargs): +def stocks_quote(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/quote` does not have a charting function" ) -def stocks_search(**kwargs): +def stocks_search(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError( "Command `stocks/search` does not have a charting function" ) @@ -1700,7 +1870,7 @@ def stocks_search(**kwargs): def _ta_ma(ma_type: str, **kwargs): data = basemodel_to_df(kwargs["data"], index=kwargs.get("index", "date")) - window = kwargs.get("window", 50) + window = kwargs.get("windowstocks_load", 50) offset = kwargs.get("offset", 0) symbol = kwargs.get("symbol", "") @@ -1712,48 +1882,49 @@ def _ta_ma(ma_type: str, **kwargs): False, volume=False, ) + content = fig.show(external=True).to_plotly_json() - return fig.show(external=True).to_plotly_json() + return fig, content -def ta_atr(**kwargs): +def ta_atr(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/atr` does not have a charting function") -def ta_fib(**kwargs): +def ta_fib(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/fib` does not have a charting function") -def ta_obv(**kwargs): +def ta_obv(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/obv` does not have a charting function") -def ta_fisher(**kwargs): +def ta_fisher(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/fisher` does not have a charting function") -def ta_adosc(**kwargs): +def ta_adosc(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/adosc` does not have a charting function") -def ta_tv(**kwargs): +def ta_tv(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/tv` does not have a charting function") -def ta_bbands(**kwargs): +def ta_bbands(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/bbands` does not have a charting function") -def ta_multi(**kwargs): +def ta_multi(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/multi` does not have a charting function") -def ta_zlma(**kwargs): +def ta_zlma(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: ma_type = "zlma" return _ta_ma(ma_type, **kwargs) -def ta_aroon(**kwargs): +def ta_aroon(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: data = basemodel_to_df(kwargs["data"], index=kwargs.get("index", "date")) length = kwargs.get("length", 25) scalar = kwargs.get("scalar", 100) @@ -1767,28 +1938,29 @@ def ta_aroon(**kwargs): False, volume=False, ) + content = fig.show(external=True).to_plotly_json() - return fig.show(external=True).to_plotly_json() + return fig, content -def ta_sma(**kwargs): +def ta_sma(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: ma_type = "sma" return _ta_ma(ma_type, **kwargs) -def ta_demark(**kwargs): +def ta_demark(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/demark` does not have a charting function") -def ta_vwap(**kwargs): +def ta_vwap(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/vwap` does not have a charting function") -def ta_recom(**kwargs): +def ta_recom(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/recom` does not have a charting function") -def ta_macd(**kwargs): +def ta_macd(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: data = basemodel_to_df(kwargs["data"], index=kwargs.get("index", "date")) fast = kwargs.get("fast", 12) slow = kwargs.get("slow", 26) @@ -1803,32 +1975,33 @@ def ta_macd(**kwargs): False, volume=False, ) + content = fig.show(external=True).to_plotly_json() - return fig.show(external=True).to_plotly_json() + return fig, content -def ta_hma(**kwargs): +def ta_hma(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: ma_type = "hma" return _ta_ma(ma_type, **kwargs) -def ta_donchian(**kwargs): +def ta_donchian(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/donchian` does not have a charting function") -def ta_ichimoku(**kwargs): +def ta_ichimoku(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/ichimoku` does not have a charting function") -def ta_clenow(**kwargs): +def ta_clenow(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/clenow` does not have a charting function") -def ta_ad(**kwargs): +def ta_ad(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/ad` does not have a charting function") -def ta_adx(**kwargs): +def ta_adx(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: data = basemodel_to_df(kwargs["data"], index=kwargs.get("index", "date")) length = kwargs.get("length", 14) scalar = kwargs.get("scalar", 100.0) @@ -1843,20 +2016,21 @@ def ta_adx(**kwargs): False, volume=False, ) + content = fig.show(external=True).to_plotly_json() - return fig.show(external=True).to_plotly_json() + return fig, content -def ta_wma(**kwargs): +def ta_wma(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: ma_type = "wma" return _ta_ma(ma_type, **kwargs) -def ta_cci(**kwargs): +def ta_cci(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/cci` does not have a charting function") -def ta_rsi(**kwargs): +def ta_rsi(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: data = basemodel_to_df(kwargs["data"], index=kwargs.get("index", "date")) window = kwargs.get("window", 14) scalar = kwargs.get("scalar", 100.0) @@ -1871,34 +2045,76 @@ def ta_rsi(**kwargs): False, volume=False, ) + content = fig.show(external=True).to_plotly_json() - return fig.show(external=True).to_plotly_json() + return fig, content -def ta_summary(**kwargs): +def ta_summary(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/summary` does not have a charting function") -def ta_stoch(**kwargs): +def ta_stoch(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/stoch` does not have a charting function") -def ta_rsp(**kwargs): +def ta_rsp(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/rsp` does not have a charting function") -def ta_kc(**kwargs): +def ta_kc(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/kc` does not have a charting function") -def ta_cg(**kwargs): +def ta_cg(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/cg` does not have a charting function") -def ta_cones(**kwargs): +def ta_cones(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: raise NotImplementedError("Command `ta/cones` does not have a charting function") -def ta_ema(**kwargs): +def ta_ema(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: ma_type = "ema" return _ta_ma(ma_type, **kwargs) + + +def forex_pairs(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: + raise NotImplementedError("Command `forex/pairs` does not have a charting function") + + +def economy_const(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: + raise NotImplementedError( + "Command `economy/const` does not have a charting function" + ) + + +def economy_risk(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: + raise NotImplementedError( + "Command `economy/risk` does not have a charting function" + ) + + +def stocks_fa_comsplit(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: + raise NotImplementedError( + "Command `stocks/fa/comsplit` does not have a charting function" + ) + + +def stocks_ins_filt(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: + raise NotImplementedError( + "Command `stocks/ins/filt` does not have a charting function" + ) + + +def stocks_multiples(**kwargs) -> Tuple[OpenBBFigure, Dict[str, Any]]: + data = basemodel_to_df( + kwargs["command_output_item"], index=kwargs.get("index", "date") + ) + standard_params = kwargs["standard_params"].__dict__ + columnwidth = standard_params.get("columnwidth", None) + + tbl_fig = OpenBBFigureTable(tabular_data=data, columnwidth=columnwidth) + content = tbl_fig.to_table().show(external=True).to_plotly_json() + + return tbl_fig, content diff --git a/openbb_sdk/extensions/charting/openbb_charting/core/chart_style.py b/openbb_sdk/extensions/charting/openbb_charting/core/chart_style.py index eb52de74e08..e90491b95af 100644 --- a/openbb_sdk/extensions/charting/openbb_charting/core/chart_style.py +++ b/openbb_sdk/extensions/charting/openbb_charting/core/chart_style.py @@ -137,7 +137,7 @@ class ChartStyle: for attr, ext in zip( ["plt_styles_available", "console_styles_available"], - [".pltstyle", ".richstyle.json"], + [".pltstyle.json", ".richstyle.json"], ): for file in folder.rglob(f"*{ext}"): getattr(self, attr)[file.name.replace(ext, "")] = file diff --git a/openbb_sdk/extensions/charting/openbb_charting/core/openbb_figure.py b/openbb_sdk/extensions/charting/openbb_charting/core/openbb_figure.py index 718bb7d1c3e..fd35d1238f5 100644 --- a/openbb_sdk/extensions/charting/openbb_charting/core/openbb_figure.py +++ b/openbb_sdk/extensions/charting/openbb_charting/core/openbb_figure.py @@ -338,9 +338,7 @@ class OpenBBFigure(go.Figure): for i, (x_i, name_i, color_i) in enumerate(zip(valid_x, name, colors)): if not color_i: color_i = ( # noqa: PLW2901 - self._self._theme.up_color - if i % 2 == 0 - else self._self._theme.down_color + self._theme.up_color if i % 2 == 0 else self._theme.down_color ) res_mean, res_std = np.mean(x_i), np.std(x_i) @@ -386,7 +384,7 @@ class OpenBBFigure(go.Figure): name=name_i if len(name) < 2 else name[1], mode="markers", marker=dict( - color=self._self._theme.down_color, + color=self._theme.down_color, symbol="line-ns-open", size=8, ), @@ -1381,7 +1379,7 @@ class OpenBBFigure(go.Figure): height = kwargs.pop("height", len(data.index) * 28 + 25) width = kwargs.pop("width", sum(columnwidth) * 8.7) - fig: OpenBBFigure = cls() + fig = OpenBBFigure(**kwargs) fig.add_table( header=dict(values=header_values), cells=dict( diff --git a/openbb_sdk/extensions/charting/openbb_charting/core/openbb_figure_table.py b/openbb_sdk/extensions/charting/openbb_charting/core/openbb_figure_table.py new file mode 100644 index 00000000000..b0d131a7251 --- /dev/null +++ b/openbb_sdk/extensions/charting/openbb_charting/core/openbb_figure_table.py @@ -0,0 +1,95 @@ +from typing import List, Optional, Union + +import pandas as pd + +from openbb_sdk.extensions.charting.openbb_charting.core.openbb_figure import ( + OpenBBFigure, +) + + +class OpenBBFigureTable(OpenBBFigure): + def __init__( + self, + tabular_data: pd.DataFrame, + columnwidth: Optional[List[Union[int, float]]] = None, + ): + super().__init__() + self._tabular_data = tabular_data + self._columnwidth = columnwidth + + def show( + self, + show_index: Optional[bool] = True, + index_name: Optional[str] = "", + headers: Optional[Union[List[str], pd.Index]] = None, + title: Optional[str] = "", + source: Optional[str] = "", + external: Optional[bool] = False, + ) -> Optional["OpenBBFigureTable"]: + if external: + return self + + if not self._backend.isatty: + tmp_fig = self.to_table() + tmp_fig.show() + else: + # Make a copy of the dataframe to avoid SettingWithCopyWarning + df = self._tabular_data.copy() + + show_index = not isinstance(df.index, pd.RangeIndex) and show_index + # convert non-str that are not timestamp or int into str + # eg) praw.models.reddit.subreddit.Subreddit + for col in df.columns: + try: + if not any( + isinstance(df[col].iloc[x], pd.Timestamp) + for x in range(min(10, len(df))) + ): + df[col] = pd.to_numeric(df[col], errors="ignore") + except (ValueError, TypeError): + df[col] = df[col].astype(str) + + def _get_headers(_headers: Union[List[str], pd.Index]) -> List[str]: + """Check if headers are valid and return them.""" + output = _headers + if isinstance(_headers, pd.Index): + output = list(_headers) + if len(output) != len(df.columns): + raise ( + ValueError( + "Length of headers does not match length of DataFrame" + ) + ) + return output + + df_outgoing = df.copy() + # If headers are provided, use them + if headers is not None: + # We check if headers are valid + df_outgoing.columns = _get_headers(headers) + + if show_index and index_name not in df_outgoing.columns: + # If index name is provided, we use it + df_outgoing.index.name = index_name or "Index" + df_outgoing = df_outgoing.reset_index() + + for col in df_outgoing.columns: + if col == "": + df_outgoing = df_outgoing.rename(columns={col: " "}) + + self._backend.send_table( + df_table=df_outgoing, + title=title, + source=source, # type: ignore + theme=self._charting_settings.table_style, + ) + + def to_table( + self, + print_index: bool = True, + **kwargs, + ) -> "OpenBBFigure": + data = self._tabular_data + columnwidth = self._columnwidth + + return super().to_table(data, columnwidth, print_index, **kwargs) diff --git a/openbb_sdk/extensions/charting/openbb_charting/core/to_plotly_json.py b/openbb_sdk/extensions/charting/openbb_charting/core/to_chart.py similarity index 88% rename from openbb_sdk/extensions/charting/openbb_charting/core/to_plotly_json.py rename to openbb_sdk/extensions/charting/openbb_charting/core/to_chart.py index 2a5745ae08b..f707a6aaab2 100644 --- a/openbb_sdk/extensions/charting/openbb_charting/core/to_plotly_json.py +++ b/openbb_sdk/extensions/charting/openbb_charting/core/to_chart.py @@ -1,12 +1,13 @@ -from typing import Any, Dict, Optional, Union +from typing import Any, Dict, Optional, Tuple, Union import pandas as pd +from openbb_charting.core.openbb_figure import OpenBBFigure from openbb_charting.core.plotly_ta.data_classes import ChartIndicators from openbb_charting.core.plotly_ta.ta_class import PlotlyTA from openbb_core.app.model.charts.charting_settings import ChartingSettings -def to_plotly_json( +def to_chart( charting_settings: ChartingSettings, data: Union[pd.DataFrame, pd.Series], indicators: Optional[Union[ChartIndicators, Dict[str, Dict[str, Any]]]] = None, @@ -15,7 +16,7 @@ def to_plotly_json( volume: bool = True, prepost: bool = False, volume_ticks_x: int = 7, -) -> str: +) -> Tuple[OpenBBFigure, Dict[str, Any]]: """ Returns the plotly json representation of the chart. This function is used so it can be called at the module level and used out of the box, @@ -57,5 +58,6 @@ def to_plotly_json( prepost=prepost, volume_ticks_x=volume_ticks_x, ) + content = fig.show(external=True).to_plotly_json() - return fig.show(external=True).to_plotly_json() + return fig, content diff --git a/openbb_sdk/extensions/charting/openbb_charting/styles/default/dark.pltstyle b/openbb_sdk/extensions/charting/openbb_charting/styles/default/dark.pltstyle.json similarity index 100% rename from openbb_sdk/extensions/charting/openbb_charting/styles/default/dark.pltstyle rename to openbb_sdk/extensions/charting/openbb_charting/styles/default/dark.pltstyle.json diff --git a/openbb_sdk/extensions/charting/openbb_charting/styles/default/light.pltstyle b/openbb_sdk/extensions/charting/openbb_charting/styles/default/light.pltstyle.json similarity index 100% rename from openbb_sdk/extensions/charting/openbb_charting/styles/default/light.pltstyle rename to openbb_sdk/extensions/charting/openbb_charting/styles/default/light.pltstyle.json diff --git a/openbb_sdk/extensions/charting/openbb_charting/styles/default/tables.pltstyle.json b/openbb_sdk/extensions/charting/openbb_charting/styles/default/tables.pltstyle.json new file mode 100644 index 00000000000..69f80ef4d88 --- /dev/null +++ b/openbb_sdk/extensions/charting/openbb_charting/styles/default/tables.pltstyle.json @@ -0,0 +1,102 @@ +{ + "data": { + "candlestick": [ + { + "decreasing": { + "fillcolor": "#e4003a", + "line": { + "color": "#e4003a" + } + }, + "increasing": { + "fillcolor": "#00ACFF", + "line": { + "color": "#00ACFF" + } + }, + "type": "candlestick" + } + ] + }, + "layout": { + "annotationdefaults": { + "showarrow": false + }, + "autotypenumbers": "strict", + "colorway": [ + "#ffed00", + "#ef7d00", + "#e4003a", + "#c13246", + "#822661", + "#48277c", + "#005ca9", + "#00aaff", + "#9b30d9", + "#af005f", + "#5f00af", + "#af87ff" + ], + "dragmode": "pan", + "font": { + "family": "Fira Code", + "size": 18 + }, + "hoverlabel": { + "align": "left" + }, + "mapbox": { + "style": "light" + }, + "hovermode": "x", + "legend": { + "bgcolor": "rgba(0, 0, 0, 0)", + "x": 0.01, + "xanchor": "left", + "y": 0.99, + "yanchor": "top", + "font": { + "size": 15 + } + }, + "paper_bgcolor": "white", + "plot_bgcolor": "white", + "xaxis": { + "automargin": true, + "autorange": true, + "rangeslider": { + "visible": false + }, + "showgrid": true, + "showline": true, + "tickfont": { + "size": 14 + }, + "zeroline": false, + "tick0": 1, + "title": { + "standoff": 20 + }, + "linecolor": "#F5EFF3", + "mirror": true, + "ticks": "outside" + }, + "yaxis": { + "anchor": "x", + "automargin": true, + "fixedrange": false, + "zeroline": false, + "showgrid": true, + "showline": true, + "side": "right", + "tick0": 0.5, + "title": { + "standoff": 20 + }, + "gridcolor": "#283442", + "linecolor": "#F5EFF3", + "mirror": true, + "ticks": "outside" + } + } +} diff --git a/openbb_sdk/sdk/core/openbb_core/api/router/commands.py b/openbb_sdk/sdk/core/openbb_core/api/router/commands.py index a3c1c00b2b2..49ee6a65c5a 100644 --- a/openbb_sdk/sdk/core/openbb_core/api/router/commands.py +++ b/openbb_sdk/sdk/core/openbb_core/api/router/commands.py @@ -1,3 +1,4 @@ +import inspect from functools import partial, wraps from inspect import Parameter, Signature, signature from typing import Any, Callable, Dict, Tuple, TypeVar @@ -7,9 +8,11 @@ from fastapi.routing import APIRoute from openbb_core.api.dependency.user import get_user from openbb_core.app.command_runner import CommandRunner from openbb_core.app.model.command_context import CommandContext +from openbb_core.app.model.command_output import CommandOutput from openbb_core.app.model.user_settings import UserSettings from openbb_core.app.router import RouterLoader from openbb_core.app.service.system_service import SystemService +from pydantic import BaseModel from typing_extensions import Annotated, ParamSpec T = TypeVar("T") @@ -73,6 +76,52 @@ def build_new_signature(func): ) +def validate_output(c_out: CommandOutput) -> CommandOutput: + """ + Validate CommandOutput object. + Checks against the CommandOutput schema and removes fields that contain the + `exclude_from_api` extra `pydantic.Field` kwarg. + Note that the modification to the `CommandOutput` object is done in-place. + + Parameters + ---------- + c_out : CommandOutput + CommandOutput object to validate. + + Returns + ------- + CommandOutput + Validated CommandOutput object. + """ + + def is_model(type_): + return inspect.isclass(type_) and issubclass(type_, BaseModel) + + def exclude_fields_from_api(key: str, value: Any): + type_ = type(value) + + # case where 1st layer field needs to be excluded + if key in c_out.__fields__ and c_out.__fields__[key].field_info.extra.get( + "exclude_from_api", None + ): + delattr(c_out, key) + + # if it's a model with nested fields + elif is_model(type_): + for field in type_.__fields__.values(): + if field.field_info.extra.get("exclude_from_api", None): + delattr(value, field.name) + + # if it's a yet a nested model we need to go deeper in the recursion + elif is_model(field.type_): + exclude_fields_from_api(field.name, getattr(value, field.name)) + + for k, v in c_out: + exclude_fields_from_api(k, v) + + return c_out + + def build_api_wrapper( command_runner: CommandRunner, route: APIRoute, @@ -97,7 +146,7 @@ def build_api_wrapper( execute = partial(command_runner.run_once, user_settings, path) journal_entry = execute(*args, **kwargs) - return journal_entry.output + return validate_output(journal_entry.output) return wrapper diff --git a/openbb_sdk/sdk/core/openbb_core/app/charting_manager.py b/openbb_sdk/sdk/core/openbb_core/app/charting_manager.py index 5f6fc25289f..d0f8188d7a8 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/charting_manager.py +++ b/openbb_sdk/sdk/core/openbb_core/app/charting_manager.py @@ -144,10 +144,28 @@ class ChartingManager(metaclass=SingletonMeta): create_backend_func(charting_settings=charting_settings) get_backend_func().start(debug=charting_settings.debug_mode) - def to_plotly_json(self, **kwargs) -> str: + def to_chart(self, **kwargs) -> Chart: """ - Returns the plotly json representation of the chart. + Returns the chart object. + + Parameters + ---------- + **kwargs + Keyword arguments to be passed to the charting extension. + + Returns + ------- + Chart + Chart object. + + Raises + ------ + ChartingManagerError + If charting extension is not installed. + Exception + If the charting extension module does not contain the `to_chart` function. """ + if not self._charting_extension_installed: raise ChartingManagerError( f"Charting extension `{self._charting_extension}` is not installed" @@ -156,12 +174,19 @@ class ChartingManager(metaclass=SingletonMeta): # Dynamically import the charting module backend_module = import_module(self._charting_extension) - # Get the plotly json function from the charting module - to_plotly_json_func = getattr(backend_module, "to_plotly_json") + # Get the `to_chart` function from the charting module + to_chart_func = getattr(backend_module, "to_chart") + # Add the charting settings to the kwargs kwargs["charting_settings"] = self._charting_settings - return to_plotly_json_func(**kwargs) + fig, content = to_chart_func(**kwargs) + + return Chart( + content=content, + format=self.get_chart_format(self._charting_extension), + fig=fig, + ) def chart( self, @@ -211,7 +236,11 @@ class ChartingManager(metaclass=SingletonMeta): kwargs["command_output_item"] = command_output_item kwargs["charting_settings"] = self._charting_settings + charting_function = self.get_chart_function(self._charting_extension, route) + fig, content = charting_function(**kwargs) + return Chart( - content=self.get_chart_function(self._charting_extension, route)(**kwargs), + content=content, format=self.get_chart_format(self._charting_extension), + fig=fig, ) diff --git a/openbb_sdk/sdk/core/openbb_core/app/model/charts/chart.py b/openbb_sdk/sdk/core/openbb_core/app/model/charts/chart.py index e29559a9895..76eabc1cace 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/model/charts/chart.py +++ b/openbb_sdk/sdk/core/openbb_core/app/model/charts/chart.py @@ -2,7 +2,7 @@ from enum import Enum from typing import Any, Dict, Optional from openbb_core.app.model.abstract.error import Error -from pydantic import BaseModel +from pydantic import BaseModel, Field class ChartFormat(str, Enum): @@ -10,28 +10,30 @@ class ChartFormat(str, Enum): class Chart(BaseModel): - content: Optional[Dict[str, Any]] = None - format: Optional[ChartFormat] = ChartFormat.plotly - error: Optional[Error] = None + content: Optional[Dict[str, Any]] = Field( + default=None, + description="Raw textual representation of the chart.", + ) + format: Optional[ChartFormat] = Field( + default=ChartFormat.plotly, + description="Complementary attribute to the `content` attribute. It specifies the format of the chart.", + ) + error: Optional[Error] = Field( + default=None, + description="Exception caught during the computation of the `Chart`.", + ) + fig: Optional[Any] = Field( + default=None, + description="The figure object.", + exclude_from_api=True, + ) class Config: validate_assignment = True - def show(self): - """Shows the chart in PyWry, browser or notebook.""" - - # TODO : this method should be handled by the ChartingManager so that - # this model class doesn't have specific knowledge on the charting extension - - # pylint: disable=import-outside-toplevel - if self.format == ChartFormat.plotly: - from openbb_charting.core.openbb_figure import OpenBBFigure - - chart = OpenBBFigure() - - chart.update(self.content) - - chart.show() - - else: - raise ValueError(f"Chart format {self.format} not supported.") + def __repr__(self) -> str: + return ( + self.__class__.__name__ + + "\n\n" + + "\n".join([f"{k}: {v}" for k, v in self.dict().items()]) + ) diff --git a/openbb_sdk/sdk/core/openbb_core/app/model/charts/charting_settings.py b/openbb_sdk/sdk/core/openbb_core/app/model/charts/charting_settings.py index f0ab0d68466..45f423acab1 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/model/charts/charting_settings.py +++ b/openbb_sdk/sdk/core/openbb_core/app/model/charts/charting_settings.py @@ -43,9 +43,8 @@ class ChartingSettings: self.user_uuid: Optional[str] = ( user_settings.profile.hub_session.user_uuid if has_hub else None ) - self.user_exports_directory: str = user_settings.preferences.export_directory - self.user_styles_directory: str = ( - user_settings.preferences.user_styles_directory - ) + self.user_exports_directory = user_settings.preferences.export_directory + self.user_styles_directory = user_settings.preferences.user_styles_directory # Theme self.chart_style: str = user_settings.preferences.chart_style + self.table_style = user_settings.preferences.table_style diff --git a/openbb_sdk/sdk/core/openbb_core/app/model/command_output.py b/openbb_sdk/sdk/core/openbb_core/app/model/command_output.py index 77284f14a39..618e17bd628 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/model/command_output.py +++ b/openbb_sdk/sdk/core/openbb_core/app/model/command_output.py @@ -1,4 +1,4 @@ -from typing import Any, Dict, Generic, List, Optional, TypeVar, Union +from typing import Dict, Generic, List, Optional, TypeVar, Union import pandas as pd from pydantic import Field @@ -8,7 +8,7 @@ from openbb_core.app.charting_manager import ChartingManager from openbb_core.app.model.abstract.error import Error from openbb_core.app.model.abstract.tagged import Tagged from openbb_core.app.model.abstract.warning import Warning_ -from openbb_core.app.model.charts.chart import Chart, ChartFormat +from openbb_core.app.model.charts.chart import Chart from openbb_core.app.provider_interface import get_provider_interface from openbb_core.app.utils import basemodel_to_df @@ -105,41 +105,31 @@ class CommandOutput(GenericModel, Generic[T], Tagged): return results - def to_plotly_json( - self, create_chart: bool = True, **kwargs - ) -> Optional[Dict[str, Any]]: + def to_chart(self, **kwargs): """ - Returns the plotly json representation of the chart. - If the chart was already computed it return the plotly json representation of the chart. - Otherwise it computes the chart based on the available data and provided kwargs. + Create or update the `Chart`. + Note that the `chart` attribute is composed by: `content`, `format` and `fig`. Parameters ---------- - create_chart : bool, optional - If True, it creates the chart object and populates the respective field on the object, by default True. **kwargs Keyword arguments to be passed to the charting extension. - This implies that the user has to know the charting extension API; this is the case - because the charting extension may vary on user settings. + This implies that the user has some knowledge on the charting extension API. + This is the case because the charting extension may vary on user preferences. + + Returns + ------- + chart.fig + The chart figure. """ + cm = ChartingManager() + kwargs["data"] = self.to_dataframe() - if self.chart and not kwargs: - plotly_json = self.chart.content - else: - cm = ChartingManager() - kwargs["data"] = self.to_dataframe() - plotly_json = cm.to_plotly_json(**kwargs) - - if create_chart: - try: - self.chart = Chart(content=plotly_json, format=ChartFormat.plotly) - except Exception as e: - self.chart = Chart(error=Error(message=str(e))) - - return plotly_json + self.chart = cm.to_chart(**kwargs) + return self.chart.fig def show(self): """Displays chart.""" - if not self.chart: + if not self.chart and not self.chart.fig: raise OpenBBError("Chart not found.") - self.chart.show() + self.chart.fig.show() diff --git a/openbb_sdk/sdk/core/openbb_core/app/model/preferences.py b/openbb_sdk/sdk/core/openbb_core/app/model/preferences.py index e26af23900d..d897ed8ae71 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/model/preferences.py +++ b/openbb_sdk/sdk/core/openbb_core/app/model/preferences.py @@ -16,6 +16,7 @@ class Preferences(BaseModel): plot_open_export: bool = ( False # Whether to open plot image exports after they are created ) + table_style: Literal["dark", "light"] = "dark" request_timeout: PositiveInt = 15 class Config: diff --git a/openbb_sdk/sdk/provider/README.md b/openbb_sdk/sdk/provider/README.md index 65911012d53..31271f98346 100644 --- a/openbb_sdk/sdk/provider/README.md +++ b/openbb_sdk/sdk/provider/README.md @@ -34,7 +34,7 @@ Close for closing price column name in data from one provider might be coded as - **Provider** : Entry point class for each provider extension. Contains information about the provider, it's required credentials and available fetchers. - **RegistryLoader** : Loads the registry with the provider extensions installed. - **Registry** : Maintains a registry of provider extensions installed. -- **RegistryMap** : Stores the complete characterization of each provider. It centralizes information like required credentials, standardised and extra query parameteres/data by provider. +- **RegistryMap** : Stores the complete characterization of each provider. It centralizes information like required credentials, standardised and extra query parameters/data by provider. - **QueryExecutor** : Executes a given query, routing it to the respective provider and fetcher. ## Installation From 1523f3f1c740391c7b2688adea153a6aa9561f27 Mon Sep 17 00:00:00 2001 From: Sai-132 <126168589+Sai-132@users.noreply.github.com> Date: Tue, 8 Aug 2023 23:12:23 +0530 Subject: [PATCH 3/7] Feature/news sentiment (#5274) * News sentiment feature added * News sentiment feature added * Integration test script file added * Updated code as per PR Instructions * API key setting and testing code updated * Unused imports and line-too-long code updated * Resolved conflicts in config_terminal file * removed empty line in terminal_controller file * Resolved conflicts and updated code for Setting API keys * Suggested changes have been updated * Changes updated * conflicts resolved with data_sources_default.json file * Code Updated For without API key * Code Updated * New changes Updated * Resolved conflicts and code updated * Small edits * missed a spelling error * fix test * Lint * pylint rewrite * Changed Domain name * Trail map file Modified --------- Co-authored-by: Sai1998 Co-authored-by: Danglewood <85772166+deeleeramone@users.noreply.github.com> Co-authored-by: James Maslek --- .../stocks/behavioural_analysis/news_sentiment_model.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openbb_terminal/stocks/behavioural_analysis/news_sentiment_model.py b/openbb_terminal/stocks/behavioural_analysis/news_sentiment_model.py index 4afdabf9aa9..a1346f6a459 100644 --- a/openbb_terminal/stocks/behavioural_analysis/news_sentiment_model.py +++ b/openbb_terminal/stocks/behavioural_analysis/news_sentiment_model.py @@ -40,7 +40,7 @@ def get_data( query_params = { "all_feilds": "False", - "ordering": "-published_on,-share_of_article,-pagerank", + "ordering": "-published_on,-entity_score,-share_of_article,-pagerank", } if ticker: query_params["ticker"] = ticker @@ -70,7 +70,7 @@ def get_data( query_params["offset"] = offset # type:ignore response = requests.get( - "https://althub-backend.invisagealpha.com/api/OnclusiveSentiment/", + "https://data-access.althub.com/api/OnclusiveSentiment/", headers=headers, params=query_params, timeout=5, From 86f951f1b188d5310a303d13294e319b5061bd30 Mon Sep 17 00:00:00 2001 From: Henrique Joaquim Date: Wed, 9 Aug 2023 10:51:08 +0100 Subject: [PATCH 4/7] Argparse custom params (#5303) * Argparse custom params POC * small improvements to the package builder * generation of static assets * minor adjustments --------- Co-authored-by: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> --- .../fmp/openbb_fmp/models/crypto_eod.py | 3 +- .../openbb_core/app/model/custom_parameter.py | 7 + .../app/static/package/__extensions__.py | 34 +- .../openbb_core/app/static/package/crypto.py | 71 +- .../openbb_core/app/static/package/economy.py | 224 ++- .../app/static/package/fixedincome.py | 17 +- .../openbb_core/app/static/package/forex.py | 115 +- .../app/static/package/module_map.json | 74 +- .../openbb_core/app/static/package/news.py | 6 +- .../openbb_core/app/static/package/stocks.py | 138 +- .../app/static/package/stocks_ca.py | 5 +- .../app/static/package/stocks_dd.py | 222 ++- .../app/static/package/stocks_fa.py | 513 +++-- .../core/openbb_core/app/static/package/ta.py | 1721 ++++++++++------- .../openbb_core/app/static/package_builder.py | 100 +- .../standard_models/balance_sheet.py | 4 +- .../institutional_ownership.py | 9 +- 17 files changed, 1924 insertions(+), 1339 deletions(-) create mode 100644 openbb_sdk/sdk/core/openbb_core/app/model/custom_parameter.py diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/crypto_eod.py b/openbb_sdk/providers/fmp/openbb_fmp/models/crypto_eod.py index 17429fd08b1..42dbbf46fdd 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/crypto_eod.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/crypto_eod.py @@ -18,7 +18,8 @@ from openbb_fmp.utils.helpers import get_data_many class FMPCryptoEODQueryParams(CryptoEODQueryParams): """FMP Crypto end of day Query. - Source: https://site.financialmodelingprep.com/developer/docs/cryptocurrency-historical-data-api/#Historical-Daily-Prices + Source: + https://site.financialmodelingprep.com/developer/docs/cryptocurrency-historical-data-api/#Historical-Daily-Prices """ timeseries: Optional[NonNegativeInt] = Field( diff --git a/openbb_sdk/sdk/core/openbb_core/app/model/custom_parameter.py b/openbb_sdk/sdk/core/openbb_core/app/model/custom_parameter.py new file mode 100644 index 00000000000..48beef06f9d --- /dev/null +++ b/openbb_sdk/sdk/core/openbb_core/app/model/custom_parameter.py @@ -0,0 +1,7 @@ +from pydantic import BaseModel + + +class OpenBBCustomParameter(BaseModel): + """Custom parameter for OpenBB.""" + + description: str diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py index fc3fea757a4..b2942d73300 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py @@ -6,18 +6,10 @@ from openbb_core.app.static.container import Container class Extensions(Container): @property - def crypto(self): # route = "/crypto" - from openbb_core.app.static.package import crypto + def news(self): # route = "/news" + from openbb_core.app.static.package import news - 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 - ) + return news.CLASS_news(command_runner_session=self._command_runner_session) @property def fixedincome(self): # route = "/fixedincome" @@ -34,16 +26,18 @@ class Extensions(Container): 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 + def economy(self): # route = "/economy" + from openbb_core.app.static.package import economy - return news.CLASS_news(command_runner_session=self._command_runner_session) + return economy.CLASS_economy( + command_runner_session=self._command_runner_session + ) @property - def qa(self): # route = "/qa" - from openbb_core.app.static.package import qa + def crypto(self): # route = "/crypto" + from openbb_core.app.static.package import crypto - return qa.CLASS_qa(command_runner_session=self._command_runner_session) + return crypto.CLASS_crypto(command_runner_session=self._command_runner_session) @property def stocks(self): # route = "/stocks" @@ -51,6 +45,12 @@ class Extensions(Container): return stocks.CLASS_stocks(command_runner_session=self._command_runner_session) + @property + def qa(self): # route = "/qa" + from openbb_core.app.static.package import qa + + return qa.CLASS_qa(command_runner_session=self._command_runner_session) + @property def ta(self): # route = "/ta" from openbb_core.app.static.package import ta 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 index ab981aa98fc..79fec6c462b 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/crypto.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/crypto.py @@ -2,11 +2,12 @@ import datetime import typing -from typing import Literal, Optional, Union +from typing import Annotated, Literal, Optional, Union from pydantic import validate_arguments from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -16,11 +17,23 @@ class CLASS_crypto(Container): @validate_arguments def load( self, - symbol: str, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Crypto Intraday Price. @@ -31,7 +44,7 @@ class CLASS_crypto(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -72,6 +85,28 @@ class CLASS_crypto(Container): vwap : PositiveFloat Volume Weighted Average Price of the symbol. + polygon + ======= + + Parameters + ---------- + timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] + The timespan of the data. + sort : Literal['asc', 'desc'] + Sort order of the data. + limit : PositiveInt + The number of data entries to return. + adjusted : bool + Whether the data is adjusted. + multiplier : PositiveInt + The multiplier of the timespan. + + + CryptoEOD + --------- + n : PositiveInt + The number of transactions for the symbol in the time period. + fmp === @@ -94,29 +129,7 @@ class CLASS_crypto(Container): label : str Human readable format of the date. changeOverTime : float - Change \\% in the price of the symbol over a period of time. - - polygon - ======= - - Parameters - ---------- - timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] - The timespan of the data. - sort : Literal['asc', 'desc'] - Sort order of the data. - limit : PositiveInt - The number of data entries to return. - adjusted : bool - Whether the data is adjusted. - multiplier : PositiveInt - The multiplier of the timespan. - - - CryptoEOD - --------- - n : PositiveInt - The number of transactions for the symbol in the time period.""" + Change \\% in the price of the symbol over a period of time.""" inputs = filter_inputs( provider_choices={ "provider": provider, 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 index b7a7b96cbc8..936f448ead8 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/economy.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/economy.py @@ -2,13 +2,14 @@ import datetime import typing -from typing import List, Literal, Optional, Union +from typing import Annotated, 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -40,7 +41,12 @@ class CLASS_economy(Container): @validate_arguments def const( self, - index: Literal["nasdaq", "sp500", "dowjones"] = "dowjones", + index: Annotated[ + Literal["nasdaq", "sp500", "dowjones"], + OpenBBCustomParameter( + description="The index for which we want to fetch the constituents." + ), + ] = "dowjones", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -125,64 +131,88 @@ class CLASS_economy(Container): @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", - ] + countries: Annotated[ + 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", + ] + ], + OpenBBCustomParameter(description="The country or countries to get data."), ], - 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, + units: Annotated[ + Literal["growth_previous", "growth_same", "index_2015"], + OpenBBCustomParameter(description="The data units."), + ] = "growth_same", + frequency: Annotated[ + Literal["monthly", "quarterly", "annual"], + OpenBBCustomParameter(description="The data time frequency."), + ] = "monthly", + harmonized: typing.Annotated[ + bool, + OpenBBCustomParameter( + description="Whether you wish to obtain harmonized data." + ), + ] = False, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, provider: Optional[Literal["fred"]] = None, **kwargs @@ -296,11 +326,23 @@ class CLASS_economy(Container): @validate_arguments def index( self, - symbol: str, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Get OHLCV data for an index. @@ -311,7 +353,7 @@ class CLASS_economy(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -348,6 +390,32 @@ class CLASS_economy(Container): volume : PositiveFloat The volume of the symbol. + polygon + ======= + + Parameters + ---------- + timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] + The timespan of the data. + sort : Literal['asc', 'desc'] + Sort order of the data. + limit : PositiveInt + The number of data entries to return. + adjusted : bool + Whether the data is adjusted. + multiplier : PositiveInt + The multiplier of the timespan. + + + MajorIndicesEOD + --------------- + t : datetime + The timestamp of the data. + n : PositiveInt + The number of transactions for the symbol in the time period. + vw : PositiveFloat + The volume weighted average price of the symbol. + fmp === @@ -374,33 +442,7 @@ class CLASS_economy(Container): label : str Human readable format of the date. changeOverTime : float - Change \\% in the price of the symbol over a period of time. - - polygon - ======= - - Parameters - ---------- - timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] - The timespan of the data. - sort : Literal['asc', 'desc'] - Sort order of the data. - limit : PositiveInt - The number of data entries to return. - adjusted : bool - Whether the data is adjusted. - multiplier : PositiveInt - The multiplier of the timespan. - - - MajorIndicesEOD - --------------- - t : datetime - The timestamp of the data. - n : PositiveInt - The number of transactions for the symbol in the time period. - vw : PositiveFloat - The volume weighted average price of the symbol.""" + Change \\% in the price of the symbol over a period of time.""" inputs = filter_inputs( provider_choices={ "provider": provider, 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 index 5faacc61adf..3763cb95872 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/fixedincome.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/fixedincome.py @@ -2,13 +2,14 @@ import datetime import typing -from typing import Literal, Optional, Union +from typing import Annotated, 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -18,8 +19,18 @@ class CLASS_fixedincome(Container): @validate_arguments def treasury( self, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs 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 index b40dd208edc..94532bb1d20 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/forex.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/forex.py @@ -2,11 +2,12 @@ import datetime import typing -from typing import Literal, Optional, Union +from typing import Annotated, Literal, Optional, Union from pydantic import validate_arguments from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -17,7 +18,7 @@ class CLASS_forex(Container): def pairs( self, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Forex Available Pairs. @@ -28,7 +29,7 @@ class CLASS_forex(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. All fields are standardized. @@ -52,25 +53,6 @@ class CLASS_forex(Container): name : str The name of the currency pair. - fmp - === - - Parameters - ---------- - All fields are standardized. - - - ForexPairs - ---------- - symbol : str - The symbol of the currency pair. - currency : str - The base currency of the currency pair. - stockExchange : 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. - polygon ======= @@ -109,7 +91,26 @@ class CLASS_forex(Container): last_updated_utc : datetime The last updated timestamp in UTC. delisted_utc : Optional[datetime] - The delisted timestamp in UTC.""" + The delisted timestamp in UTC. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + ForexPairs + ---------- + symbol : str + The symbol of the currency pair. + currency : str + The base currency of the currency pair. + stockExchange : 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.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -130,11 +131,23 @@ class CLASS_forex(Container): @validate_arguments def load( self, - symbol: str, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Forex Intraday Price. @@ -145,7 +158,7 @@ class CLASS_forex(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -186,6 +199,28 @@ class CLASS_forex(Container): vwap : Optional[PositiveFloat] Volume Weighted Average Price of the symbol. + polygon + ======= + + Parameters + ---------- + timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] + The timespan of the data. + sort : Literal['asc', 'desc'] + Sort order of the data. + limit : PositiveInt + The number of data entries to return. + adjusted : bool + Whether the data is adjusted. + multiplier : PositiveInt + The multiplier of the timespan. + + + ForexEOD + -------- + n : PositiveInt + The number of transactions for the symbol in the time period. + fmp === @@ -207,29 +242,7 @@ class CLASS_forex(Container): label : str Human readable format of the date. changeOverTime : float - Change \\% in the price of the symbol over a period of time. - - polygon - ======= - - Parameters - ---------- - timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] - The timespan of the data. - sort : Literal['asc', 'desc'] - Sort order of the data. - limit : PositiveInt - The number of data entries to return. - adjusted : bool - Whether the data is adjusted. - multiplier : PositiveInt - The multiplier of the timespan. - - - ForexEOD - -------- - n : PositiveInt - The number of transactions for the symbol in the time period.""" + Change \\% in the price of the symbol over a period of time.""" inputs = filter_inputs( provider_choices={ "provider": provider, 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 index 83224aab956..f0b46d3741c 100644 --- 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 @@ -1,7 +1,14 @@ { - "crypto_load": "/crypto/load", + "news_globalnews": "/news/globalnews", "__extensions__": "", - "crypto": "/crypto", + "news": "/news", + "news_sectornews": "/news/sectornews", + "fixedincome_treasury": "/fixedincome/treasury", + "fixedincome": "/fixedincome", + "fixedincome_ycrv": "/fixedincome/ycrv", + "forex_pairs": "/forex/pairs", + "forex": "/forex", + "forex_load": "/forex/load", "economy_corecpi": "/economy/corecpi", "economy": "/economy", "economy_const": "/economy/const", @@ -37,41 +44,8 @@ "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", - "qa_normality": "/qa/normality", - "qa": "/qa", - "qa_capm": "/qa/capm", - "qa_qqplot": "/qa/qqplot", - "qa_om": "/qa/om", - "qa_kurtosis": "/qa/kurtosis", - "qa_pick": "/qa/pick", - "qa_spread": "/qa/spread", - "qa_rolling": "/qa/rolling", - "qa_var": "/qa/var", - "qa_line": "/qa/line", - "qa_hist": "/qa/hist", - "qa_unitroot": "/qa/unitroot", - "qa_beta": "/qa/beta", - "qa_sh": "/qa/sh", - "qa_so": "/qa/so", - "qa_cusum": "/qa/cusum", - "qa_raw": "/qa/raw", - "qa_cdf": "/qa/cdf", - "qa_decompose": "/qa/decompose", - "qa_skew": "/qa/skew", - "qa_quantile": "/qa/quantile", - "qa_bw": "/qa/bw", - "qa_es": "/qa/es", - "qa_acf": "/qa/acf", - "qa_summary": "/qa/summary", + "crypto_load": "/crypto/load", + "crypto": "/crypto", "stocks_fa_analysis": "/stocks/fa/analysis", "stocks": "/stocks", "stocks_fa": "/stocks/fa", @@ -219,6 +193,32 @@ "stocks_tob": "/stocks/tob", "stocks_quote": "/stocks/quote", "stocks_search": "/stocks/search", + "qa_normality": "/qa/normality", + "qa": "/qa", + "qa_capm": "/qa/capm", + "qa_qqplot": "/qa/qqplot", + "qa_om": "/qa/om", + "qa_kurtosis": "/qa/kurtosis", + "qa_pick": "/qa/pick", + "qa_spread": "/qa/spread", + "qa_rolling": "/qa/rolling", + "qa_var": "/qa/var", + "qa_line": "/qa/line", + "qa_hist": "/qa/hist", + "qa_unitroot": "/qa/unitroot", + "qa_beta": "/qa/beta", + "qa_sh": "/qa/sh", + "qa_so": "/qa/so", + "qa_cusum": "/qa/cusum", + "qa_raw": "/qa/raw", + "qa_cdf": "/qa/cdf", + "qa_decompose": "/qa/decompose", + "qa_skew": "/qa/skew", + "qa_quantile": "/qa/quantile", + "qa_bw": "/qa/bw", + "qa_es": "/qa/es", + "qa_acf": "/qa/acf", + "qa_summary": "/qa/summary", "ta_atr": "/ta/atr", "ta": "/ta", "ta_fib": "/ta/fib", 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 index f247525bb78..703fd2fd0ac 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/news.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/news.py @@ -9,6 +9,7 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -18,7 +19,10 @@ class CLASS_news(Container): @validate_arguments def globalnews( self, - page: pydantic.types.NonNegativeInt = 0, + page: typing.Annotated[ + pydantic.types.NonNegativeInt, + OpenBBCustomParameter(description="The page of the global news."), + ] = 0, chart: bool = False, provider: Optional[Literal["benzinga", "fmp"]] = None, **kwargs 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 index ab978460a0c..b4c1e005c58 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks.py @@ -2,7 +2,7 @@ import datetime import typing -from typing import Literal, Optional, Union +from typing import Annotated, Literal, Optional, Union import pydantic from pydantic import validate_arguments @@ -10,6 +10,7 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -83,11 +84,23 @@ class CLASS_stocks(Container): @validate_arguments def load( self, - symbol: str, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Load stock data for a specific ticker. @@ -98,7 +111,7 @@ class CLASS_stocks(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -139,6 +152,28 @@ class CLASS_stocks(Container): vwap : PositiveFloat Volume Weighted Average Price of the symbol. + polygon + ======= + + Parameters + ---------- + timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] + The timespan of the data. + sort : Literal['asc', 'desc'] + Sort order of the data. + limit : PositiveInt + The number of data entries to return. + adjusted : bool + Whether the data is adjusted. + multiplier : PositiveInt + The multiplier of the timespan. + + + StockEOD + -------- + n : PositiveInt + The number of transactions for the symbol in the time period. + fmp === @@ -161,29 +196,7 @@ class CLASS_stocks(Container): label : str Human readable format of the date. changeOverTime : float - Change \\% in the price of the symbol over a period of time. - - polygon - ======= - - Parameters - ---------- - timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] - The timespan of the data. - sort : Literal['asc', 'desc'] - Sort order of the data. - limit : PositiveInt - The number of data entries to return. - adjusted : bool - Whether the data is adjusted. - multiplier : PositiveInt - The multiplier of the timespan. - - - StockEOD - -------- - n : PositiveInt - The number of transactions for the symbol in the time period.""" + Change \\% in the price of the symbol over a period of time.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -208,11 +221,23 @@ class CLASS_stocks(Container): @validate_arguments def news( self, - symbols: str, - page: int = 0, - limit: Optional[pydantic.types.NonNegativeInt] = 15, + symbols: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + page: typing.Annotated[ + int, + OpenBBCustomParameter( + description="The page of the stock news to be retrieved." + ), + ] = 0, + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], + OpenBBCustomParameter( + description="The number of results to return per page." + ), + ] = 15, chart: bool = False, - provider: Optional[Literal["benzinga", "fmp", "polygon"]] = None, + provider: Optional[Literal["benzinga", "polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Get news for one or more stock tickers. @@ -223,7 +248,7 @@ class CLASS_stocks(Container): Parameters ---------- - provider: Literal[benzinga, fmp, polygon] + provider: Literal[benzinga, polygon, fmp] The provider to use for the query. symbols : ConstrainedStrValue Symbol to get data for. @@ -296,23 +321,6 @@ class CLASS_stocks(Container): image : List[BenzingaImage] The images associated with the news. - fmp - === - - Parameters - ---------- - All fields are standardized. - - - StockNews - --------- - symbol : str - Ticker of the fetched news. - image : Optional[str] - URL to the image of the news source. - site : str - Name of the news source. - polygon ======= @@ -357,7 +365,24 @@ class CLASS_stocks(Container): publisher : PolygonPublisher Publisher of the article. tickers : List[str] - Tickers covered in the article.""" + Tickers covered in the article. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + StockNews + --------- + symbol : str + Ticker of the fetched news. + image : Optional[str] + URL to the image of the news source. + site : str + Name of the news source.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -382,8 +407,13 @@ class CLASS_stocks(Container): @validate_arguments def multiples( self, - symbol: str, - limit: Optional[int] = 100, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + limit: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 100, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs 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 index 8cd9d795b71..1dbdff8769e 100644 --- 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 @@ -8,6 +8,7 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -17,7 +18,9 @@ class CLASS_stocks_ca(Container): @validate_arguments def peers( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs 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 index 71ff5dea390..792bc303908 100644 --- 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 @@ -1,11 +1,12 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### import typing -from typing import Literal, Optional +from typing import Annotated, Literal, Optional from pydantic import validate_arguments from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -15,111 +16,122 @@ class CLASS_stocks_dd(Container): @validate_arguments def sec( self, - symbol: str, - type: Literal[ - "1", - "1-A", - "1-E", - "1-K", - "1-N", - "1-SA", - "1-U", - "1-Z", - "10", - "10-D", - "10-K", - "10-M", - "10-Q", - "11-K", - "12b-25", - "13F", - "13H", - "144", - "15", - "15F", - "17-H", - "18", - "18-K", - "19b-4", - "19b-4(e)", - "19b-7", - "2-E", - "20-F", - "24F-2", - "25", - "3", - "4", - "40-F", - "5", - "6-K", - "7-M", - "8-A", - "8-K", - "8-M", - "9-M", - "ABS-15G", - "ABS-EE", - "ABS DD-15E", - "ADV", - "ADV-E", - "ADV-H", - "ADV-NR", - "ADV-W", - "ATS", - "ATS-N", - "ATS-R", - "BD", - "BD-N", - "BDW", - "C", - "CA-1", - "CB", - "CFPORTAL", - "CRS", - "CUSTODY", - "D", - "F-1", - "F-10", - "F-3", - "F-4", - "F-6", - "F-7", - "F-8", - "F-80", - "F-N", - "F-X", - "ID", - "MA", - "MA-I", - "MA-NR", - "MA-W", - "MSD", - "MSDW", - "N-14", - "N-17D-1", - "N-17f-1", - "N-17f-2", - "N-18f-1", - "N-1A", - "N-2", - "N-23c-3", - "N-27D-1", - "N-3", - "N-4", - "N-5", - "N-54A", - "N-54C", - "N-6", - "N-6EI-1", - "N-6F", - "N-8A", - "N-8B-2", - "N-8B-4", - "N-8F", - "N-CEN", + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + type: Annotated[ + Literal[ + "1", + "1-A", + "1-E", + "1-K", + "1-N", + "1-SA", + "1-U", + "1-Z", + "10", + "10-D", + "10-K", + "10-M", + "10-Q", + "11-K", + "12b-25", + "13F", + "13H", + "144", + "15", + "15F", + "17-H", + "18", + "18-K", + "19b-4", + "19b-4(e)", + "19b-7", + "2-E", + "20-F", + "24F-2", + "25", + "3", + "4", + "40-F", + "5", + "6-K", + "7-M", + "8-A", + "8-K", + "8-M", + "9-M", + "ABS-15G", + "ABS-EE", + "ABS DD-15E", + "ADV", + "ADV-E", + "ADV-H", + "ADV-NR", + "ADV-W", + "ATS", + "ATS-N", + "ATS-R", + "BD", + "BD-N", + "BDW", + "C", + "CA-1", + "CB", + "CFPORTAL", + "CRS", + "CUSTODY", + "D", + "F-1", + "F-10", + "F-3", + "F-4", + "F-6", + "F-7", + "F-8", + "F-80", + "F-N", + "F-X", + "ID", + "MA", + "MA-I", + "MA-NR", + "MA-W", + "MSD", + "MSDW", + "N-14", + "N-17D-1", + "N-17f-1", + "N-17f-2", + "N-18f-1", + "N-1A", + "N-2", + "N-23c-3", + "N-27D-1", + "N-3", + "N-4", + "N-5", + "N-54A", + "N-54C", + "N-6", + "N-6EI-1", + "N-6F", + "N-8A", + "N-8B-2", + "N-8B-4", + "N-8F", + "N-CEN", + ], + OpenBBCustomParameter(description="The type of the SEC filing form."), ] = "10-K", - page: Optional[int] = 0, - limit: Optional[int] = 100, + page: Annotated[ + Optional[int], + OpenBBCustomParameter(description="Page number of the results."), + ] = 0, + limit: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 100, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs 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 index c005d43ffd0..9cf10adfd43 100644 --- 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 @@ -2,7 +2,7 @@ import datetime import typing -from typing import List, Literal, Optional, Union +from typing import Annotated, List, Literal, Optional, Union import pydantic from pydantic import validate_arguments @@ -10,6 +10,7 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -36,11 +37,21 @@ class CLASS_stocks_fa(Container): @validate_arguments def balance( self, - symbol: str, - period: Literal["annually", "quarterly"] = "annually", - limit: Optional[pydantic.types.NonNegativeInt] = 12, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["annually", "quarterly"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 12, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Balance Sheet. @@ -51,7 +62,7 @@ class CLASS_stocks_fa(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -164,42 +175,6 @@ class CLASS_stocks_fa(Container): total_liabilities_and_total_equity : Optional[int] None - fmp - === - - Parameters - ---------- - cik : Optional[str] - None - - - BalanceSheet - ------------ - calendarYear : Optional[int] - None - link : Optional[str] - None - finalLink : Optional[str] - None - cashAndShortTermInvestments : Optional[int] - None - goodwillAndIntangibleAssets : Optional[int] - None - deferredRevenueNonCurrent : Optional[int] - None - totalInvestments : Optional[int] - None - capitalLeaseObligations : Optional[int] - None - deferredTaxLiabilitiesNonCurrent : Optional[int] - None - totalNonCurrentLiabilities : Optional[int] - None - totalDebt : Optional[int] - None - netDebt : Optional[int] - None - polygon ======= @@ -241,7 +216,43 @@ class CLASS_stocks_fa(Container): BalanceSheet ------------ - All fields are standardized.""" + All fields are standardized. + + fmp + === + + Parameters + ---------- + cik : Optional[str] + None + + + BalanceSheet + ------------ + calendarYear : Optional[int] + None + link : Optional[str] + None + finalLink : Optional[str] + None + cashAndShortTermInvestments : Optional[int] + None + goodwillAndIntangibleAssets : Optional[int] + None + deferredRevenueNonCurrent : Optional[int] + None + totalInvestments : Optional[int] + None + capitalLeaseObligations : Optional[int] + None + deferredTaxLiabilitiesNonCurrent : Optional[int] + None + totalNonCurrentLiabilities : Optional[int] + None + totalDebt : Optional[int] + None + netDebt : Optional[int] + None""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -266,8 +277,13 @@ class CLASS_stocks_fa(Container): @validate_arguments def balance_growth( self, - symbol: str, - limit: int = 10, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + limit: typing.Annotated[ + int, + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 10, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -423,8 +439,18 @@ class CLASS_stocks_fa(Container): @validate_arguments def cal( self, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -512,11 +538,21 @@ class CLASS_stocks_fa(Container): @validate_arguments def cash( self, - symbol: str, - period: Literal["annually", "quarterly"] = "annually", - limit: Optional[pydantic.types.NonNegativeInt] = 12, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["annually", "quarterly"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 12, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Cash Flow Statement. @@ -527,7 +563,7 @@ class CLASS_stocks_fa(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -620,24 +656,6 @@ class CLASS_stocks_fa(Container): cash_at_end_of_period : Optional[int] None - fmp - === - - Parameters - ---------- - cik : Optional[str] - Central Index Key (CIK) of the company. - - - CashFlowStatement - ----------------- - calendarYear : Optional[int] - None - link : Optional[str] - None - finalLink : Optional[str] - None - polygon ======= @@ -679,7 +697,25 @@ class CLASS_stocks_fa(Container): CashFlowStatement ----------------- - All fields are standardized.""" + All fields are standardized. + + fmp + === + + Parameters + ---------- + cik : Optional[str] + Central Index Key (CIK) of the company. + + + CashFlowStatement + ----------------- + calendarYear : Optional[int] + None + link : Optional[str] + None + finalLink : Optional[str] + None""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -704,8 +740,13 @@ class CLASS_stocks_fa(Container): @validate_arguments def cash_growth( self, - symbol: str, - limit: int = 10, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + limit: typing.Annotated[ + int, + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 10, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -843,7 +884,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def comp( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -938,8 +981,18 @@ class CLASS_stocks_fa(Container): @validate_arguments def comsplit( self, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1055,7 +1108,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def divs( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1155,8 +1210,13 @@ class CLASS_stocks_fa(Container): @validate_arguments def earning( self, - symbol: str, - limit: Optional[int] = 50, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + limit: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 50, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1246,7 +1306,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def emp( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1367,9 +1429,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def est( self, - symbol: str, - period: Literal["quarterly", "annually"] = "annually", - limit: int = 30, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["quarterly", "annually"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + limit: typing.Annotated[ + int, + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 30, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1572,11 +1644,21 @@ class CLASS_stocks_fa(Container): @validate_arguments def income( self, - symbol: str, - period: Literal["annually", "quarterly"] = "annually", - limit: Optional[pydantic.types.NonNegativeInt] = 12, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["annually", "quarterly"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 12, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Income Statement. @@ -1587,7 +1669,7 @@ class CLASS_stocks_fa(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -1672,34 +1754,6 @@ class CLASS_stocks_fa(Container): weighted_average_shares_outstanding_dil : Optional[int] Weighted average shares outstanding diluted. - fmp - === - - Parameters - ---------- - cik : Optional[str] - The CIK of the company if no symbol is provided. - - - IncomeStatement - --------------- - calendarYear : Optional[int] - None - grossProfitRatio : Optional[float] - None - ebitdaratio : Optional[float] - None - operatingIncomeRatio : Optional[float] - None - incomeBeforeTaxRatio : Optional[float] - None - netIncomeRatio : Optional[float] - None - link : Optional[str] - None - finalLink : Optional[str] - None - polygon ======= @@ -1754,6 +1808,34 @@ class CLASS_stocks_fa(Container): participating_securities_distributed_and_undistributed_earnings_loss_basic : Optional[float] None preferred_stock_dividends_and_other_adjustments : Optional[float] + None + + fmp + === + + Parameters + ---------- + cik : Optional[str] + The CIK of the company if no symbol is provided. + + + IncomeStatement + --------------- + calendarYear : Optional[int] + None + grossProfitRatio : Optional[float] + None + ebitdaratio : Optional[float] + None + operatingIncomeRatio : Optional[float] + None + incomeBeforeTaxRatio : Optional[float] + None + netIncomeRatio : Optional[float] + None + link : Optional[str] + None + finalLink : Optional[str] None""" inputs = filter_inputs( provider_choices={ @@ -1779,9 +1861,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def income_growth( self, - symbol: str, - limit: int = 10, - period: Literal["annually", "quarterly"] = "annually", + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + limit: typing.Annotated[ + int, + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 10, + period: Annotated[ + Literal["annually", "quarterly"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1914,34 +2006,48 @@ class CLASS_stocks_fa(Container): @validate_arguments def ins( self, - symbol: str, - transactionType: Optional[ - List[ - Literal[ - "A-Award", - "C-Conversion", - "D-Return", - "E-ExpireShort", - "F-InKind", - "G-Gift", - "H-ExpireLong", - "I-Discretionary", - "J-Other", - "L-Small", - "M-Exempt", - "O-OutOfTheMoney", - "P-Purchase", - "S-Sale", - "U-Tender", - "W-Will", - "X-InTheMoney", - "Z-Trust", + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + transactionType: Annotated[ + Optional[ + List[ + Literal[ + "A-Award", + "C-Conversion", + "D-Return", + "E-ExpireShort", + "F-InKind", + "G-Gift", + "H-ExpireLong", + "I-Discretionary", + "J-Other", + "L-Small", + "M-Exempt", + "O-OutOfTheMoney", + "P-Purchase", + "S-Sale", + "U-Tender", + "W-Will", + "X-InTheMoney", + "Z-Trust", + ] ] - ] + ], + OpenBBCustomParameter(description="The type of the transaction."), ] = ["P-Purchase"], - reportingCik: Optional[int] = None, - companyCik: Optional[int] = None, - page: Optional[int] = 0, + reportingCik: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The CIK of the reporting owner."), + ] = None, + companyCik: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The CIK of the company owner."), + ] = None, + page: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The page number of the data to fetch."), + ] = 0, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2052,9 +2158,16 @@ class CLASS_stocks_fa(Container): @validate_arguments def ins_own( self, - symbol: str, - include_current_quarter: bool = False, - date: Optional[datetime.date] = None, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + include_current_quarter: typing.Annotated[ + bool, OpenBBCustomParameter(description="Include current quarter data.") + ] = False, + date: Annotated[ + Optional[datetime.date], + OpenBBCustomParameter(description="A specific date to get data for."), + ] = None, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2217,9 +2330,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def metrics( self, - symbol: str, - period: Literal["annually", "quarterly"] = "annually", - limit: Optional[int] = 100, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["annually", "quarterly"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + limit: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 100, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2414,7 +2537,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def mgmt( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2530,7 +2655,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def overview( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2671,9 +2798,17 @@ class CLASS_stocks_fa(Container): @validate_arguments def own( self, - symbol: str, - date: datetime.date, - page: Optional[int] = 0, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + date: typing.Annotated[ + datetime.date, + OpenBBCustomParameter(description="A specific date to get data for."), + ], + page: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The page number of the data to fetch."), + ] = 0, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2826,7 +2961,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def pt( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2905,7 +3042,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def pta( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3047,9 +3186,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def revgeo( self, - symbol: str, - period: Literal["quarterly", "annually"] = "annually", - structure: Literal["hierarchical", "flat"] = "flat", + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["quarterly", "annually"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + structure: Annotated[ + Literal["hierarchical", "flat"], + OpenBBCustomParameter(description="The structure of the returned data."), + ] = "flat", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3136,9 +3285,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def revseg( self, - symbol: str, - period: Literal["quarterly", "annually"] = "annually", - structure: Literal["hierarchical", "flat"] = "flat", + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["quarterly", "annually"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + structure: Annotated[ + Literal["hierarchical", "flat"], + OpenBBCustomParameter(description="The structure of the returned data."), + ] = "flat", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3283,7 +3442,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def shrs( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3364,7 +3525,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def split( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3458,9 +3621,21 @@ class CLASS_stocks_fa(Container): @validate_arguments def transcript( self, - symbol: str, - year: int, - quarter: Literal[1, 2, 3, 4] = 1, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + year: typing.Annotated[ + int, + OpenBBCustomParameter( + description="The year of the earnings call transcript." + ), + ], + quarter: Annotated[ + Literal[1, 2, 3, 4], + OpenBBCustomParameter( + description="The quarter of the earnings call transcript." + ), + ] = 1, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/ta.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/ta.py index 0536c0944b3..1e82589462e 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/ta.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/ta.py @@ -1,56 +1,63 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### -from openbb_core.app.static.container import Container -from openbb_core.app.model.command_output import CommandOutput +import typing +from typing import List, Literal, Optional, Union + import openbb_provider import pandas -import datetime import pydantic +import pydantic.types from pydantic import validate_arguments -from inspect import Parameter -from typing import List, Dict, Union, Optional, Literal -from openbb_core.app.utils import df_to_basemodel -from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output import openbb_core.app.model.results.empty -import pydantic.types -import typing +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_ta(Container): - @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def atr(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', length: pydantic.types.PositiveInt = 14, mamode: Literal['rma', 'ema', 'sma', 'wma'] = 'rma', drift: pydantic.types.NonNegativeInt = 1, offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def atr( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + length: pydantic.types.PositiveInt = 14, + mamode: Literal["rma", "ema", "sma", "wma"] = "rma", + drift: pydantic.types.NonNegativeInt = 1, + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - Average True Range is used to measure volatility, especially volatility caused by - gaps or limit moves. + Average True Range is used to measure volatility, especially volatility caused by + gaps or limit moves. - Parameters - ---------- - data : List[Data] - List of data to apply the indicator to. - index : str, optional - Index column name, by default "date" - length : PositiveInt, optional - It's period, by default 14 - mamode : Literal["rma", "ema", "sma", "wma"], optional - Moving average mode, by default "rma" - drift : NonNegativeInt, optional - The difference period, by default 1 - offset : int, optional - How many periods to offset the result, by default 0 + Parameters + ---------- + data : List[Data] + List of data to apply the indicator to. + index : str, optional + Index column name, by default "date" + length : PositiveInt, optional + It's period, by default 14 + mamode : Literal["rma", "ema", "sma", "wma"], optional + Moving average mode, by default "rma" + drift : NonNegativeInt, optional + The difference period, by default 1 + offset : int, optional + How many periods to offset the result, by default 0 - Returns - ------- - CommandOutput[List[Data]] - List of data with the indicator applied. + Returns + ------- + CommandOutput[List[Data]] + List of data with the indicator applied. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> atr_data = obb.ta.atr(data=stock_data.results) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> atr_data = obb.ta.atr(data=stock_data.results) + """ inputs = filter_inputs( data=data, index=index, @@ -70,30 +77,39 @@ class CLASS_ta(Container): @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def fib(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', close_column: Literal['close', 'adj_close'] = 'close', period: pydantic.types.PositiveInt = 120, start_date: Optional[str] = None, end_date: Optional[str] = None, chart: bool = False) -> CommandOutput[typing.List]: + def fib( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + close_column: Literal["close", "adj_close"] = "close", + period: pydantic.types.PositiveInt = 120, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - Fibonacci Retracement Levels. + Fibonacci Retracement Levels. - Parameters - ---------- - data : List[Data] - List of data to apply the indicator to. - index : str, optional - Index column name, by default "date" - period : PositiveInt, optional - Period to calculate the indicator, by default 120 + Parameters + ---------- + data : List[Data] + List of data to apply the indicator to. + index : str, optional + Index column name, by default "date" + period : PositiveInt, optional + Period to calculate the indicator, by default 120 - Returns - ------- - CommandOutput[List[Data]] - List of data with the indicator applied. + Returns + ------- + CommandOutput[List[Data]] + List of data with the indicator applied. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> fib_data = obb.ta.fib(data=stock_data.results, period=120) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> fib_data = obb.ta.fib(data=stock_data.results, period=120) + """ inputs = filter_inputs( data=data, index=index, @@ -113,38 +129,44 @@ class CLASS_ta(Container): @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def obv(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def obv( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The On Balance Volume (OBV) is a cumulative total of the up and - down volume. When the close is higher than the previous close, the volume is added - to the running total, and when the close is lower than the previous close, the volume - is subtracted from the running total. - - To interpret the OBV, look for the OBV - to move with the price or precede price moves. If the price moves before the OBV, - then it is a non-confirmed move. A series of rising peaks, or falling troughs, in the - OBV indicates a strong trend. If the OBV is flat, then the market is not trending. + The On Balance Volume (OBV) is a cumulative total of the up and + down volume. When the close is higher than the previous close, the volume is added + to the running total, and when the close is lower than the previous close, the volume + is subtracted from the running total. - Parameters - ---------- - data : List[Data] - List of data to apply the indicator to. - index : str, optional - Index column name, by default "date" - offset : int, optional - How many periods to offset the result, by default 0. + To interpret the OBV, look for the OBV + to move with the price or precede price moves. If the price moves before the OBV, + then it is a non-confirmed move. A series of rising peaks, or falling troughs, in the + OBV indicates a strong trend. If the OBV is flat, then the market is not trending. - Returns - ------- - CommandOutput[List[Data]] - List of data with the indicator applied. + Parameters + ---------- + data : List[Data] + List of data to apply the indicator to. + index : str, optional + Index column name, by default "date" + offset : int, optional + How many periods to offset the result, by default 0. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> obv_data = obb.ta.obv(data=stock_data.results, offset=0) - """ + Returns + ------- + CommandOutput[List[Data]] + List of data with the indicator applied. + + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> obv_data = obb.ta.obv(data=stock_data.results, offset=0) + """ inputs = filter_inputs( data=data, index=index, @@ -161,36 +183,43 @@ class CLASS_ta(Container): @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def fisher(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', length: pydantic.types.PositiveInt = 14, signal: pydantic.types.PositiveInt = 1, chart: bool = False) -> CommandOutput[typing.List]: + def fisher( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + length: pydantic.types.PositiveInt = 14, + signal: pydantic.types.PositiveInt = 1, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The Fisher Transform is a technical indicator created by John F. Ehlers - that converts prices into a Gaussian normal distribution.1 The indicator - highlights when prices have moved to an extreme, based on recent prices. - This may help in spotting turning points in the price of an asset. It also - helps show the trend and isolate the price waves within a trend. + The Fisher Transform is a technical indicator created by John F. Ehlers + that converts prices into a Gaussian normal distribution.1 The indicator + highlights when prices have moved to an extreme, based on recent prices. + This may help in spotting turning points in the price of an asset. It also + helps show the trend and isolate the price waves within a trend. - Parameters - ---------- - data : List[Data] - List of data to apply the indicator to. - index : str, optional - Index column name, by default "date" - length : PositiveInt, optional - Fisher period, by default 14 - signal : PositiveInt, optional - Fisher Signal period, by default 1 + Parameters + ---------- + data : List[Data] + List of data to apply the indicator to. + index : str, optional + Index column name, by default "date" + length : PositiveInt, optional + Fisher period, by default 14 + signal : PositiveInt, optional + Fisher Signal period, by default 1 - Returns - ------- - CommandOutput[List[Data]] - List of data with the indicator applied. + Returns + ------- + CommandOutput[List[Data]] + List of data with the indicator applied. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> fisher_data = obb.ta.fisher(data=stock_data.results, length=14, signal=1) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> fisher_data = obb.ta.fisher(data=stock_data.results, length=14, signal=1) + """ inputs = filter_inputs( data=data, index=index, @@ -208,37 +237,45 @@ class CLASS_ta(Container): @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def adosc(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', fast: pydantic.types.PositiveInt = 3, slow: pydantic.types.PositiveInt = 10, offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def adosc( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + fast: pydantic.types.PositiveInt = 3, + slow: pydantic.types.PositiveInt = 10, + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - Accumulation/Distribution Oscillator, also known as the Chaikin Oscillator - is essentially a momentum indicator, but of the Accumulation-Distribution line - rather than merely price. It looks at both the strength of price moves and the - underlying buying and selling pressure during a given time period. The oscillator - reading above zero indicates net buying pressure, while one below zero registers - net selling pressure. Divergence between the indicator and pure price moves are - the most common signals from the indicator, and often flag market turning points. + Accumulation/Distribution Oscillator, also known as the Chaikin Oscillator + is essentially a momentum indicator, but of the Accumulation-Distribution line + rather than merely price. It looks at both the strength of price moves and the + underlying buying and selling pressure during a given time period. The oscillator + reading above zero indicates net buying pressure, while one below zero registers + net selling pressure. Divergence between the indicator and pure price moves are + the most common signals from the indicator, and often flag market turning points. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - fast : PositiveInt, optional - Number of periods to be used for the fast calculation, by default 3. - slow : PositiveInt, optional - Number of periods to be used for the slow calculation, by default 10. - offset : int, optional - Offset to be used for the calculation, by default 0. + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + fast : PositiveInt, optional + Number of periods to be used for the fast calculation, by default 3. + slow : PositiveInt, optional + Number of periods to be used for the slow calculation, by default 10. + offset : int, optional + Offset to be used for the calculation, by default 0. - Returns - ------- - CommandOutput[List[Data]] + Returns + ------- + CommandOutput[List[Data]] - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> adosc_data = obb.ta.adosc(data=stock_data.results, fast=3, slow=10, offset=0) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> adosc_data = obb.ta.adosc(data=stock_data.results, fast=3, slow=10, offset=0) + """ inputs = filter_inputs( data=data, index=index, @@ -257,7 +294,9 @@ class CLASS_ta(Container): @filter_call @validate_arguments - def tv(self, chart: bool = False) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + def tv( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: """TradingView.""" inputs = filter_inputs( chart=chart, @@ -272,51 +311,61 @@ class CLASS_ta(Container): @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def bbands(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], target: str = 'close', index: str = 'date', length: int = 50, std: pydantic.types.NonNegativeFloat = 2, mamode: Literal['sma', 'ema', 'wma', 'rma'] = 'sma', offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def bbands( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + target: str = "close", + index: str = "date", + length: int = 50, + std: pydantic.types.NonNegativeFloat = 2, + mamode: Literal["sma", "ema", "wma", "rma"] = "sma", + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - Bollinger Bands consist of three lines. The middle band is a simple - moving average (generally 20 periods) of the typical price (TP). The upper and lower - bands are F standard deviations (generally 2) above and below the middle band. - The bands widen and narrow when the volatility of the price is higher or lower, - respectively. - -Bollinger Bands do not, in themselves, generate buy or sell signals; - they are an indicator of overbought or oversold conditions. When the price is near the - upper or lower band it indicates that a reversal may be imminent. The middle band - becomes a support or resistance level. The upper and lower bands can also be - interpreted as price targets. When the price bounces off of the lower band and crosses - the middle band, then the upper band becomes the price target. + Bollinger Bands consist of three lines. The middle band is a simple + moving average (generally 20 periods) of the typical price (TP). The upper and lower + bands are F standard deviations (generally 2) above and below the middle band. + The bands widen and narrow when the volatility of the price is higher or lower, + respectively. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - target : str - Target column name. - index : str, optional - Index column name to use with `data`, by default "date". - length : int, optional - Number of periods to be used for the calculation, by default 50. - std : NonNegativeFloat, optional - Standard deviation to be used for the calculation, by default 2. - mamode : Literal["sma", "ema", "wma", "rma"], optional - Moving average mode to be used for the calculation, by default "sma". - offset : int, optional - Offset to be used for the calculation, by default 0. + Bollinger Bands do not, in themselves, generate buy or sell signals; + they are an indicator of overbought or oversold conditions. When the price is near the + upper or lower band it indicates that a reversal may be imminent. The middle band + becomes a support or resistance level. The upper and lower bands can also be + interpreted as price targets. When the price bounces off of the lower band and crosses + the middle band, then the upper band becomes the price target. - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + target : str + Target column name. + index : str, optional + Index column name to use with `data`, by default "date". + length : int, optional + Number of periods to be used for the calculation, by default 50. + std : NonNegativeFloat, optional + Standard deviation to be used for the calculation, by default 2. + mamode : Literal["sma", "ema", "wma", "rma"], optional + Moving average mode to be used for the calculation, by default "sma". + offset : int, optional + Offset to be used for the calculation, by default 0. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> bbands = obb.ta.bbands( - >>> data=stock_data.results, target="close", length=50, std=2, mamode="sma", offset=0 - >>> ) - """ + Returns + ------- + CommandOutput[List[Data]] + The calculated data. + + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> bbands = obb.ta.bbands( + >>> data=stock_data.results, target="close", length=50, std=2, mamode="sma", offset=0 + >>> ) + """ inputs = filter_inputs( data=data, target=target, @@ -337,7 +386,9 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments - def multi(self, chart: bool = False) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + def multi( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: """Plot multiple indicators on the same chart.""" inputs = filter_inputs( chart=chart, @@ -352,40 +403,48 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def zlma(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], target: str = 'close', index: str = 'date', length: int = 50, offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def zlma( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + target: str = "close", + index: str = "date", + length: int = 50, + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The zero lag exponential moving average (ZLEMA) indicator - was created by John Ehlers and Ric Way. The idea is do a - regular exponential moving average (EMA) calculation but - on a de-lagged data instead of doing it on the regular data. - Data is de-lagged by removing the data from "lag" days ago - thus removing (or attempting to) the cumulative effect of - the moving average. + The zero lag exponential moving average (ZLEMA) indicator + was created by John Ehlers and Ric Way. The idea is do a + regular exponential moving average (EMA) calculation but + on a de-lagged data instead of doing it on the regular data. + Data is de-lagged by removing the data from "lag" days ago + thus removing (or attempting to) the cumulative effect of + the moving average. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - target : str - Target column name. - index : str, optional - Index column name to use with `data`, by default "date". - length : int, optional - Number of periods to be used for the calculation, by default 50. - offset : int, optional - Offset to be used for the calculation, by default 0. + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + target : str + Target column name. + index : str, optional + Index column name to use with `data`, by default "date". + length : int, optional + Number of periods to be used for the calculation, by default 50. + offset : int, optional + Offset to be used for the calculation, by default 0. - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Returns + ------- + CommandOutput[List[Data]] + The calculated data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> zlma_data = obb.ta.zlma(data=stock_data.results, target="close", length=50, offset=0) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> zlma_data = obb.ta.zlma(data=stock_data.results, target="close", length=50, offset=0) + """ inputs = filter_inputs( data=data, target=target, @@ -404,43 +463,50 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def aroon(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', length: int = 25, scalar: int = 100, chart: bool = False) -> CommandOutput[typing.List]: + def aroon( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + length: int = 25, + scalar: int = 100, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The word aroon is Sanskrit for "dawn's early light." The Aroon - indicator attempts to show when a new trend is dawning. The indicator consists - of two lines (Up and Down) that measure how long it has been since the highest - high/lowest low has occurred within an n period range. - - When the Aroon Up is - staying between 70 and 100 then it indicates an upward trend. When the Aroon Down - is staying between 70 and 100 then it indicates an downward trend. A strong upward - trend is indicated when the Aroon Up is above 70 while the Aroon Down is below 30. - Likewise, a strong downward trend is indicated when the Aroon Down is above 70 while - the Aroon Up is below 30. Also look for crossovers. When the Aroon Down crosses above - the Aroon Up, it indicates a weakening of the upward trend (and vice versa). + The word aroon is Sanskrit for "dawn's early light." The Aroon + indicator attempts to show when a new trend is dawning. The indicator consists + of two lines (Up and Down) that measure how long it has been since the highest + high/lowest low has occurred within an n period range. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - index: str, optional - Index column name to use with `data`, by default "date". - length : int, optional - Number of periods to be used for the calculation, by default 25. - scalar : int, optional - Scalar to be used for the calculation, by default 100. + When the Aroon Up is + staying between 70 and 100 then it indicates an upward trend. When the Aroon Down + is staying between 70 and 100 then it indicates an downward trend. A strong upward + trend is indicated when the Aroon Up is above 70 while the Aroon Down is below 30. + Likewise, a strong downward trend is indicated when the Aroon Down is above 70 while + the Aroon Up is below 30. Also look for crossovers. When the Aroon Down crosses above + the Aroon Up, it indicates a weakening of the upward trend (and vice versa). - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + index: str, optional + Index column name to use with `data`, by default "date". + length : int, optional + Number of periods to be used for the calculation, by default 25. + scalar : int, optional + Scalar to be used for the calculation, by default 100. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> aroon_data = obb.ta.aroon(data=stock_data.results, length=25, scalar=100) - """ + Returns + ------- + CommandOutput[List[Data]] + The calculated data. + + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> aroon_data = obb.ta.aroon(data=stock_data.results, length=25, scalar=100) + """ inputs = filter_inputs( data=data, index=index, @@ -458,40 +524,48 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def sma(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], target: str = 'close', index: str = 'date', length: int = 50, offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def sma( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + target: str = "close", + index: str = "date", + length: int = 50, + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - Moving Averages are used to smooth the data in an array to - help eliminate noise and identify trends. The Simple Moving Average is literally - the simplest form of a moving average. Each output value is the average of the - previous n values. In a Simple Moving Average, each value in the time period carries - equal weight, and values outside of the time period are not included in the average. - This makes it less responsive to recent changes in the data, which can be useful for - filtering out those changes. + Moving Averages are used to smooth the data in an array to + help eliminate noise and identify trends. The Simple Moving Average is literally + the simplest form of a moving average. Each output value is the average of the + previous n values. In a Simple Moving Average, each value in the time period carries + equal weight, and values outside of the time period are not included in the average. + This makes it less responsive to recent changes in the data, which can be useful for + filtering out those changes. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - target : str - Target column name. - index : str, optional - Index column name to use with `data`, by default "date". - length : int, optional - Number of periods to be used for the calculation, by default 50. - offset : int, optional - Offset from the current period, by default 0. + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + target : str + Target column name. + index : str, optional + Index column name to use with `data`, by default "date". + length : int, optional + Number of periods to be used for the calculation, by default 50. + offset : int, optional + Offset from the current period, by default 0. - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Returns + ------- + CommandOutput[List[Data]] + The calculated data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> sma_data = obb.ta.sma(data=stock_data.results,target="close",length=50,offset=0) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> sma_data = obb.ta.sma(data=stock_data.results,target="close",length=50,offset=0) + """ inputs = filter_inputs( data=data, target=target, @@ -510,36 +584,45 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def demark(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', target: str = 'close', show_all: bool = False, asint: bool = False, offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def demark( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + target: str = "close", + show_all: bool = False, + asint: bool = False, + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - Demark sequential indicator + Demark sequential indicator - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - index : str, optional - Index column name to use with `data`, by default "date". - target : str, optional - Target column name, by default "close". - show_all : bool, optional - Show 1 - 13. If set to False, show 6 - 9 - asint : bool, optional - If True, fill NAs with 0 and change type to int, by default False - offset : int, optional - How many periods to offset the result + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + index : str, optional + Index column name to use with `data`, by default "date". + target : str, optional + Target column name, by default "close". + show_all : bool, optional + Show 1 - 13. If set to False, show 6 - 9 + asint : bool, optional + If True, fill NAs with 0 and change type to int, by default False + offset : int, optional + How many periods to offset the result - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Returns + ------- + CommandOutput[List[Data]] + The calculated data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> demark_data = obb.ta.demark(data=stock_data.results,offset=0) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> demark_data = obb.ta.demark(data=stock_data.results,offset=0) + """ inputs = filter_inputs( data=data, index=index, @@ -559,35 +642,42 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def vwap(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', anchor: str = 'D', offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def vwap( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + anchor: str = "D", + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The Volume Weighted Average Price that measures the average typical price - by volume. It is typically used with intraday charts to identify general direction. + The Volume Weighted Average Price that measures the average typical price + by volume. It is typically used with intraday charts to identify general direction. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - index : str, optional - Index column name to use with `data`, by default "date". - anchor : str, optional - Anchor period to use for the calculation, by default "D". - See Timeseries Offset Aliases below for additional options: - https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#timeseries-offset-aliases - offset : int, optional - Offset from the current period, by default 0. + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + index : str, optional + Index column name to use with `data`, by default "date". + anchor : str, optional + Anchor period to use for the calculation, by default "D". + See Timeseries Offset Aliases below for additional options: + https://pandas.pydata.org/pandas-docs/stable/user_guide/timeseries.html#timeseries-offset-aliases + offset : int, optional + Offset from the current period, by default 0. - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Returns + ------- + CommandOutput[List[Data]] + The calculated data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> vwap_data = obb.ta.vwap(data=stock_data.results,anchor="D",offset=0) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> vwap_data = obb.ta.vwap(data=stock_data.results,anchor="D",offset=0) + """ inputs = filter_inputs( data=data, index=index, @@ -605,7 +695,9 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments - def recom(self, chart: bool = False) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + def recom( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: """Recommendation.""" inputs = filter_inputs( chart=chart, @@ -620,44 +712,53 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def macd(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], target: str = 'close', index: str = 'date', fast: int = 12, slow: int = 26, signal: int = 9, chart: bool = False) -> CommandOutput[typing.List]: + def macd( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + target: str = "close", + index: str = "date", + fast: int = 12, + slow: int = 26, + signal: int = 9, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The Moving Average Convergence Divergence (MACD) is the difference - between two Exponential Moving Averages. The Signal line is an Exponential Moving - Average of the MACD. - - The MACD signals trend changes and indicates the start - of new trend direction. High values indicate overbought conditions, low values - indicate oversold conditions. Divergence with the price indicates an end to the - current trend, especially if the MACD is at extreme high or low values. When the MACD - line crosses above the signal line a buy signal is generated. When the MACD crosses - below the signal line a sell signal is generated. To confirm the signal, the MACD - should be above zero for a buy, and below zero for a sell. + The Moving Average Convergence Divergence (MACD) is the difference + between two Exponential Moving Averages. The Signal line is an Exponential Moving + Average of the MACD. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - target : str - Target column name. - fast : int, optional - Number of periods for the fast EMA, by default 12. - slow : int, optional - Number of periods for the slow EMA, by default 26. - signal : int, optional - Number of periods for the signal EMA, by default 9. + The MACD signals trend changes and indicates the start + of new trend direction. High values indicate overbought conditions, low values + indicate oversold conditions. Divergence with the price indicates an end to the + current trend, especially if the MACD is at extreme high or low values. When the MACD + line crosses above the signal line a buy signal is generated. When the MACD crosses + below the signal line a sell signal is generated. To confirm the signal, the MACD + should be above zero for a buy, and below zero for a sell. - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + target : str + Target column name. + fast : int, optional + Number of periods for the fast EMA, by default 12. + slow : int, optional + Number of periods for the slow EMA, by default 26. + signal : int, optional + Number of periods for the signal EMA, by default 9. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> macd_data = obb.ta.macd(data=stock_data.results,target="close",fast=12,slow=26,signal=9) - """ + Returns + ------- + CommandOutput[List[Data]] + The calculated data. + + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> macd_data = obb.ta.macd(data=stock_data.results,target="close",fast=12,slow=26,signal=9) + """ inputs = filter_inputs( data=data, target=target, @@ -677,37 +778,45 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def hma(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], target: str = 'close', index: str = 'date', length: int = 50, offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def hma( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + target: str = "close", + index: str = "date", + length: int = 50, + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The Hull Moving Average solves the age old dilemma of making a moving average - more responsive to current price activity whilst maintaining curve smoothness. - In fact the HMA almost eliminates lag altogether and manages to improve smoothing - at the same time. + The Hull Moving Average solves the age old dilemma of making a moving average + more responsive to current price activity whilst maintaining curve smoothness. + In fact the HMA almost eliminates lag altogether and manages to improve smoothing + at the same time. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - target : str - Target column name. - index : str, optional - Index column name to use with `data`, by default "date". - length : int, optional - Number of periods for the HMA, by default 50. - offset : int, optional - Offset of the HMA, by default 0. + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + target : str + Target column name. + index : str, optional + Index column name to use with `data`, by default "date". + length : int, optional + Number of periods for the HMA, by default 50. + offset : int, optional + Offset of the HMA, by default 0. - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Returns + ------- + CommandOutput[List[Data]] + The calculated data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> hma_data = obb.ta.hma(data=stock_data.results,target="close",length=50,offset=0) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> hma_data = obb.ta.hma(data=stock_data.results,target="close",length=50,offset=0) + """ inputs = filter_inputs( data=data, target=target, @@ -726,39 +835,47 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def donchian(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', lower_length: pydantic.types.PositiveInt = 20, upper_length: pydantic.types.PositiveInt = 20, offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def donchian( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + lower_length: pydantic.types.PositiveInt = 20, + upper_length: pydantic.types.PositiveInt = 20, + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - Donchian Channels are three lines generated by moving average - calculations that comprise an indicator formed by upper and lower - bands around a midrange or median band. The upper band marks the - highest price of a security over N periods while the lower band - marks the lowest price of a security over N periods. The area - between the upper and lower bands represents the Donchian Channel. + Donchian Channels are three lines generated by moving average + calculations that comprise an indicator formed by upper and lower + bands around a midrange or median band. The upper band marks the + highest price of a security over N periods while the lower band + marks the lowest price of a security over N periods. The area + between the upper and lower bands represents the Donchian Channel. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - index : str, optional - Index column name to use with `data`, by default "date". - lower_length : PositiveInt, optional - Number of periods for the lower band, by default 20. - upper_length : PositiveInt, optional - Number of periods for the upper band, by default 20. - offset : int, optional - Offset of the Donchian Channel, by default 0. + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + index : str, optional + Index column name to use with `data`, by default "date". + lower_length : PositiveInt, optional + Number of periods for the lower band, by default 20. + upper_length : PositiveInt, optional + Number of periods for the upper band, by default 20. + offset : int, optional + Offset of the Donchian Channel, by default 0. - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Returns + ------- + CommandOutput[List[Data]] + The calculated data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> donchian_data = obb.ta.donchian(data=stock_data.results,lower_length=20,upper_length=20,offset=0) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> donchian_data = obb.ta.donchian(data=stock_data.results,lower_length=20,upper_length=20,offset=0) + """ inputs = filter_inputs( data=data, index=index, @@ -777,30 +894,40 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def ichimoku(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', conversion: pydantic.types.PositiveInt = 9, base: pydantic.types.PositiveInt = 26, lagging: pydantic.types.PositiveInt = 52, offset: pydantic.types.PositiveInt = 26, lookahead: bool = False, chart: bool = False) -> CommandOutput[typing.List]: + def ichimoku( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + conversion: pydantic.types.PositiveInt = 9, + base: pydantic.types.PositiveInt = 26, + lagging: pydantic.types.PositiveInt = 52, + offset: pydantic.types.PositiveInt = 26, + lookahead: bool = False, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The Ichimoku Cloud, also known as Ichimoku Kinko Hyo, is a versatile indicator that - defines support and resistance, identifies trend direction, gauges momentum and provides - trading signals. Ichimoku Kinko Hyo translates into "one look equilibrium chart". With - one look, chartists can identify the trend and look for potential signals within that trend. + The Ichimoku Cloud, also known as Ichimoku Kinko Hyo, is a versatile indicator that + defines support and resistance, identifies trend direction, gauges momentum and provides + trading signals. Ichimoku Kinko Hyo translates into "one look equilibrium chart". With + one look, chartists can identify the trend and look for potential signals within that trend. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - index : str, optional - Index column name to use with `data`, by default "date". - conversion : PositiveInt, optional - Number of periods for the conversion line, by default 9. - base : PositiveInt, optional - Number of periods for the base line, by default 26. - lagging : PositiveInt, optional - Number of periods for the lagging span, by default 52. - offset : PositiveInt, optional - Number of periods for the offset, by default 26. - lookahead : bool, optional - drops the Chikou Span Column to prevent potential data leak - """ + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + index : str, optional + Index column name to use with `data`, by default "date". + conversion : PositiveInt, optional + Number of periods for the conversion line, by default 9. + base : PositiveInt, optional + Number of periods for the base line, by default 26. + lagging : PositiveInt, optional + Number of periods for the lagging span, by default 52. + offset : PositiveInt, optional + Number of periods for the offset, by default 26. + lookahead : bool, optional + drops the Chikou Span Column to prevent potential data leak + """ inputs = filter_inputs( data=data, index=index, @@ -821,32 +948,39 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def clenow(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', target: str = 'adj_close', period: pydantic.types.PositiveInt = 90, chart: bool = False) -> CommandOutput[typing.List]: + def clenow( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + target: str = "adj_close", + period: pydantic.types.PositiveInt = 90, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - Clenow Volatility Adjusted Momentum. + Clenow Volatility Adjusted Momentum. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - index : str, optional - Index column name to use with `data`, by default "date". - target : str, optional - Target column name, by default "adj_close". - period : PositiveInt, optional - Number of periods for the momentum, by default 90. + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + index : str, optional + Index column name to use with `data`, by default "date". + target : str, optional + Target column name, by default "adj_close". + period : PositiveInt, optional + Number of periods for the momentum, by default 90. - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Returns + ------- + CommandOutput[List[Data]] + The calculated data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> clenow_data = obb.ta.clenow(data=stock_data.results,period=90) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> clenow_data = obb.ta.clenow(data=stock_data.results,period=90) + """ inputs = filter_inputs( data=data, index=index, @@ -864,40 +998,46 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def ad(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def ad( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The Accumulation/Distribution Line is similar to the On Balance - Volume (OBV), which sums the volume times +1/-1 based on whether the close is - higher than the previous close. The Accumulation/Distribution indicator, however - multiplies the volume by the close location value (CLV). The CLV is based on the - movement of the issue within a single bar and can be +1, -1 or zero. - + The Accumulation/Distribution Line is similar to the On Balance + Volume (OBV), which sums the volume times +1/-1 based on whether the close is + higher than the previous close. The Accumulation/Distribution indicator, however + multiplies the volume by the close location value (CLV). The CLV is based on the + movement of the issue within a single bar and can be +1, -1 or zero. - The Accumulation/Distribution Line is interpreted by looking for a divergence in - the direction of the indicator relative to price. If the Accumulation/Distribution - Line is trending upward it indicates that the price may follow. Also, if the - Accumulation/Distribution Line becomes flat while the price is still rising (or falling) - then it signals an impending flattening of the price. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - index : str, optional - Index column name to use with `data`, by default "date". - offset : int, optional - Offset of the AD, by default 0. + The Accumulation/Distribution Line is interpreted by looking for a divergence in + the direction of the indicator relative to price. If the Accumulation/Distribution + Line is trending upward it indicates that the price may follow. Also, if the + Accumulation/Distribution Line becomes flat while the price is still rising (or falling) + then it signals an impending flattening of the price. - Returns - ------- - CommandOutput[List[Data]] + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + index : str, optional + Index column name to use with `data`, by default "date". + offset : int, optional + Offset of the AD, by default 0. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> ad_data = obb.ta.ad(data=stock_data.results,offset=0) - """ + Returns + ------- + CommandOutput[List[Data]] + + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> ad_data = obb.ta.ad(data=stock_data.results,offset=0) + """ inputs = filter_inputs( data=data, index=index, @@ -914,36 +1054,44 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def adx(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', length: int = 50, scalar: float = 100.0, drift: int = 1, chart: bool = False) -> CommandOutput[typing.List]: + def adx( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + length: int = 50, + scalar: float = 100.0, + drift: int = 1, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The ADX is a Welles Wilder style moving average of the Directional Movement Index (DX). - The values range from 0 to 100, but rarely get above 60. To interpret the ADX, consider - a high number to be a strong trend, and a low number, a weak trend. + The ADX is a Welles Wilder style moving average of the Directional Movement Index (DX). + The values range from 0 to 100, but rarely get above 60. To interpret the ADX, consider + a high number to be a strong trend, and a low number, a weak trend. - Parameters - ---------- - data : List[Data] - List of data to be used for the calculation. - index : str, optional - Index column name to use with `data`, by default "date". - length : int, optional - Number of periods for the ADX, by default 50. - scalar : float, optional - Scalar value for the ADX, by default 100.0. - drift : int, optional - Drift value for the ADX, by default 1. + Parameters + ---------- + data : List[Data] + List of data to be used for the calculation. + index : str, optional + Index column name to use with `data`, by default "date". + length : int, optional + Number of periods for the ADX, by default 50. + scalar : float, optional + Scalar value for the ADX, by default 100.0. + drift : int, optional + Drift value for the ADX, by default 1. - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Returns + ------- + CommandOutput[List[Data]] + The calculated data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> adx_data = obb.ta.adx(data=stock_data.results,length=50,scalar=100.0,drift=1) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> adx_data = obb.ta.adx(data=stock_data.results,length=50,scalar=100.0,drift=1) + """ inputs = filter_inputs( data=data, index=index, @@ -962,37 +1110,45 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def wma(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], target: str = 'close', index: str = 'date', length: int = 50, offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def wma( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + target: str = "close", + index: str = "date", + length: int = 50, + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - A Weighted Moving Average puts more weight on recent data and less on past data. - This is done by multiplying each bar’s price by a weighting factor. Because of its - unique calculation, WMA will follow prices more closely than a corresponding Simple - Moving Average. + A Weighted Moving Average puts more weight on recent data and less on past data. + This is done by multiplying each bar’s price by a weighting factor. Because of its + unique calculation, WMA will follow prices more closely than a corresponding Simple + Moving Average. - Parameters - ---------- - data : List[Data] - The data to use for the calculation. - target : str - Target column name. - index : str, optional - Index column name to use with `data`, by default "date". - length : int, optional - The length of the WMA, by default 50. - offset : int, optional - The offset of the WMA, by default 0. + Parameters + ---------- + data : List[Data] + The data to use for the calculation. + target : str + Target column name. + index : str, optional + Index column name to use with `data`, by default "date". + length : int, optional + The length of the WMA, by default 50. + offset : int, optional + The offset of the WMA, by default 0. - Returns - ------- - CommandOutput[List[Data]] - The WMA data. + Returns + ------- + CommandOutput[List[Data]] + The WMA data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> wma_data = obb.ta.wma(data=stock_data.results, target="close", length=50, offset=0) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> wma_data = obb.ta.wma(data=stock_data.results, target="close", length=50, offset=0) + """ inputs = filter_inputs( data=data, target=target, @@ -1011,30 +1167,37 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def cci(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', length: pydantic.types.PositiveInt = 14, scalar: pydantic.types.PositiveFloat = 0.015, chart: bool = False) -> CommandOutput[typing.List]: + def cci( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + length: pydantic.types.PositiveInt = 14, + scalar: pydantic.types.PositiveFloat = 0.015, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The CCI is designed to detect beginning and ending market trends. - The range of 100 to -100 is the normal trading range. CCI values outside of this - range indicate overbought or oversold conditions. You can also look for price - divergence in the CCI. If the price is making new highs, and the CCI is not, - then a price correction is likely. + The CCI is designed to detect beginning and ending market trends. + The range of 100 to -100 is the normal trading range. CCI values outside of this + range indicate overbought or oversold conditions. You can also look for price + divergence in the CCI. If the price is making new highs, and the CCI is not, + then a price correction is likely. - Parameters - ---------- - data : List[Data] - The data to use for the CCI calculation. - index : str, optional - Index column name to use with `data`, by default "date". - length : PositiveInt, optional - The length of the CCI, by default 14. - scalar : PositiveFloat, optional - The scalar of the CCI, by default 0.015. + Parameters + ---------- + data : List[Data] + The data to use for the CCI calculation. + index : str, optional + Index column name to use with `data`, by default "date". + length : PositiveInt, optional + The length of the CCI, by default 14. + scalar : PositiveFloat, optional + The scalar of the CCI, by default 0.015. - Returns - ------- - CommandOutput[List[Data]] - The CCI data. - """ + Returns + ------- + CommandOutput[List[Data]] + The CCI data. + """ inputs = filter_inputs( data=data, index=index, @@ -1052,40 +1215,49 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def rsi(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], target: str = 'close', index: str = 'date', length: int = 14, scalar: float = 100.0, drift: int = 1, chart: bool = False) -> CommandOutput[typing.List]: + def rsi( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + target: str = "close", + index: str = "date", + length: int = 14, + scalar: float = 100.0, + drift: int = 1, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The Relative Strength Index (RSI) calculates a ratio of the - recent upward price movements to the absolute price movement. The RSI ranges - from 0 to 100. The RSI is interpreted as an overbought/oversold indicator when - the value is over 70/below 30. You can also look for divergence with price. If - the price is making new highs/lows, and the RSI is not, it indicates a reversal. + The Relative Strength Index (RSI) calculates a ratio of the + recent upward price movements to the absolute price movement. The RSI ranges + from 0 to 100. The RSI is interpreted as an overbought/oversold indicator when + the value is over 70/below 30. You can also look for divergence with price. If + the price is making new highs/lows, and the RSI is not, it indicates a reversal. - Parameters - ---------- - data : List[Data] - The data to use for the RSI calculation. - target : str - Target column name. - index : str, optional - Index column name to use with `data`, by default "date" - length : int, optional - The length of the RSI, by default 14 - scalar : float, optional - The scalar to use for the RSI, by default 100.0 - drift : int, optional - The drift to use for the RSI, by default 1 + Parameters + ---------- + data : List[Data] + The data to use for the RSI calculation. + target : str + Target column name. + index : str, optional + Index column name to use with `data`, by default "date" + length : int, optional + The length of the RSI, by default 14 + scalar : float, optional + The scalar to use for the RSI, by default 100.0 + drift : int, optional + The drift to use for the RSI, by default 1 - Returns - ------- - CommandOutput[List[Data]] - The RSI data. + Returns + ------- + CommandOutput[List[Data]] + The RSI data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> rsi_data = obb.ta.rsi(data=stock_data.results, target="close", length=14, scalar=100.0, drift=1) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> rsi_data = obb.ta.rsi(data=stock_data.results, target="close", length=14, scalar=100.0, drift=1) + """ inputs = filter_inputs( data=data, target=target, @@ -1105,7 +1277,9 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments - def summary(self, chart: bool = False) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + def summary( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: """Summary.""" inputs = filter_inputs( chart=chart, @@ -1120,39 +1294,47 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def stoch(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', fast_k_period: pydantic.types.NonNegativeInt = 14, slow_d_period: pydantic.types.NonNegativeInt = 3, slow_k_period: pydantic.types.NonNegativeInt = 3, chart: bool = False) -> CommandOutput[typing.List]: + def stoch( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + fast_k_period: pydantic.types.NonNegativeInt = 14, + slow_d_period: pydantic.types.NonNegativeInt = 3, + slow_k_period: pydantic.types.NonNegativeInt = 3, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The Stochastic Oscillator measures where the close is in relation - to the recent trading range. The values range from zero to 100. %D values over 75 - indicate an overbought condition; values under 25 indicate an oversold condition. - When the Fast %D crosses above the Slow %D, it is a buy signal; when it crosses - below, it is a sell signal. The Raw %K is generally considered too erratic to use - for crossover signals. + The Stochastic Oscillator measures where the close is in relation + to the recent trading range. The values range from zero to 100. %D values over 75 + indicate an overbought condition; values under 25 indicate an oversold condition. + When the Fast %D crosses above the Slow %D, it is a buy signal; when it crosses + below, it is a sell signal. The Raw %K is generally considered too erratic to use + for crossover signals. - Parameters - ---------- - data : List[Data] - The data to use for the Stochastic Oscillator calculation. - index : str, optional - Index column name to use with `data`, by default "date". - fast_k_period : NonNegativeInt, optional - The fast %K period, by default 14. - slow_d_period : NonNegativeInt, optional - The slow %D period, by default 3. - slow_k_period : NonNegativeInt, optional - The slow %K period, by default 3. + Parameters + ---------- + data : List[Data] + The data to use for the Stochastic Oscillator calculation. + index : str, optional + Index column name to use with `data`, by default "date". + fast_k_period : NonNegativeInt, optional + The fast %K period, by default 14. + slow_d_period : NonNegativeInt, optional + The slow %D period, by default 3. + slow_k_period : NonNegativeInt, optional + The slow %K period, by default 3. - Returns - ------- - CommandOutput[List[Data]] - The Stochastic Oscillator data. + Returns + ------- + CommandOutput[List[Data]] + The Stochastic Oscillator data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> stoch_data = obb.ta.stoch(data=stock_data.results, fast_k_period=14, slow_d_period=3, slow_k_period=3) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> stoch_data = obb.ta.stoch(data=stock_data.results, fast_k_period=14, slow_d_period=3, slow_k_period=3) + """ inputs = filter_inputs( data=data, index=index, @@ -1171,7 +1353,9 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments - def rsp(self, chart: bool = False) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: + def rsp( + self, chart: bool = False + ) -> CommandOutput[openbb_core.app.model.results.empty.Empty]: """Relative Strength Performance.""" inputs = filter_inputs( chart=chart, @@ -1186,40 +1370,49 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def kc(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', length: pydantic.types.PositiveInt = 20, scalar: pydantic.types.PositiveFloat = 20, mamode: Literal['ema', 'sma', 'wma', 'hma', 'zlma'] = 'ema', offset: pydantic.types.NonNegativeInt = 0, chart: bool = False) -> CommandOutput[typing.List]: + def kc( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + length: pydantic.types.PositiveInt = 20, + scalar: pydantic.types.PositiveFloat = 20, + mamode: Literal["ema", "sma", "wma", "hma", "zlma"] = "ema", + offset: pydantic.types.NonNegativeInt = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - Keltner Channels are volatility-based bands that are placed - on either side of an asset's price and can aid in determining - the direction of a trend.The Keltner channel uses the average - true range (ATR) or volatility, with breaks above or below the top - and bottom barriers signaling a continuation. + Keltner Channels are volatility-based bands that are placed + on either side of an asset's price and can aid in determining + the direction of a trend.The Keltner channel uses the average + true range (ATR) or volatility, with breaks above or below the top + and bottom barriers signaling a continuation. - Parameters - ---------- - data : List[Data] - The data to use for the Keltner Channels calculation. - index : str, optional - Index column name to use with `data`, by default "date" - length : PositiveInt, optional - The length of the Keltner Channels, by default 20 - scalar : PositiveFloat, optional - The scalar to use for the Keltner Channels, by default 20 - mamode : Literal["ema", "sma", "wma", "hma", "zlma"], optional - The moving average mode to use for the Keltner Channels, by default "ema" - offset : NonNegativeInt, optional - The offset to use for the Keltner Channels, by default 0 + Parameters + ---------- + data : List[Data] + The data to use for the Keltner Channels calculation. + index : str, optional + Index column name to use with `data`, by default "date" + length : PositiveInt, optional + The length of the Keltner Channels, by default 20 + scalar : PositiveFloat, optional + The scalar to use for the Keltner Channels, by default 20 + mamode : Literal["ema", "sma", "wma", "hma", "zlma"], optional + The moving average mode to use for the Keltner Channels, by default "ema" + offset : NonNegativeInt, optional + The offset to use for the Keltner Channels, by default 0 - Returns - ------- - CommandOutput[List[Data]] - The Keltner Channels data. + Returns + ------- + CommandOutput[List[Data]] + The Keltner Channels data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> kc_data = obb.ta.kc(data=stock_data.results, length=20, scalar=20, ma_mode="ema", offset=0) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> kc_data = obb.ta.kc(data=stock_data.results, length=20, scalar=20, ma_mode="ema", offset=0) + """ inputs = filter_inputs( data=data, index=index, @@ -1239,34 +1432,40 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def cg(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', length: pydantic.types.PositiveInt = 14, chart: bool = False) -> CommandOutput[typing.List]: + def cg( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + length: pydantic.types.PositiveInt = 14, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The Center of Gravity indicator, in short, is used to anticipate future price movements - and to trade on price reversals as soon as they happen. However, just like other oscillators, - the COG indicator returns the best results in range-bound markets and should be avoided when - the price is trending. Traders who use it will be able to closely speculate the upcoming - price change of the asset. + The Center of Gravity indicator, in short, is used to anticipate future price movements + and to trade on price reversals as soon as they happen. However, just like other oscillators, + the COG indicator returns the best results in range-bound markets and should be avoided when + the price is trending. Traders who use it will be able to closely speculate the upcoming + price change of the asset. - Parameters - ---------- - data : List[Data] - The data to use for the COG calculation. - index : str, optional - Index column name to use with `data`, by default "date" - length : PositiveInt, optional - The length of the COG, by default 14 + Parameters + ---------- + data : List[Data] + The data to use for the COG calculation. + index : str, optional + Index column name to use with `data`, by default "date" + length : PositiveInt, optional + The length of the COG, by default 14 - Returns - ------- - CommandOutput[List[Data]] - The COG data. + Returns + ------- + CommandOutput[List[Data]] + The COG data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> cg_data = obb.ta.cg(data=stock_data.results, length=14) - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> cg_data = obb.ta.cg(data=stock_data.results, length=14) + """ inputs = filter_inputs( data=data, index=index, @@ -1283,57 +1482,73 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def cones(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], index: str = 'date', lower_q: float = 0.25, upper_q: float = 0.75, model: Literal['STD', 'Parkinson', 'Garman-Klass', 'Hodges-Tompkins', 'Rogers-Satchell', 'Yang-Zhang'] = 'STD', is_crypto: bool = False, chart: bool = False) -> CommandOutput[typing.List]: + def cones( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + index: str = "date", + lower_q: float = 0.25, + upper_q: float = 0.75, + model: Literal[ + "STD", + "Parkinson", + "Garman-Klass", + "Hodges-Tompkins", + "Rogers-Satchell", + "Yang-Zhang", + ] = "STD", + is_crypto: bool = False, + chart: bool = False, + ) -> CommandOutput[typing.List]: """Calculate the realized volatility quantiles over rolling windows of time. - The model for calculating volatility is selectable. + The model for calculating volatility is selectable. - Parameters - ---------- - data : List[Data] - The data to use for the calculation. - index : str, optional - Index column name to use with `data`, by default "date" - lower_q : float, optional - The lower quantile value for calculations - upper_q : float, optional - The upper quantile value for calculations - model : Literal["STD", "Parkinson", "Garman-Klass", "Hodges-Tompkins", "Rogers-Satchell", "Yang-Zhang"], optional - The model used to calculate realized volatility + Parameters + ---------- + data : List[Data] + The data to use for the calculation. + index : str, optional + Index column name to use with `data`, by default "date" + lower_q : float, optional + The lower quantile value for calculations + upper_q : float, optional + The upper quantile value for calculations + model : Literal["STD", "Parkinson", "Garman-Klass", "Hodges-Tompkins", "Rogers-Satchell", "Yang-Zhang"], optional + The model used to calculate realized volatility - Standard deviation measures how widely returns are dispersed from the average return. - It is the most common (and biased) estimator of volatility. + Standard deviation measures how widely returns are dispersed from the average return. + It is the most common (and biased) estimator of volatility. - Parkinson volatility uses the high and low price of the day rather than just close to close prices. - It is useful for capturing large price movements during the day. + Parkinson volatility uses the high and low price of the day rather than just close to close prices. + It is useful for capturing large price movements during the day. - Garman-Klass volatility extends Parkinson volatility by taking into account the opening and closing price. - As markets are most active during the opening and closing of a trading session; - it makes volatility estimation more accurate. + Garman-Klass volatility extends Parkinson volatility by taking into account the opening and closing price. + As markets are most active during the opening and closing of a trading session; + it makes volatility estimation more accurate. - Hodges-Tompkins volatility is a bias correction for estimation using an overlapping data sample. - It produces unbiased estimates and a substantial gain in efficiency. + Hodges-Tompkins volatility is a bias correction for estimation using an overlapping data sample. + It produces unbiased estimates and a substantial gain in efficiency. - Rogers-Satchell is an estimator for measuring the volatility with an average return not equal to zero. - Unlike Parkinson and Garman-Klass estimators, Rogers-Satchell incorporates a drift term, - mean return not equal to zero. + Rogers-Satchell is an estimator for measuring the volatility with an average return not equal to zero. + Unlike Parkinson and Garman-Klass estimators, Rogers-Satchell incorporates a drift term, + mean return not equal to zero. - Yang-Zhang volatility is the combination of the overnight (close-to-open volatility). - It is a weighted average of the Rogers-Satchell volatility and the open-to-close volatility. - is_crypto : bool, optional - Whether the data is crypto or not. If True, volatility is calculated for 365 days instead of 252 + Yang-Zhang volatility is the combination of the overnight (close-to-open volatility). + It is a weighted average of the Rogers-Satchell volatility and the open-to-close volatility. + is_crypto : bool, optional + Whether the data is crypto or not. If True, volatility is calculated for 365 days instead of 252 - Returns - ------- - CommandOutput[List[Data]] - The cones data. + Returns + ------- + CommandOutput[List[Data]] + The cones data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> cones_data = obb.ta.cones(data=stock_data.results, lower_q=0.25, upper_q=0.75, model="STD") - """ + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> cones_data = obb.ta.cones(data=stock_data.results, lower_q=0.25, upper_q=0.75, model="STD") + """ inputs = filter_inputs( data=data, index=index, @@ -1353,42 +1568,50 @@ Bollinger Bands do not, in themselves, generate buy or sell signals; @filter_call @validate_arguments(config=dict(arbitrary_types_allowed=True)) - def ema(self, data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], target: str = 'close', index: str = 'date', length: int = 50, offset: int = 0, chart: bool = False) -> CommandOutput[typing.List]: + def ema( + self, + data: Union[List[openbb_provider.abstract.data.Data], pandas.DataFrame], + target: str = "close", + index: str = "date", + length: int = 50, + offset: int = 0, + chart: bool = False, + ) -> CommandOutput[typing.List]: """ - The Exponential Moving Average is a staple of technical - analysis and is used in countless technical indicators. In a Simple Moving - Average, each value in the time period carries equal weight, and values outside - of the time period are not included in the average. However, the Exponential - Moving Average is a cumulative calculation, including all data. Past values have - a diminishing contribution to the average, while more recent values have a greater - contribution. This method allows the moving average to be more responsive to changes - in the data. + The Exponential Moving Average is a staple of technical + analysis and is used in countless technical indicators. In a Simple Moving + Average, each value in the time period carries equal weight, and values outside + of the time period are not included in the average. However, the Exponential + Moving Average is a cumulative calculation, including all data. Past values have + a diminishing contribution to the average, while more recent values have a greater + contribution. This method allows the moving average to be more responsive to changes + in the data. - Parameters - ---------- - data : List[Data] - The data to use for the calculation. - target : str - Target column name. - index : str, optional - Index column name to use with `data`, by default "date" - length : int, optional - The length of the calculation, by default 50. - offset : int, optional - The offset of the calculation, by default 0. + Parameters + ---------- + data : List[Data] + The data to use for the calculation. + target : str + Target column name. + index : str, optional + Index column name to use with `data`, by default "date" + length : int, optional + The length of the calculation, by default 50. + offset : int, optional + The offset of the calculation, by default 0. - Returns - ------- - CommandOutput[List[Data]] - The calculated data. + Returns + ------- + CommandOutput[List[Data]] + The calculated data. - Examples - -------- - >>> from openbb import obb - >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") - >>> ema_data = obb.ta.ema(data=stock_data.results,target="close",length=50,offset=0) + Examples + -------- + >>> from openbb import obb + >>> stock_data = obb.stocks.load(symbol="TSLA", start_date="2023-01-01", provider="fmp") + >>> ema_data = obb.ta.ema(data=stock_data.results,target="close",length=50,offset=0) - """ + """ inputs = filter_inputs( data=data, target=target, diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package_builder.py b/openbb_sdk/sdk/core/openbb_core/app/static/package_builder.py index de7e34f1952..bd32af3258a 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package_builder.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package_builder.py @@ -21,8 +21,9 @@ from typing import ( import pandas as pd from pydantic.fields import ModelField from starlette.routing import BaseRoute -from typing_extensions import _AnnotatedAlias +from typing_extensions import Annotated, _AnnotatedAlias +from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.provider_interface import get_provider_interface from openbb_core.app.router import RouterLoader @@ -179,6 +180,9 @@ class ImportDefinition: hint_type_list = cls.get_path_hint_type_list(path=path) code = "\nfrom openbb_core.app.static.container import Container" code += "\nfrom openbb_core.app.model.command_output import CommandOutput" + code += ( + "\nfrom openbb_core.app.model.custom_parameter import OpenBBCustomParameter" + ) # These imports were not detected before build, so we add them manually and # ruff --fix the resulting code to remove unused imports. @@ -189,7 +193,7 @@ class ImportDefinition: code += "\nimport pydantic" code += "\nfrom pydantic import validate_arguments" code += "\nfrom inspect import Parameter" - code += "\nfrom typing import List, Dict, Union, Optional, Literal" + code += "\nfrom typing import List, Dict, Union, Optional, Literal, Annotated" code += "\nfrom openbb_core.app.utils import df_to_basemodel" code += "\nfrom openbb_core.app.static.filters import filter_call, filter_inputs, filter_output\n" @@ -347,6 +351,7 @@ class DocstringGenerator: section_docstring += ( f"{cls.get_available_providers(query_mapping)}" ) + # TODO: How do we know if the model has a chart parameter? elif section_name == "Data": underline = "-" * len(model_name) section_docstring += f"\n{model_name}\n{underline}\n" @@ -366,23 +371,26 @@ class DocstringGenerator: return docstring @classmethod - def generate_command_docstring(cls, func: Callable, model_name: str) -> Callable: + def generate_command_docstring( + cls, func: Callable, model_name: Optional[str] = None + ) -> Callable: """Generate the docstring for the command.""" - provider_interface_mapping = get_provider_interface().map - query_mapping = provider_interface_mapping.get(model_name, None) - if query_mapping: - docstring = func.__doc__ or "" - docstring += "\n\n" + if model_name: + provider_interface_mapping = get_provider_interface().map + query_mapping = provider_interface_mapping.get(model_name, None) + if query_mapping: + docstring = func.__doc__ or "" + docstring += "\n\n" - query_mapping_ordered = cls.reorder_dictionary(query_mapping, "openbb") - docstring = cls.generate_provider_docstrings( - docstring=docstring, - query_mapping=query_mapping_ordered, - model_name=model_name, - provider_interface_mapping=provider_interface_mapping, - ) + query_mapping_ordered = cls.reorder_dictionary(query_mapping, "openbb") + docstring = cls.generate_provider_docstrings( + docstring=docstring, + query_mapping=query_mapping_ordered, + model_name=model_name, + provider_interface_mapping=provider_interface_mapping, + ) - func.__doc__ = docstring + func.__doc__ = docstring return func @@ -453,7 +461,7 @@ class MethodDefinition: @staticmethod def format_params( parameter_map: Dict[str, Parameter] - ) -> "OrderedDict[str, Parameter]": + ) -> OrderedDict[str, Parameter]: """Format the params.""" # These are types we want to expand. # For example, start_date is always a 'date', but we also accept 'str' as input. @@ -517,9 +525,45 @@ class MethodDefinition: return MethodDefinition.reorder_params(params=formatted) @staticmethod - def build_func_params(parameter_map: Dict[str, Parameter]) -> str: - """Build the function parameters.""" + def add_field_descriptions( + od: OrderedDict[str, Parameter], model_name: Optional[str] = None + ) -> OrderedDict[str, Parameter]: + """Add the field description to the param signature.""" + + if model_name: + available_fields = ( + get_provider_interface() + .map[model_name]["openbb"]["QueryParams"]["fields"] + .keys() + ) + + for param, value in od.items(): + if param not in available_fields: + continue + + description = ( + get_provider_interface() + .map[model_name]["openbb"]["QueryParams"]["fields"][param] + .field_info.description + ) + + new_value = value.replace( + annotation=Annotated[ + value.annotation, OpenBBCustomParameter(description=description) + ] + ) + + od[param] = new_value + + @staticmethod + def build_func_params( + parameter_map: Dict[str, Parameter], model_name: Optional[str] = None + ) -> str: od = MethodDefinition.format_params(parameter_map=parameter_map) + MethodDefinition.add_field_descriptions( + od=od, model_name=model_name + ) # this modified `od` in place + func_params = ", ".join(str(param) for param in od.values()) func_params = func_params.replace("NoneType", "None") func_params = func_params.replace( @@ -557,10 +601,12 @@ class MethodDefinition: @staticmethod def build_command_method_signature( - func_name: str, parameter_map: Dict[str, Parameter], return_type: type + func_name: str, + parameter_map: Dict[str, Parameter], + return_type: type, + model_name: Optional[str] = None, ) -> str: - """Build the command method signature.""" - func_params = MethodDefinition.build_func_params(parameter_map) + func_params = MethodDefinition.build_func_params(parameter_map, model_name) func_returns = MethodDefinition.build_func_returns(return_type) code = "\n @filter_call" @@ -619,7 +665,7 @@ class MethodDefinition: @classmethod def build_command_method( - cls, path: str, func: Callable, model_name: Optional[str] + cls, path: str, func: Callable, model_name: Optional[str] = None ) -> str: """Build the command method.""" func_name = func.__name__ @@ -627,15 +673,15 @@ class MethodDefinition: sig = signature(func) parameter_map = dict(sig.parameters) - if model_name: - func = DocstringGenerator.generate_command_docstring( - func=func, model_name=model_name - ) + func = DocstringGenerator.generate_command_docstring( + func=func, model_name=model_name + ) code = cls.build_command_method_signature( func_name=func_name, parameter_map=parameter_map, return_type=sig.return_annotation, + model_name=model_name, ) code += cls.build_command_method_doc(func=func) code += cls.build_command_method_implementation(path=path, func=func) diff --git a/openbb_sdk/sdk/provider/openbb_provider/standard_models/balance_sheet.py b/openbb_sdk/sdk/provider/openbb_provider/standard_models/balance_sheet.py index c5de1bc9813..8093cad0043 100644 --- a/openbb_sdk/sdk/provider/openbb_provider/standard_models/balance_sheet.py +++ b/openbb_sdk/sdk/provider/openbb_provider/standard_models/balance_sheet.py @@ -60,7 +60,9 @@ class BalanceSheetData(Data): description="Accrued income taxes, other deferred revenue" ) short_term_debt: Optional[int] = Field( - description="Short-term borrowings, Long-term debt due within one year, Operating lease obligations due within one year, Finance lease obligations due within one year" + description="Short-term borrowings, Long-term debt due within one year, " + "Operating lease obligations due within one year, " + "Finance lease obligations due within one year" ) current_liabilities: Optional[int] diff --git a/openbb_sdk/sdk/provider/openbb_provider/standard_models/institutional_ownership.py b/openbb_sdk/sdk/provider/openbb_provider/standard_models/institutional_ownership.py index 3aff6ff05ae..0b3aed1e0f3 100644 --- a/openbb_sdk/sdk/provider/openbb_provider/standard_models/institutional_ownership.py +++ b/openbb_sdk/sdk/provider/openbb_provider/standard_models/institutional_ownership.py @@ -91,7 +91,8 @@ class InstitutionalOwnershipData(Data, BaseSymbol): description="Total number of call options contracts traded for Apple Inc. on the previous reporting date." ) total_calls_change: int = Field( - description="Change in the total number of call options contracts traded between the current and previous reporting dates." + description="Change in the total number of call options contracts traded between " + "the current and previous reporting dates." ) total_puts: int = Field( description="Total number of put options contracts traded for Apple Inc. on the specified date." @@ -100,10 +101,12 @@ class InstitutionalOwnershipData(Data, BaseSymbol): description="Total number of put options contracts traded for Apple Inc. on the previous reporting date." ) total_puts_change: int = Field( - description="Change in the total number of put options contracts traded between the current and previous reporting dates." + description="Change in the total number of put " + "options contracts traded between the current and previous reporting dates." ) put_call_ratio: float = Field( - description="The put-call ratio, which is the ratio of the total number of put options to call options traded on the specified date." + description="The put-call ratio, which is the ratio of the total number of " + "put options to call options traded on the specified date." ) last_put_call_ratio: float = Field( description="The put-call ratio on the previous reporting date." From 82002f2875689389c47e8752193f07fd69061f2e Mon Sep 17 00:00:00 2001 From: Igor Radovanovic <74266147+IgorWounds@users.noreply.github.com> Date: Wed, 9 Aug 2023 14:03:28 +0200 Subject: [PATCH 5/7] Change StockEOD --- .../app/static/package/__extensions__.py | 41 +- .../openbb_core/app/static/package/crypto.py | 125 +- .../openbb_core/app/static/package/economy.py | 492 ++- .../app/static/package/fixedincome.py | 87 +- .../openbb_core/app/static/package/forex.py | 220 +- .../app/static/package/module_map.json | 74 +- .../openbb_core/app/static/package/news.py | 100 +- .../openbb_core/app/static/package/stocks.py | 463 ++- .../app/static/package/stocks_ca.py | 51 +- .../app/static/package/stocks_dd.py | 284 +- .../app/static/package/stocks_fa.py | 2719 +++++++++++++++-- .../standard_models/stock_eod.py | 7 +- 12 files changed, 3995 insertions(+), 668 deletions(-) diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py index b2942d73300..4a2a8103640 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py @@ -1,15 +1,24 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + from openbb_core.app.static.container import Container class Extensions(Container): @property - def news(self): # route = "/news" - from openbb_core.app.static.package import news + def crypto(self): # route = "/crypto" + from openbb_core.app.static.package import crypto - return news.CLASS_news(command_runner_session=self._command_runner_session) + 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" @@ -26,24 +35,10 @@ class Extensions(Container): return forex.CLASS_forex(command_runner_session=self._command_runner_session) @property - def economy(self): # route = "/economy" - from openbb_core.app.static.package import economy + def news(self): # route = "/news" + from openbb_core.app.static.package import news - return economy.CLASS_economy( - command_runner_session=self._command_runner_session - ) - - @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 stocks(self): # route = "/stocks" - from openbb_core.app.static.package import stocks - - return stocks.CLASS_stocks(command_runner_session=self._command_runner_session) + return news.CLASS_news(command_runner_session=self._command_runner_session) @property def qa(self): # route = "/qa" @@ -51,6 +46,12 @@ class Extensions(Container): return qa.CLASS_qa(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) + @property def ta(self): # route = "/ta" from openbb_core.app.static.package import ta 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 index 79fec6c462b..f8447f19594 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/crypto.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/crypto.py @@ -2,12 +2,11 @@ import datetime import typing -from typing import Annotated, Literal, Optional, Union +from typing import Literal, Optional, Union from pydantic import validate_arguments from openbb_core.app.model.command_output import CommandOutput -from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -17,26 +16,14 @@ class CLASS_crypto(Container): @validate_arguments def load( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="Start date of the data, in YYYY-MM-DD format." - ), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="End date of the data, in YYYY-MM-DD format." - ), - ] = None, + symbol: str, + start_date: Union[datetime.date, None, str] = None, + end_date: Union[datetime.date, None, str] = None, chart: bool = False, - provider: Optional[Literal["polygon", "fmp"]] = None, + provider: Optional[Literal["fmp", "polygon"]] = None, **kwargs ) -> CommandOutput[typing.List]: - """Crypto Intraday Price. + r"""Crypto Intraday Price. openbb @@ -44,7 +31,7 @@ class CLASS_crypto(Container): Parameters ---------- - provider: Literal[polygon, fmp] + provider: Literal[fmp, polygon] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -85,6 +72,30 @@ class CLASS_crypto(Container): vwap : PositiveFloat Volume Weighted Average Price of the symbol. + fmp + === + + Parameters + ---------- + timeseries : Optional[NonNegativeInt] + Number of days to look back. + + + CryptoEOD + --------- + adjClose : float + Adjusted Close Price of the symbol. + unadjustedVolume : float + Unadjusted volume of the symbol. + change : float + Change in the price of the symbol from the previous day. + changePercent : float + Change \% in the price of the symbol. + label : str + Human readable format of the date. + changeOverTime : float + Change \% in the price of the symbol over a period of time. + polygon ======= @@ -107,6 +118,54 @@ class CLASS_crypto(Container): n : PositiveInt The number of transactions for the symbol in the time period. + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp, polygon] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + start_date : Optional[date] + Start date of the data, in YYYY-MM-DD format. + end_date : Optional[date] + End date of the data, in YYYY-MM-DD format. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + CryptoEOD + --------- + date : datetime + The date of the data. + open : PositiveFloat + The open price of the symbol. + high : PositiveFloat + The high price of the symbol. + low : PositiveFloat + The low price of the symbol. + close : PositiveFloat + The close price of the symbol. + volume : PositiveFloat + The volume of the symbol. + vwap : PositiveFloat + Volume Weighted Average Price of the symbol. + fmp === @@ -125,11 +184,33 @@ class CLASS_crypto(Container): change : float Change in the price of the symbol from the previous day. changePercent : float - Change \\% in the price of the symbol. + Change \% in the price of the symbol. label : str Human readable format of the date. changeOverTime : float - Change \\% in the price of the symbol over a period of time.""" + Change \% in the price of the symbol over a period of time. + + polygon + ======= + + Parameters + ---------- + timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] + The timespan of the data. + sort : Literal['asc', 'desc'] + Sort order of the data. + limit : PositiveInt + The number of data entries to return. + adjusted : bool + Whether the data is adjusted. + multiplier : PositiveInt + The multiplier of the timespan. + + + CryptoEOD + --------- + n : PositiveInt + The number of transactions for the symbol in the time period.""" inputs = filter_inputs( provider_choices={ "provider": provider, 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 index 936f448ead8..1e4d29ae7a0 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/economy.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/economy.py @@ -2,14 +2,13 @@ import datetime import typing -from typing import Annotated, List, Literal, Optional, Union +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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -41,12 +40,7 @@ class CLASS_economy(Container): @validate_arguments def const( self, - index: Annotated[ - Literal["nasdaq", "sp500", "dowjones"], - OpenBBCustomParameter( - description="The index for which we want to fetch the constituents." - ), - ] = "dowjones", + index: Literal["nasdaq", "sp500", "dowjones"] = "dowjones", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -54,6 +48,64 @@ class CLASS_economy(Container): """Get the constituents of an index. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + index : Literal['nasdaq', 'sp500', 'dowjones'] + The index for which we want to fetch the constituents. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + MajorIndicesConstituents + ------------------------ + symbol : ConstrainedStrValue + Symbol to get data for. + name : str + The name of the constituent company in the index. + sector : str + The sector the constituent company in the index belongs to. + sub_sector : Optional[str] + The sub-sector the constituent company in the index belongs to. + headquarter : Optional[str] + The location of the headquarter of the constituent company in the index. + date_first_added : Union[date, str, NoneType] + The date the constituent company was added to the index. + cik : int + The Central Index Key of the constituent company in the index. + founded : Union[date, str] + The founding year of the constituent company in the index. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + MajorIndicesConstituents + ------------------------ + All fields are standardized. + + + openbb ====== @@ -131,88 +183,64 @@ class CLASS_economy(Container): @validate_arguments def cpi( self, - countries: Annotated[ - 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", - ] - ], - OpenBBCustomParameter(description="The country or countries to get data."), + 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: Annotated[ - Literal["growth_previous", "growth_same", "index_2015"], - OpenBBCustomParameter(description="The data units."), - ] = "growth_same", - frequency: Annotated[ - Literal["monthly", "quarterly", "annual"], - OpenBBCustomParameter(description="The data time frequency."), - ] = "monthly", - harmonized: typing.Annotated[ - bool, - OpenBBCustomParameter( - description="Whether you wish to obtain harmonized data." - ), - ] = False, - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="Start date of the data, in YYYY-MM-DD format." - ), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="End date of the data, in YYYY-MM-DD format." - ), - ] = None, + 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 @@ -220,6 +248,66 @@ class CLASS_economy(Container): """CPI. + openbb + ====== + + Parameters + ---------- + provider: Literal[fred] + The provider to use for the query. + 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']] + The country or countries to get data. + units : Literal['growth_previous', 'growth_same', 'index_2015'] + The data units. + frequency : Literal['monthly', 'quarterly', 'annual'] + The data time frequency. + harmonized : bool + Whether you wish to obtain harmonized data. + start_date : Optional[date] + Start date of the data, in YYYY-MM-DD format. + end_date : Optional[date] + End date of the data, in YYYY-MM-DD format. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + CPI + --- + date : date + The date of the data. + realtime_start : date + The date the data was updated. + realtime_end : date + The date the data was updated. + value : float + The value of the data. + + fred + ==== + + Parameters + ---------- + All fields are standardized. + + + CPI + --- + All fields are standardized. + + + openbb ====== @@ -326,26 +414,14 @@ class CLASS_economy(Container): @validate_arguments def index( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="Start date of the data, in YYYY-MM-DD format." - ), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="End date of the data, in YYYY-MM-DD format." - ), - ] = None, + symbol: str, + start_date: Union[datetime.date, None, str] = None, + end_date: Union[datetime.date, None, str] = None, chart: bool = False, - provider: Optional[Literal["polygon", "fmp"]] = None, + provider: Optional[Literal["fmp", "polygon"]] = None, **kwargs ) -> CommandOutput[typing.List]: - """Get OHLCV data for an index. + r"""Get OHLCV data for an index. openbb @@ -353,7 +429,7 @@ class CLASS_economy(Container): Parameters ---------- - provider: Literal[polygon, fmp] + provider: Literal[fmp, polygon] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -390,6 +466,34 @@ class CLASS_economy(Container): volume : PositiveFloat The volume of the symbol. + fmp + === + + Parameters + ---------- + timeseries : Optional[NonNegativeInt] + Number of days to look back. + + + MajorIndicesEOD + --------------- + date : datetime + The date of the data. + adjClose : float + Adjusted Close Price of the symbol. + unadjustedVolume : float + Unadjusted volume of the symbol. + change : float + Change in the price of the symbol from the previous day. + changePercent : float + Change \% in the price of the symbol. + vwap : float + Volume Weighted Average Price of the symbol. + label : str + Human readable format of the date. + changeOverTime : float + Change \% in the price of the symbol over a period of time. + polygon ======= @@ -416,6 +520,50 @@ class CLASS_economy(Container): vw : PositiveFloat The volume weighted average price of the symbol. + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp, polygon] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + start_date : Optional[date] + Start date of the data, in YYYY-MM-DD format. + end_date : Optional[date] + End date of the data, in YYYY-MM-DD format. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + MajorIndicesEOD + --------------- + open : PositiveFloat + The open price of the symbol. + high : PositiveFloat + The high price of the symbol. + low : PositiveFloat + The low price of the symbol. + close : PositiveFloat + The close price of the symbol. + volume : PositiveFloat + The volume of the symbol. + fmp === @@ -436,13 +584,39 @@ class CLASS_economy(Container): change : float Change in the price of the symbol from the previous day. changePercent : float - Change \\% in the price of the symbol. + Change \% in the price of the symbol. vwap : float Volume Weighted Average Price of the symbol. label : str Human readable format of the date. changeOverTime : float - Change \\% in the price of the symbol over a period of time.""" + Change \% in the price of the symbol over a period of time. + + polygon + ======= + + Parameters + ---------- + timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] + The timespan of the data. + sort : Literal['asc', 'desc'] + Sort order of the data. + limit : PositiveInt + The number of data entries to return. + adjusted : bool + Whether the data is adjusted. + multiplier : PositiveInt + The multiplier of the timespan. + + + MajorIndicesEOD + --------------- + t : datetime + The timestamp of the data. + n : PositiveInt + The number of transactions for the symbol in the time period. + vw : PositiveFloat + The volume weighted average price of the symbol.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -471,6 +645,57 @@ class CLASS_economy(Container): """AVAILABLE_INDICES. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + All fields are standardized. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + AvailableIndices + ---------------- + symbol : ConstrainedStrValue + Symbol to get data for. + 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 + === + + Parameters + ---------- + All fields are standardized. + + + AvailableIndices + ---------------- + All fields are standardized. + + + openbb ====== @@ -543,6 +768,55 @@ class CLASS_economy(Container): """Market Risk Premium. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + All fields are standardized. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + RiskPremium + ----------- + country : str + Market country. + continent : Optional[str] + Continent of the country. + total_equity_risk_premium : PositiveFloat + The total equity risk premium for the country. + country_risk_premium : NonNegativeFloat + The country-specific risk premium. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + RiskPremium + ----------- + All fields are standardized. + + + openbb ====== 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 index 3763cb95872..6ce0c7dbc95 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/fixedincome.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/fixedincome.py @@ -2,14 +2,13 @@ import datetime import typing -from typing import Annotated, Literal, Optional, Union +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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -19,18 +18,8 @@ class CLASS_fixedincome(Container): @validate_arguments def treasury( self, - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="Start date of the data, in YYYY-MM-DD format." - ), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="End date of the data, in YYYY-MM-DD format." - ), - ] = None, + 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 @@ -38,6 +27,76 @@ class CLASS_fixedincome(Container): """Get treasury rates. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + start_date : Optional[date] + Start date of the data, in YYYY-MM-DD format. + end_date : Optional[date] + End date of the data, in YYYY-MM-DD format. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + TreasuryRates + ------------- + date : date + The date of the data. + 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 + === + + Parameters + ---------- + All fields are standardized. + + + TreasuryRates + ------------- + All fields are standardized. + + + openbb ====== 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 index 94532bb1d20..9c4aaa8851b 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/forex.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/forex.py @@ -2,12 +2,11 @@ import datetime import typing -from typing import Annotated, Literal, Optional, Union +from typing import Literal, Optional, Union from pydantic import validate_arguments from openbb_core.app.model.command_output import CommandOutput -from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -18,7 +17,7 @@ class CLASS_forex(Container): def pairs( self, chart: bool = False, - provider: Optional[Literal["polygon", "fmp"]] = None, + provider: Optional[Literal["fmp", "polygon"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Forex Available Pairs. @@ -29,7 +28,7 @@ class CLASS_forex(Container): Parameters ---------- - provider: Literal[polygon, fmp] + provider: Literal[fmp, polygon] The provider to use for the query. All fields are standardized. @@ -53,6 +52,25 @@ class CLASS_forex(Container): name : str The name of the currency pair. + fmp + === + + Parameters + ---------- + All fields are standardized. + + + ForexPairs + ---------- + symbol : str + The symbol of the currency pair. + currency : str + The base currency of the currency pair. + stockExchange : 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. + polygon ======= @@ -93,6 +111,37 @@ class CLASS_forex(Container): delisted_utc : Optional[datetime] The delisted timestamp in UTC. + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp, polygon] + The provider to use for the query. + All fields are standardized. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + ForexPairs + ---------- + name : str + The name of the currency pair. + fmp === @@ -110,7 +159,47 @@ class CLASS_forex(Container): stockExchange : 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.""" + The short name of the stock exchange of the currency pair. + + polygon + ======= + + Parameters + ---------- + symbol : Optional[str] + Symbol of the pair to search. + date : Optional[date] + A specific date to get data for. + search : Optional[str] + Search for terms within the ticker and/or company name. + active : Optional[Literal[True, False]] + Specify if the tickers returned should be actively traded on the queried date. + order : Optional[Literal['asc', 'desc']] + Order data by ascending or descending. + sort : Optional[Literal['ticker', 'name', 'market', 'locale', 'currency_symbol', 'currency_name', 'base_currency_symbol', 'base_currency_name', 'last_updated_utc', 'delisted_utc']] + Sort field used for ordering. + limit : Optional[PositiveInt] + The number of data entries to return. + + + ForexPairs + ---------- + market : str + The name of the trading market. Always 'fx'. + locale : str + The locale of the currency pair. + currency_symbol : str + The symbol of the quote currency. + currency_name : str + The name of the quote currency. + base_currency_symbol : str + The symbol of the base currency. + base_currency_name : str + The name of the base currency. + last_updated_utc : datetime + The last updated timestamp in UTC. + delisted_utc : Optional[datetime] + The delisted timestamp in UTC.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -131,26 +220,14 @@ class CLASS_forex(Container): @validate_arguments def load( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="Start date of the data, in YYYY-MM-DD format." - ), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="End date of the data, in YYYY-MM-DD format." - ), - ] = None, + symbol: str, + start_date: Union[datetime.date, None, str] = None, + end_date: Union[datetime.date, None, str] = None, chart: bool = False, - provider: Optional[Literal["polygon", "fmp"]] = None, + provider: Optional[Literal["fmp", "polygon"]] = None, **kwargs ) -> CommandOutput[typing.List]: - """Forex Intraday Price. + r"""Forex Intraday Price. openbb @@ -158,7 +235,7 @@ class CLASS_forex(Container): Parameters ---------- - provider: Literal[polygon, fmp] + provider: Literal[fmp, polygon] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -199,6 +276,29 @@ class CLASS_forex(Container): vwap : Optional[PositiveFloat] Volume Weighted Average Price of the symbol. + fmp + === + + Parameters + ---------- + All fields are standardized. + + + ForexEOD + -------- + adjClose : float + Adjusted Close Price of the symbol. + unadjustedVolume : float + Unadjusted volume of the symbol. + change : float + Change in the price of the symbol from the previous day. + changePercent : float + Change \% in the price of the symbol. + label : str + Human readable format of the date. + changeOverTime : float + Change \% in the price of the symbol over a period of time. + polygon ======= @@ -221,6 +321,54 @@ class CLASS_forex(Container): n : PositiveInt The number of transactions for the symbol in the time period. + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp, polygon] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + start_date : Optional[date] + Start date of the data, in YYYY-MM-DD format. + end_date : Optional[date] + End date of the data, in YYYY-MM-DD format. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + ForexEOD + -------- + date : datetime + The date of the data. + open : PositiveFloat + The open price of the symbol. + high : PositiveFloat + The high price of the symbol. + low : PositiveFloat + The low price of the symbol. + close : PositiveFloat + The close price of the symbol. + volume : NonNegativeFloat + The volume of the symbol. + vwap : Optional[PositiveFloat] + Volume Weighted Average Price of the symbol. + fmp === @@ -238,11 +386,33 @@ class CLASS_forex(Container): change : float Change in the price of the symbol from the previous day. changePercent : float - Change \\% in the price of the symbol. + Change \% in the price of the symbol. label : str Human readable format of the date. changeOverTime : float - Change \\% in the price of the symbol over a period of time.""" + Change \% in the price of the symbol over a period of time. + + polygon + ======= + + Parameters + ---------- + timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] + The timespan of the data. + sort : Literal['asc', 'desc'] + Sort order of the data. + limit : PositiveInt + The number of data entries to return. + adjusted : bool + Whether the data is adjusted. + multiplier : PositiveInt + The multiplier of the timespan. + + + ForexEOD + -------- + n : PositiveInt + The number of transactions for the symbol in the time period.""" inputs = filter_inputs( provider_choices={ "provider": provider, 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 index f0b46d3741c..83224aab956 100644 --- 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 @@ -1,14 +1,7 @@ { - "news_globalnews": "/news/globalnews", + "crypto_load": "/crypto/load", "__extensions__": "", - "news": "/news", - "news_sectornews": "/news/sectornews", - "fixedincome_treasury": "/fixedincome/treasury", - "fixedincome": "/fixedincome", - "fixedincome_ycrv": "/fixedincome/ycrv", - "forex_pairs": "/forex/pairs", - "forex": "/forex", - "forex_load": "/forex/load", + "crypto": "/crypto", "economy_corecpi": "/economy/corecpi", "economy": "/economy", "economy_const": "/economy/const", @@ -44,8 +37,41 @@ "economy_trust": "/economy/trust", "economy_usbonds": "/economy/usbonds", "economy_valuation": "/economy/valuation", - "crypto_load": "/crypto/load", - "crypto": "/crypto", + "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", + "qa_normality": "/qa/normality", + "qa": "/qa", + "qa_capm": "/qa/capm", + "qa_qqplot": "/qa/qqplot", + "qa_om": "/qa/om", + "qa_kurtosis": "/qa/kurtosis", + "qa_pick": "/qa/pick", + "qa_spread": "/qa/spread", + "qa_rolling": "/qa/rolling", + "qa_var": "/qa/var", + "qa_line": "/qa/line", + "qa_hist": "/qa/hist", + "qa_unitroot": "/qa/unitroot", + "qa_beta": "/qa/beta", + "qa_sh": "/qa/sh", + "qa_so": "/qa/so", + "qa_cusum": "/qa/cusum", + "qa_raw": "/qa/raw", + "qa_cdf": "/qa/cdf", + "qa_decompose": "/qa/decompose", + "qa_skew": "/qa/skew", + "qa_quantile": "/qa/quantile", + "qa_bw": "/qa/bw", + "qa_es": "/qa/es", + "qa_acf": "/qa/acf", + "qa_summary": "/qa/summary", "stocks_fa_analysis": "/stocks/fa/analysis", "stocks": "/stocks", "stocks_fa": "/stocks/fa", @@ -193,32 +219,6 @@ "stocks_tob": "/stocks/tob", "stocks_quote": "/stocks/quote", "stocks_search": "/stocks/search", - "qa_normality": "/qa/normality", - "qa": "/qa", - "qa_capm": "/qa/capm", - "qa_qqplot": "/qa/qqplot", - "qa_om": "/qa/om", - "qa_kurtosis": "/qa/kurtosis", - "qa_pick": "/qa/pick", - "qa_spread": "/qa/spread", - "qa_rolling": "/qa/rolling", - "qa_var": "/qa/var", - "qa_line": "/qa/line", - "qa_hist": "/qa/hist", - "qa_unitroot": "/qa/unitroot", - "qa_beta": "/qa/beta", - "qa_sh": "/qa/sh", - "qa_so": "/qa/so", - "qa_cusum": "/qa/cusum", - "qa_raw": "/qa/raw", - "qa_cdf": "/qa/cdf", - "qa_decompose": "/qa/decompose", - "qa_skew": "/qa/skew", - "qa_quantile": "/qa/quantile", - "qa_bw": "/qa/bw", - "qa_es": "/qa/es", - "qa_acf": "/qa/acf", - "qa_summary": "/qa/summary", "ta_atr": "/ta/atr", "ta": "/ta", "ta_fib": "/ta/fib", 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 index 703fd2fd0ac..260c4f0dbe6 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/news.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/news.py @@ -9,7 +9,6 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -19,10 +18,7 @@ class CLASS_news(Container): @validate_arguments def globalnews( self, - page: typing.Annotated[ - pydantic.types.NonNegativeInt, - OpenBBCustomParameter(description="The page of the global news."), - ] = 0, + page: pydantic.types.NonNegativeInt = 0, chart: bool = False, provider: Optional[Literal["benzinga", "fmp"]] = None, **kwargs @@ -30,6 +26,100 @@ class CLASS_news(Container): """Global News. + openbb + ====== + + Parameters + ---------- + provider: Literal[benzinga, fmp] + The provider to use for the query. + page : NonNegativeInt + The page of the global news. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + GlobalNews + ---------- + 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 + ======== + + Parameters + ---------- + pageSize : int + The number of results to return per page. + displayOutput : Literal['headline', 'summary', 'full', 'all'] + The type of data to return. + 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[Literal['published_at', 'updated_at', 'title', 'author', 'channel', 'ticker', 'topic', 'content_type']] + 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. + + + GlobalNews + ---------- + All fields are standardized. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + GlobalNews + ---------- + site : str + The site of the news. + + + openbb ====== 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 index b4c1e005c58..14fd74c8164 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks.py @@ -2,7 +2,7 @@ import datetime import typing -from typing import Annotated, Literal, Optional, Union +from typing import Literal, Optional, Union import pydantic from pydantic import validate_arguments @@ -10,7 +10,6 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -84,26 +83,14 @@ class CLASS_stocks(Container): @validate_arguments def load( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="Start date of the data, in YYYY-MM-DD format." - ), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="End date of the data, in YYYY-MM-DD format." - ), - ] = None, + symbol: str, + start_date: Union[datetime.date, None, str] = None, + end_date: Union[datetime.date, None, str] = None, chart: bool = False, - provider: Optional[Literal["polygon", "fmp"]] = None, + provider: Optional[Literal["fmp", "polygon"]] = None, **kwargs ) -> CommandOutput[typing.List]: - """Load stock data for a specific ticker. + r"""Load stock data for a specific ticker. openbb @@ -111,7 +98,7 @@ class CLASS_stocks(Container): Parameters ---------- - provider: Literal[polygon, fmp] + provider: Literal[fmp, polygon] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -147,11 +134,35 @@ class CLASS_stocks(Container): The low price of the symbol. close : PositiveFloat The close price of the symbol. - volume : PositiveFloat + volume : NonNegativeFloat The volume of the symbol. - vwap : PositiveFloat + vwap : Optional[PositiveFloat] Volume Weighted Average Price of the symbol. + fmp + === + + Parameters + ---------- + timeseries : Optional[NonNegativeInt] + Number of days to look back. + + + StockEOD + -------- + adjClose : float + Adjusted Close Price of the symbol. + unadjustedVolume : float + Unadjusted volume of the symbol. + change : float + Change in the price of the symbol from the previous day. + changePercent : float + Change \% in the price of the symbol. + label : str + Human readable format of the date. + changeOverTime : float + Change \% in the price of the symbol over a period of time. + polygon ======= @@ -174,6 +185,54 @@ class CLASS_stocks(Container): n : PositiveInt The number of transactions for the symbol in the time period. + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp, polygon] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + start_date : Optional[date] + Start date of the data, in YYYY-MM-DD format. + end_date : Optional[date] + End date of the data, in YYYY-MM-DD format. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + StockEOD + -------- + date : datetime + The date of the data. + open : PositiveFloat + The open price of the symbol. + high : PositiveFloat + The high price of the symbol. + low : PositiveFloat + The low price of the symbol. + close : PositiveFloat + The close price of the symbol. + volume : NonNegativeFloat + The volume of the symbol. + vwap : Optional[PositiveFloat] + Volume Weighted Average Price of the symbol. + fmp === @@ -192,11 +251,33 @@ class CLASS_stocks(Container): change : float Change in the price of the symbol from the previous day. changePercent : float - Change \\% in the price of the symbol. + Change \% in the price of the symbol. label : str Human readable format of the date. changeOverTime : float - Change \\% in the price of the symbol over a period of time.""" + Change \% in the price of the symbol over a period of time. + + polygon + ======= + + Parameters + ---------- + timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] + The timespan of the data. + sort : Literal['asc', 'desc'] + Sort order of the data. + limit : PositiveInt + The number of data entries to return. + adjusted : bool + Whether the data is adjusted. + multiplier : PositiveInt + The multiplier of the timespan. + + + StockEOD + -------- + n : PositiveInt + The number of transactions for the symbol in the time period.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -221,23 +302,11 @@ class CLASS_stocks(Container): @validate_arguments def news( self, - symbols: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - page: typing.Annotated[ - int, - OpenBBCustomParameter( - description="The page of the stock news to be retrieved." - ), - ] = 0, - limit: Annotated[ - Optional[pydantic.types.NonNegativeInt], - OpenBBCustomParameter( - description="The number of results to return per page." - ), - ] = 15, + symbols: str, + page: int = 0, + limit: Optional[pydantic.types.NonNegativeInt] = 15, chart: bool = False, - provider: Optional[Literal["benzinga", "polygon", "fmp"]] = None, + provider: Optional[Literal["benzinga", "fmp", "polygon"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Get news for one or more stock tickers. @@ -248,7 +317,7 @@ class CLASS_stocks(Container): Parameters ---------- - provider: Literal[benzinga, polygon, fmp] + provider: Literal[benzinga, fmp, polygon] The provider to use for the query. symbols : ConstrainedStrValue Symbol to get data for. @@ -321,6 +390,23 @@ class CLASS_stocks(Container): image : List[BenzingaImage] The images associated with the news. + fmp + === + + Parameters + ---------- + All fields are standardized. + + + StockNews + --------- + symbol : str + Ticker of the fetched news. + image : Optional[str] + URL to the image of the news source. + site : str + Name of the news source. + polygon ======= @@ -367,6 +453,86 @@ class CLASS_stocks(Container): tickers : List[str] Tickers covered in the article. + + + openbb + ====== + + Parameters + ---------- + provider: Literal[benzinga, fmp, polygon] + The provider to use for the query. + symbols : ConstrainedStrValue + Symbol to get data for. + page : int + The page of the stock news to be retrieved. + limit : Optional[NonNegativeInt] + The number of results to return per page. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + StockNews + --------- + date : date + The published date of the news. + title : str + The title of the news. + text : Optional[str] + The text/body of the news. + url : str + The URL of the news. + + benzinga + ======== + + Parameters + ---------- + displayOutput : Literal['headline', 'summary', 'full', 'all'] + The type of data to return. + 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[Literal['published_at', 'updated_at', 'title', 'author', 'channel', 'ticker', 'topic', 'content_type']] + 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. + + + StockNews + --------- + image : List[BenzingaImage] + The images associated with the news. + fmp === @@ -382,7 +548,53 @@ class CLASS_stocks(Container): image : Optional[str] URL to the image of the news source. site : str - Name of the news source.""" + Name of the news source. + + polygon + ======= + + Parameters + ---------- + ticker_lt : Optional[str] + Less than, by default None + ticker_lte : Optional[str] + Less than or equal, by default None + ticker_gt : Optional[str] + Greater than, by default None + ticker_gte : Optional[str] + Greater than or equal, by default None + published_utc : Optional[str] + The published date of the query, by default None + published_utc_lt : Optional[str] + Less than, by default None + published_utc_lte : Optional[str] + Less than or equal, by default None + published_utc_gt : Optional[str] + Greater than, by default None + published_utc_gte : Optional[str] + Greater than or equal, by default None + order : Optional[Literal['asc', 'desc']] + The sort order of the query, by default None + sort : Optional[str] + The sort of the query, by default None + + + StockNews + --------- + amp_url : Optional[str] + AMP URL. + author : Optional[str] + Author of the article. + id : str + Article ID. + image_url : Optional[str] + Image URL. + keywords : Optional[List[str]] + Keywords in the article + publisher : PolygonPublisher + Publisher of the article. + tickers : List[str] + Tickers covered in the article.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -407,13 +619,8 @@ class CLASS_stocks(Container): @validate_arguments def multiples( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - limit: Annotated[ - Optional[int], - OpenBBCustomParameter(description="The number of data entries to return."), - ] = 100, + symbol: str, + limit: Optional[int] = 100, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -573,6 +780,164 @@ class CLASS_stocks(Container): All fields are standardized. + StockMultiples + -------------- + All fields are standardized. + + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + limit : Optional[int] + The number of data entries to return. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + StockMultiples + -------------- + revenue_per_share_ttm : Optional[float] + Revenue per share calculated as trailing twelve months. + net_income_per_share_ttm : Optional[float] + Net income per share calculated as trailing twelve months. + operating_cash_flow_per_share_ttm : Optional[float] + Operating cash flow per share calculated as trailing twelve months. + free_cash_flow_per_share_ttm : Optional[float] + Free cash flow per share calculated as trailing twelve months. + cash_per_share_ttm : Optional[float] + Cash per share calculated as trailing twelve months. + book_value_per_share_ttm : Optional[float] + Book value per share calculated as trailing twelve months. + tangible_book_value_per_share_ttm : Optional[float] + Tangible book value per share calculated as trailing twelve months. + shareholders_equity_per_share_ttm : Optional[float] + Shareholders equity per share calculated as trailing twelve months. + interest_debt_per_share_ttm : Optional[float] + Interest debt per share calculated as trailing twelve months. + market_cap_ttm : Optional[float] + Market capitalization calculated as trailing twelve months. + enterprise_value_ttm : Optional[float] + Enterprise value calculated as trailing twelve months. + pe_ratio_ttm : Optional[float] + Price-to-earnings ratio (P/E ratio) calculated as trailing twelve months. + price_to_sales_ratio_ttm : Optional[float] + Price-to-sales ratio calculated as trailing twelve months. + pocf_ratio_ttm : Optional[float] + Price-to-operating cash flow ratio calculated as trailing twelve months. + pfcf_ratio_ttm : Optional[float] + Price-to-free cash flow ratio calculated as trailing twelve months. + pb_ratio_ttm : Optional[float] + Price-to-book ratio calculated as trailing twelve months. + ptb_ratio_ttm : Optional[float] + Price-to-tangible book ratio calculated as trailing twelve months. + ev_to_sales_ttm : Optional[float] + Enterprise value-to-sales ratio calculated as trailing twelve months. + enterprise_value_over_ebitda_ttm : Optional[float] + Enterprise value-to-EBITDA ratio calculated as trailing twelve months. + ev_to_operating_cash_flow_ttm : Optional[float] + Enterprise value-to-operating cash flow ratio calculated as trailing twelve months. + ev_to_free_cash_flow_ttm : Optional[float] + Enterprise value-to-free cash flow ratio calculated as trailing twelve months. + earnings_yield_ttm : Optional[float] + Earnings yield calculated as trailing twelve months. + free_cash_flow_yield_ttm : Optional[float] + Free cash flow yield calculated as trailing twelve months. + debt_to_equity_ttm : Optional[float] + Debt-to-equity ratio calculated as trailing twelve months. + debt_to_assets_ttm : Optional[float] + Debt-to-assets ratio calculated as trailing twelve months. + net_debt_to_ebitda_ttm : Optional[float] + Net debt-to-EBITDA ratio calculated as trailing twelve months. + current_ratio_ttm : Optional[float] + Current ratio calculated as trailing twelve months. + interest_coverage_ttm : Optional[float] + Interest coverage calculated as trailing twelve months. + income_quality_ttm : Optional[float] + Income quality calculated as trailing twelve months. + dividend_yield_ttm : Optional[float] + Dividend yield calculated as trailing twelve months. + payout_ratio_ttm : Optional[float] + Payout ratio calculated as trailing twelve months. + sales_general_and_administrative_to_revenue_ttm : Optional[float] + Sales general and administrative expenses-to-revenue ratio calculated as trailing twelve months. + research_and_development_to_revenue_ttm : Optional[float] + Research and development expenses-to-revenue ratio calculated as trailing twelve months. + intangibles_to_total_assets_ttm : Optional[float] + Intangibles-to-total assets ratio calculated as trailing twelve months. + capex_to_operating_cash_flow_ttm : Optional[float] + Capital expenditures-to-operating cash flow ratio calculated as trailing twelve months. + capex_to_revenue_ttm : Optional[float] + Capital expenditures-to-revenue ratio calculated as trailing twelve months. + capex_to_depreciation_ttm : Optional[float] + Capital expenditures-to-depreciation ratio calculated as trailing twelve months. + stock_based_compensation_to_revenue_ttm : Optional[float] + Stock-based compensation-to-revenue ratio calculated as trailing twelve months. + graham_number_ttm : Optional[float] + Graham number calculated as trailing twelve months. + roic_ttm : Optional[float] + Return on invested capital calculated as trailing twelve months. + return_on_tangible_assets_ttm : Optional[float] + Return on tangible assets calculated as trailing twelve months. + graham_net_net_ttm : Optional[float] + Graham net-net working capital calculated as trailing twelve months. + working_capital_ttm : Optional[float] + Working capital calculated as trailing twelve months. + tangible_asset_value_ttm : Optional[float] + Tangible asset value calculated as trailing twelve months. + net_current_asset_value_ttm : Optional[float] + Net current asset value calculated as trailing twelve months. + invested_capital_ttm : Optional[float] + Invested capital calculated as trailing twelve months. + average_receivables_ttm : Optional[float] + Average receivables calculated as trailing twelve months. + average_payables_ttm : Optional[float] + Average payables calculated as trailing twelve months. + average_inventory_ttm : Optional[float] + Average inventory calculated as trailing twelve months. + days_sales_outstanding_ttm : Optional[float] + Days sales outstanding calculated as trailing twelve months. + days_payables_outstanding_ttm : Optional[float] + Days payables outstanding calculated as trailing twelve months. + days_of_inventory_on_hand_ttm : Optional[float] + Days of inventory on hand calculated as trailing twelve months. + receivables_turnover_ttm : Optional[float] + Receivables turnover calculated as trailing twelve months. + payables_turnover_ttm : Optional[float] + Payables turnover calculated as trailing twelve months. + inventory_turnover_ttm : Optional[float] + Inventory turnover calculated as trailing twelve months. + roe_ttm : Optional[float] + Return on equity calculated as trailing twelve months. + capex_per_share_ttm : Optional[float] + Capital expenditures per share calculated as trailing twelve months. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + StockMultiples -------------- All fields are standardized.""" 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 index 1dbdff8769e..8474943f413 100644 --- 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 @@ -8,7 +8,6 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -18,9 +17,7 @@ class CLASS_stocks_ca(Container): @validate_arguments def peers( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], + symbol: str, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -28,6 +25,52 @@ class CLASS_stocks_ca(Container): """Company peers. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + StockPeers + ---------- + symbol : str + Symbol representing the entity requested in the data. + peers_list : Optional[List[str]] + A list of stock peers based on sector, exchange and market cap. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + StockPeers + ---------- + All fields are standardized. + + + openbb ====== 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 index 792bc303908..937b90e02bf 100644 --- 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 @@ -1,12 +1,11 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### import typing -from typing import Annotated, Literal, Optional +from typing import Literal, Optional from pydantic import validate_arguments from openbb_core.app.model.command_output import CommandOutput -from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -16,122 +15,111 @@ class CLASS_stocks_dd(Container): @validate_arguments def sec( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - type: Annotated[ - Literal[ - "1", - "1-A", - "1-E", - "1-K", - "1-N", - "1-SA", - "1-U", - "1-Z", - "10", - "10-D", - "10-K", - "10-M", - "10-Q", - "11-K", - "12b-25", - "13F", - "13H", - "144", - "15", - "15F", - "17-H", - "18", - "18-K", - "19b-4", - "19b-4(e)", - "19b-7", - "2-E", - "20-F", - "24F-2", - "25", - "3", - "4", - "40-F", - "5", - "6-K", - "7-M", - "8-A", - "8-K", - "8-M", - "9-M", - "ABS-15G", - "ABS-EE", - "ABS DD-15E", - "ADV", - "ADV-E", - "ADV-H", - "ADV-NR", - "ADV-W", - "ATS", - "ATS-N", - "ATS-R", - "BD", - "BD-N", - "BDW", - "C", - "CA-1", - "CB", - "CFPORTAL", - "CRS", - "CUSTODY", - "D", - "F-1", - "F-10", - "F-3", - "F-4", - "F-6", - "F-7", - "F-8", - "F-80", - "F-N", - "F-X", - "ID", - "MA", - "MA-I", - "MA-NR", - "MA-W", - "MSD", - "MSDW", - "N-14", - "N-17D-1", - "N-17f-1", - "N-17f-2", - "N-18f-1", - "N-1A", - "N-2", - "N-23c-3", - "N-27D-1", - "N-3", - "N-4", - "N-5", - "N-54A", - "N-54C", - "N-6", - "N-6EI-1", - "N-6F", - "N-8A", - "N-8B-2", - "N-8B-4", - "N-8F", - "N-CEN", - ], - OpenBBCustomParameter(description="The type of the SEC filing form."), + symbol: str, + type: Literal[ + "1", + "1-A", + "1-E", + "1-K", + "1-N", + "1-SA", + "1-U", + "1-Z", + "10", + "10-D", + "10-K", + "10-M", + "10-Q", + "11-K", + "12b-25", + "13F", + "13H", + "144", + "15", + "15F", + "17-H", + "18", + "18-K", + "19b-4", + "19b-4(e)", + "19b-7", + "2-E", + "20-F", + "24F-2", + "25", + "3", + "4", + "40-F", + "5", + "6-K", + "7-M", + "8-A", + "8-K", + "8-M", + "9-M", + "ABS-15G", + "ABS-EE", + "ABS DD-15E", + "ADV", + "ADV-E", + "ADV-H", + "ADV-NR", + "ADV-W", + "ATS", + "ATS-N", + "ATS-R", + "BD", + "BD-N", + "BDW", + "C", + "CA-1", + "CB", + "CFPORTAL", + "CRS", + "CUSTODY", + "D", + "F-1", + "F-10", + "F-3", + "F-4", + "F-6", + "F-7", + "F-8", + "F-80", + "F-N", + "F-X", + "ID", + "MA", + "MA-I", + "MA-NR", + "MA-W", + "MSD", + "MSDW", + "N-14", + "N-17D-1", + "N-17f-1", + "N-17f-2", + "N-18f-1", + "N-1A", + "N-2", + "N-23c-3", + "N-27D-1", + "N-3", + "N-4", + "N-5", + "N-54A", + "N-54C", + "N-6", + "N-6EI-1", + "N-6F", + "N-8A", + "N-8B-2", + "N-8B-4", + "N-8F", + "N-CEN", ] = "10-K", - page: Annotated[ - Optional[int], - OpenBBCustomParameter(description="Page number of the results."), - ] = 0, - limit: Annotated[ - Optional[int], - OpenBBCustomParameter(description="The number of data entries to return."), - ] = 100, + page: Optional[int] = 0, + limit: Optional[int] = 100, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -139,6 +127,68 @@ class CLASS_stocks_dd(Container): """SEC Filings. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + type : Literal['1', '1-A', '1-E', '1-K', '1-N', '1-SA', '1-U', '1-Z', '10', '10-D', '10-K', '10-M', '10-Q', '11-K', '12b-25', '13F', '13H', '144', '15', '15F', '17-H', '18', '18-K', '19b-4', '19b-4(e)', '19b-7', '2-E', '20-F', '24F-2', '25', '3', '4', '40-F', '5', '6-K', '7-M', '8-A', '8-K', '8-M', '9-M', 'ABS-15G', 'ABS-EE', 'ABS DD-15E', 'ADV', 'ADV-E', 'ADV-H', 'ADV-NR', 'ADV-W', 'ATS', 'ATS-N', 'ATS-R', 'BD', 'BD-N', 'BDW', 'C', 'CA-1', 'CB', 'CFPORTAL', 'CRS', 'CUSTODY', 'D', 'F-1', 'F-10', 'F-3', 'F-4', 'F-6', 'F-7', 'F-8', 'F-80', 'F-N', 'F-X', 'ID', 'MA', 'MA-I', 'MA-NR', 'MA-W', 'MSD', 'MSDW', 'N-14', 'N-17D-1', 'N-17f-1', 'N-17f-2', 'N-18f-1', 'N-1A', 'N-2', 'N-23c-3', 'N-27D-1', 'N-3', 'N-4', 'N-5', 'N-54A', 'N-54C', 'N-6', 'N-6EI-1', 'N-6F', 'N-8A', 'N-8B-2', 'N-8B-4', 'N-8F', 'N-CEN'] + The type of the SEC filing form. + page : Optional[int] + Page number of the results. + limit : Optional[int] + The number of data entries to return. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + SECFilings + ---------- + symbol : ConstrainedStrValue + Symbol to get data for. + filling_date : datetime + The filling date of the SEC filing. + accepted_date : datetime + 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 + === + + Parameters + ---------- + All fields are standardized. + + + SECFilings + ---------- + All fields are standardized. + + + openbb ====== 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 index 9cf10adfd43..04cf40aae17 100644 --- 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 @@ -2,7 +2,7 @@ import datetime import typing -from typing import Annotated, List, Literal, Optional, Union +from typing import List, Literal, Optional, Union import pydantic from pydantic import validate_arguments @@ -10,7 +10,6 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -37,21 +36,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def balance( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - period: Annotated[ - Literal["annually", "quarterly"], - OpenBBCustomParameter( - description="Period of the data to return (quarterly or annually)." - ), - ] = "annually", - limit: Annotated[ - Optional[pydantic.types.NonNegativeInt], - OpenBBCustomParameter(description="The number of data entries to return."), - ] = 12, + symbol: str, + period: Literal["annually", "quarterly"] = "annually", + limit: Optional[pydantic.types.NonNegativeInt] = 12, chart: bool = False, - provider: Optional[Literal["polygon", "fmp"]] = None, + provider: Optional[Literal["fmp", "polygon"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Balance Sheet. @@ -62,7 +51,7 @@ class CLASS_stocks_fa(Container): Parameters ---------- - provider: Literal[polygon, fmp] + provider: Literal[fmp, polygon] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -175,6 +164,42 @@ class CLASS_stocks_fa(Container): total_liabilities_and_total_equity : Optional[int] None + fmp + === + + Parameters + ---------- + cik : Optional[str] + None + + + BalanceSheet + ------------ + calendarYear : Optional[int] + None + link : Optional[str] + None + finalLink : Optional[str] + None + cashAndShortTermInvestments : Optional[int] + None + goodwillAndIntangibleAssets : Optional[int] + None + deferredRevenueNonCurrent : Optional[int] + None + totalInvestments : Optional[int] + None + capitalLeaseObligations : Optional[int] + None + deferredTaxLiabilitiesNonCurrent : Optional[int] + None + totalNonCurrentLiabilities : Optional[int] + None + totalDebt : Optional[int] + None + netDebt : Optional[int] + None + polygon ======= @@ -218,6 +243,126 @@ class CLASS_stocks_fa(Container): ------------ All fields are standardized. + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp, polygon] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + period : Literal['annually', 'quarterly'] + Period of the data to return (quarterly or annually). + limit : Optional[NonNegativeInt] + The number of data entries to return. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + BalanceSheet + ------------ + date : date + Date of the fetched statement. + symbol : Optional[str] + Symbol of the company. + cik : Optional[int] + Central Index Key. + currency : Optional[str] + Reporting currency. + filing_date : Optional[date] + Filling date. + accepted_date : Optional[datetime] + Accepted date. + period : Optional[str] + Reporting period of the statement. + cash_and_cash_equivalents : Optional[int] + Cash and cash equivalents + short_term_investments : Optional[int] + Short-term investments + inventory : Optional[int] + Inventory + net_receivables : Optional[int] + Receivables, net + other_current_assets : Optional[int] + Other current assets + current_assets : Optional[int] + Total current assets + long_term_investments : Optional[int] + Long-term investments + property_plant_equipment_net : Optional[int] + Property, plant and equipment, net + goodwill : Optional[int] + Goodwill + intangible_assets : Optional[int] + Intangible assets + other_non_current_assets : Optional[int] + Other non-current assets + tax_assets : Optional[int] + Accrued income taxes + other_assets : Optional[int] + Other assets + noncurrent_assets : Optional[int] + None + assets : Optional[int] + None + account_payables : Optional[int] + None + other_current_liabilities : Optional[int] + None + tax_payables : Optional[int] + Accrued income taxes + deferred_revenue : Optional[int] + Accrued income taxes, other deferred revenue + short_term_debt : Optional[int] + Short-term borrowings, Long-term debt due within one year, Operating lease obligations due within one year, Finance lease obligations due within one year + current_liabilities : Optional[int] + None + long_term_debt : Optional[int] + Long-term debt, Operating lease obligations, Long-term finance lease obligations + other_non_current_liabilities : Optional[int] + Deferred income taxes and other + other_liabilities : Optional[int] + None + noncurrent_liabilities : Optional[int] + None + liabilities : Optional[int] + None + common_stock : Optional[int] + None + other_stockholder_equity : Optional[int] + Capital in excess of par value + accumulated_other_comprehensive_income_loss : Optional[int] + Accumulated other comprehensive income (loss) + preferred_stock : Optional[int] + Preferred stock + retained_earnings : Optional[int] + Retained earnings + minority_interest : Optional[int] + Minority interest + total_stockholders_equity : Optional[int] + None + total_equity : Optional[int] + None + total_liabilities_and_stockholders_equity : Optional[int] + None + total_liabilities_and_total_equity : Optional[int] + None + fmp === @@ -252,7 +397,50 @@ class CLASS_stocks_fa(Container): totalDebt : Optional[int] None netDebt : Optional[int] - None""" + None + + polygon + ======= + + Parameters + ---------- + 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. + include_sources : Optional[bool] + Whether to include the sources of the financial statement. + order : Optional[Literal['asc', 'desc']] + The order of the financial statement. + sort : Optional[Literal['filing_date', 'period_of_report_date']] + The sort of the financial statement. + + + BalanceSheet + ------------ + All fields are standardized.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -277,13 +465,8 @@ class CLASS_stocks_fa(Container): @validate_arguments def balance_growth( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - limit: typing.Annotated[ - int, - OpenBBCustomParameter(description="The number of data entries to return."), - ] = 10, + symbol: str, + limit: int = 10, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -413,6 +596,134 @@ class CLASS_stocks_fa(Container): All fields are standardized. + BalanceSheetGrowth + ------------------ + All fields are standardized. + + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + limit : int + The number of data entries to return. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + BalanceSheetGrowth + ------------------ + symbol : ConstrainedStrValue + Symbol to get data for. + date : date + The date of the data. + period : str + The period the statement is returned for. + growth_cash_and_cash_equivalents : float + Growth rate of cash and cash equivalents. + growth_short_term_investments : float + Growth rate of short-term investments. + growth_cash_and_short_term_investments : float + Growth rate of cash and short-term investments. + growth_net_receivables : float + Growth rate of net receivables. + growth_inventory : float + Growth rate of inventory. + growth_other_current_assets : float + Growth rate of other current assets. + growth_total_current_assets : float + Growth rate of total current assets. + growth_property_plant_equipment_net : float + Growth rate of net property, plant, and equipment. + growth_goodwill : float + Growth rate of goodwill. + growth_intangible_assets : float + Growth rate of intangible assets. + growth_goodwill_and_intangible_assets : float + Growth rate of goodwill and intangible assets. + growth_long_term_investments : float + Growth rate of long-term investments. + growth_tax_assets : float + Growth rate of tax assets. + growth_other_non_current_assets : float + Growth rate of other non-current assets. + growth_total_non_current_assets : float + Growth rate of total non-current assets. + growth_other_assets : float + Growth rate of other assets. + growth_total_assets : float + Growth rate of total assets. + growth_account_payables : float + Growth rate of accounts payable. + growth_short_term_debt : float + Growth rate of short-term debt. + growth_tax_payables : float + Growth rate of tax payables. + growth_deferred_revenue : float + Growth rate of deferred revenue. + growth_other_current_liabilities : float + Growth rate of other current liabilities. + growth_total_current_liabilities : float + Growth rate of total current liabilities. + growth_long_term_debt : float + Growth rate of long-term debt. + growth_deferred_revenue_non_current : float + Growth rate of non-current deferred revenue. + growth_deferrred_tax_liabilities_non_current : float + Growth rate of non-current deferred tax liabilities. + growth_other_non_current_liabilities : float + Growth rate of other non-current liabilities. + growth_total_non_current_liabilities : float + Growth rate of total non-current liabilities. + growth_other_liabilities : float + Growth rate of other liabilities. + growth_total_liabilities : float + Growth rate of total liabilities. + growth_common_stock : float + Growth rate of common stock. + growth_retained_earnings : float + Growth rate of retained earnings. + growth_accumulated_other_comprehensive_income_loss : float + Growth rate of accumulated other comprehensive income/loss. + growth_othertotal_stockholders_equity : float + Growth rate of other total stockholders' equity. + growth_total_stockholders_equity : float + Growth rate of total stockholders' equity. + growth_total_liabilities_and_stockholders_equity : float + Growth rate of total liabilities and stockholders' equity. + growth_total_investments : float + Growth rate of total investments. + growth_total_debt : float + Growth rate of total debt. + growth_net_debt : float + Growth rate of net debt. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + BalanceSheetGrowth ------------------ All fields are standardized.""" @@ -439,18 +750,8 @@ class CLASS_stocks_fa(Container): @validate_arguments def cal( self, - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="Start date of the data, in YYYY-MM-DD format." - ), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="End date of the data, in YYYY-MM-DD format." - ), - ] = None, + 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 @@ -458,6 +759,66 @@ class CLASS_stocks_fa(Container): """Show Dividend Calendar for a given start and end dates. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + start_date : Optional[date] + Start date of the data, in YYYY-MM-DD format. + end_date : Optional[date] + End date of the data, in YYYY-MM-DD format. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + DividendCalendar + ---------------- + symbol : ConstrainedStrValue + Symbol to get data for. + date : date + The date of the data. + label : str + The date in human readable form in the calendar. + adj_dividend : Optional[NonNegativeFloat] + The adjusted dividend on a date in the calendar. + dividend : Optional[NonNegativeFloat] + The dividend amount in the calendar. + record_date : Optional[date] + The record date of the dividend in the calendar. + payment_date : Optional[date] + The payment date of the dividend in the calendar. + declaration_date : Optional[date] + The declaration date of the dividend in the calendar. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + DividendCalendar + ---------------- + All fields are standardized. + + + openbb ====== @@ -538,21 +899,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def cash( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - period: Annotated[ - Literal["annually", "quarterly"], - OpenBBCustomParameter( - description="Period of the data to return (quarterly or annually)." - ), - ] = "annually", - limit: Annotated[ - Optional[pydantic.types.NonNegativeInt], - OpenBBCustomParameter(description="The number of data entries to return."), - ] = 12, + symbol: str, + period: Literal["annually", "quarterly"] = "annually", + limit: Optional[pydantic.types.NonNegativeInt] = 12, chart: bool = False, - provider: Optional[Literal["polygon", "fmp"]] = None, + provider: Optional[Literal["fmp", "polygon"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Cash Flow Statement. @@ -563,7 +914,7 @@ class CLASS_stocks_fa(Container): Parameters ---------- - provider: Literal[polygon, fmp] + provider: Literal[fmp, polygon] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -656,6 +1007,24 @@ class CLASS_stocks_fa(Container): cash_at_end_of_period : Optional[int] None + fmp + === + + Parameters + ---------- + cik : Optional[str] + Central Index Key (CIK) of the company. + + + CashFlowStatement + ----------------- + calendarYear : Optional[int] + None + link : Optional[str] + None + finalLink : Optional[str] + None + polygon ======= @@ -699,6 +1068,106 @@ class CLASS_stocks_fa(Container): ----------------- All fields are standardized. + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp, polygon] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + period : Literal['annually', 'quarterly'] + Period of the data to return (quarterly or annually). + limit : Optional[NonNegativeInt] + The number of data entries to return. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + CashFlowStatement + ----------------- + date : date + Date of the fetched statement. + symbol : Optional[str] + Symbol of the company. + cik : Optional[int] + Central Index Key. + currency : Optional[str] + Reporting currency. + filing_date : Optional[date] + Filling date. + accepted_date : Optional[datetime] + Accepted date. + period : Optional[str] + Reporting period of the statement. + cash_at_beginning_of_period : Optional[int] + None + net_income : Optional[int] + None + depreciation_and_amortization : Optional[int] + None + stock_based_compensation : Optional[int] + None + other_non_cash_items : Optional[int] + Other non-cash items. + deferred_income_tax : Optional[int] + Deferred income tax. + inventory : Optional[int] + None + accounts_receivables : Optional[int] + None + accounts_payables : Optional[int] + None + other_working_capital : Optional[int] + Accrued expenses and other, Unearned revenue. + net_cash_flow_from_operating_activities : Optional[int] + None + capital_expenditure : Optional[int] + Purchases of property and equipment. + other_investing_activities : Optional[int] + Proceeds from property and equipment sales and incentives. + acquisitions_net : Optional[int] + Acquisitions, net of cash acquired, and other + sales_maturities_of_investments : Optional[int] + None + purchases_of_investments : Optional[int] + None + net_cash_flow_from_investing_activities : Optional[int] + None + investments_in_property_plant_and_equipment : Optional[int] + None + dividends_paid : Optional[int] + None + common_stock_repurchased : Optional[int] + None + debt_repayment : Optional[int] + None + other_financing_activities : Optional[int] + None + net_cash_flow_from_financing_activities : Optional[int] + None + effect_of_forex_changes_on_cash : Optional[int] + Foreign currency effect on cash, cash equivalents, and restricted cash + net_change_in_cash : Optional[int] + Net increase (decrease) in cash, cash equivalents, and restricted cash + cash_at_end_of_period : Optional[int] + None + fmp === @@ -715,7 +1184,50 @@ class CLASS_stocks_fa(Container): link : Optional[str] None finalLink : Optional[str] - None""" + None + + polygon + ======= + + Parameters + ---------- + 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. + include_sources : Optional[bool] + Whether to include the sources of the financial statement. + order : Optional[Literal['asc', 'desc']] + The order of the financial statement. + sort : Optional[Literal['filing_date', 'period_of_report_date']] + The sort of the financial statement. + + + CashFlowStatement + ----------------- + All fields are standardized.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -740,13 +1252,8 @@ class CLASS_stocks_fa(Container): @validate_arguments def cash_growth( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - limit: typing.Annotated[ - int, - OpenBBCustomParameter(description="The number of data entries to return."), - ] = 10, + symbol: str, + limit: int = 10, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -858,6 +1365,116 @@ class CLASS_stocks_fa(Container): All fields are standardized. + CashFlowStatementGrowth + ----------------------- + All fields are standardized. + + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + limit : int + The number of data entries to return. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + CashFlowStatementGrowth + ----------------------- + symbol : ConstrainedStrValue + Symbol to get data for. + date : date + The date of the data. + period : str + The period the statement is returned for. + growth_net_income : float + Growth rate of net income. + growth_depreciation_and_amortization : float + Growth rate of depreciation and amortization. + growth_deferred_income_tax : float + Growth rate of deferred income tax. + growth_stock_based_compensation : float + Growth rate of stock-based compensation. + growth_change_in_working_capital : float + Growth rate of change in working capital. + growth_accounts_receivables : float + Growth rate of accounts receivables. + growth_inventory : float + Growth rate of inventory. + growth_accounts_payables : float + Growth rate of accounts payables. + growth_other_working_capital : float + Growth rate of other working capital. + growth_other_non_cash_items : float + Growth rate of other non-cash items. + growth_net_cash_provided_by_operating_activities : float + Growth rate of net cash provided by operating activities. + growth_investments_in_property_plant_and_equipment : float + Growth rate of investments in property, plant, and equipment. + growth_acquisitions_net : float + Growth rate of net acquisitions. + growth_purchases_of_investments : float + Growth rate of purchases of investments. + growth_sales_maturities_of_investments : float + Growth rate of sales maturities of investments. + growth_other_investing_activities : float + Growth rate of other investing activities. + growth_net_cash_used_for_investing_activities : float + Growth rate of net cash used for investing activities. + growth_debt_repayment : float + Growth rate of debt repayment. + growth_common_stock_issued : float + Growth rate of common stock issued. + growth_common_stock_repurchased : float + Growth rate of common stock repurchased. + growth_dividends_paid : float + Growth rate of dividends paid. + growth_other_financing_activities : float + Growth rate of other financing activities. + growth_net_cash_used_provided_by_financing_activities : float + Growth rate of net cash used/provided by financing activities. + growth_effect_of_forex_changes_on_cash : float + Growth rate of the effect of foreign exchange changes on cash. + growth_net_change_in_cash : float + Growth rate of net change in cash. + growth_cash_at_end_of_period : float + Growth rate of cash at the end of the period. + growth_cash_at_beginning_of_period : float + Growth rate of cash at the beginning of the period. + growth_operating_cash_flow : float + Growth rate of operating cash flow. + growth_capital_expenditure : float + Growth rate of capital expenditure. + growth_free_cash_flow : float + Growth rate of free cash flow. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + CashFlowStatementGrowth ----------------------- All fields are standardized.""" @@ -884,9 +1501,7 @@ class CLASS_stocks_fa(Container): @validate_arguments def comp( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], + symbol: str, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -894,6 +1509,74 @@ class CLASS_stocks_fa(Container): """Executive Compensation. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + ExecutiveCompensation + --------------------- + symbol : ConstrainedStrValue + Symbol to get data for. + cik : Optional[str] + The Central Index Key (CIK) of the company. + filing_date : date + The date of the filing. + accepted_date : datetime + 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 : PositiveFloat + The salary of the executive. + bonus : NonNegativeFloat + The bonus of the executive. + stock_award : NonNegativeFloat + The stock award of the executive. + incentive_plan_compensation : NonNegativeFloat + The incentive plan compensation of the executive. + all_other_compensation : NonNegativeFloat + The all other compensation of the executive. + total : PositiveFloat + The total compensation of the executive. + url : str + The URL of the filing data. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + ExecutiveCompensation + --------------------- + All fields are standardized. + + + openbb ====== @@ -981,18 +1664,8 @@ class CLASS_stocks_fa(Container): @validate_arguments def comsplit( self, - start_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="Start date of the data, in YYYY-MM-DD format." - ), - ] = None, - end_date: Annotated[ - Union[datetime.date, None, str], - OpenBBCustomParameter( - description="End date of the data, in YYYY-MM-DD format." - ), - ] = None, + 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 @@ -1000,6 +1673,60 @@ class CLASS_stocks_fa(Container): """Stock Split Calendar. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + start_date : Optional[date] + Start date of the data, in YYYY-MM-DD format. + end_date : Optional[date] + End date of the data, in YYYY-MM-DD format. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + StockSplitCalendar + ------------------ + 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 + === + + Parameters + ---------- + All fields are standardized. + + + StockSplitCalendar + ------------------ + All fields are standardized. + + + openbb ====== @@ -1108,9 +1835,7 @@ class CLASS_stocks_fa(Container): @validate_arguments def divs( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], + symbol: str, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1118,6 +1843,62 @@ class CLASS_stocks_fa(Container): """Historical Dividends. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + HistoricalDividends + ------------------- + 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 : Optional[date] + The record date of the historical dividends. + payment_date : Optional[date] + The payment date of the historical dividends. + declaration_date : Optional[date] + The declaration date of the historical dividends. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + HistoricalDividends + ------------------- + All fields are standardized. + + + openbb ====== @@ -1210,13 +1991,8 @@ class CLASS_stocks_fa(Container): @validate_arguments def earning( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - limit: Annotated[ - Optional[int], - OpenBBCustomParameter(description="The number of data entries to return."), - ] = 50, + symbol: str, + limit: Optional[int] = 50, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1224,6 +2000,68 @@ class CLASS_stocks_fa(Container): """Earnings Calendar. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + limit : Optional[int] + The number of data entries to return. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + EarningsCalendar + ---------------- + symbol : ConstrainedStrValue + Symbol to get data for. + date : date + The date of the data. + eps : Optional[NonNegativeFloat] + The EPS of the earnings calendar. + eps_estimated : Optional[NonNegativeFloat] + The estimated EPS of the earnings calendar. + time : str + The time of the earnings calendar. + revenue : Optional[int] + The revenue of the earnings calendar. + revenue_estimated : Optional[int] + The estimated revenue of the earnings calendar. + updated_from_date : Optional[date] + The updated from date of the earnings calendar. + fiscal_date_ending : date + The fiscal date ending of the earnings calendar. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + EarningsCalendar + ---------------- + All fields are standardized. + + + openbb ====== @@ -1306,9 +2144,7 @@ class CLASS_stocks_fa(Container): @validate_arguments def emp( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], + symbol: str, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1316,6 +2152,66 @@ class CLASS_stocks_fa(Container): """Number of Employees. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + HistoricalEmployees + ------------------- + symbol : ConstrainedStrValue + Symbol to get data for. + 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 : str + 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 + === + + Parameters + ---------- + All fields are standardized. + + + HistoricalEmployees + ------------------- + All fields are standardized. + + + openbb ====== @@ -1429,19 +2325,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def est( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - period: Annotated[ - Literal["quarterly", "annually"], - OpenBBCustomParameter( - description="Period of the data to return (quarterly or annually)." - ), - ] = "annually", - limit: typing.Annotated[ - int, - OpenBBCustomParameter(description="The number of data entries to return."), - ] = 30, + symbol: str, + period: Literal["quarterly", "annually"] = "annually", + limit: int = 30, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1449,6 +2335,96 @@ class CLASS_stocks_fa(Container): """Analyst Estimates. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + period : Literal['quarterly', 'annually'] + Period of the data to return (quarterly or annually). + limit : int + The number of data entries to return. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + AnalystEstimates + ---------------- + symbol : ConstrainedStrValue + Symbol to get data for. + date : date + A specific date to get data for. + estimated_revenue_low : int + The estimated revenue low. + estimated_revenue_high : int + The estimated revenue high. + estimated_revenue_avg : int + The estimated revenue average. + estimated_ebitda_low : int + The estimated EBITDA low. + estimated_ebitda_high : int + The estimated EBITDA high. + estimated_ebitda_avg : int + The estimated EBITDA average. + estimated_ebit_low : int + The estimated EBIT low. + estimated_ebit_high : int + The estimated EBIT high. + estimated_ebit_avg : int + The estimated EBIT average. + estimated_net_income_low : int + The estimated net income low. + estimated_net_income_high : int + The estimated net income high. + estimated_net_income_avg : int + The estimated net income average. + estimated_sga_expense_low : int + The estimated SGA expense low. + estimated_sga_expense_high : int + The estimated SGA expense high. + estimated_sga_expense_avg : int + The estimated SGA expense average. + estimated_eps_avg : float + The estimated EPS average. + estimated_eps_high : float + The estimated EPS high. + estimated_eps_low : float + The estimated EPS low. + number_analyst_estimated_revenue : int + The number of analysts who estimated revenue. + number_analysts_estimated_eps : int + The number of analysts who estimated EPS. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + AnalystEstimates + ---------------- + All fields are standardized. + + + openbb ====== @@ -1644,21 +2620,11 @@ class CLASS_stocks_fa(Container): @validate_arguments def income( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - period: Annotated[ - Literal["annually", "quarterly"], - OpenBBCustomParameter( - description="Period of the data to return (quarterly or annually)." - ), - ] = "annually", - limit: Annotated[ - Optional[pydantic.types.NonNegativeInt], - OpenBBCustomParameter(description="The number of data entries to return."), - ] = 12, + symbol: str, + period: Literal["annually", "quarterly"] = "annually", + limit: Optional[pydantic.types.NonNegativeInt] = 12, chart: bool = False, - provider: Optional[Literal["polygon", "fmp"]] = None, + provider: Optional[Literal["fmp", "polygon"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Income Statement. @@ -1669,7 +2635,7 @@ class CLASS_stocks_fa(Container): Parameters ---------- - provider: Literal[polygon, fmp] + provider: Literal[fmp, polygon] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -1754,6 +2720,34 @@ class CLASS_stocks_fa(Container): weighted_average_shares_outstanding_dil : Optional[int] Weighted average shares outstanding diluted. + fmp + === + + Parameters + ---------- + cik : Optional[str] + The CIK of the company if no symbol is provided. + + + IncomeStatement + --------------- + calendarYear : Optional[int] + None + grossProfitRatio : Optional[float] + None + ebitdaratio : Optional[float] + None + operatingIncomeRatio : Optional[float] + None + incomeBeforeTaxRatio : Optional[float] + None + netIncomeRatio : Optional[float] + None + link : Optional[str] + None + finalLink : Optional[str] + None + polygon ======= @@ -1810,6 +2804,98 @@ class CLASS_stocks_fa(Container): preferred_stock_dividends_and_other_adjustments : Optional[float] None + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp, polygon] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + period : Literal['annually', 'quarterly'] + Period of the data to return (quarterly or annually). + limit : Optional[NonNegativeInt] + The number of data entries to return. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + IncomeStatement + --------------- + date : date + Date of the income statement. + symbol : str + Symbol of the company. + cik : Optional[int] + Central Index Key. + currency : Optional[str] + Reporting currency. + filing_date : Optional[date] + Filling date. + accepted_date : Optional[datetime] + Accepted date. + period : Optional[str] + Period of the income statement. + revenue : Optional[int] + Revenue. + cost_of_revenue : Optional[int] + Cost of revenue. + gross_profit : Optional[int] + Gross profit. + research_and_development_expenses : Optional[int] + Research and development expenses. + general_and_administrative_expenses : Optional[int] + General and administrative expenses. + selling_and_marketing_expenses : Optional[float] + Selling and marketing expenses. + selling_general_and_administrative_expenses : Optional[int] + Selling, general and administrative expenses. + other_expenses : Optional[int] + Other expenses. + operating_expenses : Optional[int] + Operating expenses. + depreciation_and_amortization : Optional[int] + Depreciation and amortization. + ebitda : Optional[int] + Earnings before interest, taxes, depreciation and amortization. + operating_income : Optional[int] + Operating income. + interest_income : Optional[int] + Interest income. + interest_expense : Optional[int] + Interest expense. + total_other_income_expenses_net : Optional[int] + Total other income expenses net. + income_before_tax : Optional[int] + Income before tax. + income_tax_expense : Optional[int] + Income tax expense. + net_income : Optional[int] + Net income. + eps : Optional[float] + Earnings per share. + eps_diluted : Optional[float] + Earnings per share diluted. + weighted_average_shares_outstanding : Optional[int] + Weighted average shares outstanding. + weighted_average_shares_outstanding_dil : Optional[int] + Weighted average shares outstanding diluted. + fmp === @@ -1836,6 +2922,62 @@ class CLASS_stocks_fa(Container): link : Optional[str] None finalLink : Optional[str] + None + + polygon + ======= + + Parameters + ---------- + 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. + include_sources : Optional[bool] + Whether to include the sources of the financial statement. + order : Optional[Literal['asc', 'desc']] + The order of the financial statement. + sort : Optional[Literal['filing_date', 'period_of_report_date']] + The sort of the financial statement. + + + IncomeStatement + --------------- + income_loss_from_continuing_operations_after_tax : Optional[float] + None + benefits_costs_expenses : Optional[float] + None + net_income_loss_attributable_to_noncontrolling_interest : Optional[int] + None + net_income_loss_attributable_to_parent : Optional[float] + None + net_income_loss_available_to_common_stockholders_basic : Optional[float] + None + participating_securities_distributed_and_undistributed_earnings_loss_basic : Optional[float] + None + preferred_stock_dividends_and_other_adjustments : Optional[float] None""" inputs = filter_inputs( provider_choices={ @@ -1861,19 +3003,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def income_growth( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - limit: typing.Annotated[ - int, - OpenBBCustomParameter(description="The number of data entries to return."), - ] = 10, - period: Annotated[ - Literal["annually", "quarterly"], - OpenBBCustomParameter( - description="Period of the data to return (quarterly or annually)." - ), - ] = "annually", + symbol: str, + limit: int = 10, + period: Literal["annually", "quarterly"] = "annually", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1881,6 +3013,110 @@ class CLASS_stocks_fa(Container): """Income Statement Growth. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + limit : int + The number of data entries to return. + period : Literal['annually', 'quarterly'] + Period of the data to return (quarterly or annually). + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + IncomeStatementGrowth + --------------------- + symbol : ConstrainedStrValue + Symbol to get data for. + date : date + The date of the data. + period : str + The period the statement is returned for. + growth_revenue : float + Growth rate of total revenue. + growth_cost_of_revenue : float + Growth rate of cost of goods sold. + growth_gross_profit : float + Growth rate of gross profit. + growth_gross_profit_ratio : float + Growth rate of gross profit as a percentage of revenue. + growth_research_and_development_expenses : float + Growth rate of expenses on research and development. + growth_general_and_administrative_expenses : float + Growth rate of general and administrative expenses. + growth_selling_and_marketing_expenses : float + Growth rate of expenses on selling and marketing activities. + growth_other_expenses : float + Growth rate of other operating expenses. + growth_operating_expenses : float + Growth rate of total operating expenses. + growth_cost_and_expenses : float + Growth rate of total costs and expenses. + growth_interest_expense : float + Growth rate of interest expenses. + growth_depreciation_and_amortization : float + Growth rate of depreciation and amortization expenses. + growth_ebitda : float + Growth rate of Earnings Before Interest, Taxes, Depreciation, and Amortization. + growth_ebitda_ratio : float + Growth rate of EBITDA as a percentage of revenue. + growth_operating_income : float + Growth rate of operating income. + growth_operating_income_ratio : float + Growth rate of operating income as a percentage of revenue. + growth_total_other_income_expenses_net : float + Growth rate of net total other income and expenses. + growth_income_before_tax : float + Growth rate of income before taxes. + growth_income_before_tax_ratio : float + Growth rate of income before taxes as a percentage of revenue. + growth_income_tax_expense : float + Growth rate of income tax expenses. + growth_net_income : float + Growth rate of net income. + growth_net_income_ratio : float + Growth rate of net income as a percentage of revenue. + growth_eps : float + Growth rate of Earnings Per Share (EPS). + growth_eps_diluted : float + Growth rate of diluted Earnings Per Share (EPS). + growth_weighted_average_shs_out : float + Growth rate of weighted average shares outstanding. + growth_weighted_average_shs_out_dil : float + Growth rate of diluted weighted average shares outstanding. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + IncomeStatementGrowth + --------------------- + All fields are standardized. + + + openbb ====== @@ -2006,48 +3242,34 @@ class CLASS_stocks_fa(Container): @validate_arguments def ins( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - transactionType: Annotated[ - Optional[ - List[ - Literal[ - "A-Award", - "C-Conversion", - "D-Return", - "E-ExpireShort", - "F-InKind", - "G-Gift", - "H-ExpireLong", - "I-Discretionary", - "J-Other", - "L-Small", - "M-Exempt", - "O-OutOfTheMoney", - "P-Purchase", - "S-Sale", - "U-Tender", - "W-Will", - "X-InTheMoney", - "Z-Trust", - ] + symbol: str, + transactionType: Optional[ + List[ + Literal[ + "A-Award", + "C-Conversion", + "D-Return", + "E-ExpireShort", + "F-InKind", + "G-Gift", + "H-ExpireLong", + "I-Discretionary", + "J-Other", + "L-Small", + "M-Exempt", + "O-OutOfTheMoney", + "P-Purchase", + "S-Sale", + "U-Tender", + "W-Will", + "X-InTheMoney", + "Z-Trust", ] - ], - OpenBBCustomParameter(description="The type of the transaction."), + ] ] = ["P-Purchase"], - reportingCik: Annotated[ - Optional[int], - OpenBBCustomParameter(description="The CIK of the reporting owner."), - ] = None, - companyCik: Annotated[ - Optional[int], - OpenBBCustomParameter(description="The CIK of the company owner."), - ] = None, - page: Annotated[ - Optional[int], - OpenBBCustomParameter(description="The page number of the data to fetch."), - ] = 0, + reportingCik: Optional[int] = None, + companyCik: Optional[int] = None, + page: Optional[int] = 0, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2055,6 +3277,86 @@ class CLASS_stocks_fa(Container): """Stock Insider Trading. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + transactionType : Optional[List[Literal['A-Award', 'C-Conversion', 'D-Return', 'E-ExpireShort', 'F-InKind', 'G-Gift', 'H-ExpireLong', 'I-Discretionary', 'J-Other', 'L-Small', 'M-Exempt', 'O-OutOfTheMoney', 'P-Purchase', 'S-Sale', 'U-Tender', 'W-Will', 'X-InTheMoney', 'Z-Trust']]] + The type of the transaction. + reportingCik : Optional[int] + The CIK of the reporting owner. + companyCik : Optional[int] + The CIK of the company owner. + page : Optional[int] + The page number of the data to fetch. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + StockInsiderTrading + ------------------- + symbol : ConstrainedStrValue + Symbol to get data for. + filing_date : datetime + The filing date of the stock insider trading. + transaction_date : date + The transaction date of the stock insider trading. + reporting_cik : int + The reporting CIK of the stock insider trading. + transaction_type : str + The transaction type of the stock insider trading. + securities_owned : int + The securities owned of the stock insider trading. + company_cik : int + The company CIK of the stock insider trading. + reporting_name : str + The reporting name of the stock insider trading. + type_of_owner : str + The type of owner of the stock insider trading. + acquistion_or_disposition : str + The acquistion or disposition of the stock insider trading. + form_type : str + The form type of the stock insider trading. + securities_transacted : float + The securities transacted of the stock insider trading. + price : float + The price of the stock insider trading. + security_name : str + The security name of the stock insider trading. + link : str + The link of the stock insider trading. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + StockInsiderTrading + ------------------- + All fields are standardized. + + + openbb ====== @@ -2158,16 +3460,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def ins_own( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - include_current_quarter: typing.Annotated[ - bool, OpenBBCustomParameter(description="Include current quarter data.") - ] = False, - date: Annotated[ - Optional[datetime.date], - OpenBBCustomParameter(description="A specific date to get data for."), - ] = None, + symbol: str, + include_current_quarter: bool = False, + date: Optional[datetime.date] = None, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2287,6 +3582,124 @@ class CLASS_stocks_fa(Container): All fields are standardized. + InstitutionalOwnership + ---------------------- + All fields are standardized. + + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + include_current_quarter : bool + Include current quarter data. + date : Optional[date] + A specific date to get data for. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + InstitutionalOwnership + ---------------------- + symbol : ConstrainedStrValue + Symbol to get data for. + cik : Optional[str] + The CIK of the company. + date : date + The date of the data. + 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 : Optional[int] + The number of 13F shares. + last_number_of_13f_shares : Optional[int] + The number of 13F shares in the last quarter. + number_of_13f_shares_change : Optional[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 + he 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. + reduced_positions_change : int + The change in the number of reduced positions. + total_calls : int + Total number of call options contracts traded for Apple Inc. on the specified date. + last_total_calls : int + Total number of call options contracts traded for Apple Inc. on the previous reporting date. + total_calls_change : int + Change in the total number of call options contracts traded between the current and previous reporting dates. + total_puts : int + Total number of put options contracts traded for Apple Inc. on the specified date. + last_total_puts : int + Total number of put options contracts traded for Apple Inc. on the previous reporting date. + total_puts_change : int + Change in the total number of put options contracts traded between the current and previous reporting dates. + put_call_ratio : float + The put-call ratio, which is the ratio of the total number of put options to call options traded on the specified date. + last_put_call_ratio : float + The put-call ratio on the previous reporting date. + put_call_ratio_change : float + Change in the put-call ratio between the current and previous reporting dates. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + InstitutionalOwnership ---------------------- All fields are standardized.""" @@ -2330,19 +3743,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def metrics( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - period: Annotated[ - Literal["annually", "quarterly"], - OpenBBCustomParameter( - description="Period of the data to return (quarterly or annually)." - ), - ] = "annually", - limit: Annotated[ - Optional[int], - OpenBBCustomParameter(description="The number of data entries to return."), - ] = 100, + symbol: str, + period: Literal["annually", "quarterly"] = "annually", + limit: Optional[int] = 100, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2510,6 +3913,172 @@ class CLASS_stocks_fa(Container): All fields are standardized. + KeyMetrics + ---------- + All fields are standardized. + + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + period : Literal['annually', 'quarterly'] + Period of the data to return (quarterly or annually). + limit : Optional[int] + The number of data entries to return. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + KeyMetrics + ---------- + symbol : ConstrainedStrValue + Symbol to get data for. + date : date + The date of the data. + period : str + The period of the data. + revenue_per_share : Optional[float] + Revenue per share + net_income_per_share : Optional[float] + Net income per share + operating_cash_flow_per_share : Optional[float] + Operating cash flow per share + free_cash_flow_per_share : Optional[float] + Free cash flow per share + cash_per_share : Optional[float] + Cash per share + book_value_per_share : Optional[float] + Book value per share + tangible_book_value_per_share : Optional[float] + Tangible book value per share + shareholders_equity_per_share : Optional[float] + Shareholders equity per share + interest_debt_per_share : Optional[float] + Interest debt per share + market_cap : Optional[float] + Market capitalization + enterprise_value : Optional[float] + Enterprise value + pe_ratio : Optional[float] + Price-to-earnings ratio (P/E ratio) + price_to_sales_ratio : Optional[float] + Price-to-sales ratio + pocf_ratio : Optional[float] + Price-to-operating cash flow ratio + pfcf_ratio : Optional[float] + Price-to-free cash flow ratio + pb_ratio : Optional[float] + Price-to-book ratio + ptb_ratio : Optional[float] + Price-to-tangible book ratio + ev_to_sales : Optional[float] + Enterprise value-to-sales ratio + enterprise_value_over_ebitda : Optional[float] + Enterprise value-to-EBITDA ratio + ev_to_operating_cash_flow : Optional[float] + Enterprise value-to-operating cash flow ratio + ev_to_free_cash_flow : Optional[float] + Enterprise value-to-free cash flow ratio + earnings_yield : Optional[float] + Earnings yield + free_cash_flow_yield : Optional[float] + Free cash flow yield + debt_to_equity : Optional[float] + Debt-to-equity ratio + debt_to_assets : Optional[float] + Debt-to-assets ratio + net_debt_to_ebitda : Optional[float] + Net debt-to-EBITDA ratio + current_ratio : Optional[float] + Current ratio + interest_coverage : Optional[float] + Interest coverage + income_quality : Optional[float] + Income quality + dividend_yield : Optional[float] + Dividend yield + payout_ratio : Optional[float] + Payout ratio + sales_general_and_administrative_to_revenue : Optional[float] + Sales general and administrative expenses-to-revenue ratio + research_and_development_to_revenue : Optional[float] + Research and development expenses-to-revenue ratio + intangibles_to_total_assets : Optional[float] + Intangibles-to-total assets ratio + capex_to_operating_cash_flow : Optional[float] + Capital expenditures-to-operating cash flow ratio + capex_to_revenue : Optional[float] + Capital expenditures-to-revenue ratio + capex_to_depreciation : Optional[float] + Capital expenditures-to-depreciation ratio + stock_based_compensation_to_revenue : Optional[float] + Stock-based compensation-to-revenue ratio + graham_number : Optional[float] + Graham number + roic : Optional[float] + Return on invested capital + return_on_tangible_assets : Optional[float] + Return on tangible assets + graham_net_net : Optional[float] + Graham net-net working capital + working_capital : Optional[float] + Working capital + tangible_asset_value : Optional[float] + Tangible asset value + net_current_asset_value : Optional[float] + Net current asset value + invested_capital : Optional[float] + Invested capital + average_receivables : Optional[float] + Average receivables + average_payables : Optional[float] + Average payables + average_inventory : Optional[float] + Average inventory + days_sales_outstanding : Optional[float] + Days sales outstanding + days_payables_outstanding : Optional[float] + Days payables outstanding + days_of_inventory_on_hand : Optional[float] + Days of inventory on hand + receivables_turnover : Optional[float] + Receivables turnover + payables_turnover : Optional[float] + Payables turnover + inventory_turnover : Optional[float] + Inventory turnover + roe : Optional[float] + Return on equity + capex_per_share : Optional[float] + Capital expenditures per share + + fmp + === + + Parameters + ---------- + All fields are standardized. + + KeyMetrics ---------- All fields are standardized.""" @@ -2537,9 +4106,7 @@ class CLASS_stocks_fa(Container): @validate_arguments def mgmt( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], + symbol: str, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2547,6 +4114,62 @@ class CLASS_stocks_fa(Container): """Key Executives. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + KeyExecutives + ------------- + title : str + Designation of the key executive. + name : str + Name of the key executive. + pay : Optional[int] + Pay of the key executive. + currency_pay : str + The currency of the pay. + gender : Optional[str] + Gender of the key executive. + year_born : Optional[str] + Birth year of the key executive. + title_since : Optional[int] + Date the tile was held since. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + KeyExecutives + ------------- + All fields are standardized. + + + openbb ====== @@ -2655,9 +4278,7 @@ class CLASS_stocks_fa(Container): @validate_arguments def overview( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], + symbol: str, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2773,6 +4394,120 @@ class CLASS_stocks_fa(Container): All fields are standardized. + CompanyOverview + --------------- + All fields are standardized. + + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + CompanyOverview + --------------- + symbol : ConstrainedStrValue + Symbol to get data for. + 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 + === + + Parameters + ---------- + All fields are standardized. + + CompanyOverview --------------- All fields are standardized.""" @@ -2798,17 +4533,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def own( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - date: typing.Annotated[ - datetime.date, - OpenBBCustomParameter(description="A specific date to get data for."), - ], - page: Annotated[ - Optional[int], - OpenBBCustomParameter(description="The page number of the data to fetch."), - ] = 0, + symbol: str, + date: datetime.date, + page: Optional[int] = 0, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2934,6 +4661,130 @@ class CLASS_stocks_fa(Container): All fields are standardized. + StockOwnership + -------------- + All fields are standardized. + + + + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + date : date + A specific date to get data for. + page : Optional[int] + The page number of the data to fetch. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + StockOwnership + -------------- + date : date + The date of the data. + cik : int + The cik of the stock ownership. + filing_date : date + The filing date of the stock ownership. + investor_name : str + The investor name of the stock ownership. + symbol : str + The symbol of the stock ownership. + security_name : str + The security name of the stock ownership. + type_of_security : str + The type of security of the stock ownership. + security_cusip : str + The security cusip of the stock ownership. + shares_type : str + The shares type of the stock ownership. + put_call_share : str + The put call share of the stock ownership. + investment_discretion : str + The investment discretion of the stock ownership. + industry_title : str + The industry title of the stock ownership. + weight : float + The weight of the stock ownership. + last_weight : float + The last weight of the stock ownership. + change_in_weight : float + The change in weight of the stock ownership. + change_in_weight_percentage : float + The change in weight percentage of the stock ownership. + market_value : int + The market value of the stock ownership. + last_market_value : int + The last market value of the stock ownership. + change_in_market_value : int + The change in market value of the stock ownership. + change_in_market_value_percentage : float + The change in market value percentage of the stock ownership. + shares_number : int + The shares number of the stock ownership. + last_shares_number : int + The last shares number of the stock ownership. + change_in_shares_number : float + The change in shares number of the stock ownership. + change_in_shares_number_percentage : float + The change in shares number percentage of the stock ownership. + quarter_end_price : float + The quarter end price of the stock ownership. + avg_price_paid : float + The average price paid of the stock ownership. + is_new : bool + Is the stock ownership new. + is_sold_out : bool + Is the stock ownership sold out. + ownership : float + How much is the ownership. + last_ownership : float + The last ownership amount. + change_in_ownership : float + The change in ownership amount. + change_in_ownership_percentage : float + The change in ownership percentage. + holding_period : int + The holding period of the stock ownership. + first_added : date + The first added date of the stock ownership. + performance : float + The performance of the stock ownership. + performance_percentage : float + The performance percentage of the stock ownership. + last_performance : float + The last performance of the stock ownership. + change_in_performance : float + The change in performance of the stock ownership. + is_counted_for_performance : bool + Is the stock ownership counted for performance. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + StockOwnership -------------- All fields are standardized.""" @@ -2961,9 +4812,7 @@ class CLASS_stocks_fa(Container): @validate_arguments def pt( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], + symbol: str, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2971,6 +4820,58 @@ class CLASS_stocks_fa(Container): """Price Target Consensus. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + PriceTargetConsensus + -------------------- + symbol : ConstrainedStrValue + Symbol to get data for. + 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 + === + + Parameters + ---------- + All fields are standardized. + + + PriceTargetConsensus + -------------------- + All fields are standardized. + + + openbb ====== @@ -3042,9 +4943,7 @@ class CLASS_stocks_fa(Container): @validate_arguments def pta( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], + symbol: str, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3052,6 +4951,70 @@ class CLASS_stocks_fa(Container): """Price Target. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + PriceTarget + ----------- + symbol : ConstrainedStrValue + Symbol to get data for. + published_date : datetime + The published date of the price target. + news_url : str + The news URL of the price target. + news_title : Optional[str] + The news title of the price target. + analyst_name : Optional[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 + === + + Parameters + ---------- + All fields are standardized. + + + PriceTarget + ----------- + All fields are standardized. + + + openbb ====== @@ -3186,19 +5149,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def revgeo( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - period: Annotated[ - Literal["quarterly", "annually"], - OpenBBCustomParameter( - description="Period of the data to return (quarterly or annually)." - ), - ] = "annually", - structure: Annotated[ - Literal["hierarchical", "flat"], - OpenBBCustomParameter(description="The structure of the returned data."), - ] = "flat", + symbol: str, + period: Literal["quarterly", "annually"] = "annually", + structure: Literal["hierarchical", "flat"] = "flat", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3206,6 +5159,64 @@ class CLASS_stocks_fa(Container): """Revenue Geographic. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + period : Literal['quarterly', 'annually'] + Period of the data to return (quarterly or annually). + structure : Literal['hierarchical', 'flat'] + The structure of the returned data. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + RevenueGeographic + ----------------- + date : date + The date of the data. + americas : Optional[int] + The revenue from the the American segment. + europe : Optional[int] + The revenue from the the European segment. + greater_china : Optional[int] + The revenue from the the Greater China segment. + japan : Optional[int] + The revenue from the the Japan segment. + rest_of_asia_pacific : Optional[int] + The revenue from the the Rest of Asia Pacific segment. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + RevenueGeographic + ----------------- + All fields are standardized. + + + openbb ====== @@ -3285,19 +5296,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def revseg( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - period: Annotated[ - Literal["quarterly", "annually"], - OpenBBCustomParameter( - description="Period of the data to return (quarterly or annually)." - ), - ] = "annually", - structure: Annotated[ - Literal["hierarchical", "flat"], - OpenBBCustomParameter(description="The structure of the returned data."), - ] = "flat", + symbol: str, + period: Literal["quarterly", "annually"] = "annually", + structure: Literal["hierarchical", "flat"] = "flat", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3305,6 +5306,56 @@ class CLASS_stocks_fa(Container): """Revenue Business Line. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + period : Literal['quarterly', 'annually'] + Period of the data to return (quarterly or annually). + structure : Literal['hierarchical', 'flat'] + The structure of the returned data. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + RevenueBusinessLine + ------------------- + date : date + The date of the data. + business_line : Mapping[str, int] + Day level data containing the revenue of the business line. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + RevenueBusinessLine + ------------------- + All fields are standardized. + + + openbb ====== @@ -3442,9 +5493,7 @@ class CLASS_stocks_fa(Container): @validate_arguments def shrs( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], + symbol: str, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3452,6 +5501,60 @@ class CLASS_stocks_fa(Container): """Share Statistics. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + ShareStatistics + --------------- + symbol : ConstrainedStrValue + Symbol to get data for. + date : date + A specific date to get data for. + free_float : float + The percentage of unrestricted shares of a publicly-traded company. + float_shares : float + The number of shares available for trading by the general public. + outstanding_shares : float + The total number of shares of a publicly-traded company. + source : str + Source of the received data. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + ShareStatistics + --------------- + All fields are standardized. + + + openbb ====== @@ -3525,9 +5628,7 @@ class CLASS_stocks_fa(Container): @validate_arguments def split( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], + symbol: str, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3535,6 +5636,56 @@ class CLASS_stocks_fa(Container): """Historical Stock Splits. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + HistoricalStockSplits + --------------------- + date : date + The date of the data. + 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 + === + + Parameters + ---------- + All fields are standardized. + + + HistoricalStockSplits + --------------------- + All fields are standardized. + + + openbb ====== @@ -3621,21 +5772,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def transcript( self, - symbol: typing.Annotated[ - str, OpenBBCustomParameter(description="Symbol to get data for.") - ], - year: typing.Annotated[ - int, - OpenBBCustomParameter( - description="The year of the earnings call transcript." - ), - ], - quarter: Annotated[ - Literal[1, 2, 3, 4], - OpenBBCustomParameter( - description="The quarter of the earnings call transcript." - ), - ] = 1, + symbol: str, + year: int, + quarter: Literal[1, 2, 3, 4] = 1, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3643,6 +5782,62 @@ class CLASS_stocks_fa(Container): """Earnings Call Transcript. + openbb + ====== + + Parameters + ---------- + provider: Literal[fmp] + The provider to use for the query. + symbol : ConstrainedStrValue + Symbol to get data for. + year : int + The year of the earnings call transcript. + quarter : Literal[1, 2, 3, 4] + The quarter of the earnings call transcript. + + Returns + ------- + CommandOutput + results: List[Data] + Serializable results. + provider: Optional[PROVIDERS] + Provider name. + warnings: Optional[List[Warning_]] + List of warnings. + error: Optional[Error] + Caught exceptions. + chart: Optional[Chart] + Chart object. + + + EarningsCallTranscript + ---------------------- + symbol : ConstrainedStrValue + Symbol to get data for. + quarter : int + The quarter of the earnings call transcript. + year : int + The year of the earnings call transcript. + date : datetime + The date of the data. + content : str + The content of the earnings call transcript. + + fmp + === + + Parameters + ---------- + All fields are standardized. + + + EarningsCallTranscript + ---------------------- + All fields are standardized. + + + openbb ====== diff --git a/openbb_sdk/sdk/provider/openbb_provider/standard_models/stock_eod.py b/openbb_sdk/sdk/provider/openbb_provider/standard_models/stock_eod.py index ead78900695..680b93730e1 100644 --- a/openbb_sdk/sdk/provider/openbb_provider/standard_models/stock_eod.py +++ b/openbb_sdk/sdk/provider/openbb_provider/standard_models/stock_eod.py @@ -4,12 +4,11 @@ from datetime import date, datetime from typing import Optional -from pydantic import Field, PositiveFloat - from openbb_provider.abstract.data import Data from openbb_provider.abstract.query_params import QueryParams from openbb_provider.standard_models.base import BaseSymbol from openbb_provider.utils.descriptions import DATA_DESCRIPTIONS, QUERY_DESCRIPTIONS +from pydantic import Field, NonNegativeFloat, PositiveFloat class StockEODQueryParams(QueryParams, BaseSymbol): @@ -33,5 +32,5 @@ class StockEODData(Data): high: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("high", "")) low: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("low", "")) close: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("close", "")) - volume: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("volume", "")) - vwap: PositiveFloat = Field(description=DATA_DESCRIPTIONS.get("vwap", "")) + volume: NonNegativeFloat = Field(description=DATA_DESCRIPTIONS.get("volume", "")) + vwap: Optional[PositiveFloat] = Field(description=DATA_DESCRIPTIONS.get("vwap", "")) From f479375871e4dd5b869ca22b499c68fa0f99c618 Mon Sep 17 00:00:00 2001 From: Pratyush Shukla Date: Wed, 9 Aug 2023 20:08:28 +0530 Subject: [PATCH 6/7] fixed `StockNewsData` date type --- openbb_sdk/providers/fmp/openbb_fmp/models/stock_news.py | 1 - .../provider/openbb_provider/standard_models/stock_news.py | 6 +++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_news.py b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_news.py index 90f9a1ded37..7e0bd8c873b 100644 --- a/openbb_sdk/providers/fmp/openbb_fmp/models/stock_news.py +++ b/openbb_sdk/providers/fmp/openbb_fmp/models/stock_news.py @@ -58,4 +58,3 @@ class FMPStockNewsFetcher( @staticmethod def transform_data(data: List[FMPStockNewsData]) -> List[FMPStockNewsData]: return data - return data diff --git a/openbb_sdk/sdk/provider/openbb_provider/standard_models/stock_news.py b/openbb_sdk/sdk/provider/openbb_provider/standard_models/stock_news.py index 080e7f16eff..507d57a6a99 100644 --- a/openbb_sdk/sdk/provider/openbb_provider/standard_models/stock_news.py +++ b/openbb_sdk/sdk/provider/openbb_provider/standard_models/stock_news.py @@ -1,7 +1,7 @@ """Stock News Data Model.""" -from datetime import date as dateType +from datetime import datetime from typing import Optional from pydantic import Field, NonNegativeInt, validator @@ -23,14 +23,14 @@ class StockNewsQueryParams(QueryParams): ) @validator("symbols", pre=True) - def time_validate(cls, v: str): # pylint: disable=E0213 + def symbol_validate(cls, v: str): # pylint: disable=E0213 return v.upper() class StockNewsData(Data): """Stock News data.""" - date: dateType = Field(description="The published date of the news.") + date: datetime = Field(description="The published date of the news.") title: str = Field(description="The title of the news.") text: Optional[str] = Field(default=None, description="The text/body of the news.") url: str = Field(description="The URL of the news.") From fd64bd7fb77aed3f502e8ba90f2ce9124b8c929c Mon Sep 17 00:00:00 2001 From: hjoaquim Date: Wed, 9 Aug 2023 16:29:38 +0100 Subject: [PATCH 7/7] new static asstes and fixed openbb custom argumet --- .../openbb_core/app/model/custom_parameter.py | 6 +- .../app/static/package/__extensions__.py | 34 +- .../openbb_core/app/static/package/crypto.py | 125 +- .../openbb_core/app/static/package/economy.py | 492 +-- .../app/static/package/fixedincome.py | 87 +- .../openbb_core/app/static/package/forex.py | 220 +- .../app/static/package/module_map.json | 74 +- .../openbb_core/app/static/package/news.py | 100 +- .../openbb_core/app/static/package/stocks.py | 461 +-- .../app/static/package/stocks_ca.py | 51 +- .../app/static/package/stocks_dd.py | 284 +- .../app/static/package/stocks_fa.py | 2719 ++--------------- 12 files changed, 665 insertions(+), 3988 deletions(-) diff --git a/openbb_sdk/sdk/core/openbb_core/app/model/custom_parameter.py b/openbb_sdk/sdk/core/openbb_core/app/model/custom_parameter.py index 48beef06f9d..0bd65b27060 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/model/custom_parameter.py +++ b/openbb_sdk/sdk/core/openbb_core/app/model/custom_parameter.py @@ -1,7 +1,11 @@ +from typing import Optional from pydantic import BaseModel class OpenBBCustomParameter(BaseModel): """Custom parameter for OpenBB.""" - description: str + description: Optional[str] = None + + class Config: + frozen = True diff --git a/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py b/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py index 4a2a8103640..10f2b50a9ae 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/__extensions__.py @@ -7,18 +7,10 @@ from openbb_core.app.static.container import Container class Extensions(Container): @property - def crypto(self): # route = "/crypto" - from openbb_core.app.static.package import crypto + def news(self): # route = "/news" + from openbb_core.app.static.package import news - 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 - ) + return news.CLASS_news(command_runner_session=self._command_runner_session) @property def fixedincome(self): # route = "/fixedincome" @@ -35,16 +27,18 @@ class Extensions(Container): 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 + def economy(self): # route = "/economy" + from openbb_core.app.static.package import economy - return news.CLASS_news(command_runner_session=self._command_runner_session) + return economy.CLASS_economy( + command_runner_session=self._command_runner_session + ) @property - def qa(self): # route = "/qa" - from openbb_core.app.static.package import qa + def crypto(self): # route = "/crypto" + from openbb_core.app.static.package import crypto - return qa.CLASS_qa(command_runner_session=self._command_runner_session) + return crypto.CLASS_crypto(command_runner_session=self._command_runner_session) @property def stocks(self): # route = "/stocks" @@ -52,6 +46,12 @@ class Extensions(Container): return stocks.CLASS_stocks(command_runner_session=self._command_runner_session) + @property + def qa(self): # route = "/qa" + from openbb_core.app.static.package import qa + + return qa.CLASS_qa(command_runner_session=self._command_runner_session) + @property def ta(self): # route = "/ta" from openbb_core.app.static.package import ta 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 index f8447f19594..79fec6c462b 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/crypto.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/crypto.py @@ -2,11 +2,12 @@ import datetime import typing -from typing import Literal, Optional, Union +from typing import Annotated, Literal, Optional, Union from pydantic import validate_arguments from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -16,14 +17,26 @@ class CLASS_crypto(Container): @validate_arguments def load( self, - symbol: str, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: - r"""Crypto Intraday Price. + """Crypto Intraday Price. openbb @@ -31,7 +44,7 @@ class CLASS_crypto(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -72,30 +85,6 @@ class CLASS_crypto(Container): vwap : PositiveFloat Volume Weighted Average Price of the symbol. - fmp - === - - Parameters - ---------- - timeseries : Optional[NonNegativeInt] - Number of days to look back. - - - CryptoEOD - --------- - adjClose : float - Adjusted Close Price of the symbol. - unadjustedVolume : float - Unadjusted volume of the symbol. - change : float - Change in the price of the symbol from the previous day. - changePercent : float - Change \% in the price of the symbol. - label : str - Human readable format of the date. - changeOverTime : float - Change \% in the price of the symbol over a period of time. - polygon ======= @@ -118,54 +107,6 @@ class CLASS_crypto(Container): n : PositiveInt The number of transactions for the symbol in the time period. - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp, polygon] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - start_date : Optional[date] - Start date of the data, in YYYY-MM-DD format. - end_date : Optional[date] - End date of the data, in YYYY-MM-DD format. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - CryptoEOD - --------- - date : datetime - The date of the data. - open : PositiveFloat - The open price of the symbol. - high : PositiveFloat - The high price of the symbol. - low : PositiveFloat - The low price of the symbol. - close : PositiveFloat - The close price of the symbol. - volume : PositiveFloat - The volume of the symbol. - vwap : PositiveFloat - Volume Weighted Average Price of the symbol. - fmp === @@ -184,33 +125,11 @@ class CLASS_crypto(Container): change : float Change in the price of the symbol from the previous day. changePercent : float - Change \% in the price of the symbol. + Change \\% in the price of the symbol. label : str Human readable format of the date. changeOverTime : float - Change \% in the price of the symbol over a period of time. - - polygon - ======= - - Parameters - ---------- - timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] - The timespan of the data. - sort : Literal['asc', 'desc'] - Sort order of the data. - limit : PositiveInt - The number of data entries to return. - adjusted : bool - Whether the data is adjusted. - multiplier : PositiveInt - The multiplier of the timespan. - - - CryptoEOD - --------- - n : PositiveInt - The number of transactions for the symbol in the time period.""" + Change \\% in the price of the symbol over a period of time.""" inputs = filter_inputs( provider_choices={ "provider": provider, 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 index 1e4d29ae7a0..936f448ead8 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/economy.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/economy.py @@ -2,13 +2,14 @@ import datetime import typing -from typing import List, Literal, Optional, Union +from typing import Annotated, 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -40,7 +41,12 @@ class CLASS_economy(Container): @validate_arguments def const( self, - index: Literal["nasdaq", "sp500", "dowjones"] = "dowjones", + index: Annotated[ + Literal["nasdaq", "sp500", "dowjones"], + OpenBBCustomParameter( + description="The index for which we want to fetch the constituents." + ), + ] = "dowjones", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -48,64 +54,6 @@ class CLASS_economy(Container): """Get the constituents of an index. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - index : Literal['nasdaq', 'sp500', 'dowjones'] - The index for which we want to fetch the constituents. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - MajorIndicesConstituents - ------------------------ - symbol : ConstrainedStrValue - Symbol to get data for. - name : str - The name of the constituent company in the index. - sector : str - The sector the constituent company in the index belongs to. - sub_sector : Optional[str] - The sub-sector the constituent company in the index belongs to. - headquarter : Optional[str] - The location of the headquarter of the constituent company in the index. - date_first_added : Union[date, str, NoneType] - The date the constituent company was added to the index. - cik : int - The Central Index Key of the constituent company in the index. - founded : Union[date, str] - The founding year of the constituent company in the index. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - MajorIndicesConstituents - ------------------------ - All fields are standardized. - - - openbb ====== @@ -183,64 +131,88 @@ class CLASS_economy(Container): @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", - ] + countries: Annotated[ + 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", + ] + ], + OpenBBCustomParameter(description="The country or countries to get data."), ], - 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, + units: Annotated[ + Literal["growth_previous", "growth_same", "index_2015"], + OpenBBCustomParameter(description="The data units."), + ] = "growth_same", + frequency: Annotated[ + Literal["monthly", "quarterly", "annual"], + OpenBBCustomParameter(description="The data time frequency."), + ] = "monthly", + harmonized: typing.Annotated[ + bool, + OpenBBCustomParameter( + description="Whether you wish to obtain harmonized data." + ), + ] = False, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, provider: Optional[Literal["fred"]] = None, **kwargs @@ -248,66 +220,6 @@ class CLASS_economy(Container): """CPI. - openbb - ====== - - Parameters - ---------- - provider: Literal[fred] - The provider to use for the query. - 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']] - The country or countries to get data. - units : Literal['growth_previous', 'growth_same', 'index_2015'] - The data units. - frequency : Literal['monthly', 'quarterly', 'annual'] - The data time frequency. - harmonized : bool - Whether you wish to obtain harmonized data. - start_date : Optional[date] - Start date of the data, in YYYY-MM-DD format. - end_date : Optional[date] - End date of the data, in YYYY-MM-DD format. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - CPI - --- - date : date - The date of the data. - realtime_start : date - The date the data was updated. - realtime_end : date - The date the data was updated. - value : float - The value of the data. - - fred - ==== - - Parameters - ---------- - All fields are standardized. - - - CPI - --- - All fields are standardized. - - - openbb ====== @@ -414,14 +326,26 @@ class CLASS_economy(Container): @validate_arguments def index( self, - symbol: str, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: - r"""Get OHLCV data for an index. + """Get OHLCV data for an index. openbb @@ -429,7 +353,7 @@ class CLASS_economy(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -466,34 +390,6 @@ class CLASS_economy(Container): volume : PositiveFloat The volume of the symbol. - fmp - === - - Parameters - ---------- - timeseries : Optional[NonNegativeInt] - Number of days to look back. - - - MajorIndicesEOD - --------------- - date : datetime - The date of the data. - adjClose : float - Adjusted Close Price of the symbol. - unadjustedVolume : float - Unadjusted volume of the symbol. - change : float - Change in the price of the symbol from the previous day. - changePercent : float - Change \% in the price of the symbol. - vwap : float - Volume Weighted Average Price of the symbol. - label : str - Human readable format of the date. - changeOverTime : float - Change \% in the price of the symbol over a period of time. - polygon ======= @@ -520,50 +416,6 @@ class CLASS_economy(Container): vw : PositiveFloat The volume weighted average price of the symbol. - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp, polygon] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - start_date : Optional[date] - Start date of the data, in YYYY-MM-DD format. - end_date : Optional[date] - End date of the data, in YYYY-MM-DD format. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - MajorIndicesEOD - --------------- - open : PositiveFloat - The open price of the symbol. - high : PositiveFloat - The high price of the symbol. - low : PositiveFloat - The low price of the symbol. - close : PositiveFloat - The close price of the symbol. - volume : PositiveFloat - The volume of the symbol. - fmp === @@ -584,39 +436,13 @@ class CLASS_economy(Container): change : float Change in the price of the symbol from the previous day. changePercent : float - Change \% in the price of the symbol. + Change \\% in the price of the symbol. vwap : float Volume Weighted Average Price of the symbol. label : str Human readable format of the date. changeOverTime : float - Change \% in the price of the symbol over a period of time. - - polygon - ======= - - Parameters - ---------- - timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] - The timespan of the data. - sort : Literal['asc', 'desc'] - Sort order of the data. - limit : PositiveInt - The number of data entries to return. - adjusted : bool - Whether the data is adjusted. - multiplier : PositiveInt - The multiplier of the timespan. - - - MajorIndicesEOD - --------------- - t : datetime - The timestamp of the data. - n : PositiveInt - The number of transactions for the symbol in the time period. - vw : PositiveFloat - The volume weighted average price of the symbol.""" + Change \\% in the price of the symbol over a period of time.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -645,57 +471,6 @@ class CLASS_economy(Container): """AVAILABLE_INDICES. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - All fields are standardized. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - AvailableIndices - ---------------- - symbol : ConstrainedStrValue - Symbol to get data for. - 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 - === - - Parameters - ---------- - All fields are standardized. - - - AvailableIndices - ---------------- - All fields are standardized. - - - openbb ====== @@ -768,55 +543,6 @@ class CLASS_economy(Container): """Market Risk Premium. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - All fields are standardized. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - RiskPremium - ----------- - country : str - Market country. - continent : Optional[str] - Continent of the country. - total_equity_risk_premium : PositiveFloat - The total equity risk premium for the country. - country_risk_premium : NonNegativeFloat - The country-specific risk premium. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - RiskPremium - ----------- - All fields are standardized. - - - openbb ====== 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 index 6ce0c7dbc95..3763cb95872 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/fixedincome.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/fixedincome.py @@ -2,13 +2,14 @@ import datetime import typing -from typing import Literal, Optional, Union +from typing import Annotated, 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -18,8 +19,18 @@ class CLASS_fixedincome(Container): @validate_arguments def treasury( self, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -27,76 +38,6 @@ class CLASS_fixedincome(Container): """Get treasury rates. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - start_date : Optional[date] - Start date of the data, in YYYY-MM-DD format. - end_date : Optional[date] - End date of the data, in YYYY-MM-DD format. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - TreasuryRates - ------------- - date : date - The date of the data. - 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 - === - - Parameters - ---------- - All fields are standardized. - - - TreasuryRates - ------------- - All fields are standardized. - - - openbb ====== 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 index 9c4aaa8851b..94532bb1d20 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/forex.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/forex.py @@ -2,11 +2,12 @@ import datetime import typing -from typing import Literal, Optional, Union +from typing import Annotated, Literal, Optional, Union from pydantic import validate_arguments from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -17,7 +18,7 @@ class CLASS_forex(Container): def pairs( self, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Forex Available Pairs. @@ -28,7 +29,7 @@ class CLASS_forex(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. All fields are standardized. @@ -52,25 +53,6 @@ class CLASS_forex(Container): name : str The name of the currency pair. - fmp - === - - Parameters - ---------- - All fields are standardized. - - - ForexPairs - ---------- - symbol : str - The symbol of the currency pair. - currency : str - The base currency of the currency pair. - stockExchange : 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. - polygon ======= @@ -111,37 +93,6 @@ class CLASS_forex(Container): delisted_utc : Optional[datetime] The delisted timestamp in UTC. - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp, polygon] - The provider to use for the query. - All fields are standardized. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - ForexPairs - ---------- - name : str - The name of the currency pair. - fmp === @@ -159,47 +110,7 @@ class CLASS_forex(Container): stockExchange : 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. - - polygon - ======= - - Parameters - ---------- - symbol : Optional[str] - Symbol of the pair to search. - date : Optional[date] - A specific date to get data for. - search : Optional[str] - Search for terms within the ticker and/or company name. - active : Optional[Literal[True, False]] - Specify if the tickers returned should be actively traded on the queried date. - order : Optional[Literal['asc', 'desc']] - Order data by ascending or descending. - sort : Optional[Literal['ticker', 'name', 'market', 'locale', 'currency_symbol', 'currency_name', 'base_currency_symbol', 'base_currency_name', 'last_updated_utc', 'delisted_utc']] - Sort field used for ordering. - limit : Optional[PositiveInt] - The number of data entries to return. - - - ForexPairs - ---------- - market : str - The name of the trading market. Always 'fx'. - locale : str - The locale of the currency pair. - currency_symbol : str - The symbol of the quote currency. - currency_name : str - The name of the quote currency. - base_currency_symbol : str - The symbol of the base currency. - base_currency_name : str - The name of the base currency. - last_updated_utc : datetime - The last updated timestamp in UTC. - delisted_utc : Optional[datetime] - The delisted timestamp in UTC.""" + The short name of the stock exchange of the currency pair.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -220,14 +131,26 @@ class CLASS_forex(Container): @validate_arguments def load( self, - symbol: str, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: - r"""Forex Intraday Price. + """Forex Intraday Price. openbb @@ -235,7 +158,7 @@ class CLASS_forex(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -276,29 +199,6 @@ class CLASS_forex(Container): vwap : Optional[PositiveFloat] Volume Weighted Average Price of the symbol. - fmp - === - - Parameters - ---------- - All fields are standardized. - - - ForexEOD - -------- - adjClose : float - Adjusted Close Price of the symbol. - unadjustedVolume : float - Unadjusted volume of the symbol. - change : float - Change in the price of the symbol from the previous day. - changePercent : float - Change \% in the price of the symbol. - label : str - Human readable format of the date. - changeOverTime : float - Change \% in the price of the symbol over a period of time. - polygon ======= @@ -321,54 +221,6 @@ class CLASS_forex(Container): n : PositiveInt The number of transactions for the symbol in the time period. - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp, polygon] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - start_date : Optional[date] - Start date of the data, in YYYY-MM-DD format. - end_date : Optional[date] - End date of the data, in YYYY-MM-DD format. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - ForexEOD - -------- - date : datetime - The date of the data. - open : PositiveFloat - The open price of the symbol. - high : PositiveFloat - The high price of the symbol. - low : PositiveFloat - The low price of the symbol. - close : PositiveFloat - The close price of the symbol. - volume : NonNegativeFloat - The volume of the symbol. - vwap : Optional[PositiveFloat] - Volume Weighted Average Price of the symbol. - fmp === @@ -386,33 +238,11 @@ class CLASS_forex(Container): change : float Change in the price of the symbol from the previous day. changePercent : float - Change \% in the price of the symbol. + Change \\% in the price of the symbol. label : str Human readable format of the date. changeOverTime : float - Change \% in the price of the symbol over a period of time. - - polygon - ======= - - Parameters - ---------- - timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] - The timespan of the data. - sort : Literal['asc', 'desc'] - Sort order of the data. - limit : PositiveInt - The number of data entries to return. - adjusted : bool - Whether the data is adjusted. - multiplier : PositiveInt - The multiplier of the timespan. - - - ForexEOD - -------- - n : PositiveInt - The number of transactions for the symbol in the time period.""" + Change \\% in the price of the symbol over a period of time.""" inputs = filter_inputs( provider_choices={ "provider": provider, 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 index 83224aab956..f0b46d3741c 100644 --- 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 @@ -1,7 +1,14 @@ { - "crypto_load": "/crypto/load", + "news_globalnews": "/news/globalnews", "__extensions__": "", - "crypto": "/crypto", + "news": "/news", + "news_sectornews": "/news/sectornews", + "fixedincome_treasury": "/fixedincome/treasury", + "fixedincome": "/fixedincome", + "fixedincome_ycrv": "/fixedincome/ycrv", + "forex_pairs": "/forex/pairs", + "forex": "/forex", + "forex_load": "/forex/load", "economy_corecpi": "/economy/corecpi", "economy": "/economy", "economy_const": "/economy/const", @@ -37,41 +44,8 @@ "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", - "qa_normality": "/qa/normality", - "qa": "/qa", - "qa_capm": "/qa/capm", - "qa_qqplot": "/qa/qqplot", - "qa_om": "/qa/om", - "qa_kurtosis": "/qa/kurtosis", - "qa_pick": "/qa/pick", - "qa_spread": "/qa/spread", - "qa_rolling": "/qa/rolling", - "qa_var": "/qa/var", - "qa_line": "/qa/line", - "qa_hist": "/qa/hist", - "qa_unitroot": "/qa/unitroot", - "qa_beta": "/qa/beta", - "qa_sh": "/qa/sh", - "qa_so": "/qa/so", - "qa_cusum": "/qa/cusum", - "qa_raw": "/qa/raw", - "qa_cdf": "/qa/cdf", - "qa_decompose": "/qa/decompose", - "qa_skew": "/qa/skew", - "qa_quantile": "/qa/quantile", - "qa_bw": "/qa/bw", - "qa_es": "/qa/es", - "qa_acf": "/qa/acf", - "qa_summary": "/qa/summary", + "crypto_load": "/crypto/load", + "crypto": "/crypto", "stocks_fa_analysis": "/stocks/fa/analysis", "stocks": "/stocks", "stocks_fa": "/stocks/fa", @@ -219,6 +193,32 @@ "stocks_tob": "/stocks/tob", "stocks_quote": "/stocks/quote", "stocks_search": "/stocks/search", + "qa_normality": "/qa/normality", + "qa": "/qa", + "qa_capm": "/qa/capm", + "qa_qqplot": "/qa/qqplot", + "qa_om": "/qa/om", + "qa_kurtosis": "/qa/kurtosis", + "qa_pick": "/qa/pick", + "qa_spread": "/qa/spread", + "qa_rolling": "/qa/rolling", + "qa_var": "/qa/var", + "qa_line": "/qa/line", + "qa_hist": "/qa/hist", + "qa_unitroot": "/qa/unitroot", + "qa_beta": "/qa/beta", + "qa_sh": "/qa/sh", + "qa_so": "/qa/so", + "qa_cusum": "/qa/cusum", + "qa_raw": "/qa/raw", + "qa_cdf": "/qa/cdf", + "qa_decompose": "/qa/decompose", + "qa_skew": "/qa/skew", + "qa_quantile": "/qa/quantile", + "qa_bw": "/qa/bw", + "qa_es": "/qa/es", + "qa_acf": "/qa/acf", + "qa_summary": "/qa/summary", "ta_atr": "/ta/atr", "ta": "/ta", "ta_fib": "/ta/fib", 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 index 260c4f0dbe6..703fd2fd0ac 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/news.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/news.py @@ -9,6 +9,7 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -18,7 +19,10 @@ class CLASS_news(Container): @validate_arguments def globalnews( self, - page: pydantic.types.NonNegativeInt = 0, + page: typing.Annotated[ + pydantic.types.NonNegativeInt, + OpenBBCustomParameter(description="The page of the global news."), + ] = 0, chart: bool = False, provider: Optional[Literal["benzinga", "fmp"]] = None, **kwargs @@ -26,100 +30,6 @@ class CLASS_news(Container): """Global News. - openbb - ====== - - Parameters - ---------- - provider: Literal[benzinga, fmp] - The provider to use for the query. - page : NonNegativeInt - The page of the global news. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - GlobalNews - ---------- - 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 - ======== - - Parameters - ---------- - pageSize : int - The number of results to return per page. - displayOutput : Literal['headline', 'summary', 'full', 'all'] - The type of data to return. - 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[Literal['published_at', 'updated_at', 'title', 'author', 'channel', 'ticker', 'topic', 'content_type']] - 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. - - - GlobalNews - ---------- - All fields are standardized. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - GlobalNews - ---------- - site : str - The site of the news. - - - openbb ====== 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 index 14fd74c8164..109a1e9c076 100644 --- a/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks.py +++ b/openbb_sdk/sdk/core/openbb_core/app/static/package/stocks.py @@ -2,7 +2,7 @@ import datetime import typing -from typing import Literal, Optional, Union +from typing import Annotated, Literal, Optional, Union import pydantic from pydantic import validate_arguments @@ -10,6 +10,7 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -83,14 +84,26 @@ class CLASS_stocks(Container): @validate_arguments def load( self, - symbol: str, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: - r"""Load stock data for a specific ticker. + """Load stock data for a specific ticker. openbb @@ -98,7 +111,7 @@ class CLASS_stocks(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -139,30 +152,6 @@ class CLASS_stocks(Container): vwap : Optional[PositiveFloat] Volume Weighted Average Price of the symbol. - fmp - === - - Parameters - ---------- - timeseries : Optional[NonNegativeInt] - Number of days to look back. - - - StockEOD - -------- - adjClose : float - Adjusted Close Price of the symbol. - unadjustedVolume : float - Unadjusted volume of the symbol. - change : float - Change in the price of the symbol from the previous day. - changePercent : float - Change \% in the price of the symbol. - label : str - Human readable format of the date. - changeOverTime : float - Change \% in the price of the symbol over a period of time. - polygon ======= @@ -185,54 +174,6 @@ class CLASS_stocks(Container): n : PositiveInt The number of transactions for the symbol in the time period. - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp, polygon] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - start_date : Optional[date] - Start date of the data, in YYYY-MM-DD format. - end_date : Optional[date] - End date of the data, in YYYY-MM-DD format. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - StockEOD - -------- - date : datetime - The date of the data. - open : PositiveFloat - The open price of the symbol. - high : PositiveFloat - The high price of the symbol. - low : PositiveFloat - The low price of the symbol. - close : PositiveFloat - The close price of the symbol. - volume : NonNegativeFloat - The volume of the symbol. - vwap : Optional[PositiveFloat] - Volume Weighted Average Price of the symbol. - fmp === @@ -251,33 +192,11 @@ class CLASS_stocks(Container): change : float Change in the price of the symbol from the previous day. changePercent : float - Change \% in the price of the symbol. + Change \\% in the price of the symbol. label : str Human readable format of the date. changeOverTime : float - Change \% in the price of the symbol over a period of time. - - polygon - ======= - - Parameters - ---------- - timespan : Literal['minute', 'hour', 'day', 'week', 'month', 'quarter', 'year'] - The timespan of the data. - sort : Literal['asc', 'desc'] - Sort order of the data. - limit : PositiveInt - The number of data entries to return. - adjusted : bool - Whether the data is adjusted. - multiplier : PositiveInt - The multiplier of the timespan. - - - StockEOD - -------- - n : PositiveInt - The number of transactions for the symbol in the time period.""" + Change \\% in the price of the symbol over a period of time.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -302,11 +221,23 @@ class CLASS_stocks(Container): @validate_arguments def news( self, - symbols: str, - page: int = 0, - limit: Optional[pydantic.types.NonNegativeInt] = 15, + symbols: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + page: typing.Annotated[ + int, + OpenBBCustomParameter( + description="The page of the stock news to be retrieved." + ), + ] = 0, + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], + OpenBBCustomParameter( + description="The number of results to return per page." + ), + ] = 15, chart: bool = False, - provider: Optional[Literal["benzinga", "fmp", "polygon"]] = None, + provider: Optional[Literal["benzinga", "polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Get news for one or more stock tickers. @@ -317,7 +248,7 @@ class CLASS_stocks(Container): Parameters ---------- - provider: Literal[benzinga, fmp, polygon] + provider: Literal[benzinga, polygon, fmp] The provider to use for the query. symbols : ConstrainedStrValue Symbol to get data for. @@ -343,7 +274,7 @@ class CLASS_stocks(Container): StockNews --------- - date : date + date : datetime The published date of the news. title : str The title of the news. @@ -390,23 +321,6 @@ class CLASS_stocks(Container): image : List[BenzingaImage] The images associated with the news. - fmp - === - - Parameters - ---------- - All fields are standardized. - - - StockNews - --------- - symbol : str - Ticker of the fetched news. - image : Optional[str] - URL to the image of the news source. - site : str - Name of the news source. - polygon ======= @@ -453,86 +367,6 @@ class CLASS_stocks(Container): tickers : List[str] Tickers covered in the article. - - - openbb - ====== - - Parameters - ---------- - provider: Literal[benzinga, fmp, polygon] - The provider to use for the query. - symbols : ConstrainedStrValue - Symbol to get data for. - page : int - The page of the stock news to be retrieved. - limit : Optional[NonNegativeInt] - The number of results to return per page. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - StockNews - --------- - date : date - The published date of the news. - title : str - The title of the news. - text : Optional[str] - The text/body of the news. - url : str - The URL of the news. - - benzinga - ======== - - Parameters - ---------- - displayOutput : Literal['headline', 'summary', 'full', 'all'] - The type of data to return. - 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[Literal['published_at', 'updated_at', 'title', 'author', 'channel', 'ticker', 'topic', 'content_type']] - 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. - - - StockNews - --------- - image : List[BenzingaImage] - The images associated with the news. - fmp === @@ -548,53 +382,7 @@ class CLASS_stocks(Container): image : Optional[str] URL to the image of the news source. site : str - Name of the news source. - - polygon - ======= - - Parameters - ---------- - ticker_lt : Optional[str] - Less than, by default None - ticker_lte : Optional[str] - Less than or equal, by default None - ticker_gt : Optional[str] - Greater than, by default None - ticker_gte : Optional[str] - Greater than or equal, by default None - published_utc : Optional[str] - The published date of the query, by default None - published_utc_lt : Optional[str] - Less than, by default None - published_utc_lte : Optional[str] - Less than or equal, by default None - published_utc_gt : Optional[str] - Greater than, by default None - published_utc_gte : Optional[str] - Greater than or equal, by default None - order : Optional[Literal['asc', 'desc']] - The sort order of the query, by default None - sort : Optional[str] - The sort of the query, by default None - - - StockNews - --------- - amp_url : Optional[str] - AMP URL. - author : Optional[str] - Author of the article. - id : str - Article ID. - image_url : Optional[str] - Image URL. - keywords : Optional[List[str]] - Keywords in the article - publisher : PolygonPublisher - Publisher of the article. - tickers : List[str] - Tickers covered in the article.""" + Name of the news source.""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -619,8 +407,13 @@ class CLASS_stocks(Container): @validate_arguments def multiples( self, - symbol: str, - limit: Optional[int] = 100, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + limit: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 100, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -780,164 +573,6 @@ class CLASS_stocks(Container): All fields are standardized. - StockMultiples - -------------- - All fields are standardized. - - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - limit : Optional[int] - The number of data entries to return. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - StockMultiples - -------------- - revenue_per_share_ttm : Optional[float] - Revenue per share calculated as trailing twelve months. - net_income_per_share_ttm : Optional[float] - Net income per share calculated as trailing twelve months. - operating_cash_flow_per_share_ttm : Optional[float] - Operating cash flow per share calculated as trailing twelve months. - free_cash_flow_per_share_ttm : Optional[float] - Free cash flow per share calculated as trailing twelve months. - cash_per_share_ttm : Optional[float] - Cash per share calculated as trailing twelve months. - book_value_per_share_ttm : Optional[float] - Book value per share calculated as trailing twelve months. - tangible_book_value_per_share_ttm : Optional[float] - Tangible book value per share calculated as trailing twelve months. - shareholders_equity_per_share_ttm : Optional[float] - Shareholders equity per share calculated as trailing twelve months. - interest_debt_per_share_ttm : Optional[float] - Interest debt per share calculated as trailing twelve months. - market_cap_ttm : Optional[float] - Market capitalization calculated as trailing twelve months. - enterprise_value_ttm : Optional[float] - Enterprise value calculated as trailing twelve months. - pe_ratio_ttm : Optional[float] - Price-to-earnings ratio (P/E ratio) calculated as trailing twelve months. - price_to_sales_ratio_ttm : Optional[float] - Price-to-sales ratio calculated as trailing twelve months. - pocf_ratio_ttm : Optional[float] - Price-to-operating cash flow ratio calculated as trailing twelve months. - pfcf_ratio_ttm : Optional[float] - Price-to-free cash flow ratio calculated as trailing twelve months. - pb_ratio_ttm : Optional[float] - Price-to-book ratio calculated as trailing twelve months. - ptb_ratio_ttm : Optional[float] - Price-to-tangible book ratio calculated as trailing twelve months. - ev_to_sales_ttm : Optional[float] - Enterprise value-to-sales ratio calculated as trailing twelve months. - enterprise_value_over_ebitda_ttm : Optional[float] - Enterprise value-to-EBITDA ratio calculated as trailing twelve months. - ev_to_operating_cash_flow_ttm : Optional[float] - Enterprise value-to-operating cash flow ratio calculated as trailing twelve months. - ev_to_free_cash_flow_ttm : Optional[float] - Enterprise value-to-free cash flow ratio calculated as trailing twelve months. - earnings_yield_ttm : Optional[float] - Earnings yield calculated as trailing twelve months. - free_cash_flow_yield_ttm : Optional[float] - Free cash flow yield calculated as trailing twelve months. - debt_to_equity_ttm : Optional[float] - Debt-to-equity ratio calculated as trailing twelve months. - debt_to_assets_ttm : Optional[float] - Debt-to-assets ratio calculated as trailing twelve months. - net_debt_to_ebitda_ttm : Optional[float] - Net debt-to-EBITDA ratio calculated as trailing twelve months. - current_ratio_ttm : Optional[float] - Current ratio calculated as trailing twelve months. - interest_coverage_ttm : Optional[float] - Interest coverage calculated as trailing twelve months. - income_quality_ttm : Optional[float] - Income quality calculated as trailing twelve months. - dividend_yield_ttm : Optional[float] - Dividend yield calculated as trailing twelve months. - payout_ratio_ttm : Optional[float] - Payout ratio calculated as trailing twelve months. - sales_general_and_administrative_to_revenue_ttm : Optional[float] - Sales general and administrative expenses-to-revenue ratio calculated as trailing twelve months. - research_and_development_to_revenue_ttm : Optional[float] - Research and development expenses-to-revenue ratio calculated as trailing twelve months. - intangibles_to_total_assets_ttm : Optional[float] - Intangibles-to-total assets ratio calculated as trailing twelve months. - capex_to_operating_cash_flow_ttm : Optional[float] - Capital expenditures-to-operating cash flow ratio calculated as trailing twelve months. - capex_to_revenue_ttm : Optional[float] - Capital expenditures-to-revenue ratio calculated as trailing twelve months. - capex_to_depreciation_ttm : Optional[float] - Capital expenditures-to-depreciation ratio calculated as trailing twelve months. - stock_based_compensation_to_revenue_ttm : Optional[float] - Stock-based compensation-to-revenue ratio calculated as trailing twelve months. - graham_number_ttm : Optional[float] - Graham number calculated as trailing twelve months. - roic_ttm : Optional[float] - Return on invested capital calculated as trailing twelve months. - return_on_tangible_assets_ttm : Optional[float] - Return on tangible assets calculated as trailing twelve months. - graham_net_net_ttm : Optional[float] - Graham net-net working capital calculated as trailing twelve months. - working_capital_ttm : Optional[float] - Working capital calculated as trailing twelve months. - tangible_asset_value_ttm : Optional[float] - Tangible asset value calculated as trailing twelve months. - net_current_asset_value_ttm : Optional[float] - Net current asset value calculated as trailing twelve months. - invested_capital_ttm : Optional[float] - Invested capital calculated as trailing twelve months. - average_receivables_ttm : Optional[float] - Average receivables calculated as trailing twelve months. - average_payables_ttm : Optional[float] - Average payables calculated as trailing twelve months. - average_inventory_ttm : Optional[float] - Average inventory calculated as trailing twelve months. - days_sales_outstanding_ttm : Optional[float] - Days sales outstanding calculated as trailing twelve months. - days_payables_outstanding_ttm : Optional[float] - Days payables outstanding calculated as trailing twelve months. - days_of_inventory_on_hand_ttm : Optional[float] - Days of inventory on hand calculated as trailing twelve months. - receivables_turnover_ttm : Optional[float] - Receivables turnover calculated as trailing twelve months. - payables_turnover_ttm : Optional[float] - Payables turnover calculated as trailing twelve months. - inventory_turnover_ttm : Optional[float] - Inventory turnover calculated as trailing twelve months. - roe_ttm : Optional[float] - Return on equity calculated as trailing twelve months. - capex_per_share_ttm : Optional[float] - Capital expenditures per share calculated as trailing twelve months. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - StockMultiples -------------- All fields are standardized.""" 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 index 8474943f413..1dbdff8769e 100644 --- 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 @@ -8,6 +8,7 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -17,7 +18,9 @@ class CLASS_stocks_ca(Container): @validate_arguments def peers( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -25,52 +28,6 @@ class CLASS_stocks_ca(Container): """Company peers. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - StockPeers - ---------- - symbol : str - Symbol representing the entity requested in the data. - peers_list : Optional[List[str]] - A list of stock peers based on sector, exchange and market cap. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - StockPeers - ---------- - All fields are standardized. - - - openbb ====== 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 index 937b90e02bf..792bc303908 100644 --- 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 @@ -1,11 +1,12 @@ ### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### import typing -from typing import Literal, Optional +from typing import Annotated, Literal, Optional from pydantic import validate_arguments from openbb_core.app.model.command_output import CommandOutput +from openbb_core.app.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -15,111 +16,122 @@ class CLASS_stocks_dd(Container): @validate_arguments def sec( self, - symbol: str, - type: Literal[ - "1", - "1-A", - "1-E", - "1-K", - "1-N", - "1-SA", - "1-U", - "1-Z", - "10", - "10-D", - "10-K", - "10-M", - "10-Q", - "11-K", - "12b-25", - "13F", - "13H", - "144", - "15", - "15F", - "17-H", - "18", - "18-K", - "19b-4", - "19b-4(e)", - "19b-7", - "2-E", - "20-F", - "24F-2", - "25", - "3", - "4", - "40-F", - "5", - "6-K", - "7-M", - "8-A", - "8-K", - "8-M", - "9-M", - "ABS-15G", - "ABS-EE", - "ABS DD-15E", - "ADV", - "ADV-E", - "ADV-H", - "ADV-NR", - "ADV-W", - "ATS", - "ATS-N", - "ATS-R", - "BD", - "BD-N", - "BDW", - "C", - "CA-1", - "CB", - "CFPORTAL", - "CRS", - "CUSTODY", - "D", - "F-1", - "F-10", - "F-3", - "F-4", - "F-6", - "F-7", - "F-8", - "F-80", - "F-N", - "F-X", - "ID", - "MA", - "MA-I", - "MA-NR", - "MA-W", - "MSD", - "MSDW", - "N-14", - "N-17D-1", - "N-17f-1", - "N-17f-2", - "N-18f-1", - "N-1A", - "N-2", - "N-23c-3", - "N-27D-1", - "N-3", - "N-4", - "N-5", - "N-54A", - "N-54C", - "N-6", - "N-6EI-1", - "N-6F", - "N-8A", - "N-8B-2", - "N-8B-4", - "N-8F", - "N-CEN", + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + type: Annotated[ + Literal[ + "1", + "1-A", + "1-E", + "1-K", + "1-N", + "1-SA", + "1-U", + "1-Z", + "10", + "10-D", + "10-K", + "10-M", + "10-Q", + "11-K", + "12b-25", + "13F", + "13H", + "144", + "15", + "15F", + "17-H", + "18", + "18-K", + "19b-4", + "19b-4(e)", + "19b-7", + "2-E", + "20-F", + "24F-2", + "25", + "3", + "4", + "40-F", + "5", + "6-K", + "7-M", + "8-A", + "8-K", + "8-M", + "9-M", + "ABS-15G", + "ABS-EE", + "ABS DD-15E", + "ADV", + "ADV-E", + "ADV-H", + "ADV-NR", + "ADV-W", + "ATS", + "ATS-N", + "ATS-R", + "BD", + "BD-N", + "BDW", + "C", + "CA-1", + "CB", + "CFPORTAL", + "CRS", + "CUSTODY", + "D", + "F-1", + "F-10", + "F-3", + "F-4", + "F-6", + "F-7", + "F-8", + "F-80", + "F-N", + "F-X", + "ID", + "MA", + "MA-I", + "MA-NR", + "MA-W", + "MSD", + "MSDW", + "N-14", + "N-17D-1", + "N-17f-1", + "N-17f-2", + "N-18f-1", + "N-1A", + "N-2", + "N-23c-3", + "N-27D-1", + "N-3", + "N-4", + "N-5", + "N-54A", + "N-54C", + "N-6", + "N-6EI-1", + "N-6F", + "N-8A", + "N-8B-2", + "N-8B-4", + "N-8F", + "N-CEN", + ], + OpenBBCustomParameter(description="The type of the SEC filing form."), ] = "10-K", - page: Optional[int] = 0, - limit: Optional[int] = 100, + page: Annotated[ + Optional[int], + OpenBBCustomParameter(description="Page number of the results."), + ] = 0, + limit: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 100, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -127,68 +139,6 @@ class CLASS_stocks_dd(Container): """SEC Filings. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - type : Literal['1', '1-A', '1-E', '1-K', '1-N', '1-SA', '1-U', '1-Z', '10', '10-D', '10-K', '10-M', '10-Q', '11-K', '12b-25', '13F', '13H', '144', '15', '15F', '17-H', '18', '18-K', '19b-4', '19b-4(e)', '19b-7', '2-E', '20-F', '24F-2', '25', '3', '4', '40-F', '5', '6-K', '7-M', '8-A', '8-K', '8-M', '9-M', 'ABS-15G', 'ABS-EE', 'ABS DD-15E', 'ADV', 'ADV-E', 'ADV-H', 'ADV-NR', 'ADV-W', 'ATS', 'ATS-N', 'ATS-R', 'BD', 'BD-N', 'BDW', 'C', 'CA-1', 'CB', 'CFPORTAL', 'CRS', 'CUSTODY', 'D', 'F-1', 'F-10', 'F-3', 'F-4', 'F-6', 'F-7', 'F-8', 'F-80', 'F-N', 'F-X', 'ID', 'MA', 'MA-I', 'MA-NR', 'MA-W', 'MSD', 'MSDW', 'N-14', 'N-17D-1', 'N-17f-1', 'N-17f-2', 'N-18f-1', 'N-1A', 'N-2', 'N-23c-3', 'N-27D-1', 'N-3', 'N-4', 'N-5', 'N-54A', 'N-54C', 'N-6', 'N-6EI-1', 'N-6F', 'N-8A', 'N-8B-2', 'N-8B-4', 'N-8F', 'N-CEN'] - The type of the SEC filing form. - page : Optional[int] - Page number of the results. - limit : Optional[int] - The number of data entries to return. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - SECFilings - ---------- - symbol : ConstrainedStrValue - Symbol to get data for. - filling_date : datetime - The filling date of the SEC filing. - accepted_date : datetime - 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 - === - - Parameters - ---------- - All fields are standardized. - - - SECFilings - ---------- - All fields are standardized. - - - openbb ====== 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 index 04cf40aae17..9cf10adfd43 100644 --- 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 @@ -2,7 +2,7 @@ import datetime import typing -from typing import List, Literal, Optional, Union +from typing import Annotated, List, Literal, Optional, Union import pydantic from pydantic import validate_arguments @@ -10,6 +10,7 @@ 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.model.custom_parameter import OpenBBCustomParameter from openbb_core.app.static.container import Container from openbb_core.app.static.filters import filter_call, filter_inputs, filter_output @@ -36,11 +37,21 @@ class CLASS_stocks_fa(Container): @validate_arguments def balance( self, - symbol: str, - period: Literal["annually", "quarterly"] = "annually", - limit: Optional[pydantic.types.NonNegativeInt] = 12, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["annually", "quarterly"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 12, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Balance Sheet. @@ -51,7 +62,7 @@ class CLASS_stocks_fa(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -164,42 +175,6 @@ class CLASS_stocks_fa(Container): total_liabilities_and_total_equity : Optional[int] None - fmp - === - - Parameters - ---------- - cik : Optional[str] - None - - - BalanceSheet - ------------ - calendarYear : Optional[int] - None - link : Optional[str] - None - finalLink : Optional[str] - None - cashAndShortTermInvestments : Optional[int] - None - goodwillAndIntangibleAssets : Optional[int] - None - deferredRevenueNonCurrent : Optional[int] - None - totalInvestments : Optional[int] - None - capitalLeaseObligations : Optional[int] - None - deferredTaxLiabilitiesNonCurrent : Optional[int] - None - totalNonCurrentLiabilities : Optional[int] - None - totalDebt : Optional[int] - None - netDebt : Optional[int] - None - polygon ======= @@ -243,126 +218,6 @@ class CLASS_stocks_fa(Container): ------------ All fields are standardized. - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp, polygon] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - period : Literal['annually', 'quarterly'] - Period of the data to return (quarterly or annually). - limit : Optional[NonNegativeInt] - The number of data entries to return. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - BalanceSheet - ------------ - date : date - Date of the fetched statement. - symbol : Optional[str] - Symbol of the company. - cik : Optional[int] - Central Index Key. - currency : Optional[str] - Reporting currency. - filing_date : Optional[date] - Filling date. - accepted_date : Optional[datetime] - Accepted date. - period : Optional[str] - Reporting period of the statement. - cash_and_cash_equivalents : Optional[int] - Cash and cash equivalents - short_term_investments : Optional[int] - Short-term investments - inventory : Optional[int] - Inventory - net_receivables : Optional[int] - Receivables, net - other_current_assets : Optional[int] - Other current assets - current_assets : Optional[int] - Total current assets - long_term_investments : Optional[int] - Long-term investments - property_plant_equipment_net : Optional[int] - Property, plant and equipment, net - goodwill : Optional[int] - Goodwill - intangible_assets : Optional[int] - Intangible assets - other_non_current_assets : Optional[int] - Other non-current assets - tax_assets : Optional[int] - Accrued income taxes - other_assets : Optional[int] - Other assets - noncurrent_assets : Optional[int] - None - assets : Optional[int] - None - account_payables : Optional[int] - None - other_current_liabilities : Optional[int] - None - tax_payables : Optional[int] - Accrued income taxes - deferred_revenue : Optional[int] - Accrued income taxes, other deferred revenue - short_term_debt : Optional[int] - Short-term borrowings, Long-term debt due within one year, Operating lease obligations due within one year, Finance lease obligations due within one year - current_liabilities : Optional[int] - None - long_term_debt : Optional[int] - Long-term debt, Operating lease obligations, Long-term finance lease obligations - other_non_current_liabilities : Optional[int] - Deferred income taxes and other - other_liabilities : Optional[int] - None - noncurrent_liabilities : Optional[int] - None - liabilities : Optional[int] - None - common_stock : Optional[int] - None - other_stockholder_equity : Optional[int] - Capital in excess of par value - accumulated_other_comprehensive_income_loss : Optional[int] - Accumulated other comprehensive income (loss) - preferred_stock : Optional[int] - Preferred stock - retained_earnings : Optional[int] - Retained earnings - minority_interest : Optional[int] - Minority interest - total_stockholders_equity : Optional[int] - None - total_equity : Optional[int] - None - total_liabilities_and_stockholders_equity : Optional[int] - None - total_liabilities_and_total_equity : Optional[int] - None - fmp === @@ -397,50 +252,7 @@ class CLASS_stocks_fa(Container): totalDebt : Optional[int] None netDebt : Optional[int] - None - - polygon - ======= - - Parameters - ---------- - 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. - include_sources : Optional[bool] - Whether to include the sources of the financial statement. - order : Optional[Literal['asc', 'desc']] - The order of the financial statement. - sort : Optional[Literal['filing_date', 'period_of_report_date']] - The sort of the financial statement. - - - BalanceSheet - ------------ - All fields are standardized.""" + None""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -465,8 +277,13 @@ class CLASS_stocks_fa(Container): @validate_arguments def balance_growth( self, - symbol: str, - limit: int = 10, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + limit: typing.Annotated[ + int, + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 10, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -596,134 +413,6 @@ class CLASS_stocks_fa(Container): All fields are standardized. - BalanceSheetGrowth - ------------------ - All fields are standardized. - - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - limit : int - The number of data entries to return. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - BalanceSheetGrowth - ------------------ - symbol : ConstrainedStrValue - Symbol to get data for. - date : date - The date of the data. - period : str - The period the statement is returned for. - growth_cash_and_cash_equivalents : float - Growth rate of cash and cash equivalents. - growth_short_term_investments : float - Growth rate of short-term investments. - growth_cash_and_short_term_investments : float - Growth rate of cash and short-term investments. - growth_net_receivables : float - Growth rate of net receivables. - growth_inventory : float - Growth rate of inventory. - growth_other_current_assets : float - Growth rate of other current assets. - growth_total_current_assets : float - Growth rate of total current assets. - growth_property_plant_equipment_net : float - Growth rate of net property, plant, and equipment. - growth_goodwill : float - Growth rate of goodwill. - growth_intangible_assets : float - Growth rate of intangible assets. - growth_goodwill_and_intangible_assets : float - Growth rate of goodwill and intangible assets. - growth_long_term_investments : float - Growth rate of long-term investments. - growth_tax_assets : float - Growth rate of tax assets. - growth_other_non_current_assets : float - Growth rate of other non-current assets. - growth_total_non_current_assets : float - Growth rate of total non-current assets. - growth_other_assets : float - Growth rate of other assets. - growth_total_assets : float - Growth rate of total assets. - growth_account_payables : float - Growth rate of accounts payable. - growth_short_term_debt : float - Growth rate of short-term debt. - growth_tax_payables : float - Growth rate of tax payables. - growth_deferred_revenue : float - Growth rate of deferred revenue. - growth_other_current_liabilities : float - Growth rate of other current liabilities. - growth_total_current_liabilities : float - Growth rate of total current liabilities. - growth_long_term_debt : float - Growth rate of long-term debt. - growth_deferred_revenue_non_current : float - Growth rate of non-current deferred revenue. - growth_deferrred_tax_liabilities_non_current : float - Growth rate of non-current deferred tax liabilities. - growth_other_non_current_liabilities : float - Growth rate of other non-current liabilities. - growth_total_non_current_liabilities : float - Growth rate of total non-current liabilities. - growth_other_liabilities : float - Growth rate of other liabilities. - growth_total_liabilities : float - Growth rate of total liabilities. - growth_common_stock : float - Growth rate of common stock. - growth_retained_earnings : float - Growth rate of retained earnings. - growth_accumulated_other_comprehensive_income_loss : float - Growth rate of accumulated other comprehensive income/loss. - growth_othertotal_stockholders_equity : float - Growth rate of other total stockholders' equity. - growth_total_stockholders_equity : float - Growth rate of total stockholders' equity. - growth_total_liabilities_and_stockholders_equity : float - Growth rate of total liabilities and stockholders' equity. - growth_total_investments : float - Growth rate of total investments. - growth_total_debt : float - Growth rate of total debt. - growth_net_debt : float - Growth rate of net debt. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - BalanceSheetGrowth ------------------ All fields are standardized.""" @@ -750,8 +439,18 @@ class CLASS_stocks_fa(Container): @validate_arguments def cal( self, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -759,66 +458,6 @@ class CLASS_stocks_fa(Container): """Show Dividend Calendar for a given start and end dates. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - start_date : Optional[date] - Start date of the data, in YYYY-MM-DD format. - end_date : Optional[date] - End date of the data, in YYYY-MM-DD format. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - DividendCalendar - ---------------- - symbol : ConstrainedStrValue - Symbol to get data for. - date : date - The date of the data. - label : str - The date in human readable form in the calendar. - adj_dividend : Optional[NonNegativeFloat] - The adjusted dividend on a date in the calendar. - dividend : Optional[NonNegativeFloat] - The dividend amount in the calendar. - record_date : Optional[date] - The record date of the dividend in the calendar. - payment_date : Optional[date] - The payment date of the dividend in the calendar. - declaration_date : Optional[date] - The declaration date of the dividend in the calendar. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - DividendCalendar - ---------------- - All fields are standardized. - - - openbb ====== @@ -899,11 +538,21 @@ class CLASS_stocks_fa(Container): @validate_arguments def cash( self, - symbol: str, - period: Literal["annually", "quarterly"] = "annually", - limit: Optional[pydantic.types.NonNegativeInt] = 12, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["annually", "quarterly"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 12, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Cash Flow Statement. @@ -914,7 +563,7 @@ class CLASS_stocks_fa(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -1007,24 +656,6 @@ class CLASS_stocks_fa(Container): cash_at_end_of_period : Optional[int] None - fmp - === - - Parameters - ---------- - cik : Optional[str] - Central Index Key (CIK) of the company. - - - CashFlowStatement - ----------------- - calendarYear : Optional[int] - None - link : Optional[str] - None - finalLink : Optional[str] - None - polygon ======= @@ -1068,106 +699,6 @@ class CLASS_stocks_fa(Container): ----------------- All fields are standardized. - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp, polygon] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - period : Literal['annually', 'quarterly'] - Period of the data to return (quarterly or annually). - limit : Optional[NonNegativeInt] - The number of data entries to return. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - CashFlowStatement - ----------------- - date : date - Date of the fetched statement. - symbol : Optional[str] - Symbol of the company. - cik : Optional[int] - Central Index Key. - currency : Optional[str] - Reporting currency. - filing_date : Optional[date] - Filling date. - accepted_date : Optional[datetime] - Accepted date. - period : Optional[str] - Reporting period of the statement. - cash_at_beginning_of_period : Optional[int] - None - net_income : Optional[int] - None - depreciation_and_amortization : Optional[int] - None - stock_based_compensation : Optional[int] - None - other_non_cash_items : Optional[int] - Other non-cash items. - deferred_income_tax : Optional[int] - Deferred income tax. - inventory : Optional[int] - None - accounts_receivables : Optional[int] - None - accounts_payables : Optional[int] - None - other_working_capital : Optional[int] - Accrued expenses and other, Unearned revenue. - net_cash_flow_from_operating_activities : Optional[int] - None - capital_expenditure : Optional[int] - Purchases of property and equipment. - other_investing_activities : Optional[int] - Proceeds from property and equipment sales and incentives. - acquisitions_net : Optional[int] - Acquisitions, net of cash acquired, and other - sales_maturities_of_investments : Optional[int] - None - purchases_of_investments : Optional[int] - None - net_cash_flow_from_investing_activities : Optional[int] - None - investments_in_property_plant_and_equipment : Optional[int] - None - dividends_paid : Optional[int] - None - common_stock_repurchased : Optional[int] - None - debt_repayment : Optional[int] - None - other_financing_activities : Optional[int] - None - net_cash_flow_from_financing_activities : Optional[int] - None - effect_of_forex_changes_on_cash : Optional[int] - Foreign currency effect on cash, cash equivalents, and restricted cash - net_change_in_cash : Optional[int] - Net increase (decrease) in cash, cash equivalents, and restricted cash - cash_at_end_of_period : Optional[int] - None - fmp === @@ -1184,50 +715,7 @@ class CLASS_stocks_fa(Container): link : Optional[str] None finalLink : Optional[str] - None - - polygon - ======= - - Parameters - ---------- - 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. - include_sources : Optional[bool] - Whether to include the sources of the financial statement. - order : Optional[Literal['asc', 'desc']] - The order of the financial statement. - sort : Optional[Literal['filing_date', 'period_of_report_date']] - The sort of the financial statement. - - - CashFlowStatement - ----------------- - All fields are standardized.""" + None""" inputs = filter_inputs( provider_choices={ "provider": provider, @@ -1252,8 +740,13 @@ class CLASS_stocks_fa(Container): @validate_arguments def cash_growth( self, - symbol: str, - limit: int = 10, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + limit: typing.Annotated[ + int, + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 10, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1365,116 +858,6 @@ class CLASS_stocks_fa(Container): All fields are standardized. - CashFlowStatementGrowth - ----------------------- - All fields are standardized. - - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - limit : int - The number of data entries to return. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - CashFlowStatementGrowth - ----------------------- - symbol : ConstrainedStrValue - Symbol to get data for. - date : date - The date of the data. - period : str - The period the statement is returned for. - growth_net_income : float - Growth rate of net income. - growth_depreciation_and_amortization : float - Growth rate of depreciation and amortization. - growth_deferred_income_tax : float - Growth rate of deferred income tax. - growth_stock_based_compensation : float - Growth rate of stock-based compensation. - growth_change_in_working_capital : float - Growth rate of change in working capital. - growth_accounts_receivables : float - Growth rate of accounts receivables. - growth_inventory : float - Growth rate of inventory. - growth_accounts_payables : float - Growth rate of accounts payables. - growth_other_working_capital : float - Growth rate of other working capital. - growth_other_non_cash_items : float - Growth rate of other non-cash items. - growth_net_cash_provided_by_operating_activities : float - Growth rate of net cash provided by operating activities. - growth_investments_in_property_plant_and_equipment : float - Growth rate of investments in property, plant, and equipment. - growth_acquisitions_net : float - Growth rate of net acquisitions. - growth_purchases_of_investments : float - Growth rate of purchases of investments. - growth_sales_maturities_of_investments : float - Growth rate of sales maturities of investments. - growth_other_investing_activities : float - Growth rate of other investing activities. - growth_net_cash_used_for_investing_activities : float - Growth rate of net cash used for investing activities. - growth_debt_repayment : float - Growth rate of debt repayment. - growth_common_stock_issued : float - Growth rate of common stock issued. - growth_common_stock_repurchased : float - Growth rate of common stock repurchased. - growth_dividends_paid : float - Growth rate of dividends paid. - growth_other_financing_activities : float - Growth rate of other financing activities. - growth_net_cash_used_provided_by_financing_activities : float - Growth rate of net cash used/provided by financing activities. - growth_effect_of_forex_changes_on_cash : float - Growth rate of the effect of foreign exchange changes on cash. - growth_net_change_in_cash : float - Growth rate of net change in cash. - growth_cash_at_end_of_period : float - Growth rate of cash at the end of the period. - growth_cash_at_beginning_of_period : float - Growth rate of cash at the beginning of the period. - growth_operating_cash_flow : float - Growth rate of operating cash flow. - growth_capital_expenditure : float - Growth rate of capital expenditure. - growth_free_cash_flow : float - Growth rate of free cash flow. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - CashFlowStatementGrowth ----------------------- All fields are standardized.""" @@ -1501,7 +884,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def comp( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1509,74 +894,6 @@ class CLASS_stocks_fa(Container): """Executive Compensation. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - ExecutiveCompensation - --------------------- - symbol : ConstrainedStrValue - Symbol to get data for. - cik : Optional[str] - The Central Index Key (CIK) of the company. - filing_date : date - The date of the filing. - accepted_date : datetime - 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 : PositiveFloat - The salary of the executive. - bonus : NonNegativeFloat - The bonus of the executive. - stock_award : NonNegativeFloat - The stock award of the executive. - incentive_plan_compensation : NonNegativeFloat - The incentive plan compensation of the executive. - all_other_compensation : NonNegativeFloat - The all other compensation of the executive. - total : PositiveFloat - The total compensation of the executive. - url : str - The URL of the filing data. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - ExecutiveCompensation - --------------------- - All fields are standardized. - - - openbb ====== @@ -1664,8 +981,18 @@ class CLASS_stocks_fa(Container): @validate_arguments def comsplit( self, - start_date: Union[datetime.date, None, str] = None, - end_date: Union[datetime.date, None, str] = None, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="Start date of the data, in YYYY-MM-DD format." + ), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBCustomParameter( + description="End date of the data, in YYYY-MM-DD format." + ), + ] = None, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1673,60 +1000,6 @@ class CLASS_stocks_fa(Container): """Stock Split Calendar. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - start_date : Optional[date] - Start date of the data, in YYYY-MM-DD format. - end_date : Optional[date] - End date of the data, in YYYY-MM-DD format. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - StockSplitCalendar - ------------------ - 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 - === - - Parameters - ---------- - All fields are standardized. - - - StockSplitCalendar - ------------------ - All fields are standardized. - - - openbb ====== @@ -1835,7 +1108,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def divs( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -1843,62 +1118,6 @@ class CLASS_stocks_fa(Container): """Historical Dividends. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - HistoricalDividends - ------------------- - 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 : Optional[date] - The record date of the historical dividends. - payment_date : Optional[date] - The payment date of the historical dividends. - declaration_date : Optional[date] - The declaration date of the historical dividends. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - HistoricalDividends - ------------------- - All fields are standardized. - - - openbb ====== @@ -1991,8 +1210,13 @@ class CLASS_stocks_fa(Container): @validate_arguments def earning( self, - symbol: str, - limit: Optional[int] = 50, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + limit: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 50, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2000,68 +1224,6 @@ class CLASS_stocks_fa(Container): """Earnings Calendar. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - limit : Optional[int] - The number of data entries to return. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - EarningsCalendar - ---------------- - symbol : ConstrainedStrValue - Symbol to get data for. - date : date - The date of the data. - eps : Optional[NonNegativeFloat] - The EPS of the earnings calendar. - eps_estimated : Optional[NonNegativeFloat] - The estimated EPS of the earnings calendar. - time : str - The time of the earnings calendar. - revenue : Optional[int] - The revenue of the earnings calendar. - revenue_estimated : Optional[int] - The estimated revenue of the earnings calendar. - updated_from_date : Optional[date] - The updated from date of the earnings calendar. - fiscal_date_ending : date - The fiscal date ending of the earnings calendar. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - EarningsCalendar - ---------------- - All fields are standardized. - - - openbb ====== @@ -2144,7 +1306,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def emp( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2152,66 +1316,6 @@ class CLASS_stocks_fa(Container): """Number of Employees. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - HistoricalEmployees - ------------------- - symbol : ConstrainedStrValue - Symbol to get data for. - 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 : str - 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 - === - - Parameters - ---------- - All fields are standardized. - - - HistoricalEmployees - ------------------- - All fields are standardized. - - - openbb ====== @@ -2325,9 +1429,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def est( self, - symbol: str, - period: Literal["quarterly", "annually"] = "annually", - limit: int = 30, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["quarterly", "annually"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + limit: typing.Annotated[ + int, + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 30, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -2335,96 +1449,6 @@ class CLASS_stocks_fa(Container): """Analyst Estimates. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - period : Literal['quarterly', 'annually'] - Period of the data to return (quarterly or annually). - limit : int - The number of data entries to return. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - AnalystEstimates - ---------------- - symbol : ConstrainedStrValue - Symbol to get data for. - date : date - A specific date to get data for. - estimated_revenue_low : int - The estimated revenue low. - estimated_revenue_high : int - The estimated revenue high. - estimated_revenue_avg : int - The estimated revenue average. - estimated_ebitda_low : int - The estimated EBITDA low. - estimated_ebitda_high : int - The estimated EBITDA high. - estimated_ebitda_avg : int - The estimated EBITDA average. - estimated_ebit_low : int - The estimated EBIT low. - estimated_ebit_high : int - The estimated EBIT high. - estimated_ebit_avg : int - The estimated EBIT average. - estimated_net_income_low : int - The estimated net income low. - estimated_net_income_high : int - The estimated net income high. - estimated_net_income_avg : int - The estimated net income average. - estimated_sga_expense_low : int - The estimated SGA expense low. - estimated_sga_expense_high : int - The estimated SGA expense high. - estimated_sga_expense_avg : int - The estimated SGA expense average. - estimated_eps_avg : float - The estimated EPS average. - estimated_eps_high : float - The estimated EPS high. - estimated_eps_low : float - The estimated EPS low. - number_analyst_estimated_revenue : int - The number of analysts who estimated revenue. - number_analysts_estimated_eps : int - The number of analysts who estimated EPS. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - AnalystEstimates - ---------------- - All fields are standardized. - - - openbb ====== @@ -2620,11 +1644,21 @@ class CLASS_stocks_fa(Container): @validate_arguments def income( self, - symbol: str, - period: Literal["annually", "quarterly"] = "annually", - limit: Optional[pydantic.types.NonNegativeInt] = 12, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["annually", "quarterly"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + limit: Annotated[ + Optional[pydantic.types.NonNegativeInt], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 12, chart: bool = False, - provider: Optional[Literal["fmp", "polygon"]] = None, + provider: Optional[Literal["polygon", "fmp"]] = None, **kwargs ) -> CommandOutput[typing.List]: """Income Statement. @@ -2635,7 +1669,7 @@ class CLASS_stocks_fa(Container): Parameters ---------- - provider: Literal[fmp, polygon] + provider: Literal[polygon, fmp] The provider to use for the query. symbol : ConstrainedStrValue Symbol to get data for. @@ -2720,34 +1754,6 @@ class CLASS_stocks_fa(Container): weighted_average_shares_outstanding_dil : Optional[int] Weighted average shares outstanding diluted. - fmp - === - - Parameters - ---------- - cik : Optional[str] - The CIK of the company if no symbol is provided. - - - IncomeStatement - --------------- - calendarYear : Optional[int] - None - grossProfitRatio : Optional[float] - None - ebitdaratio : Optional[float] - None - operatingIncomeRatio : Optional[float] - None - incomeBeforeTaxRatio : Optional[float] - None - netIncomeRatio : Optional[float] - None - link : Optional[str] - None - finalLink : Optional[str] - None - polygon ======= @@ -2804,98 +1810,6 @@ class CLASS_stocks_fa(Container): preferred_stock_dividends_and_other_adjustments : Optional[float] None - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp, polygon] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - period : Literal['annually', 'quarterly'] - Period of the data to return (quarterly or annually). - limit : Optional[NonNegativeInt] - The number of data entries to return. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - IncomeStatement - --------------- - date : date - Date of the income statement. - symbol : str - Symbol of the company. - cik : Optional[int] - Central Index Key. - currency : Optional[str] - Reporting currency. - filing_date : Optional[date] - Filling date. - accepted_date : Optional[datetime] - Accepted date. - period : Optional[str] - Period of the income statement. - revenue : Optional[int] - Revenue. - cost_of_revenue : Optional[int] - Cost of revenue. - gross_profit : Optional[int] - Gross profit. - research_and_development_expenses : Optional[int] - Research and development expenses. - general_and_administrative_expenses : Optional[int] - General and administrative expenses. - selling_and_marketing_expenses : Optional[float] - Selling and marketing expenses. - selling_general_and_administrative_expenses : Optional[int] - Selling, general and administrative expenses. - other_expenses : Optional[int] - Other expenses. - operating_expenses : Optional[int] - Operating expenses. - depreciation_and_amortization : Optional[int] - Depreciation and amortization. - ebitda : Optional[int] - Earnings before interest, taxes, depreciation and amortization. - operating_income : Optional[int] - Operating income. - interest_income : Optional[int] - Interest income. - interest_expense : Optional[int] - Interest expense. - total_other_income_expenses_net : Optional[int] - Total other income expenses net. - income_before_tax : Optional[int] - Income before tax. - income_tax_expense : Optional[int] - Income tax expense. - net_income : Optional[int] - Net income. - eps : Optional[float] - Earnings per share. - eps_diluted : Optional[float] - Earnings per share diluted. - weighted_average_shares_outstanding : Optional[int] - Weighted average shares outstanding. - weighted_average_shares_outstanding_dil : Optional[int] - Weighted average shares outstanding diluted. - fmp === @@ -2922,62 +1836,6 @@ class CLASS_stocks_fa(Container): link : Optional[str] None finalLink : Optional[str] - None - - polygon - ======= - - Parameters - ---------- - 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. - include_sources : Optional[bool] - Whether to include the sources of the financial statement. - order : Optional[Literal['asc', 'desc']] - The order of the financial statement. - sort : Optional[Literal['filing_date', 'period_of_report_date']] - The sort of the financial statement. - - - IncomeStatement - --------------- - income_loss_from_continuing_operations_after_tax : Optional[float] - None - benefits_costs_expenses : Optional[float] - None - net_income_loss_attributable_to_noncontrolling_interest : Optional[int] - None - net_income_loss_attributable_to_parent : Optional[float] - None - net_income_loss_available_to_common_stockholders_basic : Optional[float] - None - participating_securities_distributed_and_undistributed_earnings_loss_basic : Optional[float] - None - preferred_stock_dividends_and_other_adjustments : Optional[float] None""" inputs = filter_inputs( provider_choices={ @@ -3003,9 +1861,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def income_growth( self, - symbol: str, - limit: int = 10, - period: Literal["annually", "quarterly"] = "annually", + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + limit: typing.Annotated[ + int, + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 10, + period: Annotated[ + Literal["annually", "quarterly"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3013,110 +1881,6 @@ class CLASS_stocks_fa(Container): """Income Statement Growth. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - limit : int - The number of data entries to return. - period : Literal['annually', 'quarterly'] - Period of the data to return (quarterly or annually). - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - IncomeStatementGrowth - --------------------- - symbol : ConstrainedStrValue - Symbol to get data for. - date : date - The date of the data. - period : str - The period the statement is returned for. - growth_revenue : float - Growth rate of total revenue. - growth_cost_of_revenue : float - Growth rate of cost of goods sold. - growth_gross_profit : float - Growth rate of gross profit. - growth_gross_profit_ratio : float - Growth rate of gross profit as a percentage of revenue. - growth_research_and_development_expenses : float - Growth rate of expenses on research and development. - growth_general_and_administrative_expenses : float - Growth rate of general and administrative expenses. - growth_selling_and_marketing_expenses : float - Growth rate of expenses on selling and marketing activities. - growth_other_expenses : float - Growth rate of other operating expenses. - growth_operating_expenses : float - Growth rate of total operating expenses. - growth_cost_and_expenses : float - Growth rate of total costs and expenses. - growth_interest_expense : float - Growth rate of interest expenses. - growth_depreciation_and_amortization : float - Growth rate of depreciation and amortization expenses. - growth_ebitda : float - Growth rate of Earnings Before Interest, Taxes, Depreciation, and Amortization. - growth_ebitda_ratio : float - Growth rate of EBITDA as a percentage of revenue. - growth_operating_income : float - Growth rate of operating income. - growth_operating_income_ratio : float - Growth rate of operating income as a percentage of revenue. - growth_total_other_income_expenses_net : float - Growth rate of net total other income and expenses. - growth_income_before_tax : float - Growth rate of income before taxes. - growth_income_before_tax_ratio : float - Growth rate of income before taxes as a percentage of revenue. - growth_income_tax_expense : float - Growth rate of income tax expenses. - growth_net_income : float - Growth rate of net income. - growth_net_income_ratio : float - Growth rate of net income as a percentage of revenue. - growth_eps : float - Growth rate of Earnings Per Share (EPS). - growth_eps_diluted : float - Growth rate of diluted Earnings Per Share (EPS). - growth_weighted_average_shs_out : float - Growth rate of weighted average shares outstanding. - growth_weighted_average_shs_out_dil : float - Growth rate of diluted weighted average shares outstanding. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - IncomeStatementGrowth - --------------------- - All fields are standardized. - - - openbb ====== @@ -3242,34 +2006,48 @@ class CLASS_stocks_fa(Container): @validate_arguments def ins( self, - symbol: str, - transactionType: Optional[ - List[ - Literal[ - "A-Award", - "C-Conversion", - "D-Return", - "E-ExpireShort", - "F-InKind", - "G-Gift", - "H-ExpireLong", - "I-Discretionary", - "J-Other", - "L-Small", - "M-Exempt", - "O-OutOfTheMoney", - "P-Purchase", - "S-Sale", - "U-Tender", - "W-Will", - "X-InTheMoney", - "Z-Trust", + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + transactionType: Annotated[ + Optional[ + List[ + Literal[ + "A-Award", + "C-Conversion", + "D-Return", + "E-ExpireShort", + "F-InKind", + "G-Gift", + "H-ExpireLong", + "I-Discretionary", + "J-Other", + "L-Small", + "M-Exempt", + "O-OutOfTheMoney", + "P-Purchase", + "S-Sale", + "U-Tender", + "W-Will", + "X-InTheMoney", + "Z-Trust", + ] ] - ] + ], + OpenBBCustomParameter(description="The type of the transaction."), ] = ["P-Purchase"], - reportingCik: Optional[int] = None, - companyCik: Optional[int] = None, - page: Optional[int] = 0, + reportingCik: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The CIK of the reporting owner."), + ] = None, + companyCik: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The CIK of the company owner."), + ] = None, + page: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The page number of the data to fetch."), + ] = 0, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3277,86 +2055,6 @@ class CLASS_stocks_fa(Container): """Stock Insider Trading. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - transactionType : Optional[List[Literal['A-Award', 'C-Conversion', 'D-Return', 'E-ExpireShort', 'F-InKind', 'G-Gift', 'H-ExpireLong', 'I-Discretionary', 'J-Other', 'L-Small', 'M-Exempt', 'O-OutOfTheMoney', 'P-Purchase', 'S-Sale', 'U-Tender', 'W-Will', 'X-InTheMoney', 'Z-Trust']]] - The type of the transaction. - reportingCik : Optional[int] - The CIK of the reporting owner. - companyCik : Optional[int] - The CIK of the company owner. - page : Optional[int] - The page number of the data to fetch. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - StockInsiderTrading - ------------------- - symbol : ConstrainedStrValue - Symbol to get data for. - filing_date : datetime - The filing date of the stock insider trading. - transaction_date : date - The transaction date of the stock insider trading. - reporting_cik : int - The reporting CIK of the stock insider trading. - transaction_type : str - The transaction type of the stock insider trading. - securities_owned : int - The securities owned of the stock insider trading. - company_cik : int - The company CIK of the stock insider trading. - reporting_name : str - The reporting name of the stock insider trading. - type_of_owner : str - The type of owner of the stock insider trading. - acquistion_or_disposition : str - The acquistion or disposition of the stock insider trading. - form_type : str - The form type of the stock insider trading. - securities_transacted : float - The securities transacted of the stock insider trading. - price : float - The price of the stock insider trading. - security_name : str - The security name of the stock insider trading. - link : str - The link of the stock insider trading. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - StockInsiderTrading - ------------------- - All fields are standardized. - - - openbb ====== @@ -3460,9 +2158,16 @@ class CLASS_stocks_fa(Container): @validate_arguments def ins_own( self, - symbol: str, - include_current_quarter: bool = False, - date: Optional[datetime.date] = None, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + include_current_quarter: typing.Annotated[ + bool, OpenBBCustomParameter(description="Include current quarter data.") + ] = False, + date: Annotated[ + Optional[datetime.date], + OpenBBCustomParameter(description="A specific date to get data for."), + ] = None, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3582,124 +2287,6 @@ class CLASS_stocks_fa(Container): All fields are standardized. - InstitutionalOwnership - ---------------------- - All fields are standardized. - - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - include_current_quarter : bool - Include current quarter data. - date : Optional[date] - A specific date to get data for. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - InstitutionalOwnership - ---------------------- - symbol : ConstrainedStrValue - Symbol to get data for. - cik : Optional[str] - The CIK of the company. - date : date - The date of the data. - 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 : Optional[int] - The number of 13F shares. - last_number_of_13f_shares : Optional[int] - The number of 13F shares in the last quarter. - number_of_13f_shares_change : Optional[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 - he 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. - reduced_positions_change : int - The change in the number of reduced positions. - total_calls : int - Total number of call options contracts traded for Apple Inc. on the specified date. - last_total_calls : int - Total number of call options contracts traded for Apple Inc. on the previous reporting date. - total_calls_change : int - Change in the total number of call options contracts traded between the current and previous reporting dates. - total_puts : int - Total number of put options contracts traded for Apple Inc. on the specified date. - last_total_puts : int - Total number of put options contracts traded for Apple Inc. on the previous reporting date. - total_puts_change : int - Change in the total number of put options contracts traded between the current and previous reporting dates. - put_call_ratio : float - The put-call ratio, which is the ratio of the total number of put options to call options traded on the specified date. - last_put_call_ratio : float - The put-call ratio on the previous reporting date. - put_call_ratio_change : float - Change in the put-call ratio between the current and previous reporting dates. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - InstitutionalOwnership ---------------------- All fields are standardized.""" @@ -3743,9 +2330,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def metrics( self, - symbol: str, - period: Literal["annually", "quarterly"] = "annually", - limit: Optional[int] = 100, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["annually", "quarterly"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + limit: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The number of data entries to return."), + ] = 100, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -3913,172 +2510,6 @@ class CLASS_stocks_fa(Container): All fields are standardized. - KeyMetrics - ---------- - All fields are standardized. - - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - period : Literal['annually', 'quarterly'] - Period of the data to return (quarterly or annually). - limit : Optional[int] - The number of data entries to return. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - KeyMetrics - ---------- - symbol : ConstrainedStrValue - Symbol to get data for. - date : date - The date of the data. - period : str - The period of the data. - revenue_per_share : Optional[float] - Revenue per share - net_income_per_share : Optional[float] - Net income per share - operating_cash_flow_per_share : Optional[float] - Operating cash flow per share - free_cash_flow_per_share : Optional[float] - Free cash flow per share - cash_per_share : Optional[float] - Cash per share - book_value_per_share : Optional[float] - Book value per share - tangible_book_value_per_share : Optional[float] - Tangible book value per share - shareholders_equity_per_share : Optional[float] - Shareholders equity per share - interest_debt_per_share : Optional[float] - Interest debt per share - market_cap : Optional[float] - Market capitalization - enterprise_value : Optional[float] - Enterprise value - pe_ratio : Optional[float] - Price-to-earnings ratio (P/E ratio) - price_to_sales_ratio : Optional[float] - Price-to-sales ratio - pocf_ratio : Optional[float] - Price-to-operating cash flow ratio - pfcf_ratio : Optional[float] - Price-to-free cash flow ratio - pb_ratio : Optional[float] - Price-to-book ratio - ptb_ratio : Optional[float] - Price-to-tangible book ratio - ev_to_sales : Optional[float] - Enterprise value-to-sales ratio - enterprise_value_over_ebitda : Optional[float] - Enterprise value-to-EBITDA ratio - ev_to_operating_cash_flow : Optional[float] - Enterprise value-to-operating cash flow ratio - ev_to_free_cash_flow : Optional[float] - Enterprise value-to-free cash flow ratio - earnings_yield : Optional[float] - Earnings yield - free_cash_flow_yield : Optional[float] - Free cash flow yield - debt_to_equity : Optional[float] - Debt-to-equity ratio - debt_to_assets : Optional[float] - Debt-to-assets ratio - net_debt_to_ebitda : Optional[float] - Net debt-to-EBITDA ratio - current_ratio : Optional[float] - Current ratio - interest_coverage : Optional[float] - Interest coverage - income_quality : Optional[float] - Income quality - dividend_yield : Optional[float] - Dividend yield - payout_ratio : Optional[float] - Payout ratio - sales_general_and_administrative_to_revenue : Optional[float] - Sales general and administrative expenses-to-revenue ratio - research_and_development_to_revenue : Optional[float] - Research and development expenses-to-revenue ratio - intangibles_to_total_assets : Optional[float] - Intangibles-to-total assets ratio - capex_to_operating_cash_flow : Optional[float] - Capital expenditures-to-operating cash flow ratio - capex_to_revenue : Optional[float] - Capital expenditures-to-revenue ratio - capex_to_depreciation : Optional[float] - Capital expenditures-to-depreciation ratio - stock_based_compensation_to_revenue : Optional[float] - Stock-based compensation-to-revenue ratio - graham_number : Optional[float] - Graham number - roic : Optional[float] - Return on invested capital - return_on_tangible_assets : Optional[float] - Return on tangible assets - graham_net_net : Optional[float] - Graham net-net working capital - working_capital : Optional[float] - Working capital - tangible_asset_value : Optional[float] - Tangible asset value - net_current_asset_value : Optional[float] - Net current asset value - invested_capital : Optional[float] - Invested capital - average_receivables : Optional[float] - Average receivables - average_payables : Optional[float] - Average payables - average_inventory : Optional[float] - Average inventory - days_sales_outstanding : Optional[float] - Days sales outstanding - days_payables_outstanding : Optional[float] - Days payables outstanding - days_of_inventory_on_hand : Optional[float] - Days of inventory on hand - receivables_turnover : Optional[float] - Receivables turnover - payables_turnover : Optional[float] - Payables turnover - inventory_turnover : Optional[float] - Inventory turnover - roe : Optional[float] - Return on equity - capex_per_share : Optional[float] - Capital expenditures per share - - fmp - === - - Parameters - ---------- - All fields are standardized. - - KeyMetrics ---------- All fields are standardized.""" @@ -4106,7 +2537,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def mgmt( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -4114,62 +2547,6 @@ class CLASS_stocks_fa(Container): """Key Executives. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - KeyExecutives - ------------- - title : str - Designation of the key executive. - name : str - Name of the key executive. - pay : Optional[int] - Pay of the key executive. - currency_pay : str - The currency of the pay. - gender : Optional[str] - Gender of the key executive. - year_born : Optional[str] - Birth year of the key executive. - title_since : Optional[int] - Date the tile was held since. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - KeyExecutives - ------------- - All fields are standardized. - - - openbb ====== @@ -4278,7 +2655,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def overview( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -4394,120 +2773,6 @@ class CLASS_stocks_fa(Container): All fields are standardized. - CompanyOverview - --------------- - All fields are standardized. - - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - CompanyOverview - --------------- - symbol : ConstrainedStrValue - Symbol to get data for. - 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 - === - - Parameters - ---------- - All fields are standardized. - - CompanyOverview --------------- All fields are standardized.""" @@ -4533,9 +2798,17 @@ class CLASS_stocks_fa(Container): @validate_arguments def own( self, - symbol: str, - date: datetime.date, - page: Optional[int] = 0, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + date: typing.Annotated[ + datetime.date, + OpenBBCustomParameter(description="A specific date to get data for."), + ], + page: Annotated[ + Optional[int], + OpenBBCustomParameter(description="The page number of the data to fetch."), + ] = 0, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -4661,130 +2934,6 @@ class CLASS_stocks_fa(Container): All fields are standardized. - StockOwnership - -------------- - All fields are standardized. - - - - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - date : date - A specific date to get data for. - page : Optional[int] - The page number of the data to fetch. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - StockOwnership - -------------- - date : date - The date of the data. - cik : int - The cik of the stock ownership. - filing_date : date - The filing date of the stock ownership. - investor_name : str - The investor name of the stock ownership. - symbol : str - The symbol of the stock ownership. - security_name : str - The security name of the stock ownership. - type_of_security : str - The type of security of the stock ownership. - security_cusip : str - The security cusip of the stock ownership. - shares_type : str - The shares type of the stock ownership. - put_call_share : str - The put call share of the stock ownership. - investment_discretion : str - The investment discretion of the stock ownership. - industry_title : str - The industry title of the stock ownership. - weight : float - The weight of the stock ownership. - last_weight : float - The last weight of the stock ownership. - change_in_weight : float - The change in weight of the stock ownership. - change_in_weight_percentage : float - The change in weight percentage of the stock ownership. - market_value : int - The market value of the stock ownership. - last_market_value : int - The last market value of the stock ownership. - change_in_market_value : int - The change in market value of the stock ownership. - change_in_market_value_percentage : float - The change in market value percentage of the stock ownership. - shares_number : int - The shares number of the stock ownership. - last_shares_number : int - The last shares number of the stock ownership. - change_in_shares_number : float - The change in shares number of the stock ownership. - change_in_shares_number_percentage : float - The change in shares number percentage of the stock ownership. - quarter_end_price : float - The quarter end price of the stock ownership. - avg_price_paid : float - The average price paid of the stock ownership. - is_new : bool - Is the stock ownership new. - is_sold_out : bool - Is the stock ownership sold out. - ownership : float - How much is the ownership. - last_ownership : float - The last ownership amount. - change_in_ownership : float - The change in ownership amount. - change_in_ownership_percentage : float - The change in ownership percentage. - holding_period : int - The holding period of the stock ownership. - first_added : date - The first added date of the stock ownership. - performance : float - The performance of the stock ownership. - performance_percentage : float - The performance percentage of the stock ownership. - last_performance : float - The last performance of the stock ownership. - change_in_performance : float - The change in performance of the stock ownership. - is_counted_for_performance : bool - Is the stock ownership counted for performance. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - StockOwnership -------------- All fields are standardized.""" @@ -4812,7 +2961,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def pt( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -4820,58 +2971,6 @@ class CLASS_stocks_fa(Container): """Price Target Consensus. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - PriceTargetConsensus - -------------------- - symbol : ConstrainedStrValue - Symbol to get data for. - 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 - === - - Parameters - ---------- - All fields are standardized. - - - PriceTargetConsensus - -------------------- - All fields are standardized. - - - openbb ====== @@ -4943,7 +3042,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def pta( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -4951,70 +3052,6 @@ class CLASS_stocks_fa(Container): """Price Target. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - PriceTarget - ----------- - symbol : ConstrainedStrValue - Symbol to get data for. - published_date : datetime - The published date of the price target. - news_url : str - The news URL of the price target. - news_title : Optional[str] - The news title of the price target. - analyst_name : Optional[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 - === - - Parameters - ---------- - All fields are standardized. - - - PriceTarget - ----------- - All fields are standardized. - - - openbb ====== @@ -5149,9 +3186,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def revgeo( self, - symbol: str, - period: Literal["quarterly", "annually"] = "annually", - structure: Literal["hierarchical", "flat"] = "flat", + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["quarterly", "annually"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + structure: Annotated[ + Literal["hierarchical", "flat"], + OpenBBCustomParameter(description="The structure of the returned data."), + ] = "flat", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -5159,64 +3206,6 @@ class CLASS_stocks_fa(Container): """Revenue Geographic. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - period : Literal['quarterly', 'annually'] - Period of the data to return (quarterly or annually). - structure : Literal['hierarchical', 'flat'] - The structure of the returned data. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - RevenueGeographic - ----------------- - date : date - The date of the data. - americas : Optional[int] - The revenue from the the American segment. - europe : Optional[int] - The revenue from the the European segment. - greater_china : Optional[int] - The revenue from the the Greater China segment. - japan : Optional[int] - The revenue from the the Japan segment. - rest_of_asia_pacific : Optional[int] - The revenue from the the Rest of Asia Pacific segment. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - RevenueGeographic - ----------------- - All fields are standardized. - - - openbb ====== @@ -5296,9 +3285,19 @@ class CLASS_stocks_fa(Container): @validate_arguments def revseg( self, - symbol: str, - period: Literal["quarterly", "annually"] = "annually", - structure: Literal["hierarchical", "flat"] = "flat", + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + period: Annotated[ + Literal["quarterly", "annually"], + OpenBBCustomParameter( + description="Period of the data to return (quarterly or annually)." + ), + ] = "annually", + structure: Annotated[ + Literal["hierarchical", "flat"], + OpenBBCustomParameter(description="The structure of the returned data."), + ] = "flat", chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -5306,56 +3305,6 @@ class CLASS_stocks_fa(Container): """Revenue Business Line. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - period : Literal['quarterly', 'annually'] - Period of the data to return (quarterly or annually). - structure : Literal['hierarchical', 'flat'] - The structure of the returned data. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - RevenueBusinessLine - ------------------- - date : date - The date of the data. - business_line : Mapping[str, int] - Day level data containing the revenue of the business line. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - RevenueBusinessLine - ------------------- - All fields are standardized. - - - openbb ====== @@ -5493,7 +3442,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def shrs( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -5501,60 +3452,6 @@ class CLASS_stocks_fa(Container): """Share Statistics. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - ShareStatistics - --------------- - symbol : ConstrainedStrValue - Symbol to get data for. - date : date - A specific date to get data for. - free_float : float - The percentage of unrestricted shares of a publicly-traded company. - float_shares : float - The number of shares available for trading by the general public. - outstanding_shares : float - The total number of shares of a publicly-traded company. - source : str - Source of the received data. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - ShareStatistics - --------------- - All fields are standardized. - - - openbb ====== @@ -5628,7 +3525,9 @@ class CLASS_stocks_fa(Container): @validate_arguments def split( self, - symbol: str, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -5636,56 +3535,6 @@ class CLASS_stocks_fa(Container): """Historical Stock Splits. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - HistoricalStockSplits - --------------------- - date : date - The date of the data. - 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 - === - - Parameters - ---------- - All fields are standardized. - - - HistoricalStockSplits - --------------------- - All fields are standardized. - - - openbb ====== @@ -5772,9 +3621,21 @@ class CLASS_stocks_fa(Container): @validate_arguments def transcript( self, - symbol: str, - year: int, - quarter: Literal[1, 2, 3, 4] = 1, + symbol: typing.Annotated[ + str, OpenBBCustomParameter(description="Symbol to get data for.") + ], + year: typing.Annotated[ + int, + OpenBBCustomParameter( + description="The year of the earnings call transcript." + ), + ], + quarter: Annotated[ + Literal[1, 2, 3, 4], + OpenBBCustomParameter( + description="The quarter of the earnings call transcript." + ), + ] = 1, chart: bool = False, provider: Optional[Literal["fmp"]] = None, **kwargs @@ -5782,62 +3643,6 @@ class CLASS_stocks_fa(Container): """Earnings Call Transcript. - openbb - ====== - - Parameters - ---------- - provider: Literal[fmp] - The provider to use for the query. - symbol : ConstrainedStrValue - Symbol to get data for. - year : int - The year of the earnings call transcript. - quarter : Literal[1, 2, 3, 4] - The quarter of the earnings call transcript. - - Returns - ------- - CommandOutput - results: List[Data] - Serializable results. - provider: Optional[PROVIDERS] - Provider name. - warnings: Optional[List[Warning_]] - List of warnings. - error: Optional[Error] - Caught exceptions. - chart: Optional[Chart] - Chart object. - - - EarningsCallTranscript - ---------------------- - symbol : ConstrainedStrValue - Symbol to get data for. - quarter : int - The quarter of the earnings call transcript. - year : int - The year of the earnings call transcript. - date : datetime - The date of the data. - content : str - The content of the earnings call transcript. - - fmp - === - - Parameters - ---------- - All fields are standardized. - - - EarningsCallTranscript - ---------------------- - All fields are standardized. - - - openbb ======