From 41f7899e7a50ebcf117cbbfe6d1070f1a03afe9f Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Mon, 22 Jul 2024 15:59:02 -0700 Subject: [PATCH 01/19] fix duplicated unions in reference.json --- .../openbb_core/app/static/package_builder.py | 26 +- openbb_platform/openbb/assets/reference.json | 284 +++++++++--------- .../openbb/package/crypto_price.py | 4 +- .../openbb/package/currency_price.py | 4 +- openbb_platform/openbb/package/economy.py | 68 ++--- openbb_platform/openbb/package/economy_gdp.py | 12 +- .../openbb/package/equity_calendar.py | 16 +- .../openbb/package/equity_discovery.py | 4 +- .../openbb/package/equity_fundamental.py | 10 +- .../openbb/package/equity_ownership.py | 4 +- .../openbb/package/equity_price.py | 6 +- openbb_platform/openbb/package/etf.py | 6 +- openbb_platform/openbb/package/fixedincome.py | 12 +- .../openbb/package/fixedincome_corporate.py | 18 +- .../openbb/package/fixedincome_government.py | 10 +- .../openbb/package/fixedincome_rate.py | 36 +-- .../openbb/package/fixedincome_spreads.py | 12 +- openbb_platform/openbb/package/news.py | 10 +- 18 files changed, 275 insertions(+), 267 deletions(-) diff --git a/openbb_platform/core/openbb_core/app/static/package_builder.py b/openbb_platform/core/openbb_core/app/static/package_builder.py index 0b473e1e9873..16b842ab6478 100644 --- a/openbb_platform/core/openbb_core/app/static/package_builder.py +++ b/openbb_platform/core/openbb_core/app/static/package_builder.py @@ -1069,7 +1069,15 @@ def generate_model_docstring( def format_type(type_: str, char_limit: Optional[int] = None) -> str: """Format type in docstrings.""" type_str = str(type_) - type_str = type_str.replace("NoneType", "None") + type_str = ( + type_str.replace("", "") + .replace("typing.", "") + .replace("pydantic.types.", "") + .replace("NoneType", "None") + .replace("datetime.date", "date") + .replace("datetime.datetime", "datetime") + ) if char_limit: type_str = type_str[:char_limit] + ( "..." if len(str(type_str)) > char_limit else "" @@ -1109,7 +1117,7 @@ def get_param_info(parameter: Optional[Parameter]) -> Tuple[str, str]: # Explicit parameters for param_name, param in explicit_params.items(): type_, description = get_param_info(param) - type_str = format_type(str(type_), char_limit=79) + type_str = format_type(str(type_), char_limit=86) docstring += f"{create_indent(2)}{param_name} : {type_str}\n" docstring += f"{create_indent(3)}{format_description(description)}\n" @@ -1484,21 +1492,15 @@ def _get_provider_field_params( field_type, is_required, "website" ) - if params_type == "QueryParams" and field in expanded_types: - expanded_type = DocstringGenerator.get_field_type( - expanded_types[field], is_required, "website" - ) - field_type = f"Union[{field_type}, {expanded_type}]" cleaned_description = ( str(field_info.description) - .strip().replace("\n", " ").replace(" ", " ").replace('"', "'") + .strip().replace('"', "'") ) # fmt: skip extra = field_info.json_schema_extra or {} # Add information for the providers supporting multiple symbols if params_type == "QueryParams" and extra: - providers = [] for p, v in extra.items(): # type: ignore[union-attr] if isinstance(v, dict) and v.get("multiple_items_allowed"): @@ -1515,6 +1517,12 @@ def _get_provider_field_params( # Manually setting to List[] for multiple items # Should be removed if TYPE_EXPANSION is updated to include this field_type = f"Union[{field_type}, List[{field_type}]]" + elif field in expanded_types: + expanded_type = DocstringGenerator.get_field_type( + expanded_types[field], is_required, "website" + ) + field_type = f"Union[{field_type}, {expanded_type}]" + default_value = "" if field_info.default is PydanticUndefined else field_info.default # fmt: skip provider_field_params.append( diff --git a/openbb_platform/openbb/assets/reference.json b/openbb_platform/openbb/assets/reference.json index f24668263ee2..e5a04a491ed9 100644 --- a/openbb_platform/openbb/assets/reference.json +++ b/openbb_platform/openbb/assets/reference.json @@ -175,7 +175,7 @@ "standard": [ { "name": "date", - "type": "Union[date, datetime]", + "type": "Union[Union[date, datetime], str]", "description": "The date of the data.", "default": "", "optional": false, @@ -523,7 +523,7 @@ "standard": [ { "name": "date", - "type": "Union[date, datetime]", + "type": "Union[Union[date, datetime], str]", "description": "The date of the data.", "default": "", "optional": false, @@ -2373,7 +2373,7 @@ "standard": [ { "name": "date", - "type": "datetime", + "type": "Union[datetime, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -2443,7 +2443,7 @@ }, { "name": "date", - "type": "Union[Union[Union[str, date], str], List[Union[Union[str, date], str]]]", + "type": "Union[Union[str, date], List[Union[str, date]]]", "description": "A specific date to get data for. Multiple items allowed for provider(s): yfinance.", "default": null, "optional": true, @@ -2492,7 +2492,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -2627,7 +2627,7 @@ { "name": "units", "type": "Literal['current_prices', 'volume', 'capita', 'growth', 'deflator']", - "description": "Units of the data, default is volume (chain linked volume, 2015). 'current_prices', 'volume', and 'capita' are expressed in USD; 'growth' as a percent; 'deflator' as an index.", + "description": "Units of the data, default is volume (chain linked volume, 2015).\n'current_prices', 'volume', and 'capita' are expressed in USD; 'growth' as a percent; 'deflator' as an index.", "default": "volume", "optional": true, "choices": [ @@ -2673,7 +2673,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -2947,7 +2947,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -3224,7 +3224,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -3333,7 +3333,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change\n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -3382,7 +3382,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -3465,7 +3465,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n \n avg = Average\n \n sum = Sum\n \n eop = End of Period", "default": null, "optional": true, "choices": [ @@ -3477,7 +3477,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n \n None = No transformation\n \n chg = Change\n \n ch1 = Change from Year Ago\n \n pch = Percent Change\n \n pc1 = Percent Change from Year Ago\n \n pca = Compounded Annual Rate of Change\n \n cch = Continuously Compounded Rate of Change\n \n cca = Continuously Compounded Annual Rate of Change\n \n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -3526,7 +3526,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -3535,7 +3535,7 @@ { "name": "consumer_sentiment", "type": "float", - "description": "Index of the results of the University of Michigan's monthly Survey of Consumers, which is used to estimate future spending and saving. (1966:Q1=100).", + "description": "Index of the results of the University of Michigan's monthly Survey of Consumers, which is used to estimate future spending and saving. (1966:Q1=100).", "default": null, "optional": true, "choices": null @@ -3601,7 +3601,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n \n avg = Average\n \n sum = Sum\n \n eop = End of Period", "default": null, "optional": true, "choices": [ @@ -3613,7 +3613,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n \n None = No transformation\n \n chg = Change\n \n ch1 = Change from Year Ago\n \n pch = Percent Change\n \n pc1 = Percent Change from Year Ago\n \n pca = Compounded Annual Rate of Change\n \n cch = Continuously Compounded Rate of Change\n \n cca = Continuously Compounded Annual Rate of Change\n \n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -3662,7 +3662,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -3816,7 +3816,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n avg = Average\n sum = Sum\n eop = End of Period", "default": null, "optional": true, "choices": [ @@ -3828,7 +3828,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change\n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -3877,7 +3877,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -3939,7 +3939,7 @@ "standard": [ { "name": "date", - "type": "Union[Union[Union[str, date], str], List[Union[Union[str, date], str]]]", + "type": "Union[Union[str, date], List[Union[str, date]]]", "description": "A specific date to get data for. Default is the latest report. Multiple items allowed for provider(s): fred.", "default": null, "optional": true, @@ -4015,7 +4015,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -4401,7 +4401,7 @@ "standard": [ { "name": "date", - "type": "datetime", + "type": "Union[datetime, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -4752,7 +4752,7 @@ { "name": "country", "type": "str", - "description": "Country to get CPI for. This is the list of OECD supported countries", + "description": "Country to get CPI for. This is the list of OECD supported countries", "default": "united_states", "optional": true, "choices": [ @@ -4885,7 +4885,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -5286,7 +5286,7 @@ { "name": "is_release", "type": "bool", - "description": "Is release? If True, other search filter variables are ignored. If no query text or release_id is supplied, this defaults to True.", + "description": "Is release? If True, other search filter variables are ignored. If no query text or release_id is supplied, this defaults to True.", "default": false, "optional": true, "choices": null @@ -5326,7 +5326,7 @@ { "name": "filter_value", "type": "str", - "description": "String value to filter the variable by. Used in conjunction with filter_variable.", + "description": "String value to filter the variable by. Used in conjunction with filter_variable.", "default": null, "optional": true, "choices": null @@ -5334,7 +5334,7 @@ { "name": "tag_names", "type": "Union[str, List[str]]", - "description": "A semicolon delimited list of tag names that series match all of. Example: 'japan;imports' Multiple items allowed for provider(s): fred.", + "description": "A semicolon delimited list of tag names that series match all of. Example: 'japan;imports' Multiple items allowed for provider(s): fred.", "default": null, "optional": true, "choices": null @@ -5342,7 +5342,7 @@ { "name": "exclude_tag_names", "type": "Union[str, List[str]]", - "description": "A semicolon delimited list of tag names that series match none of. Example: 'imports;services'. Requires that variable tag_names also be set to limit the number of matching series. Multiple items allowed for provider(s): fred.", + "description": "A semicolon delimited list of tag names that series match none of. Example: 'imports;services'. Requires that variable tag_names also be set to limit the number of matching series. Multiple items allowed for provider(s): fred.", "default": null, "optional": true, "choices": null @@ -5615,7 +5615,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'd', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert high frequency data to lower frequency. None = No change a = Annual q = Quarterly m = Monthly w = Weekly d = Daily wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert high frequency data to lower frequency.\n \n None = No change\n \n a = Annual\n \n q = Quarterly\n \n m = Monthly\n \n w = Weekly\n \n d = Daily\n \n wef = Weekly, Ending Friday\n \n weth = Weekly, Ending Thursday\n \n wew = Weekly, Ending Wednesday\n \n wetu = Weekly, Ending Tuesday\n \n wem = Weekly, Ending Monday\n \n wesu = Weekly, Ending Sunday\n \n wesa = Weekly, Ending Saturday\n \n bwew = Biweekly, Ending Wednesday\n \n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -5638,7 +5638,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. This parameter has no affect if the frequency parameter is not set. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n This parameter has no affect if the frequency parameter is not set.\n \n avg = Average\n \n sum = Sum\n \n eop = End of Period", "default": "eop", "optional": true, "choices": [ @@ -5650,7 +5650,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n \n None = No transformation\n \n chg = Change\n \n ch1 = Change from Year Ago\n \n pch = Percent Change\n \n pc1 = Percent Change from Year Ago\n \n pca = Compounded Annual Rate of Change\n \n cch = Continuously Compounded Rate of Change\n \n cca = Continuously Compounded Annual Rate of Change\n \n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -5717,7 +5717,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -5765,7 +5765,7 @@ }, { "name": "date", - "type": "Union[Union[Union[str, date], str], List[Union[Union[str, date], str]]]", + "type": "Union[Union[str, date], List[Union[str, date]]]", "description": "A specific date to get data for. Multiple items allowed for provider(s): fred.", "default": null, "optional": true, @@ -5814,7 +5814,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -5871,7 +5871,7 @@ { "name": "symbol", "type": "str", - "description": "The date of the data.", + "description": "Symbol representing the entity requested in the data.", "default": null, "optional": true, "choices": null @@ -6215,7 +6215,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -6359,7 +6359,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -6471,7 +6471,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -6583,7 +6583,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -6716,7 +6716,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'd', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert high frequency data to lower frequency. None = No change a = Annual q = Quarterly m = Monthly w = Weekly d = Daily wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert high frequency data to lower frequency.\n \n None = No change\n \n a = Annual\n \n q = Quarterly\n \n m = Monthly\n \n w = Weekly\n \n d = Daily\n \n wef = Weekly, Ending Friday\n \n weth = Weekly, Ending Thursday\n \n wew = Weekly, Ending Wednesday\n \n wetu = Weekly, Ending Tuesday\n \n wem = Weekly, Ending Monday\n \n wesu = Weekly, Ending Sunday\n \n wesa = Weekly, Ending Saturday\n \n bwew = Biweekly, Ending Wednesday\n \n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -6739,7 +6739,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. This parameter has no affect if the frequency parameter is not set. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n This parameter has no affect if the frequency parameter is not set.\n \n avg = Average\n \n sum = Sum\n \n eop = End of Period", "default": "eop", "optional": true, "choices": [ @@ -6751,7 +6751,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n \n None = No transformation\n \n chg = Change\n \n ch1 = Change from Year Ago\n \n pch = Percent Change\n \n pc1 = Percent Change from Year Ago\n \n pca = Compounded Annual Rate of Change\n \n cch = Continuously Compounded Rate of Change\n \n cca = Continuously Compounded Annual Rate of Change\n \n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -6800,7 +6800,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -7266,7 +7266,7 @@ { "name": "transform", "type": "Literal['toya', 'tpop', 'tusd', 'tpgp']", - "description": "The transformation to apply to the data, default is None. tpop: Change from previous period toya: Change from one year ago tusd: Values as US dollars tpgp: Values as a percent of GDP Only 'tpop' and 'toya' are applicable to all indicators. Applying transformations across multiple indicators/countries may produce unexpected results. This is because not all indicators are compatible with all transformations, and the original units and scale differ between entities. `tusd` should only be used where values are currencies.", + "description": "The transformation to apply to the data, default is None.\n\n tpop: Change from previous period\n toya: Change from one year ago\n tusd: Values as US dollars\n tpgp: Values as a percent of GDP\n\n Only 'tpop' and 'toya' are applicable to all indicators. Applying transformations across multiple indicators/countries may produce unexpected results.\n This is because not all indicators are compatible with all transformations, and the original units and scale differ between entities.\n `tusd` should only be used where values are currencies.", "default": null, "optional": true, "choices": null @@ -7322,7 +7322,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -7476,7 +7476,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -7827,7 +7827,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -8021,7 +8021,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -8191,7 +8191,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -8365,7 +8365,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change\n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -8414,7 +8414,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -8548,7 +8548,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -8603,7 +8603,7 @@ "standard": [ { "name": "date", - "type": "Union[Union[Union[str, date], str], List[Union[Union[str, date], str]]]", + "type": "Union[Union[str, date], List[Union[str, date]]]", "description": "A specific date to get data for. Default is the latest report. Multiple items allowed for provider(s): fred.", "default": null, "optional": true, @@ -8670,7 +8670,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -9247,7 +9247,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -9863,7 +9863,7 @@ { "name": "instantaneous", "type": "bool", - "description": "Whether to retrieve instantaneous data. See the notes above for more information. Defaults to False. Some facts are only available as instantaneous data. The function will automatically attempt the inverse of this parameter if the initial fiscal quarter request fails. This parameter is ignored when a symbol is supplied.", + "description": "Whether to retrieve instantaneous data. See the notes above for more information. Defaults to False. Some facts are only available as instantaneous data.\nThe function will automatically attempt the inverse of this parameter if the initial fiscal quarter request fails. This parameter is ignored when a symbol is supplied.", "default": false, "optional": true, "choices": null @@ -10517,7 +10517,7 @@ }, { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -11572,7 +11572,7 @@ }, { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -12099,7 +12099,7 @@ }, { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -13445,7 +13445,7 @@ }, { "name": "date", - "type": "datetime", + "type": "Union[datetime, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -14092,7 +14092,7 @@ { "name": "fiscal_year", "type": "int", - "description": "The specific fiscal year. Reports do not go beyond 2008.", + "description": "The specific fiscal year. Reports do not go beyond 2008.", "default": null, "optional": true, "choices": null @@ -16155,7 +16155,7 @@ { "name": "fiscal_year", "type": "int", - "description": "The specific fiscal year. Reports do not go beyond 2008.", + "description": "The specific fiscal year. Reports do not go beyond 2008.", "default": null, "optional": true, "choices": null @@ -17177,7 +17177,7 @@ { "name": "fiscal_year", "type": "int", - "description": "The specific fiscal year. Reports do not go beyond 2008.", + "description": "The specific fiscal year. Reports do not go beyond 2008.", "default": null, "optional": true, "choices": null @@ -17851,7 +17851,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -18440,7 +18440,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -18546,7 +18546,7 @@ { "name": "fiscal_year", "type": "int", - "description": "The specific fiscal year. Reports do not go beyond 2008.", + "description": "The specific fiscal year. Reports do not go beyond 2008.", "default": null, "optional": true, "choices": null @@ -21875,7 +21875,7 @@ { "name": "fiscal_year", "type": "int", - "description": "The specific fiscal year. Reports do not go beyond 2008.", + "description": "The specific fiscal year. Reports do not go beyond 2008.", "default": null, "optional": true, "choices": null @@ -22726,7 +22726,7 @@ { "name": "use_cache", "type": "bool", - "description": "Whether or not to use cache. If True, cache will store for one day.", + "description": "Whether or not to use cache. If True, cache will store for one day.", "default": true, "optional": true, "choices": null @@ -23041,7 +23041,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -23168,7 +23168,7 @@ }, { "name": "date", - "type": "datetime", + "type": "Union[datetime, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -23255,7 +23255,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -23350,7 +23350,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -23758,7 +23758,7 @@ }, { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -24461,7 +24461,7 @@ }, { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -25393,7 +25393,7 @@ { "name": "ask_size", "type": "int", - "description": "The ask size. This represents the number of round lot orders at the given ask price. The normal round lot size is 100 shares. An ask size of 2 means there are 200 shares available to purchase at the given ask price.", + "description": "The ask size. This represents the number of round lot orders at the given ask price.\n The normal round lot size is 100 shares.\n An ask size of 2 means there are 200 shares available to purchase at the given ask price.", "default": "", "optional": false, "choices": null @@ -25729,7 +25729,7 @@ "standard": [ { "name": "date", - "type": "Union[date, datetime]", + "type": "Union[Union[date, datetime], str]", "description": "The date of the data.", "default": "", "optional": false, @@ -26274,7 +26274,7 @@ { "name": "limit", "type": "int", - "description": "Limit the number of reports to parse, from most recent. Approximately 24 reports per year, going back to 2009.", + "description": "Limit the number of reports to parse, from most recent.\n Approximately 24 reports per year, going back to 2009.", "default": 24, "optional": true, "choices": null @@ -28387,7 +28387,7 @@ "standard": [ { "name": "date", - "type": "Union[date, datetime]", + "type": "Union[Union[date, datetime], str]", "description": "The date of the data.", "default": "", "optional": false, @@ -30193,7 +30193,7 @@ { "name": "country", "type": "str", - "description": "The country of the exposure. Corresponding values are normalized percentage points.", + "description": "The country of the exposure. Corresponding values are normalized percentage points.", "default": "", "optional": false, "choices": null @@ -30608,7 +30608,7 @@ { "name": "date", "type": "Union[Union[str, date], str]", - "description": "A specific date to get data for. The date represents the period ending. The date entered will return the closest filing.", + "description": "A specific date to get data for. The date represents the period ending. The date entered will return the closest filing.", "default": null, "optional": true, "choices": null @@ -31645,7 +31645,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -31811,7 +31811,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly m = Monthly w = Weekly wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert daily data to lower frequency.\n a = Annual\n q = Quarterly\n m = Monthly\n w = Weekly\n wef = Weekly, Ending Friday\n weth = Weekly, Ending Thursday\n wew = Weekly, Ending Wednesday\n wetu = Weekly, Ending Tuesday\n wem = Weekly, Ending Monday\n wesu = Weekly, Ending Sunday\n wesa = Weekly, Ending Saturday\n bwew = Biweekly, Ending Wednesday\n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -31833,7 +31833,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n avg = Average\n sum = Sum\n eop = End of Period", "default": null, "optional": true, "choices": [ @@ -31845,7 +31845,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change\n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -31894,7 +31894,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -32014,7 +32014,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -32071,7 +32071,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly m = Monthly w = Weekly wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert daily data to lower frequency.\n a = Annual\n q = Quarterly\n m = Monthly\n w = Weekly\n wef = Weekly, Ending Friday\n weth = Weekly, Ending Thursday\n wew = Weekly, Ending Wednesday\n wetu = Weekly, Ending Tuesday\n wem = Weekly, Ending Monday\n wesu = Weekly, Ending Sunday\n wesa = Weekly, Ending Saturday\n bwew = Biweekly, Ending Wednesday\n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -32093,7 +32093,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n avg = Average\n sum = Sum\n eop = End of Period", "default": null, "optional": true, "choices": [ @@ -32105,7 +32105,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change\n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -32154,7 +32154,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -32315,7 +32315,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -32372,7 +32372,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly m = Monthly w = Weekly wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert daily data to lower frequency.\n a = Annual\n q = Quarterly\n m = Monthly\n w = Weekly\n wef = Weekly, Ending Friday\n weth = Weekly, Ending Thursday\n wew = Weekly, Ending Wednesday\n wetu = Weekly, Ending Tuesday\n wem = Weekly, Ending Monday\n wesu = Weekly, Ending Sunday\n wesa = Weekly, Ending Saturday\n bwew = Biweekly, Ending Wednesday\n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -32394,7 +32394,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n avg = Average\n sum = Sum\n eop = End of Period", "default": null, "optional": true, "choices": [ @@ -32406,7 +32406,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change\n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -32463,7 +32463,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -32633,7 +32633,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -32737,7 +32737,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly m = Monthly w = Weekly d = Daily wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert daily data to lower frequency.\n \n a = Annual\n \n q = Quarterly\n \n m = Monthly\n \n w = Weekly\n \n d = Daily\n \n wef = Weekly, Ending Friday\n \n weth = Weekly, Ending Thursday\n \n wew = Weekly, Ending Wednesday\n \n wetu = Weekly, Ending Tuesday\n \n wem = Weekly, Ending Monday\n \n wesu = Weekly, Ending Sunday\n \n wesa = Weekly, Ending Saturday\n \n bwew = Biweekly, Ending Wednesday\n \n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -32759,7 +32759,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n \n avg = Average\n \n sum = Sum\n \n eop = End of Period", "default": null, "optional": true, "choices": [ @@ -32771,7 +32771,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n \n None = No transformation\n \n chg = Change\n \n ch1 = Change from Year Ago\n \n pch = Percent Change\n \n pc1 = Percent Change from Year Ago\n \n pca = Compounded Annual Rate of Change\n \n cch = Continuously Compounded Rate of Change\n \n cca = Continuously Compounded Annual Rate of Change\n \n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -32820,7 +32820,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -32963,7 +32963,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -33059,7 +33059,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -33116,7 +33116,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly m = Monthly w = Weekly wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert daily data to lower frequency.\n a = Annual\n q = Quarterly\n m = Monthly\n w = Weekly\n wef = Weekly, Ending Friday\n weth = Weekly, Ending Thursday\n wew = Weekly, Ending Wednesday\n wetu = Weekly, Ending Tuesday\n wem = Weekly, Ending Monday\n wesu = Weekly, Ending Sunday\n wesa = Weekly, Ending Saturday\n bwew = Biweekly, Ending Wednesday\n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -33138,7 +33138,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n avg = Average\n sum = Sum\n eop = End of Period", "default": null, "optional": true, "choices": [ @@ -33150,7 +33150,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change\n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -33199,7 +33199,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -33344,7 +33344,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -33439,7 +33439,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -33534,7 +33534,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -33564,7 +33564,7 @@ "standard": [ { "name": "date", - "type": "Union[Union[str, str], List[Union[str, str]]]", + "type": "Union[str, List[str]]", "description": "A specific date to get data for. By default is the current data. Multiple items allowed for provider(s): econdb, federal_reserve, fmp, fred.", "default": null, "optional": true, @@ -33667,7 +33667,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": null, "optional": true, @@ -33853,7 +33853,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -34019,7 +34019,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'd', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert high frequency data to lower frequency. None = No change a = Annual q = Quarterly m = Monthly w = Weekly d = Daily wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert high frequency data to lower frequency.\n None = No change\n a = Annual\n q = Quarterly\n m = Monthly\n w = Weekly\n d = Daily\n wef = Weekly, Ending Friday\n weth = Weekly, Ending Thursday\n wew = Weekly, Ending Wednesday\n wetu = Weekly, Ending Tuesday\n wem = Weekly, Ending Monday\n wesu = Weekly, Ending Sunday\n wesa = Weekly, Ending Saturday\n bwew = Biweekly, Ending Wednesday\n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -34042,7 +34042,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n avg = Average\n sum = Sum\n eop = End of Period", "default": null, "optional": true, "choices": [ @@ -34054,7 +34054,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change", "default": null, "optional": true, "choices": [ @@ -34102,7 +34102,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -34254,7 +34254,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -34358,7 +34358,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -34388,7 +34388,7 @@ "standard": [ { "name": "date", - "type": "Union[Union[Union[str, date], str], List[Union[Union[str, date], str]]]", + "type": "Union[Union[str, date], List[Union[str, date]]]", "description": "A specific date to get data for. Multiple items allowed for provider(s): fred.", "default": null, "optional": true, @@ -34449,7 +34449,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -34563,7 +34563,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -34649,7 +34649,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly m = Monthly w = Weekly wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert daily data to lower frequency.\n a = Annual\n q = Quarterly\n m = Monthly\n w = Weekly\n wef = Weekly, Ending Friday\n weth = Weekly, Ending Thursday\n wew = Weekly, Ending Wednesday\n wetu = Weekly, Ending Tuesday\n wem = Weekly, Ending Monday\n wesu = Weekly, Ending Sunday\n wesa = Weekly, Ending Saturday\n bwew = Biweekly, Ending Wednesday\n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -34671,7 +34671,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n avg = Average\n sum = Sum\n eop = End of Period", "default": null, "optional": true, "choices": [ @@ -34683,7 +34683,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change\n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -34732,7 +34732,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -34822,7 +34822,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert daily data to lower frequency. a = Annual q = Quarterly m = Monthly w = Weekly wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert daily data to lower frequency.\n a = Annual\n q = Quarterly\n m = Monthly\n w = Weekly\n wef = Weekly, Ending Friday\n weth = Weekly, Ending Thursday\n wew = Weekly, Ending Wednesday\n wetu = Weekly, Ending Tuesday\n wem = Weekly, Ending Monday\n wesu = Weekly, Ending Sunday\n wesa = Weekly, Ending Saturday\n bwew = Biweekly, Ending Wednesday\n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -34844,7 +34844,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n avg = Average\n sum = Sum\n eop = End of Period", "default": null, "optional": true, "choices": [ @@ -34856,7 +34856,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change\n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -34905,7 +34905,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -35090,7 +35090,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'd', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert daily data to lower frequency. None = No change a = Annual q = Quarterly m = Monthly w = Weekly d = Daily wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert daily data to lower frequency.\n None = No change\n a = Annual\n q = Quarterly\n m = Monthly\n w = Weekly\n d = Daily\n wef = Weekly, Ending Friday\n weth = Weekly, Ending Thursday\n wew = Weekly, Ending Wednesday\n wetu = Weekly, Ending Tuesday\n wem = Weekly, Ending Monday\n wesu = Weekly, Ending Sunday\n wesa = Weekly, Ending Saturday\n bwew = Biweekly, Ending Wednesday\n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -35113,7 +35113,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. This parameter has no affect if the frequency parameter is not set, default is 'avg'. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n This parameter has no affect if the frequency parameter is not set, default is 'avg'.\n avg = Average\n sum = Sum\n eop = End of Period", "default": "avg", "optional": true, "choices": [ @@ -35125,7 +35125,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change\n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -35174,7 +35174,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -35284,7 +35284,7 @@ { "name": "frequency", "type": "Literal['a', 'q', 'm', 'w', 'd', 'wef', 'weth', 'wew', 'wetu', 'wem', 'wesu', 'wesa', 'bwew', 'bwem']", - "description": "Frequency aggregation to convert daily data to lower frequency. None = No change a = Annual q = Quarterly m = Monthly w = Weekly d = Daily wef = Weekly, Ending Friday weth = Weekly, Ending Thursday wew = Weekly, Ending Wednesday wetu = Weekly, Ending Tuesday wem = Weekly, Ending Monday wesu = Weekly, Ending Sunday wesa = Weekly, Ending Saturday bwew = Biweekly, Ending Wednesday bwem = Biweekly, Ending Monday", + "description": "Frequency aggregation to convert daily data to lower frequency.\n None = No change\n a = Annual\n q = Quarterly\n m = Monthly\n w = Weekly\n d = Daily\n wef = Weekly, Ending Friday\n weth = Weekly, Ending Thursday\n wew = Weekly, Ending Wednesday\n wetu = Weekly, Ending Tuesday\n wem = Weekly, Ending Monday\n wesu = Weekly, Ending Sunday\n wesa = Weekly, Ending Saturday\n bwew = Biweekly, Ending Wednesday\n bwem = Biweekly, Ending Monday", "default": null, "optional": true, "choices": [ @@ -35307,7 +35307,7 @@ { "name": "aggregation_method", "type": "Literal['avg', 'sum', 'eop']", - "description": "A key that indicates the aggregation method used for frequency aggregation. This parameter has no affect if the frequency parameter is not set, default is 'avg'. avg = Average sum = Sum eop = End of Period", + "description": "A key that indicates the aggregation method used for frequency aggregation.\n This parameter has no affect if the frequency parameter is not set, default is 'avg'.\n avg = Average\n sum = Sum\n eop = End of Period", "default": "avg", "optional": true, "choices": [ @@ -35319,7 +35319,7 @@ { "name": "transform", "type": "Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']", - "description": "Transformation type None = No transformation chg = Change ch1 = Change from Year Ago pch = Percent Change pc1 = Percent Change from Year Ago pca = Compounded Annual Rate of Change cch = Continuously Compounded Rate of Change cca = Continuously Compounded Annual Rate of Change log = Natural Log", + "description": "Transformation type\n None = No transformation\n chg = Change\n ch1 = Change from Year Ago\n pch = Percent Change\n pc1 = Percent Change from Year Ago\n pca = Compounded Annual Rate of Change\n cch = Continuously Compounded Rate of Change\n cca = Continuously Compounded Annual Rate of Change\n log = Natural Log", "default": null, "optional": true, "choices": [ @@ -35368,7 +35368,7 @@ "standard": [ { "name": "date", - "type": "date", + "type": "Union[date, str]", "description": "The date of the data.", "default": "", "optional": false, @@ -35542,7 +35542,7 @@ "standard": [ { "name": "date", - "type": "Union[date, datetime]", + "type": "Union[Union[date, datetime], str]", "description": "The date of the data.", "default": "", "optional": false, @@ -36140,7 +36140,7 @@ "standard": [ { "name": "date", - "type": "datetime", + "type": "Union[datetime, str]", "description": "The date of the data. The published date of the article.", "default": "", "optional": false, @@ -36692,7 +36692,7 @@ "standard": [ { "name": "date", - "type": "datetime", + "type": "Union[datetime, str]", "description": "The date of the data. Here it is the published date of the article.", "default": "", "optional": false, diff --git a/openbb_platform/openbb/package/crypto_price.py b/openbb_platform/openbb/package/crypto_price.py index d60ec9119d6c..f43e427b2ba3 100644 --- a/openbb_platform/openbb/package/crypto_price.py +++ b/openbb_platform/openbb/package/crypto_price.py @@ -51,9 +51,9 @@ def historical( ---------- symbol : Union[str, List[str]] Symbol to get data for. Can use CURR1-CURR2 or CURR1CURR2 format. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fmp', 'polygon', 'tiingo', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, polygon, tiingo, yfinance. diff --git a/openbb_platform/openbb/package/currency_price.py b/openbb_platform/openbb/package/currency_price.py index 1c75f8cbcf62..59d205de8a09 100644 --- a/openbb_platform/openbb/package/currency_price.py +++ b/openbb_platform/openbb/package/currency_price.py @@ -58,9 +58,9 @@ def historical( ---------- symbol : Union[str, List[str]] Symbol to get data for. Can use CURR1-CURR2 or CURR1CURR2 format. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fmp', 'polygon', 'tiingo', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, polygon, tiingo, yfinance. diff --git a/openbb_platform/openbb/package/economy.py b/openbb_platform/openbb/package/economy.py index 52a72dafaae9..af1a088c5548 100644 --- a/openbb_platform/openbb/package/economy.py +++ b/openbb_platform/openbb/package/economy.py @@ -260,9 +260,9 @@ def calendar( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fmp', 'tradingeconomics']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, tradingeconomics. @@ -395,7 +395,7 @@ def central_bank_holdings( Parameters ---------- - date : Union[datetime.date, None, str] + date : Union[date, None, str] A specific date to get data for. provider : Optional[Literal['federal_reserve']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve. @@ -536,9 +536,9 @@ def composite_leading_indicator( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['oecd']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd. @@ -758,9 +758,9 @@ def cpi( The frequency of the data. harmonized : bool If true, returns harmonized data. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fred', 'oecd']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred, oecd. @@ -862,9 +862,9 @@ def fred_regional( ---------- symbol : str Symbol to get data for. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. limit : Optional[int] The number of data entries to return. @@ -1036,7 +1036,7 @@ def fred_release_table( The ID of the release. Use `fred_search` to find releases. element_id : Optional[str] The element ID of a specific table in the release. - date : Union[str, datetime.date, None, List[Union[str, datetime.d... + date : Union[str, date, None, List[Union[str, date, None]]] A specific date to get data for. Multiple comma separated items allowed for provider(s): fred. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. @@ -1072,7 +1072,7 @@ def fred_release_table( children : Optional[str] The element_id of each child, as a comma-separated string. symbol : Optional[str] - The date of the data. + Symbol representing the entity requested in the data. name : Optional[str] The name of the series. value : Optional[float] @@ -1275,9 +1275,9 @@ def fred_series( ---------- symbol : Union[str, List[str]] Symbol to get data for. Multiple comma separated items allowed for provider(s): fred. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. limit : Optional[int] The number of data entries to return. @@ -1461,9 +1461,9 @@ def house_price_index( The frequency of the data. transform : Literal['index', 'yoy', 'period'] Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy). - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['oecd']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd. @@ -1553,9 +1553,9 @@ def immediate_interest_rate( ---------- country : Union[str, List[str]] The country to get data. Multiple comma separated items allowed for provider(s): oecd. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['oecd']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd. @@ -1653,9 +1653,9 @@ def indicators( Symbol to get data for. The base symbol for the indicator (e.g. GDP, CPI, etc.). Multiple comma separated items allowed for provider(s): econdb. country : Union[str, None, List[Optional[str]]] The country to get data. The country represented by the indicator, if available. Multiple comma separated items allowed for provider(s): econdb. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['econdb']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb. @@ -1770,9 +1770,9 @@ def long_term_interest_rate( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['oecd']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd. @@ -1860,9 +1860,9 @@ def money_measures( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. adjusted : Optional[bool] Whether to return seasonally adjusted data. @@ -1950,7 +1950,7 @@ def pce( Parameters ---------- - date : Union[str, datetime.date, None, List[Union[str, datetime.d... + date : Union[str, date, None, List[Union[str, date, None]]] A specific date to get data for. Default is the latest report. Multiple comma separated items allowed for provider(s): fred. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. @@ -2042,9 +2042,9 @@ def primary_dealer_positioning( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['federal_reserve']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve. @@ -2138,9 +2138,9 @@ def retail_prices( The item or basket of items to query. country : str The country to get data. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. @@ -2325,9 +2325,9 @@ def share_price_index( The country to get data. Multiple comma separated items allowed for provider(s): oecd. frequency : Literal['monthly', 'quarter', 'annual'] The frequency of the data. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['oecd']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd. @@ -2416,9 +2416,9 @@ def short_term_interest_rate( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['oecd']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd. @@ -2523,9 +2523,9 @@ def unemployment( The country to get data. Multiple comma separated items allowed for provider(s): oecd. frequency : Literal['monthly', 'quarter', 'annual'] The frequency of the data. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['oecd']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd. diff --git a/openbb_platform/openbb/package/economy_gdp.py b/openbb_platform/openbb/package/economy_gdp.py index b336a63ed6c8..7240e572a44e 100644 --- a/openbb_platform/openbb/package/economy_gdp.py +++ b/openbb_platform/openbb/package/economy_gdp.py @@ -45,9 +45,9 @@ def forecast( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['oecd']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd. @@ -132,9 +132,9 @@ def nominal( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['econdb', 'oecd']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, oecd. @@ -231,9 +231,9 @@ def real( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['econdb', 'oecd']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, oecd. diff --git a/openbb_platform/openbb/package/equity_calendar.py b/openbb_platform/openbb/package/equity_calendar.py index 071136fac33f..2d57eca41b34 100644 --- a/openbb_platform/openbb/package/equity_calendar.py +++ b/openbb_platform/openbb/package/equity_calendar.py @@ -46,9 +46,9 @@ def dividend( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fmp']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp. @@ -136,9 +136,9 @@ def earnings( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fmp']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp. @@ -241,9 +241,9 @@ def ipo( ---------- symbol : Optional[str] Symbol to get data for. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. limit : Optional[int] The number of data entries to return. @@ -369,9 +369,9 @@ def splits( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fmp']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp. diff --git a/openbb_platform/openbb/package/equity_discovery.py b/openbb_platform/openbb/package/equity_discovery.py index ee83c6787d9c..c54f2051a06b 100644 --- a/openbb_platform/openbb/package/equity_discovery.py +++ b/openbb_platform/openbb/package/equity_discovery.py @@ -237,9 +237,9 @@ def filings( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. form_type : Optional[str] Filter by form type. Visit https://www.sec.gov/forms for a list of supported form types. diff --git a/openbb_platform/openbb/package/equity_fundamental.py b/openbb_platform/openbb/package/equity_fundamental.py index 41e20e4f9cf4..2c9fcdcfc63f 100644 --- a/openbb_platform/openbb/package/equity_fundamental.py +++ b/openbb_platform/openbb/package/equity_fundamental.py @@ -998,9 +998,9 @@ def dividends( ---------- symbol : str Symbol to get data for. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fmp', 'intrinio', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance. @@ -1351,11 +1351,11 @@ def historical_attributes( Symbol to get data for. Multiple comma separated items allowed for provider(s): intrinio. tag : Union[str, List[str]] Intrinio data tag ID or code. Multiple comma separated items allowed for provider(s): intrinio. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. - frequency : Optional[Literal['daily', 'weekly', 'monthly', 'quarterly', 'year... + frequency : Optional[Literal['daily', 'weekly', 'monthly', 'quarterly', 'yearly']] The frequency of the data. limit : Optional[int] The number of data entries to return. diff --git a/openbb_platform/openbb/package/equity_ownership.py b/openbb_platform/openbb/package/equity_ownership.py index 7a7173af7315..eb52434be8bb 100644 --- a/openbb_platform/openbb/package/equity_ownership.py +++ b/openbb_platform/openbb/package/equity_ownership.py @@ -67,7 +67,7 @@ def form_13f( ---------- symbol : str Symbol to get data for. A CIK or Symbol can be used. - date : Union[datetime.date, None, str] + date : Union[date, None, str] A specific date to get data for. The date represents the end of the reporting period. All form 13F-HR filings are based on the calendar year and are reported quarterly. If a date is not supplied, the most recent filing is returned. Submissions beginning 2013-06-30 are supported. limit : Optional[int] The number of data entries to return. The number of previous filings to return. The date parameter takes priority over this parameter. @@ -447,7 +447,7 @@ def major_holders( ---------- symbol : str Symbol to get data for. - date : Union[datetime.date, None, str] + date : Union[date, None, str] A specific date to get data for. page : Optional[int] Page number of the data to fetch. diff --git a/openbb_platform/openbb/package/equity_price.py b/openbb_platform/openbb/package/equity_price.py index 1520e0e1c6b7..0db8bac14a7a 100644 --- a/openbb_platform/openbb/package/equity_price.py +++ b/openbb_platform/openbb/package/equity_price.py @@ -60,11 +60,11 @@ def historical( Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance. interval : Optional[str] Time interval of the data to return. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. - provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'tiingo', 'yfinanc... + provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'tiingo', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, tiingo, yfinance. start_time : Optional[datetime.time] Return intervals starting at the specified time on the `start_date` formatted as 'HH:MM:SS'. (provider: intrinio) diff --git a/openbb_platform/openbb/package/etf.py b/openbb_platform/openbb/package/etf.py index 497fb7778748..c57ede7886a0 100644 --- a/openbb_platform/openbb/package/etf.py +++ b/openbb_platform/openbb/package/etf.py @@ -215,11 +215,11 @@ def historical( Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance. interval : Optional[str] Time interval of the data to return. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. - provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'tiingo', 'yfinanc... + provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'tiingo', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, tiingo, yfinance. start_time : Optional[datetime.time] Return intervals starting at the specified time on the `start_date` formatted as 'HH:MM:SS'. (provider: intrinio) diff --git a/openbb_platform/openbb/package/fixedincome.py b/openbb_platform/openbb/package/fixedincome.py index 12365aab9acc..223cfe379788 100644 --- a/openbb_platform/openbb/package/fixedincome.py +++ b/openbb_platform/openbb/package/fixedincome.py @@ -58,9 +58,9 @@ def bond_indices( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. index_type : Literal['yield', 'yield_to_worst', 'total_return', 'oas'] The type of series. OAS is the option-adjusted spread. Default is yield. @@ -211,9 +211,9 @@ def mortgage_indices( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. @@ -354,9 +354,9 @@ def sofr( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['federal_reserve', 'fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred. diff --git a/openbb_platform/openbb/package/fixedincome_corporate.py b/openbb_platform/openbb/package/fixedincome_corporate.py index b003e8768870..93161daf6da7 100644 --- a/openbb_platform/openbb/package/fixedincome_corporate.py +++ b/openbb_platform/openbb/package/fixedincome_corporate.py @@ -55,9 +55,9 @@ def commercial_paper( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. @@ -189,7 +189,7 @@ def hqm( Parameters ---------- - date : Union[str, datetime.date, None, List[Union[str, datetime.d... + date : Union[str, date, None, List[Union[str, date, None]]] A specific date to get data for. Multiple comma separated items allowed for provider(s): fred. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. @@ -283,9 +283,9 @@ def ice_bofa( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. index_type : Literal['yield', 'yield_to_worst', 'total_return', 'spread'] The type of series. @@ -391,9 +391,9 @@ def moody( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. index_type : Literal['aaa', 'baa'] The type of series. @@ -499,9 +499,9 @@ def spot_rates( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. maturity : Union[float, str, List[Union[float, str]]] Maturities in years. Multiple comma separated items allowed for provider(s): fred. diff --git a/openbb_platform/openbb/package/fixedincome_government.py b/openbb_platform/openbb/package/fixedincome_government.py index 544a554c7ed2..559669789932 100644 --- a/openbb_platform/openbb/package/fixedincome_government.py +++ b/openbb_platform/openbb/package/fixedincome_government.py @@ -48,9 +48,9 @@ def tips_yields( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. @@ -168,9 +168,9 @@ def treasury_rates( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['federal_reserve', 'fmp']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fmp. @@ -273,7 +273,7 @@ def us_yield_curve( Parameters ---------- - date : Union[datetime.date, None, str] + date : Union[date, None, str] A specific date to get data for. Defaults to the most recent FRED entry. inflation_adjusted : Optional[bool] Get inflation adjusted rates. diff --git a/openbb_platform/openbb/package/fixedincome_rate.py b/openbb_platform/openbb/package/fixedincome_rate.py index a18ffe02be9f..ca1f7c224470 100644 --- a/openbb_platform/openbb/package/fixedincome_rate.py +++ b/openbb_platform/openbb/package/fixedincome_rate.py @@ -57,9 +57,9 @@ def ameribor( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. @@ -187,9 +187,9 @@ def dpcredit( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. @@ -278,9 +278,9 @@ def ecb( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. interest_rate_type : Literal['deposit', 'lending', 'refinancing'] The type of interest rate. @@ -362,9 +362,9 @@ def effr( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['federal_reserve', 'fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred. @@ -588,9 +588,9 @@ def estr( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. @@ -743,9 +743,9 @@ def iorb( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. @@ -824,9 +824,9 @@ def overnight_bank_funding( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['federal_reserve', 'fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred. @@ -953,9 +953,9 @@ def sofr( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['federal_reserve', 'fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred. @@ -1089,9 +1089,9 @@ def sonia( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fred']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. diff --git a/openbb_platform/openbb/package/fixedincome_spreads.py b/openbb_platform/openbb/package/fixedincome_spreads.py index e6aa9492d7c3..85a2afd0e426 100644 --- a/openbb_platform/openbb/package/fixedincome_spreads.py +++ b/openbb_platform/openbb/package/fixedincome_spreads.py @@ -54,9 +54,9 @@ def tcm( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. maturity : Optional[Literal['3m', '2y']] The maturity @@ -144,9 +144,9 @@ def tcm_effr( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. maturity : Optional[Literal['10y', '5y', '1y', '6m', '3m']] The maturity @@ -234,9 +234,9 @@ def treasury_effr( Parameters ---------- - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. maturity : Optional[Literal['3m', '6m']] The maturity diff --git a/openbb_platform/openbb/package/news.py b/openbb_platform/openbb/package/news.py index dffd030ff848..a50277b3ffdb 100644 --- a/openbb_platform/openbb/package/news.py +++ b/openbb_platform/openbb/package/news.py @@ -59,13 +59,13 @@ def company( ---------- symbol : Union[str, None, List[Optional[str]]] Symbol to get data for. Multiple comma separated items allowed for provider(s): benzinga, fmp, intrinio, polygon, tiingo, yfinance. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. limit : Optional[Annotated[int, Ge(ge=0)]] The number of data entries to return. - provider : Optional[Literal['benzinga', 'fmp', 'intrinio', 'polygon', 'tiing... + provider : Optional[Literal['benzinga', 'fmp', 'intrinio', 'polygon', 'tiingo', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp, intrinio, polygon, tiingo, yfinance. date : Optional[datetime.date] A specific date to get data for. (provider: benzinga) @@ -277,9 +277,9 @@ def world( ---------- limit : int The number of data entries to return. The number of articles to return. - start_date : Union[datetime.date, None, str] + start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. - end_date : Union[datetime.date, None, str] + end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['benzinga', 'fmp', 'intrinio', 'tiingo']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp, intrinio, tiingo. From 7981965a19aa3d0e51ac6b9f48c5c1e2c5f47656 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Mon, 22 Jul 2024 17:01:16 -0700 Subject: [PATCH 02/19] missing static files --- .../openbb/package/derivatives_futures.py | 206 +++++++ .../openbb/package/economy_survey.py | 553 ++++++++++++++++++ openbb_platform/openbb/package/index_price.py | 142 +++++ .../openbb/package/regulators_sec.py | 468 +++++++++++++++ 4 files changed, 1369 insertions(+) create mode 100644 openbb_platform/openbb/package/derivatives_futures.py create mode 100644 openbb_platform/openbb/package/economy_survey.py create mode 100644 openbb_platform/openbb/package/index_price.py create mode 100644 openbb_platform/openbb/package/regulators_sec.py diff --git a/openbb_platform/openbb/package/derivatives_futures.py b/openbb_platform/openbb/package/derivatives_futures.py new file mode 100644 index 000000000000..d3c3aba29081 --- /dev/null +++ b/openbb_platform/openbb/package/derivatives_futures.py @@ -0,0 +1,206 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import datetime +from typing import List, Literal, Optional, Union + +from openbb_core.app.model.field import OpenBBField +from openbb_core.app.model.obbject import OBBject +from openbb_core.app.static.container import Container +from openbb_core.app.static.utils.decorators import exception_handler, validate +from openbb_core.app.static.utils.filters import filter_inputs +from typing_extensions import Annotated + + +class ROUTER_derivatives_futures(Container): + """/derivatives/futures + curve + historical + """ + + def __repr__(self) -> str: + return self.__doc__ or "" + + @exception_handler + @validate + def curve( + self, + symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], + date: Annotated[ + Union[str, datetime.date, None, List[Union[str, datetime.date, None]]], + OpenBBField( + description="A specific date to get data for. Multiple comma separated items allowed for provider(s): yfinance." + ), + ] = None, + provider: Annotated[ + Optional[Literal["yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance." + ), + ] = None, + **kwargs + ) -> OBBject: + """Futures Term Structure, current or historical. + + Parameters + ---------- + symbol : str + Symbol to get data for. + date : Union[str, date, None, List[Union[str, date, None]]] + A specific date to get data for. Multiple comma separated items allowed for provider(s): yfinance. + provider : Optional[Literal['yfinance']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance. + + Returns + ------- + OBBject + results : List[FuturesCurve] + Serializable results. + provider : Optional[Literal['yfinance']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + FuturesCurve + ------------ + date : Optional[date] + The date of the data. + expiration : str + Futures expiration month. + price : Optional[float] + The price of the futures contract. + + Examples + -------- + >>> from openbb import obb + >>> obb.derivatives.futures.curve(symbol='NG', provider='yfinance') + """ # noqa: E501 + + return self._run( + "/derivatives/futures/curve", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "derivatives.futures.curve", + ("yfinance",), + ) + }, + standard_params={ + "symbol": symbol, + "date": date, + }, + extra_params=kwargs, + info={"date": {"yfinance": {"multiple_items_allowed": True}}}, + ) + ) + + @exception_handler + @validate + def historical( + self, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): yfinance." + ), + ], + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="End date of the data, in YYYY-MM-DD format."), + ] = None, + expiration: Annotated[ + Optional[str], + OpenBBField(description="Future expiry date with format YYYY-MM"), + ] = None, + provider: Annotated[ + Optional[Literal["yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance." + ), + ] = None, + **kwargs + ) -> OBBject: + """Historical futures prices. + + Parameters + ---------- + symbol : Union[str, List[str]] + Symbol to get data for. Multiple comma separated items allowed for provider(s): yfinance. + start_date : Union[date, None, str] + Start date of the data, in YYYY-MM-DD format. + end_date : Union[date, None, str] + End date of the data, in YYYY-MM-DD format. + expiration : Optional[str] + Future expiry date with format YYYY-MM + provider : Optional[Literal['yfinance']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance. + interval : Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1W', '1M', '1Q'] + Time interval of the data to return. (provider: yfinance) + + Returns + ------- + OBBject + results : List[FuturesHistorical] + Serializable results. + provider : Optional[Literal['yfinance']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + FuturesHistorical + ----------------- + date : datetime + The date of the data. + open : float + The open price. + high : float + The high price. + low : float + The low price. + close : float + The close price. + volume : float + The trading volume. + + Examples + -------- + >>> from openbb import obb + >>> obb.derivatives.futures.historical(symbol='ES', provider='yfinance') + >>> # Enter multiple symbols. + >>> obb.derivatives.futures.historical(symbol='ES,NQ', provider='yfinance') + >>> # Enter expiration dates as "YYYY-MM". + >>> obb.derivatives.futures.historical(symbol='ES', provider='yfinance', expiration='2025-12') + """ # noqa: E501 + + return self._run( + "/derivatives/futures/historical", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "derivatives.futures.historical", + ("yfinance",), + ) + }, + standard_params={ + "symbol": symbol, + "start_date": start_date, + "end_date": end_date, + "expiration": expiration, + }, + extra_params=kwargs, + info={"symbol": {"yfinance": {"multiple_items_allowed": True}}}, + ) + ) diff --git a/openbb_platform/openbb/package/economy_survey.py b/openbb_platform/openbb/package/economy_survey.py new file mode 100644 index 000000000000..7f94d2f774a7 --- /dev/null +++ b/openbb_platform/openbb/package/economy_survey.py @@ -0,0 +1,553 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import datetime +from typing import List, Literal, Optional, Union + +from openbb_core.app.model.field import OpenBBField +from openbb_core.app.model.obbject import OBBject +from openbb_core.app.static.container import Container +from openbb_core.app.static.utils.decorators import exception_handler, validate +from openbb_core.app.static.utils.filters import filter_inputs +from typing_extensions import Annotated + + +class ROUTER_economy_survey(Container): + """/economy/survey + economic_conditions_chicago + manufacturing_outlook_texas + nonfarm_payrolls + sloos + university_of_michigan + """ + + def __repr__(self) -> str: + return self.__doc__ or "" + + @exception_handler + @validate + def economic_conditions_chicago( + self, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="End date of the data, in YYYY-MM-DD format."), + ] = None, + provider: Annotated[ + Optional[Literal["fred"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred." + ), + ] = None, + **kwargs + ) -> OBBject: + """Get The Survey Of Economic Conditions For The Chicago Region. + + Parameters + ---------- + start_date : Union[date, None, str] + Start date of the data, in YYYY-MM-DD format. + end_date : Union[date, None, str] + End date of the data, in YYYY-MM-DD format. + provider : Optional[Literal['fred']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. + frequency : Optional[Literal['annual', 'quarter']] + Frequency aggregation to convert monthly data to lower frequency. None is monthly. (provider: fred) + aggregation_method : Optional[Literal['avg', 'sum', 'eop']] + A key that indicates the aggregation method used for frequency aggregation. + + avg = Average + + sum = Sum + + eop = End of Period + (provider: fred) + transform : Optional[Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']] + Transformation type + + None = No transformation + + chg = Change + + ch1 = Change from Year Ago + + pch = Percent Change + + pc1 = Percent Change from Year Ago + + pca = Compounded Annual Rate of Change + + cch = Continuously Compounded Rate of Change + + cca = Continuously Compounded Annual Rate of Change + + log = Natural Log + (provider: fred) + + Returns + ------- + OBBject + results : List[SurveyOfEconomicConditionsChicago] + Serializable results. + provider : Optional[Literal['fred']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + SurveyOfEconomicConditionsChicago + --------------------------------- + date : date + The date of the data. + activity_index : Optional[float] + Activity Index. + one_year_outlook : Optional[float] + One Year Outlook Index. + manufacturing_activity : Optional[float] + Manufacturing Activity Index. + non_manufacturing_activity : Optional[float] + Non-Manufacturing Activity Index. + capital_expenditures_expectations : Optional[float] + Capital Expenditures Expectations Index. + hiring_expectations : Optional[float] + Hiring Expectations Index. + current_hiring : Optional[float] + Current Hiring Index. + labor_costs : Optional[float] + Labor Costs Index. + non_labor_costs : Optional[float] + Non-Labor Costs Index. + + Examples + -------- + >>> from openbb import obb + >>> obb.economy.survey.economic_conditions_chicago(provider='fred') + """ # noqa: E501 + + return self._run( + "/economy/survey/economic_conditions_chicago", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "economy.survey.economic_conditions_chicago", + ("fred",), + ) + }, + standard_params={ + "start_date": start_date, + "end_date": end_date, + }, + extra_params=kwargs, + ) + ) + + @exception_handler + @validate + def manufacturing_outlook_texas( + self, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="End date of the data, in YYYY-MM-DD format."), + ] = None, + provider: Annotated[ + Optional[Literal["fred"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred." + ), + ] = None, + **kwargs + ) -> OBBject: + """Get The Manufacturing Outlook Survey For The Texas Region. + + Parameters + ---------- + start_date : Union[date, None, str] + Start date of the data, in YYYY-MM-DD format. + end_date : Union[date, None, str] + End date of the data, in YYYY-MM-DD format. + provider : Optional[Literal['fred']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. + topic : Union[Literal['business_activity', 'business_outlook', 'capex', 'prices_paid', 'production', 'inventory', 'new_orders', 'new_orders_growth', 'unfilled_orders', 'shipments', 'delivery_time', 'employment', 'wages', 'hours_worked'], str] + The topic for the survey response. Multiple comma separated items allowed. (provider: fred) + frequency : Optional[Literal['annual', 'quarter']] + + Frequency aggregation to convert monthly data to lower frequency. None is monthly. + (provider: fred) + aggregation_method : Optional[Literal['avg', 'sum', 'eop']] + + A key that indicates the aggregation method used for frequency aggregation. + avg = Average + sum = Sum + eop = End of Period + (provider: fred) + transform : Optional[Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']] + + Transformation type + None = No transformation + chg = Change + ch1 = Change from Year Ago + pch = Percent Change + pc1 = Percent Change from Year Ago + pca = Compounded Annual Rate of Change + cch = Continuously Compounded Rate of Change + cca = Continuously Compounded Annual Rate of Change + log = Natural Log + (provider: fred) + + Returns + ------- + OBBject + results : List[ManufacturingOutlookTexas] + Serializable results. + provider : Optional[Literal['fred']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + ManufacturingOutlookTexas + ------------------------- + date : date + The date of the data. + topic : Optional[str] + Topic of the survey response. + diffusion_index : Optional[float] + Diffusion Index. + percent_reporting_increase : Optional[float] + Percent of respondents reporting an increase over the last month. + percent_reporting_decrease : Optional[float] + Percent of respondents reporting a decrease over the last month. + percent_reporting_no_change : Optional[float] + Percent of respondents reporting no change over the last month. + + Examples + -------- + >>> from openbb import obb + >>> obb.economy.survey.manufacturing_outlook_texas(provider='fred') + >>> obb.economy.survey.manufacturing_outlook_texas(topic='business_outlook,new_orders', transform='pc1', provider='fred') + """ # noqa: E501 + + return self._run( + "/economy/survey/manufacturing_outlook_texas", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "economy.survey.manufacturing_outlook_texas", + ("fred",), + ) + }, + standard_params={ + "start_date": start_date, + "end_date": end_date, + }, + extra_params=kwargs, + info={"topic": {"fred": {"multiple_items_allowed": True}}}, + ) + ) + + @exception_handler + @validate + def nonfarm_payrolls( + self, + date: Annotated[ + Union[str, datetime.date, None, List[Union[str, datetime.date, None]]], + OpenBBField( + description="A specific date to get data for. Default is the latest report. Multiple comma separated items allowed for provider(s): fred." + ), + ] = None, + provider: Annotated[ + Optional[Literal["fred"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred." + ), + ] = None, + **kwargs + ) -> OBBject: + """Get Nonfarm Payrolls Survey. + + Parameters + ---------- + date : Union[str, date, None, List[Union[str, date, None]]] + A specific date to get data for. Default is the latest report. Multiple comma separated items allowed for provider(s): fred. + provider : Optional[Literal['fred']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. + category : Literal['employees_nsa', 'employees_sa', 'employees_production_and_nonsupervisory', 'employees_women', 'employees_women_percent', 'avg_hours', 'avg_hours_production_and_nonsupervisory', 'avg_hours_overtime', 'avg_hours_overtime_production_and_nonsupervisory', 'avg_earnings_hourly', 'avg_earnings_hourly_production_and_nonsupervisory', 'avg_earnings_weekly', 'avg_earnings_weekly_production_and_nonsupervisory', 'index_weekly_hours', 'index_weekly_hours_production_and_nonsupervisory', 'index_weekly_payrolls', 'index_weekly_payrolls_production_and_nonsupervisory'] + The category to query. (provider: fred) + + Returns + ------- + OBBject + results : List[NonFarmPayrolls] + Serializable results. + provider : Optional[Literal['fred']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + NonFarmPayrolls + --------------- + date : date + The date of the data. + symbol : str + Symbol representing the entity requested in the data. + value : float + + name : Optional[str] + The name of the series. (provider: fred) + element_id : Optional[str] + The element id in the parent/child relationship. (provider: fred) + parent_id : Optional[str] + The parent id in the parent/child relationship. (provider: fred) + children : Optional[str] + The element_id of each child, as a comma-separated string. (provider: fred) + level : Optional[int] + The indentation level of the element. (provider: fred) + + Examples + -------- + >>> from openbb import obb + >>> obb.economy.survey.nonfarm_payrolls(provider='fred') + >>> obb.economy.survey.nonfarm_payrolls(category='avg_hours', provider='fred') + """ # noqa: E501 + + return self._run( + "/economy/survey/nonfarm_payrolls", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "economy.survey.nonfarm_payrolls", + ("fred",), + ) + }, + standard_params={ + "date": date, + }, + extra_params=kwargs, + info={"date": {"fred": {"multiple_items_allowed": True}}}, + ) + ) + + @exception_handler + @validate + def sloos( + self, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="End date of the data, in YYYY-MM-DD format."), + ] = None, + provider: Annotated[ + Optional[Literal["fred"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred." + ), + ] = None, + **kwargs + ) -> OBBject: + """Get Senior Loan Officers Opinion Survey. + + Parameters + ---------- + start_date : Union[date, None, str] + Start date of the data, in YYYY-MM-DD format. + end_date : Union[date, None, str] + End date of the data, in YYYY-MM-DD format. + provider : Optional[Literal['fred']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. + category : Literal['spreads', 'consumer', 'auto', 'credit_card', 'firms', 'mortgage', 'commercial_real_estate', 'standards', 'demand', 'foreign_banks'] + Category of survey response. (provider: fred) + transform : Optional[Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']] + + Transformation type + None = No transformation + chg = Change + ch1 = Change from Year Ago + pch = Percent Change + pc1 = Percent Change from Year Ago + pca = Compounded Annual Rate of Change + cch = Continuously Compounded Rate of Change + cca = Continuously Compounded Annual Rate of Change + log = Natural Log + (provider: fred) + + Returns + ------- + OBBject + results : List[SeniorLoanOfficerSurvey] + Serializable results. + provider : Optional[Literal['fred']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + SeniorLoanOfficerSurvey + ----------------------- + date : date + The date of the data. + symbol : Optional[str] + Symbol representing the entity requested in the data. + value : float + Survey value. + title : Optional[str] + Survey title. + + Examples + -------- + >>> from openbb import obb + >>> obb.economy.survey.sloos(provider='fred') + >>> obb.economy.survey.sloos(category='credit_card', provider='fred') + """ # noqa: E501 + + return self._run( + "/economy/survey/sloos", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "economy.survey.sloos", + ("fred",), + ) + }, + standard_params={ + "start_date": start_date, + "end_date": end_date, + }, + extra_params=kwargs, + ) + ) + + @exception_handler + @validate + def university_of_michigan( + self, + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="End date of the data, in YYYY-MM-DD format."), + ] = None, + provider: Annotated[ + Optional[Literal["fred"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred." + ), + ] = None, + **kwargs + ) -> OBBject: + """Get University of Michigan Consumer Sentiment and Inflation Expectations Surveys. + + Parameters + ---------- + start_date : Union[date, None, str] + Start date of the data, in YYYY-MM-DD format. + end_date : Union[date, None, str] + End date of the data, in YYYY-MM-DD format. + provider : Optional[Literal['fred']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred. + frequency : Optional[Literal['annual', 'quarter']] + Frequency aggregation to convert monthly data to lower frequency. None is monthly. (provider: fred) + aggregation_method : Optional[Literal['avg', 'sum', 'eop']] + A key that indicates the aggregation method used for frequency aggregation. + + avg = Average + + sum = Sum + + eop = End of Period + (provider: fred) + transform : Optional[Literal['chg', 'ch1', 'pch', 'pc1', 'pca', 'cch', 'cca', 'log']] + Transformation type + + None = No transformation + + chg = Change + + ch1 = Change from Year Ago + + pch = Percent Change + + pc1 = Percent Change from Year Ago + + pca = Compounded Annual Rate of Change + + cch = Continuously Compounded Rate of Change + + cca = Continuously Compounded Annual Rate of Change + + log = Natural Log + (provider: fred) + + Returns + ------- + OBBject + results : List[UniversityOfMichigan] + Serializable results. + provider : Optional[Literal['fred']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + UniversityOfMichigan + -------------------- + date : date + The date of the data. + consumer_sentiment : Optional[float] + Index of the results of the University of Michigan's monthly Survey of Consumers, which is used to estimate future spending and saving. (1966:Q1=100). + inflation_expectation : Optional[float] + Median expected price change next 12 months, Surveys of Consumers. + + Examples + -------- + >>> from openbb import obb + >>> obb.economy.survey.university_of_michigan(provider='fred') + """ # noqa: E501 + + return self._run( + "/economy/survey/university_of_michigan", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "economy.survey.university_of_michigan", + ("fred",), + ) + }, + standard_params={ + "start_date": start_date, + "end_date": end_date, + }, + extra_params=kwargs, + ) + ) diff --git a/openbb_platform/openbb/package/index_price.py b/openbb_platform/openbb/package/index_price.py new file mode 100644 index 000000000000..9eb9271a99d1 --- /dev/null +++ b/openbb_platform/openbb/package/index_price.py @@ -0,0 +1,142 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +import datetime +from typing import List, Literal, Optional, Union + +from openbb_core.app.model.field import OpenBBField +from openbb_core.app.model.obbject import OBBject +from openbb_core.app.static.container import Container +from openbb_core.app.static.utils.decorators import exception_handler, validate +from openbb_core.app.static.utils.filters import filter_inputs +from typing_extensions import Annotated + + +class ROUTER_index_price(Container): + """/index/price + historical + """ + + def __repr__(self) -> str: + return self.__doc__ or "" + + @exception_handler + @validate + def historical( + self, + symbol: Annotated[ + Union[str, List[str]], + OpenBBField( + description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, polygon, yfinance." + ), + ], + start_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), + ] = None, + end_date: Annotated[ + Union[datetime.date, None, str], + OpenBBField(description="End date of the data, in YYYY-MM-DD format."), + ] = None, + interval: Annotated[ + Optional[str], + OpenBBField(description="Time interval of the data to return."), + ] = "1d", + provider: Annotated[ + Optional[Literal["fmp", "intrinio", "polygon", "yfinance"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance." + ), + ] = None, + **kwargs + ) -> OBBject: + """Historical Index Levels. + + Parameters + ---------- + symbol : Union[str, List[str]] + Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, polygon, yfinance. + start_date : Union[date, None, str] + Start date of the data, in YYYY-MM-DD format. + end_date : Union[date, None, str] + End date of the data, in YYYY-MM-DD format. + interval : Optional[str] + Time interval of the data to return. + provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'yfinance']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance. + limit : Optional[int] + The number of data entries to return. (provider: intrinio, polygon) + sort : Literal['asc', 'desc'] + Sort order of the data. This impacts the results in combination with the 'limit' parameter. The results are always returned in ascending order by date. (provider: polygon) + + Returns + ------- + OBBject + results : List[IndexHistorical] + Serializable results. + provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'yfinance']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + IndexHistorical + --------------- + date : Union[date, datetime] + The date of the data. + open : Optional[Annotated[float, Strict(strict=True)]] + The open price. + high : Optional[Annotated[float, Strict(strict=True)]] + The high price. + low : Optional[Annotated[float, Strict(strict=True)]] + The low price. + close : Optional[Annotated[float, Strict(strict=True)]] + The close price. + volume : Optional[int] + The trading volume. + vwap : Optional[float] + Volume Weighted Average Price over the period. (provider: fmp) + change : Optional[float] + Change in the price from the previous close. (provider: fmp) + change_percent : Optional[float] + Change in the price from the previous close, as a normalized percent. (provider: fmp) + transactions : Optional[Annotated[int, Gt(gt=0)]] + Number of transactions for the symbol in the time period. (provider: polygon) + + Examples + -------- + >>> from openbb import obb + >>> obb.index.price.historical(symbol='^GSPC', provider='fmp') + >>> # Not all providers have the same symbols. + >>> obb.index.price.historical(symbol='SPX', provider='intrinio') + """ # noqa: E501 + + return self._run( + "/index/price/historical", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "index.price.historical", + ("fmp", "intrinio", "polygon", "yfinance"), + ) + }, + standard_params={ + "symbol": symbol, + "start_date": start_date, + "end_date": end_date, + "interval": interval, + }, + extra_params=kwargs, + info={ + "symbol": { + "fmp": {"multiple_items_allowed": True}, + "intrinio": {"multiple_items_allowed": True}, + "polygon": {"multiple_items_allowed": True}, + "yfinance": {"multiple_items_allowed": True}, + } + }, + ) + ) diff --git a/openbb_platform/openbb/package/regulators_sec.py b/openbb_platform/openbb/package/regulators_sec.py new file mode 100644 index 000000000000..54dd6f9146c0 --- /dev/null +++ b/openbb_platform/openbb/package/regulators_sec.py @@ -0,0 +1,468 @@ +### THIS FILE IS AUTO-GENERATED. DO NOT EDIT. ### + +from typing import Literal, Optional + +from openbb_core.app.model.field import OpenBBField +from openbb_core.app.model.obbject import OBBject +from openbb_core.app.static.container import Container +from openbb_core.app.static.utils.decorators import exception_handler, validate +from openbb_core.app.static.utils.filters import filter_inputs +from typing_extensions import Annotated + + +class ROUTER_regulators_sec(Container): + """/regulators/sec + cik_map + institutions_search + rss_litigation + schema_files + sic_search + symbol_map + """ + + def __repr__(self) -> str: + return self.__doc__ or "" + + @exception_handler + @validate + def cik_map( + self, + symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, + **kwargs + ) -> OBBject: + """Map a ticker symbol to a CIK number. + + Parameters + ---------- + symbol : str + Symbol to get data for. + provider : Optional[Literal['sec']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec. + use_cache : Optional[bool] + Whether or not to use cache for the request, default is True. (provider: sec) + + Returns + ------- + OBBject + results : CikMap + Serializable results. + provider : Optional[Literal['sec']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + CikMap + ------ + cik : Optional[Union[int, str]] + Central Index Key (CIK) for the requested entity. + + Examples + -------- + >>> from openbb import obb + >>> obb.regulators.sec.cik_map(symbol='MSFT', provider='sec') + """ # noqa: E501 + + return self._run( + "/regulators/sec/cik_map", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "regulators.sec.cik_map", + ("sec",), + ) + }, + standard_params={ + "symbol": symbol, + }, + extra_params=kwargs, + ) + ) + + @exception_handler + @validate + def institutions_search( + self, + query: Annotated[str, OpenBBField(description="Search query.")] = "", + use_cache: Annotated[ + Optional[bool], OpenBBField(description="Whether or not to use cache.") + ] = True, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, + **kwargs + ) -> OBBject: + """Search SEC-regulated institutions by name and return a list of results with CIK numbers. + + Parameters + ---------- + query : str + Search query. + use_cache : Optional[bool] + Whether or not to use cache. + provider : Optional[Literal['sec']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec. + + Returns + ------- + OBBject + results : List[InstitutionsSearch] + Serializable results. + provider : Optional[Literal['sec']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + InstitutionsSearch + ------------------ + name : Optional[str] + The name of the institution. (provider: sec) + cik : Optional[Union[int, str]] + Central Index Key (CIK) (provider: sec) + + Examples + -------- + >>> from openbb import obb + >>> obb.regulators.sec.institutions_search(provider='sec') + >>> obb.regulators.sec.institutions_search(query='blackstone real estate', provider='sec') + """ # noqa: E501 + + return self._run( + "/regulators/sec/institutions_search", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "regulators.sec.institutions_search", + ("sec",), + ) + }, + standard_params={ + "query": query, + "use_cache": use_cache, + }, + extra_params=kwargs, + ) + ) + + @exception_handler + @validate + def rss_litigation( + self, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, + **kwargs + ) -> OBBject: + """Get the RSS feed that provides links to litigation releases concerning civil lawsuits brought by the Commission in federal court. + + Parameters + ---------- + provider : Optional[Literal['sec']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec. + + Returns + ------- + OBBject + results : List[RssLitigation] + Serializable results. + provider : Optional[Literal['sec']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + RssLitigation + ------------- + published : Optional[datetime] + The date of publication. (provider: sec) + title : Optional[str] + The title of the release. (provider: sec) + summary : Optional[str] + Short summary of the release. (provider: sec) + id : Optional[str] + The identifier associated with the release. (provider: sec) + link : Optional[str] + URL to the release. (provider: sec) + + Examples + -------- + >>> from openbb import obb + >>> obb.regulators.sec.rss_litigation(provider='sec') + """ # noqa: E501 + + return self._run( + "/regulators/sec/rss_litigation", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "regulators.sec.rss_litigation", + ("sec",), + ) + }, + standard_params={}, + extra_params=kwargs, + ) + ) + + @exception_handler + @validate + def schema_files( + self, + query: Annotated[str, OpenBBField(description="Search query.")] = "", + use_cache: Annotated[ + Optional[bool], OpenBBField(description="Whether or not to use cache.") + ] = True, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, + **kwargs + ) -> OBBject: + """Use tool for navigating the directory of SEC XML schema files by year. + + Parameters + ---------- + query : str + Search query. + use_cache : Optional[bool] + Whether or not to use cache. + provider : Optional[Literal['sec']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec. + url : Optional[str] + Enter an optional URL path to fetch the next level. (provider: sec) + + Returns + ------- + OBBject + results : SchemaFiles + Serializable results. + provider : Optional[Literal['sec']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + SchemaFiles + ----------- + files : Optional[List[str]] + Dictionary of URLs to SEC Schema Files (provider: sec) + + Examples + -------- + >>> from openbb import obb + >>> obb.regulators.sec.schema_files(provider='sec') + >>> # Get a list of schema files. + >>> data = obb.regulators.sec.schema_files().results + >>> data.files[0] + >>> 'https://xbrl.fasb.org/us-gaap/' + >>> # The directory structure can be navigated by constructing a URL from the 'results' list. + >>> url = data.files[0]+data.files[-1] + >>> # The URL base will always be the 0 position in the list, feed the URL back in as a parameter. + >>> obb.regulators.sec.schema_files(url=url).results.files + >>> ['https://xbrl.fasb.org/us-gaap/2024/' + >>> 'USGAAP2024FileList.xml' + >>> 'dis/' + >>> 'dqcrules/' + >>> 'ebp/' + >>> 'elts/' + >>> 'entire/' + >>> 'meta/' + >>> 'stm/' + >>> 'us-gaap-2024.zip'] + """ # noqa: E501 + + return self._run( + "/regulators/sec/schema_files", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "regulators.sec.schema_files", + ("sec",), + ) + }, + standard_params={ + "query": query, + "use_cache": use_cache, + }, + extra_params=kwargs, + ) + ) + + @exception_handler + @validate + def sic_search( + self, + query: Annotated[str, OpenBBField(description="Search query.")] = "", + use_cache: Annotated[ + Optional[bool], OpenBBField(description="Whether or not to use cache.") + ] = True, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, + **kwargs + ) -> OBBject: + """Search for Industry Titles, Reporting Office, and SIC Codes. An empty query string returns all results. + + Parameters + ---------- + query : str + Search query. + use_cache : Optional[bool] + Whether or not to use cache. + provider : Optional[Literal['sec']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec. + + Returns + ------- + OBBject + results : List[SicSearch] + Serializable results. + provider : Optional[Literal['sec']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + SicSearch + --------- + sic : Optional[int] + Sector Industrial Code (SIC) (provider: sec) + industry : Optional[str] + Industry title. (provider: sec) + office : Optional[str] + Reporting office within the Corporate Finance Office (provider: sec) + + Examples + -------- + >>> from openbb import obb + >>> obb.regulators.sec.sic_search(provider='sec') + >>> obb.regulators.sec.sic_search(query='real estate investment trusts', provider='sec') + """ # noqa: E501 + + return self._run( + "/regulators/sec/sic_search", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "regulators.sec.sic_search", + ("sec",), + ) + }, + standard_params={ + "query": query, + "use_cache": use_cache, + }, + extra_params=kwargs, + ) + ) + + @exception_handler + @validate + def symbol_map( + self, + query: Annotated[str, OpenBBField(description="Search query.")], + use_cache: Annotated[ + Optional[bool], + OpenBBField( + description="Whether or not to use cache. If True, cache will store for seven days." + ), + ] = True, + provider: Annotated[ + Optional[Literal["sec"]], + OpenBBField( + description="The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec." + ), + ] = None, + **kwargs + ) -> OBBject: + """Map a CIK number to a ticker symbol, leading 0s can be omitted or included. + + Parameters + ---------- + query : str + Search query. + use_cache : Optional[bool] + Whether or not to use cache. If True, cache will store for seven days. + provider : Optional[Literal['sec']] + The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec. + + Returns + ------- + OBBject + results : SymbolMap + Serializable results. + provider : Optional[Literal['sec']] + Provider name. + warnings : Optional[List[Warning_]] + List of warnings. + chart : Optional[Chart] + Chart object. + extra : Dict[str, Any] + Extra info. + + SymbolMap + --------- + symbol : Optional[str] + Symbol representing the entity requested in the data. (provider: sec) + + Examples + -------- + >>> from openbb import obb + >>> obb.regulators.sec.symbol_map(query='0000789019', provider='sec') + """ # noqa: E501 + + return self._run( + "/regulators/sec/symbol_map", + **filter_inputs( + provider_choices={ + "provider": self._get_provider( + provider, + "regulators.sec.symbol_map", + ("sec",), + ) + }, + standard_params={ + "query": query, + "use_cache": use_cache, + }, + extra_params=kwargs, + ) + ) From 9b9024210d5ddbcf3912cbc03a6ea24bfaf7fc54 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:18:58 -0700 Subject: [PATCH 03/19] fix choices --- .../openbb_core/app/provider_interface.py | 19 +- .../openbb_core/app/static/package_builder.py | 36 +- .../provider/standard_models/spot.py | 1 - openbb_platform/openbb/assets/reference.json | 1838 ++--------------- .../openbb/package/crypto_price.py | 8 +- openbb_platform/openbb/package/currency.py | 4 +- .../openbb/package/currency_price.py | 8 +- .../openbb/package/derivatives_futures.py | 12 +- openbb_platform/openbb/package/economy.py | 429 +++- openbb_platform/openbb/package/economy_gdp.py | 196 +- .../openbb/package/economy_survey.py | 28 +- openbb_platform/openbb/package/equity.py | 6 +- .../openbb/package/equity_compare.py | 4 +- .../openbb/package/equity_estimates.py | 66 +- .../openbb/package/equity_fundamental.py | 36 +- .../openbb/package/equity_ownership.py | 6 +- .../openbb/package/equity_price.py | 22 +- openbb_platform/openbb/package/etf.py | 30 +- openbb_platform/openbb/package/fixedincome.py | 42 +- .../openbb/package/fixedincome_corporate.py | 46 +- .../openbb/package/fixedincome_government.py | 11 +- .../openbb/package/fixedincome_rate.py | 16 +- openbb_platform/openbb/package/index_price.py | 8 +- openbb_platform/openbb/package/news.py | 12 +- .../fred/openbb_fred/models/ameribor.py | 17 +- .../fred/openbb_fred/models/bond_indices.py | 8 +- .../openbb_fred/models/commercial_paper.py | 17 +- .../models/consumer_price_index.py | 8 +- .../models/manufacturing_outlook_texas.py | 8 +- .../openbb_fred/models/mortgage_indices.py | 8 +- .../providers/fred/openbb_fred/models/spot.py | 5 +- .../models/composite_leading_indicator.py | 6 +- .../models/consumer_price_index.py | 8 +- .../oecd/openbb_oecd/models/gdp_forecast.py | 6 +- .../oecd/openbb_oecd/models/gdp_nominal.py | 8 +- .../oecd/openbb_oecd/models/gdp_real.py | 8 +- .../openbb_oecd/models/house_price_index.py | 8 +- .../models/immediate_interest_rate.py | 8 +- .../openbb_oecd/models/share_price_index.py | 8 +- .../oecd/openbb_oecd/models/unemployment.py | 8 +- 40 files changed, 1170 insertions(+), 1853 deletions(-) diff --git a/openbb_platform/core/openbb_core/app/provider_interface.py b/openbb_platform/core/openbb_core/app/provider_interface.py index 8eb2f5371b62..5ee5fd1ed17a 100644 --- a/openbb_platform/core/openbb_core/app/provider_interface.py +++ b/openbb_platform/core/openbb_core/app/provider_interface.py @@ -253,14 +253,22 @@ def _create_field( annotation = field.annotation additional_description = "" + choices: Dict = {} if extra := field.json_schema_extra: - providers = [] - for p, v in extra.items(): # type: ignore[union-attr] + providers: List = [] + for p, v in extra.items(): # type: ignore[union-attr]) if isinstance(v, dict) and v.get("multiple_items_allowed"): providers.append(p) + choices[p] = {"multiple_items_allowed": True, "choices": v.get("choices")} # type: ignore elif isinstance(v, list) and "multiple_items_allowed" in v: # For backwards compatibility, before this was a list providers.append(p) + choices[p] = {"multiple_items_allowed": True, "choices": None} # type: ignore + elif isinstance(v, dict) and v.get("choices"): + choices[p] = { + "multiple_items_allowed": False, + "choices": v.get("choices"), + } if providers: if provider_name: @@ -271,7 +279,6 @@ def _create_field( + ", ".join(providers) # type: ignore[arg-type] + "." ) - provider_field = ( f"(provider: {provider_name})" if provider_name != "openbb" else "" ) @@ -303,7 +310,7 @@ def _create_field( title=provider_name, description=description, alias=field.alias or None, - json_schema_extra=getattr(field, "json_schema_extra", None), + json_schema_extra=choices, ), ) @@ -318,7 +325,7 @@ def _create_field( title=provider_name, description=description, alias=field.alias or None, - json_schema_extra=getattr(field, "json_schema_extra", None), + json_schema_extra=choices, ), ) if provider_name: @@ -329,7 +336,7 @@ def _create_field( default=default or None, title=provider_name, description=description, - json_schema_extra=field.json_schema_extra, + json_schema_extra=choices, ), ) diff --git a/openbb_platform/core/openbb_core/app/static/package_builder.py b/openbb_platform/core/openbb_core/app/static/package_builder.py index 16b842ab6478..aa6aabb050eb 100644 --- a/openbb_platform/core/openbb_core/app/static/package_builder.py +++ b/openbb_platform/core/openbb_core/app/static/package_builder.py @@ -1498,16 +1498,20 @@ def _get_provider_field_params( ) # fmt: skip extra = field_info.json_schema_extra or {} + choices = extra.get("choices") # Add information for the providers supporting multiple symbols if params_type == "QueryParams" and extra: - providers = [] + providers: List = [] for p, v in extra.items(): # type: ignore[union-attr] if isinstance(v, dict) and v.get("multiple_items_allowed"): providers.append(p) + choices = v.get("choices") # type: ignore elif isinstance(v, list) and "multiple_items_allowed" in v: # For backwards compatibility, before this was a list providers.append(p) + elif isinstance(v, dict) and "choices" in v: + choices = v.get("choices") if providers: multiple_items = ", ".join(providers) @@ -1532,7 +1536,7 @@ def _get_provider_field_params( "description": cleaned_description, "default": default_value, "optional": not is_required, - "choices": extra.get("choices"), + "choices": choices, } ) @@ -1750,25 +1754,47 @@ def get_paths(cls, route_map: Dict[str, BaseRoute]) -> Dict[str, Dict[str, Any]] provider_parameter_fields = cls._get_provider_parameter_info( standard_model ) - reference[path]["parameters"]["standard"].append( - provider_parameter_fields - ) # Add endpoint data fields for standard provider reference[path]["data"]["standard"] = ( cls._get_provider_field_params(standard_model, "Data") ) continue + # Adds provider specific parameter fields to the reference reference[path]["parameters"][provider] = ( cls._get_provider_field_params( standard_model, "QueryParams", provider ) ) + # Adds provider specific data fields to the reference reference[path]["data"][provider] = cls._get_provider_field_params( standard_model, "Data", provider ) + + # If choices for a parameter exist for both standard and provider, and are the same, remove choices from 'standard' + standard = [ + {d["name"]: d["choices"]} + for d in reference[path]["parameters"]["standard"] + if d.get("choices") + ] + standard = standard[0] if standard else [] + provider = [ + {d["name"]: d["choices"]} + for d in reference[path]["parameters"][provider] + if d.get("choices") + ] + provider = provider[0] if provider else [] + if standard and provider and standard == provider: + for i, d in enumerate( + reference[path]["parameters"]["standard"] + ): + if d.get("name") in standard: + reference[path]["parameters"]["standard"][i][ + "choices" + ] = None + # Add endpoint returns data # Currently only OBBject object is returned providers = provider_parameter_fields["type"] diff --git a/openbb_platform/core/openbb_core/provider/standard_models/spot.py b/openbb_platform/core/openbb_core/provider/standard_models/spot.py index ca871e1f0c80..b635aa622356 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/spot.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/spot.py @@ -32,7 +32,6 @@ class SpotRateQueryParams(QueryParams): category: str = Field( default="spot_rate", description="Rate category. Options: spot_rate, par_yield.", - json_schema_extra={"choices": ["par_yield", "spot_rate"]}, ) @field_validator("category", mode="before", check_fields=False) diff --git a/openbb_platform/openbb/assets/reference.json b/openbb_platform/openbb/assets/reference.json index e5a04a491ed9..f60406af0000 100644 --- a/openbb_platform/openbb/assets/reference.json +++ b/openbb_platform/openbb/assets/reference.json @@ -68,13 +68,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'polygon', 'tiingo', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, polygon, tiingo, yfinance.", - "default": null, - "optional": true } ], "fmp": [ @@ -304,13 +297,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -424,13 +410,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'polygon', 'tiingo', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, polygon, tiingo, yfinance.", - "default": null, - "optional": true } ], "fmp": [ @@ -635,13 +614,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'polygon']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon.", - "default": null, - "optional": true } ], "fmp": [], @@ -841,13 +813,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'polygon']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, polygon.", - "default": null, - "optional": true } ], "fmp": [], @@ -1196,13 +1161,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['intrinio', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio, yfinance.", - "default": null, - "optional": true } ], "intrinio": [ @@ -1790,13 +1748,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.", - "default": null, - "optional": true } ], "intrinio": [ @@ -1999,15 +1950,7 @@ "description": "Get a snapshot of the options market universe.", "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.derivatives.options.snapshots(provider='intrinio')\n```\n\n", "parameters": { - "standard": [ - { - "name": "provider", - "type": "Literal['intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.", - "default": null, - "optional": true - } - ], + "standard": [], "intrinio": [ { "name": "date", @@ -2320,13 +2263,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.", - "default": null, - "optional": true } ], "yfinance": [ @@ -2448,13 +2384,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.", - "default": null, - "optional": true } ], "yfinance": [] @@ -2543,13 +2472,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['oecd']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.", - "default": null, - "optional": true } ], "oecd": [ @@ -2724,82 +2646,16 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['econdb', 'oecd']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, oecd.", - "default": null, - "optional": true } ], "econdb": [ { "name": "country", "type": "Union[str, List[str]]", - "description": "The country to get data.Use 'all' to get data for all available countries. Multiple items allowed for provider(s): econdb, oecd.", + "description": "The country to get data.Use 'all' to get data for all available countries. Multiple items allowed for provider(s): econdb.", "default": "united_states", "optional": true, - "choices": [ - "oecd", - "oecd_26", - "oecd_europe", - "g7", - "g20", - "euro_area", - "european_union_27", - "european_union_15", - "nafta", - "argentina", - "australia", - "austria", - "belgium", - "bulgaria", - "brazil", - "canada", - "chile", - "colombia", - "costa_rica", - "croatia", - "czech_republic", - "denmark", - "estonia", - "finland", - "france", - "germany", - "greece", - "hungary", - "iceland", - "india", - "indonesia", - "ireland", - "israel", - "italy", - "japan", - "korea", - "latvia", - "lithuania", - "luxembourg", - "mexico", - "netherlands", - "new_zealand", - "norway", - "poland", - "portugal", - "romania", - "russia", - "saudi_arabia", - "slovak_republic", - "slovenia", - "south_africa", - "spain", - "sweden", - "switzerland", - "turkey", - "united_kingdom", - "united_states", - "all" - ] + "choices": null }, { "name": "use_cache", @@ -3024,82 +2880,16 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['econdb', 'oecd']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, oecd.", - "default": null, - "optional": true } ], "econdb": [ { "name": "country", "type": "Union[str, List[str]]", - "description": "The country to get data.Use 'all' to get data for all available countries. Multiple items allowed for provider(s): econdb, oecd.", + "description": "The country to get data.Use 'all' to get data for all available countries. Multiple items allowed for provider(s): econdb.", "default": "united_states", "optional": true, - "choices": [ - "oecd", - "oecd_26", - "oecd_europe", - "g7", - "g20", - "euro_area", - "european_union_27", - "european_union_15", - "nafta", - "argentina", - "australia", - "austria", - "belgium", - "bulgaria", - "brazil", - "canada", - "chile", - "colombia", - "costa_rica", - "croatia", - "czech_republic", - "denmark", - "estonia", - "finland", - "france", - "germany", - "greece", - "hungary", - "iceland", - "india", - "indonesia", - "ireland", - "israel", - "italy", - "japan", - "korea", - "latvia", - "lithuania", - "luxembourg", - "mexico", - "netherlands", - "new_zealand", - "norway", - "poland", - "portugal", - "romania", - "russia", - "saudi_arabia", - "slovak_republic", - "slovenia", - "south_africa", - "spain", - "sweden", - "switzerland", - "turkey", - "united_kingdom", - "united_states", - "all" - ] + "choices": null }, { "name": "use_cache", @@ -3301,13 +3091,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -3441,13 +3224,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -3577,13 +3353,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -3769,13 +3538,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -3944,13 +3706,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -4107,13 +3862,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'tradingeconomics']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, tradingeconomics.", - "default": null, - "optional": true } ], "fmp": [], @@ -4124,205 +3872,7 @@ "description": "Country of the event. Multiple items allowed for provider(s): tradingeconomics.", "default": null, "optional": true, - "choices": [ - "afghanistan", - "albania", - "algeria", - "andorra", - "angola", - "antigua_and_barbuda", - "argentina", - "armenia", - "aruba", - "australia", - "austria", - "azerbaijan", - "bahamas", - "bahrain", - "bangladesh", - "barbados", - "belarus", - "belgium", - "belize", - "benin", - "bermuda", - "bhutan", - "bolivia", - "bosnia_and_herzegovina", - "botswana", - "brazil", - "brunei", - "bulgaria", - "burkina_faso", - "burundi", - "cambodia", - "cameroon", - "canada", - "cape_verde", - "cayman_islands", - "central_african_republic", - "chad", - "chile", - "china", - "colombia", - "comoros", - "congo", - "costa_rica", - "croatia", - "cuba", - "cyprus", - "czech_republic", - "denmark", - "djibouti", - "dominica", - "dominican_republic", - "east_timor", - "ecuador", - "egypt", - "el_salvador", - "equatorial_guinea", - "eritrea", - "estonia", - "ethiopia", - "euro_area", - "faroe_islands", - "fiji", - "finland", - "france", - "gabon", - "gambia", - "georgia", - "germany", - "ghana", - "greece", - "grenada", - "guatemala", - "guinea", - "guinea_bissau", - "guyana", - "haiti", - "honduras", - "hong_kong", - "hungary", - "iceland", - "india", - "indonesia", - "iran", - "iraq", - "ireland", - "isle_of_man", - "israel", - "italy", - "ivory_coast", - "jamaica", - "japan", - "jordan", - "kazakhstan", - "kenya", - "kiribati", - "kosovo", - "kuwait", - "kyrgyzstan", - "laos", - "latvia", - "lebanon", - "lesotho", - "liberia", - "libya", - "liechtenstein", - "lithuania", - "luxembourg", - "macao", - "madagascar", - "malawi", - "malaysia", - "maldives", - "mali", - "malta", - "mauritania", - "mauritius", - "mexico", - "moldova", - "monaco", - "mongolia", - "montenegro", - "morocco", - "mozambique", - "myanmar", - "namibia", - "nepal", - "netherlands", - "new_caledonia", - "new_zealand", - "nicaragua", - "niger", - "nigeria", - "north_korea", - "north_macedonia", - "norway", - "oman", - "pakistan", - "palestine", - "panama", - "papua_new_guinea", - "paraguay", - "peru", - "philippines", - "poland", - "portugal", - "puerto_rico", - "qatar", - "republic_of_the_congo", - "romania", - "russia", - "rwanda", - "samoa", - "sao_tome_and_principe", - "saudi_arabia", - "senegal", - "serbia", - "seychelles", - "sierra_leone", - "singapore", - "slovakia", - "slovenia", - "solomon_islands", - "somalia", - "south_africa", - "south_korea", - "south_sudan", - "spain", - "sri_lanka", - "sudan", - "suriname", - "swaziland", - "sweden", - "switzerland", - "syria", - "taiwan", - "tajikistan", - "tanzania", - "thailand", - "togo", - "tonga", - "trinidad_and_tobago", - "tunisia", - "turkey", - "turkmenistan", - "uganda", - "ukraine", - "united_arab_emirates", - "united_kingdom", - "united_states", - "uruguay", - "uzbekistan", - "vanuatu", - "venezuela", - "vietnam", - "yemen", - "zambia", - "zimbabwe" - ] + "choices": null }, { "name": "importance", @@ -4630,7 +4180,61 @@ "description": "The country to get data. Multiple items allowed for provider(s): fred, oecd.", "default": "united_states", "optional": true, - "choices": null + "choices": [ + "G20", + "G7", + "argentina", + "australia", + "austria", + "belgium", + "brazil", + "canada", + "chile", + "china", + "colombia", + "costa_rica", + "czech_republic", + "denmark", + "estonia", + "euro_area_20", + "europe", + "european_union_27", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "oecd_total", + "poland", + "portugal", + "russia", + "saudi_arabia", + "slovak_republic", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + "all" + ] }, { "name": "transform", @@ -4679,13 +4283,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred', 'oecd']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred, oecd.", - "default": null, - "optional": true } ], "fred": [ @@ -4695,57 +4292,7 @@ "description": "The country to get data.", "default": "united_states", "optional": true, - "choices": [ - "australia", - "austria", - "belgium", - "brazil", - "bulgaria", - "canada", - "chile", - "china", - "croatia", - "cyprus", - "czech_republic", - "denmark", - "estonia", - "euro_area", - "finland", - "france", - "germany", - "greece", - "hungary", - "iceland", - "india", - "indonesia", - "ireland", - "israel", - "italy", - "japan", - "korea", - "latvia", - "lithuania", - "luxembourg", - "malta", - "mexico", - "netherlands", - "new_zealand", - "norway", - "poland", - "portugal", - "romania", - "russian_federation", - "slovak_republic", - "slovakia", - "slovenia", - "south_africa", - "spain", - "sweden", - "switzerland", - "turkey", - "united_kingdom", - "united_states" - ] + "choices": null } ], "oecd": [ @@ -4755,61 +4302,7 @@ "description": "Country to get CPI for. This is the list of OECD supported countries", "default": "united_states", "optional": true, - "choices": [ - "G20", - "G7", - "argentina", - "australia", - "austria", - "belgium", - "brazil", - "canada", - "chile", - "china", - "colombia", - "costa_rica", - "czech_republic", - "denmark", - "estonia", - "euro_area_20", - "europe", - "european_union_27", - "finland", - "france", - "germany", - "greece", - "hungary", - "iceland", - "india", - "indonesia", - "ireland", - "israel", - "italy", - "japan", - "korea", - "latvia", - "lithuania", - "luxembourg", - "mexico", - "netherlands", - "new_zealand", - "norway", - "oecd_total", - "poland", - "portugal", - "russia", - "saudi_arabia", - "slovak_republic", - "slovenia", - "south_africa", - "spain", - "sweden", - "switzerland", - "turkey", - "united_kingdom", - "united_states", - "all" - ] + "choices": null }, { "name": "expenditure", @@ -4930,15 +4423,7 @@ "description": "Get Market Risk Premium by country.", "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.economy.risk_premium(provider='fmp')\n```\n\n", "parameters": { - "standard": [ - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true - } - ], + "standard": [], "fmp": [] }, "returns": { @@ -5017,15 +4502,7 @@ "description": "Balance of Payments Reports.", "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.economy.balance_of_payments(provider='fred')\nobb.economy.balance_of_payments(provider='fred', country=brazil)\n```\n\n", "parameters": { - "standard": [ - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true - } - ], + "standard": [], "fred": [ { "name": "country", @@ -5273,13 +4750,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -5594,13 +5064,6 @@ "default": 100000, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred', 'intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred, intrinio.", - "default": null, - "optional": true } ], "fred": [ @@ -5770,13 +5233,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [] @@ -5929,13 +5385,6 @@ "default": true, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['federal_reserve']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve.", - "default": null, - "optional": true } ], "federal_reserve": [] @@ -6084,13 +5533,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['oecd']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.", - "default": null, - "optional": true } ], "oecd": [ @@ -6100,53 +5542,7 @@ "description": "The country to get data.", "default": "united_states", "optional": true, - "choices": [ - "all", - "australia", - "austria", - "belgium", - "canada", - "chile", - "colombia", - "costa_rica", - "czech_republic", - "denmark", - "estonia", - "euro_area20", - "european_union27_2020", - "finland", - "france", - "g7", - "germany", - "greece", - "hungary", - "iceland", - "ireland", - "israel", - "italy", - "japan", - "korea", - "latvia", - "lithuania", - "luxembourg", - "mexico", - "netherlands", - "new_zealand", - "norway", - "oecd", - "poland", - "portugal", - "russia", - "slovakia", - "slovenia", - "south_africa", - "spain", - "sweden", - "switzerland", - "turkey", - "united_kingdom", - "united_states" - ] + "choices": null }, { "name": "sex", @@ -6266,13 +5662,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['oecd']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.", - "default": null, - "optional": true } ], "oecd": [ @@ -6410,13 +5799,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['oecd']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.", - "default": null, - "optional": true } ], "oecd": [ @@ -6522,13 +5904,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['oecd']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.", - "default": null, - "optional": true } ], "oecd": [ @@ -6650,13 +6025,6 @@ "default": 100000, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -6860,13 +6228,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['econdb']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb.", - "default": null, - "optional": true } ], "econdb": [ @@ -7044,15 +6405,7 @@ "description": "Get the available economic indicators for a provider.", "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.economy.available_indicators(provider='econdb')\n```\n\n", "parameters": { - "standard": [ - { - "name": "provider", - "type": "Literal['econdb']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb.", - "default": null, - "optional": true - } - ], + "standard": [], "econdb": [ { "name": "use_cache", @@ -7253,13 +6606,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['econdb']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb.", - "default": null, - "optional": true } ], "econdb": [ @@ -7381,13 +6727,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['federal_reserve']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve.", - "default": null, - "optional": true } ], "federal_reserve": [ @@ -7687,51 +7026,6 @@ "description": "The country to get data. Multiple items allowed for provider(s): oecd.", "default": "united_states", "optional": true, - "choices": null - }, - { - "name": "frequency", - "type": "Literal['monthly', 'quarter', 'annual']", - "description": "The frequency of the data.", - "default": "monthly", - "optional": true, - "choices": [ - "monthly", - "quarter", - "annual" - ] - }, - { - "name": "start_date", - "type": "Union[date, str]", - "description": "Start date of the data, in YYYY-MM-DD format.", - "default": null, - "optional": true, - "choices": null - }, - { - "name": "end_date", - "type": "Union[date, str]", - "description": "End date of the data, in YYYY-MM-DD format.", - "default": null, - "optional": true, - "choices": null - }, - { - "name": "provider", - "type": "Literal['oecd']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.", - "default": null, - "optional": true - } - ], - "oecd": [ - { - "name": "country", - "type": "str", - "description": "The country to get data.", - "default": "united_states", - "optional": true, "choices": [ "G20", "G7", @@ -7791,6 +7085,44 @@ "united_kingdom", "united_states" ] + }, + { + "name": "frequency", + "type": "Literal['monthly', 'quarter', 'annual']", + "description": "The frequency of the data.", + "default": "monthly", + "optional": true, + "choices": [ + "monthly", + "quarter", + "annual" + ] + }, + { + "name": "start_date", + "type": "Union[date, str]", + "description": "Start date of the data, in YYYY-MM-DD format.", + "default": null, + "optional": true, + "choices": null + }, + { + "name": "end_date", + "type": "Union[date, str]", + "description": "End date of the data, in YYYY-MM-DD format.", + "default": null, + "optional": true, + "choices": null + } + ], + "oecd": [ + { + "name": "country", + "type": "str", + "description": "The country to get data.", + "default": "united_states", + "optional": true, + "choices": null } ] }, @@ -7869,63 +7201,6 @@ "description": "The country to get data. Multiple items allowed for provider(s): oecd.", "default": "united_states", "optional": true, - "choices": null - }, - { - "name": "frequency", - "type": "Literal['monthly', 'quarter', 'annual']", - "description": "The frequency of the data.", - "default": "quarter", - "optional": true, - "choices": [ - "monthly", - "quarter", - "annual" - ] - }, - { - "name": "transform", - "type": "Literal['index', 'yoy', 'period']", - "description": "Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy).", - "default": "index", - "optional": true, - "choices": [ - "index", - "yoy", - "period" - ] - }, - { - "name": "start_date", - "type": "Union[date, str]", - "description": "Start date of the data, in YYYY-MM-DD format.", - "default": null, - "optional": true, - "choices": null - }, - { - "name": "end_date", - "type": "Union[date, str]", - "description": "End date of the data, in YYYY-MM-DD format.", - "default": null, - "optional": true, - "choices": null - }, - { - "name": "provider", - "type": "Literal['oecd']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.", - "default": null, - "optional": true - } - ], - "oecd": [ - { - "name": "country", - "type": "str", - "description": "The country to get data.", - "default": "united_states", - "optional": true, "choices": [ "G20", "G7", @@ -7985,6 +7260,56 @@ "united_states", "all" ] + }, + { + "name": "frequency", + "type": "Literal['monthly', 'quarter', 'annual']", + "description": "The frequency of the data.", + "default": "quarter", + "optional": true, + "choices": [ + "monthly", + "quarter", + "annual" + ] + }, + { + "name": "transform", + "type": "Literal['index', 'yoy', 'period']", + "description": "Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy).", + "default": "index", + "optional": true, + "choices": [ + "index", + "yoy", + "period" + ] + }, + { + "name": "start_date", + "type": "Union[date, str]", + "description": "Start date of the data, in YYYY-MM-DD format.", + "default": null, + "optional": true, + "choices": null + }, + { + "name": "end_date", + "type": "Union[date, str]", + "description": "End date of the data, in YYYY-MM-DD format.", + "default": null, + "optional": true, + "choices": null + } + ], + "oecd": [ + { + "name": "country", + "type": "str", + "description": "The country to get data.", + "default": "united_states", + "optional": true, + "choices": null } ] }, @@ -8063,39 +7388,6 @@ "description": "The country to get data. Multiple items allowed for provider(s): oecd.", "default": "united_states", "optional": true, - "choices": null - }, - { - "name": "start_date", - "type": "Union[date, str]", - "description": "Start date of the data, in YYYY-MM-DD format.", - "default": null, - "optional": true, - "choices": null - }, - { - "name": "end_date", - "type": "Union[date, str]", - "description": "End date of the data, in YYYY-MM-DD format.", - "default": null, - "optional": true, - "choices": null - }, - { - "name": "provider", - "type": "Literal['oecd']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: oecd.", - "default": null, - "optional": true - } - ], - "oecd": [ - { - "name": "country", - "type": "str", - "description": "The country to get data.", - "default": "united_states", - "optional": true, "choices": [ "belgium", "bulgaria", @@ -8148,6 +7440,32 @@ "all" ] }, + { + "name": "start_date", + "type": "Union[date, str]", + "description": "Start date of the data, in YYYY-MM-DD format.", + "default": null, + "optional": true, + "choices": null + }, + { + "name": "end_date", + "type": "Union[date, str]", + "description": "End date of the data, in YYYY-MM-DD format.", + "default": null, + "optional": true, + "choices": null + } + ], + "oecd": [ + { + "name": "country", + "type": "str", + "description": "The country to get data.", + "default": "united_states", + "optional": true, + "choices": null + }, { "name": "frequency", "type": "Literal['monthly', 'quarter', 'annual']", @@ -8258,13 +7576,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -8481,13 +7792,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['federal_reserve']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve.", - "default": null, - "optional": true } ], "federal_reserve": [ @@ -8608,13 +7912,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -8786,13 +8083,6 @@ "default": 100, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.", - "default": null, - "optional": true } ], "intrinio": [ @@ -9059,13 +8349,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -9203,13 +8486,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -9314,13 +8590,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -9466,13 +8735,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -9545,13 +8807,6 @@ "default": "", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.", - "default": null, - "optional": true } ], "sec": [ @@ -10059,13 +9314,6 @@ "default": 200, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['benzinga', 'fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp.", - "default": null, - "optional": true } ], "benzinga": [ @@ -10448,13 +9696,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [ @@ -10704,13 +9945,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.", - "default": null, - "optional": true } ], "fmp": [], @@ -10926,13 +10160,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['benzinga']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga.", - "default": null, - "optional": true } ], "benzinga": [ @@ -11479,13 +10706,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.", - "default": null, - "optional": true } ], "intrinio": [ @@ -11752,13 +10972,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.", - "default": null, - "optional": true } ], "fmp": [ @@ -11980,13 +11193,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.", - "default": null, - "optional": true } ], "fmp": [ @@ -12248,13 +11454,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.", - "default": null, - "optional": true } ], "intrinio": [] @@ -12392,13 +11591,6 @@ "default": "desc", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.", - "default": null, - "optional": true } ], "yfinance": [] @@ -12528,13 +11720,6 @@ "default": "desc", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.", - "default": null, - "optional": true } ], "yfinance": [] @@ -12664,13 +11849,6 @@ "default": "desc", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.", - "default": null, - "optional": true } ], "yfinance": [] @@ -12800,13 +11978,6 @@ "default": "desc", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.", - "default": null, - "optional": true } ], "yfinance": [] @@ -12936,13 +12107,6 @@ "default": "desc", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.", - "default": null, - "optional": true } ], "yfinance": [] @@ -13072,13 +12236,6 @@ "default": "desc", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.", - "default": null, - "optional": true } ], "yfinance": [] @@ -13208,13 +12365,6 @@ "default": "desc", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: yfinance.", - "default": null, - "optional": true } ], "yfinance": [] @@ -13368,13 +12518,6 @@ "default": 100, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [ @@ -13488,13 +12631,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -14055,13 +13191,6 @@ "default": 5, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'polygon', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance.", - "default": null, - "optional": true } ], "fmp": [ @@ -15680,13 +14809,6 @@ "default": 10, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [ @@ -16116,13 +15238,6 @@ "default": 5, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'polygon', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance.", - "default": null, - "optional": true } ], "fmp": [ @@ -17148,13 +16263,6 @@ "default": 100, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.", - "default": null, - "optional": true } ], "intrinio": [ @@ -17276,13 +16384,6 @@ "default": 10, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [ @@ -17640,13 +16741,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.", - "default": null, - "optional": true } ], "fmp": [], @@ -17798,13 +16892,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [ @@ -17951,13 +17038,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -18094,13 +17174,6 @@ "default": 1000, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.", - "default": null, - "optional": true } ], "intrinio": [] @@ -18253,13 +17326,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.", - "default": null, - "optional": true } ], "intrinio": [] @@ -18396,13 +17462,6 @@ "default": "desc", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio.", - "default": null, - "optional": true } ], "intrinio": [] @@ -18507,13 +17566,6 @@ "default": 5, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'polygon', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance.", - "default": null, - "optional": true } ], "fmp": [ @@ -20022,13 +19074,6 @@ "default": 10, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [ @@ -20354,13 +19399,6 @@ "default": 100, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.", - "default": null, - "optional": true } ], "fmp": [ @@ -21497,13 +20535,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, yfinance.", - "default": null, - "optional": true } ], "fmp": [], @@ -21635,13 +20666,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [ @@ -21844,13 +20868,6 @@ "default": 12, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.", - "default": null, - "optional": true } ], "fmp": [ @@ -22424,13 +21441,6 @@ "default": "flat", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -22543,13 +21553,6 @@ "default": "flat", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -22662,13 +21665,6 @@ "default": 100, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, sec.", - "default": null, - "optional": true } ], "fmp": [], @@ -22997,13 +21993,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -23100,13 +22089,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -23211,13 +22193,6 @@ "default": 252, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['tiingo']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: tiingo.", - "default": null, - "optional": true } ], "tiingo": [] @@ -23306,13 +22281,6 @@ "default": 0, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -23681,13 +22649,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [ @@ -24058,13 +23019,6 @@ "default": 500, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.", - "default": null, - "optional": true } ], "fmp": [ @@ -24407,13 +23361,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.", - "default": null, - "optional": true } ], "fmp": [], @@ -24636,13 +23583,6 @@ "default": 1, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.", - "default": null, - "optional": true } ], "sec": [] @@ -24796,13 +23736,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.", - "default": null, - "optional": true } ], "fmp": [], @@ -25283,13 +24216,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['polygon']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: polygon.", - "default": null, - "optional": true } ], "polygon": [ @@ -25524,13 +24450,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'polygon', 'tiingo', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, tiingo, yfinance.", - "default": null, - "optional": true } ], "fmp": [ @@ -26053,13 +24972,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -26261,13 +25173,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.", - "default": null, - "optional": true } ], "sec": [ @@ -26413,13 +25318,6 @@ "default": true, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['intrinio', 'sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: intrinio, sec.", - "default": null, - "optional": true } ], "intrinio": [ @@ -26546,15 +25444,7 @@ "description": "Screen for companies meeting various criteria.\n\nThese criteria include market cap, price, beta, volume, and dividend yield.", "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.screener(provider='fmp')\n```\n\n", "parameters": { - "standard": [ - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true - } - ], + "standard": [], "fmp": [ { "name": "mktcap_min", @@ -26859,13 +25749,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.", - "default": null, - "optional": true } ], "fmp": [], @@ -27425,15 +26308,7 @@ "description": "Get an updated equity market snapshot. This includes price data for thousands of stocks.", "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.market_snapshots(provider='fmp')\n```\n\n", "parameters": { - "standard": [ - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'polygon']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon.", - "default": null, - "optional": true - } - ], + "standard": [], "fmp": [ { "name": "market", @@ -27913,13 +26788,6 @@ "default": "", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.", - "default": null, - "optional": true } ], "fmp": [ @@ -28182,13 +27050,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'polygon', 'tiingo', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, tiingo, yfinance.", - "default": null, - "optional": true } ], "fmp": [ @@ -28711,13 +27572,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance.", - "default": null, - "optional": true } ], "fmp": [], @@ -30069,13 +28923,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -30148,13 +28995,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -30219,13 +29059,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio.", - "default": null, - "optional": true } ], "fmp": [], @@ -30567,13 +29400,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, sec.", - "default": null, - "optional": true } ], "fmp": [ @@ -31592,13 +30418,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [ @@ -31672,13 +30491,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [] @@ -31783,13 +30595,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -31961,13 +30766,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -32057,13 +30855,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['federal_reserve', 'fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred.", - "default": null, - "optional": true } ], "federal_reserve": [], @@ -32271,13 +31062,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [] @@ -32358,13 +31142,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['federal_reserve', 'fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred.", - "default": null, - "optional": true } ], "federal_reserve": [], @@ -32580,15 +31357,7 @@ "description": "Fed Funds Rate Projections.\n\nThe projections for the federal funds rate are the value of the midpoint of the\nprojected appropriate target range for the federal funds rate or the projected\nappropriate target level for the federal funds rate at the end of the specified\ncalendar year or over the longer run.", "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.fixedincome.rate.effr_forecast(provider='fred')\nobb.fixedincome.rate.effr_forecast(long_run=True, provider='fred')\n```\n\n", "parameters": { - "standard": [ - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true - } - ], + "standard": [], "fred": [ { "name": "long_run", @@ -32724,13 +31493,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -32919,13 +31681,6 @@ "default": "lending", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [] @@ -33006,13 +31761,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -33102,13 +31850,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['federal_reserve', 'fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred.", - "default": null, - "optional": true } ], "federal_reserve": [], @@ -33300,13 +32041,6 @@ "default": "3m", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [] @@ -33395,13 +32129,6 @@ "default": "10y", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [] @@ -33490,13 +32217,6 @@ "default": "3m", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [] @@ -33569,13 +32289,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['econdb', 'federal_reserve', 'fmp', 'fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: econdb, federal_reserve, fmp, fred.", - "default": null, - "optional": true } ], "econdb": [ @@ -33721,13 +32434,6 @@ "default": false, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [] @@ -33808,13 +32514,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['federal_reserve', 'fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fmp.", - "default": null, - "optional": true } ], "federal_reserve": [], @@ -33993,13 +32692,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -34177,13 +32869,6 @@ "default": "yield", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -34305,13 +32990,6 @@ "default": "aaa", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -34393,13 +33071,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -34519,13 +33190,6 @@ "par_yield", "spot_rate" ] - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [] @@ -34606,13 +33270,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -34808,13 +33465,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['federal_reserve', 'fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: federal_reserve, fred.", - "default": null, - "optional": true } ], "federal_reserve": [], @@ -35035,13 +33685,6 @@ "total_return", "oas" ] - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -35242,13 +33885,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fred']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fred.", - "default": null, - "optional": true } ], "fred": [ @@ -35258,28 +33894,7 @@ "description": "The specific index, or index group, to query. Default is the 'primary' group. Multiple items allowed for provider(s): fred.", "default": "primary", "optional": true, - "choices": [ - "primary", - "ltv_lte_80", - "ltv_gt_80", - "conforming_30y", - "conforming_30y_na", - "jumbo_30y", - "fha_30y", - "va_30y", - "usda_30y", - "conforming_15y", - "ltv_lte80_fico_ge740", - "ltv_lte80_fico_a720b739", - "ltv_lte80_fico_a700b719", - "ltv_lte80_fico_a680b699", - "ltv_lte80_fico_lt680", - "ltv_gt80_fico_ge740", - "ltv_gt80_fico_a720b739", - "ltv_gt80_fico_a700b719", - "ltv_gt80_fico_a680b699", - "ltv_gt80_fico_lt680" - ] + "choices": null }, { "name": "frequency", @@ -35443,13 +34058,6 @@ "default": "1d", "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp', 'intrinio', 'polygon', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance.", - "default": null, - "optional": true } ], "fmp": [ @@ -35646,13 +34254,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['fmp']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp.", - "default": null, - "optional": true } ], "fmp": [ @@ -35775,15 +34376,7 @@ "description": "All indices available from a given provider.", "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.index.available(provider='fmp')\nobb.index.available(provider='yfinance')\n```\n\n", "parameters": { - "standard": [ - { - "name": "provider", - "type": "Literal['fmp', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, yfinance.", - "default": null, - "optional": true - } - ], + "standard": [], "fmp": [], "yfinance": [] }, @@ -35906,13 +34499,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['benzinga', 'fmp', 'intrinio', 'tiingo']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp, intrinio, tiingo.", - "default": null, - "optional": true } ], "benzinga": [ @@ -36438,13 +35024,6 @@ "default": 2500, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['benzinga', 'fmp', 'intrinio', 'polygon', 'tiingo', 'yfinance']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: benzinga, fmp, intrinio, polygon, tiingo, yfinance.", - "default": null, - "optional": true } ], "benzinga": [ @@ -37018,13 +35597,6 @@ "default": "", "optional": false, "choices": null - }, - { - "name": "provider", - "type": "Literal['sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.", - "default": null, - "optional": true } ], "sec": [ @@ -37106,13 +35678,6 @@ "default": true, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.", - "default": null, - "optional": true } ], "sec": [] @@ -37193,13 +35758,6 @@ "default": true, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.", - "default": null, - "optional": true } ], "sec": [ @@ -37281,13 +35839,6 @@ "default": true, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.", - "default": null, - "optional": true } ], "sec": [] @@ -37344,15 +35895,7 @@ "description": "Get the RSS feed that provides links to litigation releases concerning civil lawsuits brought by the Commission in federal court.", "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.regulators.sec.rss_litigation(provider='sec')\n```\n\n", "parameters": { - "standard": [ - { - "name": "provider", - "type": "Literal['sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.", - "default": null, - "optional": true - } - ], + "standard": [], "sec": [] }, "returns": { @@ -37455,13 +35998,6 @@ "default": true, "optional": true, "choices": null - }, - { - "name": "provider", - "type": "Literal['sec']", - "description": "The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: sec.", - "default": null, - "optional": true } ], "sec": [] diff --git a/openbb_platform/openbb/package/crypto_price.py b/openbb_platform/openbb/package/crypto_price.py index f43e427b2ba3..a2f6be19f54f 100644 --- a/openbb_platform/openbb/package/crypto_price.py +++ b/openbb_platform/openbb/package/crypto_price.py @@ -135,10 +135,10 @@ def historical( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "polygon": {"multiple_items_allowed": True}, - "tiingo": {"multiple_items_allowed": True}, - "yfinance": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "tiingo": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, } }, ) diff --git a/openbb_platform/openbb/package/currency.py b/openbb_platform/openbb/package/currency.py index b754ddec4c9d..a42e26cd17ed 100644 --- a/openbb_platform/openbb/package/currency.py +++ b/openbb_platform/openbb/package/currency.py @@ -288,8 +288,8 @@ def snapshots( extra_params=kwargs, info={ "base": { - "fmp": {"multiple_items_allowed": True}, - "polygon": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, } }, ) diff --git a/openbb_platform/openbb/package/currency_price.py b/openbb_platform/openbb/package/currency_price.py index 59d205de8a09..264b4aa78216 100644 --- a/openbb_platform/openbb/package/currency_price.py +++ b/openbb_platform/openbb/package/currency_price.py @@ -138,10 +138,10 @@ def historical( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "polygon": {"multiple_items_allowed": True}, - "tiingo": {"multiple_items_allowed": True}, - "yfinance": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "tiingo": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, } }, ) diff --git a/openbb_platform/openbb/package/derivatives_futures.py b/openbb_platform/openbb/package/derivatives_futures.py index d3c3aba29081..0678828aa42a 100644 --- a/openbb_platform/openbb/package/derivatives_futures.py +++ b/openbb_platform/openbb/package/derivatives_futures.py @@ -94,7 +94,11 @@ def curve( "date": date, }, extra_params=kwargs, - info={"date": {"yfinance": {"multiple_items_allowed": True}}}, + info={ + "date": { + "yfinance": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) @@ -201,6 +205,10 @@ def historical( "expiration": expiration, }, extra_params=kwargs, - info={"symbol": {"yfinance": {"multiple_items_allowed": True}}}, + info={ + "symbol": { + "yfinance": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) diff --git a/openbb_platform/openbb/package/economy.py b/openbb_platform/openbb/package/economy.py index af1a088c5548..88634bb8fd8a 100644 --- a/openbb_platform/openbb/package/economy.py +++ b/openbb_platform/openbb/package/economy.py @@ -367,9 +367,17 @@ def calendar( }, extra_params=kwargs, info={ - "country": {"tradingeconomics": {"multiple_items_allowed": True}}, + "country": { + "tradingeconomics": { + "multiple_items_allowed": True, + "choices": None, + } + }, "calendar_id": { - "tradingeconomics": {"multiple_items_allowed": True} + "tradingeconomics": { + "multiple_items_allowed": True, + "choices": None, + } }, }, ) @@ -502,7 +510,14 @@ def central_bank_holdings( "date": date, }, extra_params=kwargs, - info={"cusip": {"federal_reserve": {"multiple_items_allowed": True}}}, + info={ + "cusip": { + "federal_reserve": { + "multiple_items_allowed": True, + "choices": None, + } + } + }, ) ) @@ -594,7 +609,38 @@ def composite_leading_indicator( "end_date": end_date, }, extra_params=kwargs, - info={"country": {"oecd": {"multiple_items_allowed": True}}}, + info={ + "country": { + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "g20", + "g7", + "asia5", + "north_america", + "europe4", + "australia", + "brazil", + "canada", + "china", + "france", + "germany", + "india", + "indonesia", + "italy", + "japan", + "mexico", + "spain", + "south_africa", + "south_korea", + "turkey", + "united_states", + "united_kingdom", + "all", + ], + } + } + }, ) ) @@ -696,7 +742,11 @@ def country_profile( "country": country, }, extra_params=kwargs, - info={"country": {"econdb": {"multiple_items_allowed": True}}}, + info={ + "country": { + "econdb": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) @@ -713,16 +763,12 @@ def cpi( transform: Annotated[ Literal["index", "yoy", "period"], OpenBBField( - description="Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy).", - choices=["index", "yoy", "period"], + description="Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy)." ), ] = "yoy", frequency: Annotated[ Literal["annual", "quarter", "monthly"], - OpenBBField( - description="The frequency of the data.", - choices=["annual", "quarter", "monthly"], - ), + OpenBBField(description="The frequency of the data."), ] = "monthly", harmonized: Annotated[ bool, OpenBBField(description="If true, returns harmonized data.") @@ -821,8 +867,118 @@ def cpi( extra_params=kwargs, info={ "country": { - "fred": ["multiple_items_allowed"], - "oecd": ["multiple_items_allowed"], + "fred": { + "multiple_items_allowed": True, + "choices": [ + "australia", + "austria", + "belgium", + "brazil", + "bulgaria", + "canada", + "chile", + "china", + "croatia", + "cyprus", + "czech_republic", + "denmark", + "estonia", + "euro_area", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "malta", + "mexico", + "netherlands", + "new_zealand", + "norway", + "poland", + "portugal", + "romania", + "russian_federation", + "slovak_republic", + "slovakia", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + ], + }, + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "G20", + "G7", + "argentina", + "australia", + "austria", + "belgium", + "brazil", + "canada", + "chile", + "china", + "colombia", + "costa_rica", + "czech_republic", + "denmark", + "estonia", + "euro_area_20", + "europe", + "european_union_27", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "oecd_total", + "poland", + "portugal", + "russia", + "saudi_arabia", + "slovak_republic", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + "all", + ], + }, } }, ) @@ -1105,7 +1261,9 @@ def fred_release_table( "date": date, }, extra_params=kwargs, - info={"date": {"fred": {"multiple_items_allowed": True}}}, + info={ + "date": {"fred": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -1233,8 +1391,12 @@ def fred_search( }, extra_params=kwargs, info={ - "tag_names": {"fred": {"multiple_items_allowed": True}}, - "exclude_tag_names": {"fred": {"multiple_items_allowed": True}}, + "tag_names": { + "fred": {"multiple_items_allowed": True, "choices": None} + }, + "exclude_tag_names": { + "fred": {"multiple_items_allowed": True, "choices": None} + }, }, ) ) @@ -1400,7 +1562,11 @@ def fred_series( "limit": limit, }, extra_params=kwargs, - info={"symbol": {"fred": {"multiple_items_allowed": True}}}, + info={ + "symbol": { + "fred": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) @@ -1423,16 +1589,12 @@ def house_price_index( ] = "united_states", frequency: Annotated[ Literal["monthly", "quarter", "annual"], - OpenBBField( - description="The frequency of the data.", - choices=["monthly", "quarter", "annual"], - ), + OpenBBField(description="The frequency of the data."), ] = "quarter", transform: Annotated[ Literal["index", "yoy", "period"], OpenBBField( - description="Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy).", - choices=["index", "yoy", "period"], + description="Transformation of the CPI data. Period represents the change since previous. Defaults to change from one year ago (yoy)." ), ] = "index", start_date: Annotated[ @@ -1517,7 +1679,72 @@ def house_price_index( "end_date": end_date, }, extra_params=kwargs, - info={"country": {"oecd": ["multiple_items_allowed"]}}, + info={ + "country": { + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "G20", + "G7", + "argentina", + "australia", + "austria", + "belgium", + "brazil", + "bulgaria", + "canada", + "chile", + "china", + "colombia", + "costa_rica", + "croatia", + "czech_republic", + "denmark", + "estonia", + "euro_area_20", + "euro_area_19", + "europe", + "european_union_27", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "oecd_total", + "poland", + "portugal", + "romania", + "russia", + "saudi_arabia", + "slovak_republic", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + "all", + ], + } + } + }, ) ) @@ -1609,7 +1836,64 @@ def immediate_interest_rate( "end_date": end_date, }, extra_params=kwargs, - info={"country": {"oecd": ["multiple_items_allowed"]}}, + info={ + "country": { + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "belgium", + "bulgaria", + "brazil", + "ireland", + "mexico", + "indonesia", + "new_zealand", + "japan", + "united_kingdom", + "france", + "chile", + "canada", + "netherlands", + "united_states", + "south_korea", + "norway", + "austria", + "south_africa", + "denmark", + "switzerland", + "hungary", + "luxembourg", + "australia", + "germany", + "sweden", + "iceland", + "turkey", + "greece", + "israel", + "czech_republic", + "latvia", + "slovenia", + "poland", + "estonia", + "lithuania", + "portugal", + "costa_rica", + "slovakia", + "finland", + "spain", + "romania", + "russia", + "euro_area19", + "colombia", + "italy", + "india", + "china", + "croatia", + "all", + ], + } + } + }, ) ) @@ -1730,8 +2014,12 @@ def indicators( }, extra_params=kwargs, info={ - "symbol": {"econdb": {"multiple_items_allowed": True}}, - "country": {"econdb": {"multiple_items_allowed": True}}, + "symbol": { + "econdb": {"multiple_items_allowed": True, "choices": None} + }, + "country": { + "econdb": {"multiple_items_allowed": True, "choices": None} + }, }, ) ) @@ -2014,7 +2302,9 @@ def pce( "date": date, }, extra_params=kwargs, - info={"date": {"fred": {"multiple_items_allowed": True}}}, + info={ + "date": {"fred": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -2296,10 +2586,7 @@ def share_price_index( ] = "united_states", frequency: Annotated[ Literal["monthly", "quarter", "annual"], - OpenBBField( - description="The frequency of the data.", - choices=["monthly", "quarter", "annual"], - ), + OpenBBField(description="The frequency of the data."), ] = "monthly", start_date: Annotated[ Union[datetime.date, None, str], @@ -2380,7 +2667,72 @@ def share_price_index( "end_date": end_date, }, extra_params=kwargs, - info={"country": {"oecd": ["multiple_items_allowed"]}}, + info={ + "country": { + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "G20", + "G7", + "all", + "argentina", + "australia", + "austria", + "belgium", + "brazil", + "bulgaria", + "canada", + "chile", + "china", + "colombia", + "costa_rica", + "croatia", + "czech_republic", + "denmark", + "estonia", + "euro_area_19", + "euro_area_20", + "europe", + "european_union_27", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "oecd_total", + "poland", + "portugal", + "romania", + "russia", + "saudi_arabia", + "slovak_republic", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + ], + } + } + }, ) ) @@ -2494,10 +2846,7 @@ def unemployment( ] = "united_states", frequency: Annotated[ Literal["monthly", "quarter", "annual"], - OpenBBField( - description="The frequency of the data.", - choices=["monthly", "quarter", "annual"], - ), + OpenBBField(description="The frequency of the data."), ] = "monthly", start_date: Annotated[ Union[datetime.date, None, str], @@ -2585,6 +2934,10 @@ def unemployment( "end_date": end_date, }, extra_params=kwargs, - info={"country": {"oecd": ["multiple_items_allowed"]}}, + info={ + "country": { + "oecd": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) diff --git a/openbb_platform/openbb/package/economy_gdp.py b/openbb_platform/openbb/package/economy_gdp.py index 7240e572a44e..d0092c89563f 100644 --- a/openbb_platform/openbb/package/economy_gdp.py +++ b/openbb_platform/openbb/package/economy_gdp.py @@ -104,7 +104,69 @@ def forecast( "end_date": end_date, }, extra_params=kwargs, - info={"country": {"oecd": {"multiple_items_allowed": True}}}, + info={ + "country": { + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "argentina", + "asia", + "australia", + "austria", + "belgium", + "brazil", + "bulgaria", + "canada", + "chile", + "china", + "colombia", + "costa_rica", + "croatia", + "czech_republic", + "denmark", + "estonia", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "peru", + "poland", + "portugal", + "romania", + "russia", + "slovak_republic", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + "other_major_oil_producers", + "rest_of_the_world", + "world", + "all", + ], + } + } + }, ) ) @@ -200,8 +262,70 @@ def nominal( extra_params=kwargs, info={ "country": { - "econdb": {"multiple_items_allowed": True}, - "oecd": ["multiple_items_allowed"], + "econdb": {"multiple_items_allowed": True, "choices": None}, + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "oecd", + "oecd_26", + "oecd_europe", + "g7", + "g20", + "euro_area", + "european_union_27", + "european_union_15", + "nafta", + "argentina", + "australia", + "austria", + "belgium", + "bulgaria", + "brazil", + "canada", + "chile", + "colombia", + "costa_rica", + "croatia", + "czech_republic", + "denmark", + "estonia", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "poland", + "portugal", + "romania", + "russia", + "saudi_arabia", + "slovak_republic", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + "all", + ], + }, } }, ) @@ -295,8 +419,70 @@ def real( extra_params=kwargs, info={ "country": { - "econdb": {"multiple_items_allowed": True}, - "oecd": ["multiple_items_allowed"], + "econdb": {"multiple_items_allowed": True, "choices": None}, + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "oecd", + "oecd_26", + "oecd_europe", + "g7", + "g20", + "euro_area", + "european_union_27", + "european_union_15", + "nafta", + "argentina", + "australia", + "austria", + "belgium", + "bulgaria", + "brazil", + "canada", + "chile", + "colombia", + "costa_rica", + "croatia", + "czech_republic", + "denmark", + "estonia", + "finland", + "france", + "germany", + "greece", + "hungary", + "iceland", + "india", + "indonesia", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "poland", + "portugal", + "romania", + "russia", + "saudi_arabia", + "slovak_republic", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + "all", + ], + }, } }, ) diff --git a/openbb_platform/openbb/package/economy_survey.py b/openbb_platform/openbb/package/economy_survey.py index 7f94d2f774a7..c12e538c2b6d 100644 --- a/openbb_platform/openbb/package/economy_survey.py +++ b/openbb_platform/openbb/package/economy_survey.py @@ -255,7 +255,29 @@ def manufacturing_outlook_texas( "end_date": end_date, }, extra_params=kwargs, - info={"topic": {"fred": {"multiple_items_allowed": True}}}, + info={ + "topic": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "business_activity", + "business_outlook", + "capex", + "prices_paid", + "production", + "inventory", + "new_orders", + "new_orders_growth", + "unfilled_orders", + "shipments", + "delivery_time", + "employment", + "wages", + "hours_worked", + ], + } + } + }, ) ) @@ -342,7 +364,9 @@ def nonfarm_payrolls( "date": date, }, extra_params=kwargs, - info={"date": {"fred": {"multiple_items_allowed": True}}}, + info={ + "date": {"fred": {"multiple_items_allowed": True, "choices": None}} + }, ) ) diff --git a/openbb_platform/openbb/package/equity.py b/openbb_platform/openbb/package/equity.py index 2b0dc44be780..abc7c7de1915 100644 --- a/openbb_platform/openbb/package/equity.py +++ b/openbb_platform/openbb/package/equity.py @@ -432,9 +432,9 @@ def profile( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "intrinio": {"multiple_items_allowed": True}, - "yfinance": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, } }, ) diff --git a/openbb_platform/openbb/package/equity_compare.py b/openbb_platform/openbb/package/equity_compare.py index 78863dde8372..7d1d771a584d 100644 --- a/openbb_platform/openbb/package/equity_compare.py +++ b/openbb_platform/openbb/package/equity_compare.py @@ -133,7 +133,9 @@ def company_facts( "fact": fact, }, extra_params=kwargs, - info={"symbol": {"sec": {"multiple_items_allowed": True}}}, + info={ + "symbol": {"sec": {"multiple_items_allowed": True, "choices": None}} + }, ) ) diff --git a/openbb_platform/openbb/package/equity_estimates.py b/openbb_platform/openbb/package/equity_estimates.py index 41e53703cc7f..d7ffeee681a7 100644 --- a/openbb_platform/openbb/package/equity_estimates.py +++ b/openbb_platform/openbb/package/equity_estimates.py @@ -222,11 +222,21 @@ def analyst_search( }, extra_params=kwargs, info={ - "analyst_name": {"benzinga": {"multiple_items_allowed": True}}, - "firm_name": {"benzinga": {"multiple_items_allowed": True}}, - "analyst_ids": {"benzinga": {"multiple_items_allowed": True}}, - "firm_ids": {"benzinga": {"multiple_items_allowed": True}}, - "fields": {"benzinga": {"multiple_items_allowed": True}}, + "analyst_name": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "firm_name": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "analyst_ids": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "firm_ids": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "fields": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, }, ) ) @@ -334,9 +344,9 @@ def consensus( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "intrinio": {"multiple_items_allowed": True}, - "yfinance": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, } }, ) @@ -449,8 +459,8 @@ def forward_ebitda( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "intrinio": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, } }, ) @@ -571,8 +581,8 @@ def forward_eps( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "intrinio": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, } }, ) @@ -663,7 +673,11 @@ def forward_pe( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"intrinio": {"multiple_items_allowed": True}}}, + info={ + "symbol": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) @@ -784,7 +798,11 @@ def forward_sales( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"intrinio": {"multiple_items_allowed": True}}}, + info={ + "symbol": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) @@ -900,7 +918,9 @@ def historical( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -1056,12 +1076,18 @@ def price_target( extra_params=kwargs, info={ "symbol": { - "benzinga": ["multiple_items_allowed"], - "fmp": {"multiple_items_allowed": True}, + "benzinga": {"multiple_items_allowed": True, "choices": None}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + }, + "analyst_ids": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "firm_ids": { + "benzinga": {"multiple_items_allowed": True, "choices": None} + }, + "fields": { + "benzinga": {"multiple_items_allowed": True, "choices": None} }, - "analyst_ids": {"benzinga": ["multiple_items_allowed"]}, - "firm_ids": {"benzinga": ["multiple_items_allowed"]}, - "fields": {"benzinga": ["multiple_items_allowed"]}, }, ) ) diff --git a/openbb_platform/openbb/package/equity_fundamental.py b/openbb_platform/openbb/package/equity_fundamental.py index 2c9fcdcfc63f..e0ca020b39ea 100644 --- a/openbb_platform/openbb/package/equity_fundamental.py +++ b/openbb_platform/openbb/package/equity_fundamental.py @@ -1419,8 +1419,12 @@ def historical_attributes( }, extra_params=kwargs, info={ - "symbol": {"intrinio": {"multiple_items_allowed": True}}, - "tag": {"intrinio": {"multiple_items_allowed": True}}, + "symbol": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + }, + "tag": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + }, }, ) ) @@ -2155,8 +2159,12 @@ def latest_attributes( }, extra_params=kwargs, info={ - "symbol": {"intrinio": {"multiple_items_allowed": True}}, - "tag": {"intrinio": {"multiple_items_allowed": True}}, + "symbol": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + }, + "tag": { + "intrinio": {"multiple_items_allowed": True, "choices": None} + }, }, ) ) @@ -2337,7 +2345,9 @@ def management_compensation( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -2651,9 +2661,9 @@ def metrics( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "intrinio": {"multiple_items_allowed": True}, - "yfinance": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, } }, ) @@ -2845,7 +2855,9 @@ def multiples( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -3569,8 +3581,10 @@ def transcript( }, extra_params=kwargs, info={ - "symbol": {"fmp": {"multiple_items_allowed": True}}, - "year": {"fmp": {"multiple_items_allowed": True}}, + "symbol": { + "fmp": {"multiple_items_allowed": True, "choices": None} + }, + "year": {"fmp": {"multiple_items_allowed": True, "choices": None}}, }, ) ) diff --git a/openbb_platform/openbb/package/equity_ownership.py b/openbb_platform/openbb/package/equity_ownership.py index eb52434be8bb..a3b829ce3e30 100644 --- a/openbb_platform/openbb/package/equity_ownership.py +++ b/openbb_platform/openbb/package/equity_ownership.py @@ -675,6 +675,10 @@ def share_statistics( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"yfinance": {"multiple_items_allowed": True}}}, + info={ + "symbol": { + "yfinance": {"multiple_items_allowed": True, "choices": None} + } + }, ) ) diff --git a/openbb_platform/openbb/package/equity_price.py b/openbb_platform/openbb/package/equity_price.py index 0db8bac14a7a..4dad13a2581e 100644 --- a/openbb_platform/openbb/package/equity_price.py +++ b/openbb_platform/openbb/package/equity_price.py @@ -184,13 +184,11 @@ def historical( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "polygon": {"multiple_items_allowed": True}, - "tiingo": {"multiple_items_allowed": True}, - "yfinance": {"multiple_items_allowed": True}, - }, - "adjusted": {"deprecated": True}, - "prepost": {"deprecated": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "tiingo": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + } }, ) ) @@ -397,7 +395,9 @@ def performance( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -569,9 +569,9 @@ def quote( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "intrinio": {"multiple_items_allowed": True}, - "yfinance": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, } }, ) diff --git a/openbb_platform/openbb/package/etf.py b/openbb_platform/openbb/package/etf.py index c57ede7886a0..6bef5d52410d 100644 --- a/openbb_platform/openbb/package/etf.py +++ b/openbb_platform/openbb/package/etf.py @@ -93,7 +93,9 @@ def countries( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -173,7 +175,9 @@ def equity_exposure( "symbol": symbol, }, extra_params=kwargs, - info={"symbol": {"fmp": {"multiple_items_allowed": True}}}, + info={ + "symbol": {"fmp": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -341,13 +345,11 @@ def historical( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "polygon": {"multiple_items_allowed": True}, - "tiingo": {"multiple_items_allowed": True}, - "yfinance": {"multiple_items_allowed": True}, - }, - "adjusted": {"deprecated": True}, - "prepost": {"deprecated": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "tiingo": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, + } }, ) ) @@ -1063,9 +1065,9 @@ def info( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "intrinio": {"multiple_items_allowed": True}, - "yfinance": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, } }, ) @@ -1206,8 +1208,8 @@ def price_performance( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "intrinio": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, } }, ) diff --git a/openbb_platform/openbb/package/fixedincome.py b/openbb_platform/openbb/package/fixedincome.py index 223cfe379788..134b04840435 100644 --- a/openbb_platform/openbb/package/fixedincome.py +++ b/openbb_platform/openbb/package/fixedincome.py @@ -42,8 +42,7 @@ def bond_indices( index_type: Annotated[ Literal["yield", "yield_to_worst", "total_return", "oas"], OpenBBField( - description="The type of series. OAS is the option-adjusted spread. Default is yield.", - choices=["yield", "yield_to_worst", "total_return", "oas"], + description="The type of series. OAS is the option-adjusted spread. Default is yield." ), ] = "yield", provider: Annotated[ @@ -165,7 +164,40 @@ def bond_indices( "index_type": index_type, }, extra_params=kwargs, - info={"index": {"fred": {"multiple_items_allowed": True}}}, + info={ + "index": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "a", + "aa", + "aaa", + "asia", + "b", + "bb", + "bbb", + "ccc", + "corporate", + "crossover", + "emea", + "high_grade", + "high_yield", + "latam", + "liquid_aaa", + "liquid_asia", + "liquid_bbb", + "liquid_corporate", + "liquid_emea", + "liquid_latam", + "non_financial", + "private_sector", + "public_sector", + "seasoned_corporate", + "yield_curve", + ], + } + } + }, ) ) @@ -309,7 +341,9 @@ def mortgage_indices( "end_date": end_date, }, extra_params=kwargs, - info={"index": {"fred": {"multiple_items_allowed": True}}}, + info={ + "index": {"fred": {"multiple_items_allowed": True, "choices": None}} + }, ) ) diff --git a/openbb_platform/openbb/package/fixedincome_corporate.py b/openbb_platform/openbb/package/fixedincome_corporate.py index 93161daf6da7..ffec185f6e6e 100644 --- a/openbb_platform/openbb/package/fixedincome_corporate.py +++ b/openbb_platform/openbb/package/fixedincome_corporate.py @@ -155,8 +155,32 @@ def commercial_paper( }, extra_params=kwargs, info={ - "maturity": {"fred": {"multiple_items_allowed": True}}, - "category": {"fred": {"multiple_items_allowed": True}}, + "maturity": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "all", + "overnight", + "7d", + "15d", + "30d", + "60d", + "90d", + ], + } + }, + "category": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "all", + "asset_backed", + "financial", + "nonfinancial", + "a2p2", + ], + } + }, }, ) ) @@ -240,7 +264,9 @@ def hqm( "date": date, }, extra_params=kwargs, - info={"date": {"fred": {"multiple_items_allowed": True}}}, + info={ + "date": {"fred": {"multiple_items_allowed": True, "choices": None}} + }, ) ) @@ -477,8 +503,7 @@ def spot_rates( category: Annotated[ Union[str, List[str]], OpenBBField( - description="Rate category. Options: spot_rate, par_yield. Multiple comma separated items allowed for provider(s): fred.", - choices=["par_yield", "spot_rate"], + description="Rate category. Options: spot_rate, par_yield. Multiple comma separated items allowed for provider(s): fred." ), ] = "spot_rate", provider: Annotated[ @@ -556,8 +581,15 @@ def spot_rates( }, extra_params=kwargs, info={ - "maturity": {"fred": {"multiple_items_allowed": True}}, - "category": {"fred": {"multiple_items_allowed": True}}, + "maturity": { + "fred": {"multiple_items_allowed": True, "choices": None} + }, + "category": { + "fred": { + "multiple_items_allowed": True, + "choices": ["par_yield", "spot_rate"], + } + }, }, ) ) diff --git a/openbb_platform/openbb/package/fixedincome_government.py b/openbb_platform/openbb/package/fixedincome_government.py index 559669789932..ee7efb55a9d8 100644 --- a/openbb_platform/openbb/package/fixedincome_government.py +++ b/openbb_platform/openbb/package/fixedincome_government.py @@ -414,10 +414,13 @@ def yield_curve( extra_params=kwargs, info={ "date": { - "econdb": ["multiple_items_allowed"], - "federal_reserve": {"multiple_items_allowed": True}, - "fmp": {"multiple_items_allowed": True}, - "fred": {"multiple_items_allowed": True}, + "econdb": {"multiple_items_allowed": True, "choices": None}, + "federal_reserve": { + "multiple_items_allowed": True, + "choices": None, + }, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "fred": {"multiple_items_allowed": True, "choices": None}, } }, ) diff --git a/openbb_platform/openbb/package/fixedincome_rate.py b/openbb_platform/openbb/package/fixedincome_rate.py index ca1f7c224470..83a83ff45c16 100644 --- a/openbb_platform/openbb/package/fixedincome_rate.py +++ b/openbb_platform/openbb/package/fixedincome_rate.py @@ -153,7 +153,21 @@ def ameribor( "end_date": end_date, }, extra_params=kwargs, - info={"maturity": {"fred": {"multiple_items_allowed": True}}}, + info={ + "maturity": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "all", + "overnight", + "average_30d", + "average_90d", + "term_30d", + "term_90d", + ], + } + } + }, ) ) diff --git a/openbb_platform/openbb/package/index_price.py b/openbb_platform/openbb/package/index_price.py index 9eb9271a99d1..590635649771 100644 --- a/openbb_platform/openbb/package/index_price.py +++ b/openbb_platform/openbb/package/index_price.py @@ -132,10 +132,10 @@ def historical( extra_params=kwargs, info={ "symbol": { - "fmp": {"multiple_items_allowed": True}, - "intrinio": {"multiple_items_allowed": True}, - "polygon": {"multiple_items_allowed": True}, - "yfinance": {"multiple_items_allowed": True}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, } }, ) diff --git a/openbb_platform/openbb/package/news.py b/openbb_platform/openbb/package/news.py index a50277b3ffdb..148876ebd50e 100644 --- a/openbb_platform/openbb/package/news.py +++ b/openbb_platform/openbb/package/news.py @@ -234,12 +234,12 @@ def company( extra_params=kwargs, info={ "symbol": { - "benzinga": {"multiple_items_allowed": True}, - "fmp": {"multiple_items_allowed": True}, - "intrinio": {"multiple_items_allowed": True}, - "polygon": {"multiple_items_allowed": True}, - "tiingo": {"multiple_items_allowed": True}, - "yfinance": {"multiple_items_allowed": True}, + "benzinga": {"multiple_items_allowed": True, "choices": None}, + "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": {"multiple_items_allowed": True, "choices": None}, + "polygon": {"multiple_items_allowed": True, "choices": None}, + "tiingo": {"multiple_items_allowed": True, "choices": None}, + "yfinance": {"multiple_items_allowed": True, "choices": None}, } }, ) diff --git a/openbb_platform/providers/fred/openbb_fred/models/ameribor.py b/openbb_platform/providers/fred/openbb_fred/models/ameribor.py index 79de5d782193..eeb71b0041ba 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/ameribor.py +++ b/openbb_platform/providers/fred/openbb_fred/models/ameribor.py @@ -27,7 +27,12 @@ class FredAmeriborQueryParams(AmeriborQueryParams): """FRED AMERIBOR Query.""" - __json_schema_extra__ = {"maturity": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "maturity": { + "multiple_items_allowed": True, + "choices": ["all", "overnight", "average_30d", "average_90d", "term_30d", "term_90d"], + } + } maturity: Union[ Literal[ @@ -42,16 +47,6 @@ class FredAmeriborQueryParams(AmeriborQueryParams): ] = Field( default="all", description="Period of AMERIBOR rate.", - json_schema_extra={ - "choices": [ - "all", - "overnight", - "average_30d", - "average_90d", - "term_30d", - "term_90d", - ] - }, ) frequency: Union[ None, diff --git a/openbb_platform/providers/fred/openbb_fred/models/bond_indices.py b/openbb_platform/providers/fred/openbb_fred/models/bond_indices.py index eb466c51ba44..a47d697ab8b9 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/bond_indices.py +++ b/openbb_platform/providers/fred/openbb_fred/models/bond_indices.py @@ -294,7 +294,12 @@ class FredBondIndicesQueryParams(BondIndicesQueryParams): """FRED Bond Indices Query.""" - __json_schema_extra__ = {"index": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "index": { + "multiple_items_allowed": True, + "choices": sorted(INDEX_CHOICES), + } + } category: BamlCategories = Field( default="us", @@ -304,7 +309,6 @@ class FredBondIndicesQueryParams(BondIndicesQueryParams): default="yield_curve", description="The specific index to query." + " Used in conjunction with 'category' and 'index_type', default is 'yield_curve'.", - choices=sorted(INDEX_CHOICES), ) frequency: Union[ None, diff --git a/openbb_platform/providers/fred/openbb_fred/models/commercial_paper.py b/openbb_platform/providers/fred/openbb_fred/models/commercial_paper.py index 393105303819..321cee82c690 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/commercial_paper.py +++ b/openbb_platform/providers/fred/openbb_fred/models/commercial_paper.py @@ -143,26 +143,27 @@ class FREDCommercialPaperParams(CommercialPaperParams): """FRED Commercial Paper Query.""" __json_schema_extra__ = { - "maturity": {"multiple_items_allowed": True}, - "category": {"multiple_items_allowed": True}, + "maturity": { + "multiple_items_allowed": True, + "choices": ["all", "overnight", "7d", "15d", "30d", "60d", "90d"], + }, + "category": { + "multiple_items_allowed": True, + "choices": ["all", "asset_backed", "financial", "nonfinancial", "a2p2"], + }, } + maturity: Union[ str, Literal["all", "overnight", "7d", "15d", "30d", "60d", "90d"] ] = Field( default="all", description="A target maturity.", - json_schema_extra={ - "choices": ["all", "overnight", "7d", "15d", "30d", "60d", "90d"] - }, ) category: Union[ str, Literal["all", "asset_backed", "financial", "nonfinancial", "a2p2"] ] = Field( default="all", description="The category of asset.", - json_schema_extra={ - "choices": ["all", "asset_backed", "financial", "nonfinancial", "a2p2"] - }, ) frequency: Union[ None, diff --git a/openbb_platform/providers/fred/openbb_fred/models/consumer_price_index.py b/openbb_platform/providers/fred/openbb_fred/models/consumer_price_index.py index b5e05b3df5cd..9a8d751d978a 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/consumer_price_index.py +++ b/openbb_platform/providers/fred/openbb_fred/models/consumer_price_index.py @@ -21,12 +21,16 @@ class FREDConsumerPriceIndexQueryParams(ConsumerPriceIndexQueryParams): """FRED Consumer Price Index Query.""" - __json_schema_extra__ = {"country": ["multiple_items_allowed"]} + __json_schema_extra__ = { + "country": { + "multiple_items_allowed": True, + "choices": CPI_COUNTRIES, + }, + } country: str = Field( description=QUERY_DESCRIPTIONS.get("country"), default="united_states", - json_schema_extra={"choices": CPI_COUNTRIES}, # type: ignore[dict-item] ) @field_validator("country", mode="before", check_fields=False) diff --git a/openbb_platform/providers/fred/openbb_fred/models/manufacturing_outlook_texas.py b/openbb_platform/providers/fred/openbb_fred/models/manufacturing_outlook_texas.py index 01ba9891c75d..e6e4f248118c 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/manufacturing_outlook_texas.py +++ b/openbb_platform/providers/fred/openbb_fred/models/manufacturing_outlook_texas.py @@ -234,12 +234,16 @@ class FredManufacturingOutlookTexasQueryParams(ManufacturingOutlookTexasQueryParams): """FRED Manufacturing Outlook - Texas - Query Params.""" - __json_schema_extra__ = {"topic": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "topic": { + "multiple_items_allowed": True, + "choices": TEXAS_MANUFACTURING_OUTLOOK_CHOICES, + } + } topic: Union[TexasManufacturingOutlookChoices, str] = Field( default="new_orders_growth", description="The topic for the survey response.", - json_schema_extra={"choices": TEXAS_MANUFACTURING_OUTLOOK_CHOICES}, ) frequency: Union[ None, diff --git a/openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py b/openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py index 3973e87bc1bb..93742d03ba8d 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py +++ b/openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py @@ -112,12 +112,16 @@ class FredMortgageIndicesQueryParams(MortgageIndicesQueryParams): """FRED Mortgage Indices Query.""" - __json_schema_extra__ = {"index": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "index": { + "multiple_items_allowed": True, + "chocies": list(MORTGAGE_CHOICES_TO_ID), + } + } index: Union[MortgageChoices, str] = Field( default="primary", description="The specific index, or index group, to query. Default is the 'primary' group.", - choices=list(MORTGAGE_CHOICES_TO_ID.keys()), ) frequency: Union[ None, diff --git a/openbb_platform/providers/fred/openbb_fred/models/spot.py b/openbb_platform/providers/fred/openbb_fred/models/spot.py index f580e83fc736..9f82ef74a34c 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/spot.py +++ b/openbb_platform/providers/fred/openbb_fred/models/spot.py @@ -18,7 +18,10 @@ class FREDSpotRateQueryParams(SpotRateQueryParams): __json_schema_extra__ = { "maturity": {"multiple_items_allowed": True}, - "category": {"multiple_items_allowed": True}, + "category": { + "multiple_items_allowed": True, + "choices": ["par_yield", "spot_rate"], + }, } diff --git a/openbb_platform/providers/oecd/openbb_oecd/models/composite_leading_indicator.py b/openbb_platform/providers/oecd/openbb_oecd/models/composite_leading_indicator.py index affbd74658f3..0ba3acf73099 100644 --- a/openbb_platform/providers/oecd/openbb_oecd/models/composite_leading_indicator.py +++ b/openbb_platform/providers/oecd/openbb_oecd/models/composite_leading_indicator.py @@ -71,13 +71,15 @@ class OECDCompositeLeadingIndicatorQueryParams(CompositeLeadingIndicatorQueryPar """OECD Composite Leading Indicator Query.""" __json_schema_extra__ = { - "country": {"multiple_items_allowed": True}, + "country": { + "multiple_items_allowed": True, + "choices": COUNTRY_CHOICES, + }, } country: Union[Countries, str] = Field( description="Country to get the CLI for, default is G20.", default="g20", - json_schema_extra={"choices": COUNTRY_CHOICES}, # type: ignore ) adjustment: Literal["amplitude", "normalized"] = Field( default="amplitude", diff --git a/openbb_platform/providers/oecd/openbb_oecd/models/consumer_price_index.py b/openbb_platform/providers/oecd/openbb_oecd/models/consumer_price_index.py index 2dd1f1f34ddf..d4aaf984b1ab 100644 --- a/openbb_platform/providers/oecd/openbb_oecd/models/consumer_price_index.py +++ b/openbb_platform/providers/oecd/openbb_oecd/models/consumer_price_index.py @@ -94,12 +94,16 @@ class OECDCPIQueryParams(ConsumerPriceIndexQueryParams): Source: https://data-explorer.oecd.org/?lc=en """ - __json_schema_extra__ = {"country": ["multiple_items_allowed"]} + __json_schema_extra__ = { + "country": { + "multiple_items_allowed": True, + "choices": CountriesList, + }, + } country: str = Field( description="Country to get CPI for. This is the list of OECD supported countries", default="united_states", - choices=CountriesList, ) expenditure: ExpenditureChoices = Field( description="Expenditure component of CPI.", diff --git a/openbb_platform/providers/oecd/openbb_oecd/models/gdp_forecast.py b/openbb_platform/providers/oecd/openbb_oecd/models/gdp_forecast.py index 3ba805316294..d4701d9ac83c 100644 --- a/openbb_platform/providers/oecd/openbb_oecd/models/gdp_forecast.py +++ b/openbb_platform/providers/oecd/openbb_oecd/models/gdp_forecast.py @@ -72,13 +72,15 @@ class OECDGdpForecastQueryParams(GdpForecastQueryParams): """ __json_schema_extra__ = { - "country": {"multiple_items_allowed": True}, + "country": { + "multiple_items_allowed": True, + "choices": COUNTRIES, + }, } country: str = Field( description="Country, or countries, to get forward GDP projections for. Default is all.", default="all", - json_schema_extra={"choices": COUNTRIES}, # type: ignore ) frequency: Literal["annual", "quarter"] = Field( default="annual", diff --git a/openbb_platform/providers/oecd/openbb_oecd/models/gdp_nominal.py b/openbb_platform/providers/oecd/openbb_oecd/models/gdp_nominal.py index d790b98156e2..998567d0ade7 100644 --- a/openbb_platform/providers/oecd/openbb_oecd/models/gdp_nominal.py +++ b/openbb_platform/providers/oecd/openbb_oecd/models/gdp_nominal.py @@ -32,13 +32,17 @@ class OECDGdpNominalQueryParams(GdpNominalQueryParams): plus net trade (exports minus imports). """ - __json_schema_extra__ = {"country": ["multiple_items_allowed"]} + __json_schema_extra__ = { + "country": { + "multiple_items_allowed": True, + "choices": COUNTRIES, + } + } country: str = Field( description=QUERY_DESCRIPTIONS.get("country", "") + " Use 'all' to get data for all available countries.", default="united_states", - json_schema_extra={"choices": COUNTRIES}, # type: ignore ) frequency: Literal["quarter", "annual"] = Field( description="Frequency of the data.", diff --git a/openbb_platform/providers/oecd/openbb_oecd/models/gdp_real.py b/openbb_platform/providers/oecd/openbb_oecd/models/gdp_real.py index f4c0d6fc489d..465a3785cdee 100644 --- a/openbb_platform/providers/oecd/openbb_oecd/models/gdp_real.py +++ b/openbb_platform/providers/oecd/openbb_oecd/models/gdp_real.py @@ -32,13 +32,17 @@ class OECDGdpRealQueryParams(GdpRealQueryParams): plus net trade (exports minus imports). """ - __json_schema_extra__ = {"country": ["multiple_items_allowed"]} + __json_schema_extra__ = { + "country": { + "multiple_items_allowed": True, + "choices": COUNTRIES, + } + } country: str = Field( description=QUERY_DESCRIPTIONS.get("country", "") + " Use 'all' to get data for all available countries.", default="united_states", - json_schema_extra={"choices": COUNTRIES}, # type: ignore ) frequency: Literal["quarter", "annual"] = Field( description="Frequency of the data.", diff --git a/openbb_platform/providers/oecd/openbb_oecd/models/house_price_index.py b/openbb_platform/providers/oecd/openbb_oecd/models/house_price_index.py index 3407cd7ba4e0..92c349d7187f 100644 --- a/openbb_platform/providers/oecd/openbb_oecd/models/house_price_index.py +++ b/openbb_platform/providers/oecd/openbb_oecd/models/house_price_index.py @@ -37,12 +37,16 @@ class OECDHousePriceIndexQueryParams(HousePriceIndexQueryParams): Source: https://data-explorer.oecd.org/?lc=en """ - __json_schema_extra__ = {"country": ["multiple_items_allowed"]} + __json_schema_extra__ = { + "country": { + "multiple_items_allowed": True, + "choices": CountriesList, + } + } country: str = Field( description=QUERY_DESCRIPTIONS.get("country", ""), default="united_states", - choices=CountriesList, ) @field_validator("country", mode="before", check_fields=False) diff --git a/openbb_platform/providers/oecd/openbb_oecd/models/immediate_interest_rate.py b/openbb_platform/providers/oecd/openbb_oecd/models/immediate_interest_rate.py index 8782b3f7e8a5..9f83dd2462fd 100644 --- a/openbb_platform/providers/oecd/openbb_oecd/models/immediate_interest_rate.py +++ b/openbb_platform/providers/oecd/openbb_oecd/models/immediate_interest_rate.py @@ -33,12 +33,16 @@ class OECDImmediateInterestRateQueryParams(ImmediateInterestRateQueryParams): Source: https://data-explorer.oecd.org/?lc=en """ - __json_schema_extra__ = {"country": ["multiple_items_allowed"]} + __json_schema_extra__ = { + "country": { + "multiple_items_allowed": True, + "choices": CountriesList, + } + } country: str = Field( description=QUERY_DESCRIPTIONS.get("country", ""), default="united_states", - json_schema_extra={"choices": CountriesList}, ) frequency: Literal["monthly", "quarter", "annual"] = Field( description=QUERY_DESCRIPTIONS.get("frequency", ""), diff --git a/openbb_platform/providers/oecd/openbb_oecd/models/share_price_index.py b/openbb_platform/providers/oecd/openbb_oecd/models/share_price_index.py index 3381ee42b38d..d3b403b51bfd 100644 --- a/openbb_platform/providers/oecd/openbb_oecd/models/share_price_index.py +++ b/openbb_platform/providers/oecd/openbb_oecd/models/share_price_index.py @@ -36,12 +36,16 @@ class OECDSharePriceIndexQueryParams(SharePriceIndexQueryParams): Source: https://data-explorer.oecd.org/?lc=en """ - __json_schema_extra__ = {"country": ["multiple_items_allowed"]} + __json_schema_extra__ = { + "country": { + "multiple_items_allowed": True, + "choices": CountriesList, + } + } country: str = Field( description=QUERY_DESCRIPTIONS.get("country", ""), default="united_states", - choices=CountriesList, ) @field_validator("country", mode="before", check_fields=False) diff --git a/openbb_platform/providers/oecd/openbb_oecd/models/unemployment.py b/openbb_platform/providers/oecd/openbb_oecd/models/unemployment.py index d2df56171056..2169bf315150 100644 --- a/openbb_platform/providers/oecd/openbb_oecd/models/unemployment.py +++ b/openbb_platform/providers/oecd/openbb_oecd/models/unemployment.py @@ -41,12 +41,16 @@ class OECDUnemploymentQueryParams(UnemploymentQueryParams): Source: https://data-explorer.oecd.org/?lc=en """ - __json_schema_extra__ = {"country": ["multiple_items_allowed"]} + __json_schema_extra__ = { + "country": { + "multiple_items_allowed": True, + "chocies": CountriesList, + }, + } country: str = Field( description=QUERY_DESCRIPTIONS.get("country", ""), default="united_states", - json_schema_extra={"choices": CountriesList}, # type: ignore ) sex: Literal["total", "male", "female"] = Field( description="Sex to get unemployment for.", From 6451fe03b08747e3aabca75fcf7ee812b0aec063 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:26:27 -0700 Subject: [PATCH 04/19] black --- .../providers/fred/openbb_fred/models/ameribor.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/openbb_platform/providers/fred/openbb_fred/models/ameribor.py b/openbb_platform/providers/fred/openbb_fred/models/ameribor.py index eeb71b0041ba..5a6b08161b36 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/ameribor.py +++ b/openbb_platform/providers/fred/openbb_fred/models/ameribor.py @@ -30,7 +30,14 @@ class FredAmeriborQueryParams(AmeriborQueryParams): __json_schema_extra__ = { "maturity": { "multiple_items_allowed": True, - "choices": ["all", "overnight", "average_30d", "average_90d", "term_30d", "term_90d"], + "choices": [ + "all", + "overnight", + "average_30d", + "average_90d", + "term_30d", + "term_90d", + ], } } From aae29e96dcbd57e804fe4d18eec979ef7bc84ede Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:37:04 -0700 Subject: [PATCH 05/19] mypy --- openbb_platform/core/openbb_core/app/provider_interface.py | 2 +- .../core/openbb_core/app/static/package_builder.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/openbb_platform/core/openbb_core/app/provider_interface.py b/openbb_platform/core/openbb_core/app/provider_interface.py index 5ee5fd1ed17a..901e47ec21e2 100644 --- a/openbb_platform/core/openbb_core/app/provider_interface.py +++ b/openbb_platform/core/openbb_core/app/provider_interface.py @@ -256,7 +256,7 @@ def _create_field( choices: Dict = {} if extra := field.json_schema_extra: providers: List = [] - for p, v in extra.items(): # type: ignore[union-attr]) + for p, v in extra.items(): # type: ignore if isinstance(v, dict) and v.get("multiple_items_allowed"): providers.append(p) choices[p] = {"multiple_items_allowed": True, "choices": v.get("choices")} # type: ignore diff --git a/openbb_platform/core/openbb_core/app/static/package_builder.py b/openbb_platform/core/openbb_core/app/static/package_builder.py index aa6aabb050eb..0fe66df86551 100644 --- a/openbb_platform/core/openbb_core/app/static/package_builder.py +++ b/openbb_platform/core/openbb_core/app/static/package_builder.py @@ -1779,13 +1779,13 @@ def get_paths(cls, route_map: Dict[str, BaseRoute]) -> Dict[str, Dict[str, Any]] for d in reference[path]["parameters"]["standard"] if d.get("choices") ] - standard = standard[0] if standard else [] + standard = standard[0] if standard else [] # type: ignore provider = [ {d["name"]: d["choices"]} for d in reference[path]["parameters"][provider] if d.get("choices") ] - provider = provider[0] if provider else [] + provider = provider[0] if provider else [] # type: ignore if standard and provider and standard == provider: for i, d in enumerate( reference[path]["parameters"]["standard"] From f23734f1f0b58009695af8b7e2359746d7dbd600 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:42:05 -0700 Subject: [PATCH 06/19] more mypy --- .../core/openbb_core/app/static/package_builder.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbb_platform/core/openbb_core/app/static/package_builder.py b/openbb_platform/core/openbb_core/app/static/package_builder.py index 0fe66df86551..92b78bc95310 100644 --- a/openbb_platform/core/openbb_core/app/static/package_builder.py +++ b/openbb_platform/core/openbb_core/app/static/package_builder.py @@ -1780,13 +1780,13 @@ def get_paths(cls, route_map: Dict[str, BaseRoute]) -> Dict[str, Dict[str, Any]] if d.get("choices") ] standard = standard[0] if standard else [] # type: ignore - provider = [ + _provider = [ {d["name"]: d["choices"]} for d in reference[path]["parameters"][provider] if d.get("choices") ] - provider = provider[0] if provider else [] # type: ignore - if standard and provider and standard == provider: + _provider = _provider[0] if _provider else [] # type: ignore + if standard and _provider and standard == _provider: for i, d in enumerate( reference[path]["parameters"]["standard"] ): From 9fb8a607ca553f7c6a0065d5ece7a37742323b0a Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 23 Jul 2024 12:54:09 -0700 Subject: [PATCH 07/19] line too long --- openbb_platform/core/openbb_core/app/static/package_builder.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/openbb_platform/core/openbb_core/app/static/package_builder.py b/openbb_platform/core/openbb_core/app/static/package_builder.py index 92b78bc95310..ceabbcf7fa0c 100644 --- a/openbb_platform/core/openbb_core/app/static/package_builder.py +++ b/openbb_platform/core/openbb_core/app/static/package_builder.py @@ -1773,7 +1773,8 @@ def get_paths(cls, route_map: Dict[str, BaseRoute]) -> Dict[str, Dict[str, Any]] standard_model, "Data", provider ) - # If choices for a parameter exist for both standard and provider, and are the same, remove choices from 'standard' + # Remove choices from 'standard' if choices for a parameter exist + # for both standard and provider, and are the same standard = [ {d["name"]: d["choices"]} for d in reference[path]["parameters"]["standard"] From 9e39a60c8cb621fe27d1fc20773b1da0d421d59d Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:02:54 -0700 Subject: [PATCH 08/19] fix typo --- .../providers/fred/openbb_fred/models/mortgage_indices.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py b/openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py index 93742d03ba8d..9691a11466eb 100644 --- a/openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py +++ b/openbb_platform/providers/fred/openbb_fred/models/mortgage_indices.py @@ -115,7 +115,7 @@ class FredMortgageIndicesQueryParams(MortgageIndicesQueryParams): __json_schema_extra__ = { "index": { "multiple_items_allowed": True, - "chocies": list(MORTGAGE_CHOICES_TO_ID), + "choices": list(MORTGAGE_CHOICES_TO_ID), } } From b955c5f95a5d0dbfaff27758b8388ceadbe1284d Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:04:03 -0700 Subject: [PATCH 09/19] fix another typo --- .../providers/oecd/openbb_oecd/models/unemployment.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/openbb_platform/providers/oecd/openbb_oecd/models/unemployment.py b/openbb_platform/providers/oecd/openbb_oecd/models/unemployment.py index 2169bf315150..6a1ff3fd0bd0 100644 --- a/openbb_platform/providers/oecd/openbb_oecd/models/unemployment.py +++ b/openbb_platform/providers/oecd/openbb_oecd/models/unemployment.py @@ -44,7 +44,7 @@ class OECDUnemploymentQueryParams(UnemploymentQueryParams): __json_schema_extra__ = { "country": { "multiple_items_allowed": True, - "chocies": CountriesList, + "choices": CountriesList, }, } From 91ec303ce51f64f5b7510e385a68937d8c5a379d Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:05:26 -0700 Subject: [PATCH 10/19] static files --- openbb_platform/openbb/assets/reference.json | 71 ++++++++++++++++++- openbb_platform/openbb/package/economy.py | 51 ++++++++++++- openbb_platform/openbb/package/fixedincome.py | 28 +++++++- 3 files changed, 146 insertions(+), 4 deletions(-) diff --git a/openbb_platform/openbb/assets/reference.json b/openbb_platform/openbb/assets/reference.json index f60406af0000..fec7626fbf43 100644 --- a/openbb_platform/openbb/assets/reference.json +++ b/openbb_platform/openbb/assets/reference.json @@ -5504,7 +5504,53 @@ "description": "The country to get data. Multiple items allowed for provider(s): oecd.", "default": "united_states", "optional": true, - "choices": null + "choices": [ + "all", + "australia", + "austria", + "belgium", + "canada", + "chile", + "colombia", + "costa_rica", + "czech_republic", + "denmark", + "estonia", + "euro_area20", + "european_union27_2020", + "finland", + "france", + "g7", + "germany", + "greece", + "hungary", + "iceland", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "oecd", + "poland", + "portugal", + "russia", + "slovakia", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states" + ] }, { "name": "frequency", @@ -33894,7 +33940,28 @@ "description": "The specific index, or index group, to query. Default is the 'primary' group. Multiple items allowed for provider(s): fred.", "default": "primary", "optional": true, - "choices": null + "choices": [ + "primary", + "ltv_lte_80", + "ltv_gt_80", + "conforming_30y", + "conforming_30y_na", + "jumbo_30y", + "fha_30y", + "va_30y", + "usda_30y", + "conforming_15y", + "ltv_lte80_fico_ge740", + "ltv_lte80_fico_a720b739", + "ltv_lte80_fico_a700b719", + "ltv_lte80_fico_a680b699", + "ltv_lte80_fico_lt680", + "ltv_gt80_fico_ge740", + "ltv_gt80_fico_a720b739", + "ltv_gt80_fico_a700b719", + "ltv_gt80_fico_a680b699", + "ltv_gt80_fico_lt680" + ] }, { "name": "frequency", diff --git a/openbb_platform/openbb/package/economy.py b/openbb_platform/openbb/package/economy.py index 88634bb8fd8a..aac8248adc18 100644 --- a/openbb_platform/openbb/package/economy.py +++ b/openbb_platform/openbb/package/economy.py @@ -2936,7 +2936,56 @@ def unemployment( extra_params=kwargs, info={ "country": { - "oecd": {"multiple_items_allowed": True, "choices": None} + "oecd": { + "multiple_items_allowed": True, + "choices": [ + "all", + "australia", + "austria", + "belgium", + "canada", + "chile", + "colombia", + "costa_rica", + "czech_republic", + "denmark", + "estonia", + "euro_area20", + "european_union27_2020", + "finland", + "france", + "g7", + "germany", + "greece", + "hungary", + "iceland", + "ireland", + "israel", + "italy", + "japan", + "korea", + "latvia", + "lithuania", + "luxembourg", + "mexico", + "netherlands", + "new_zealand", + "norway", + "oecd", + "poland", + "portugal", + "russia", + "slovakia", + "slovenia", + "south_africa", + "spain", + "sweden", + "switzerland", + "turkey", + "united_kingdom", + "united_states", + ], + } } }, ) diff --git a/openbb_platform/openbb/package/fixedincome.py b/openbb_platform/openbb/package/fixedincome.py index 134b04840435..484ec2f06fc1 100644 --- a/openbb_platform/openbb/package/fixedincome.py +++ b/openbb_platform/openbb/package/fixedincome.py @@ -342,7 +342,33 @@ def mortgage_indices( }, extra_params=kwargs, info={ - "index": {"fred": {"multiple_items_allowed": True, "choices": None}} + "index": { + "fred": { + "multiple_items_allowed": True, + "choices": [ + "primary", + "ltv_lte_80", + "ltv_gt_80", + "conforming_30y", + "conforming_30y_na", + "jumbo_30y", + "fha_30y", + "va_30y", + "usda_30y", + "conforming_15y", + "ltv_lte80_fico_ge740", + "ltv_lte80_fico_a720b739", + "ltv_lte80_fico_a700b719", + "ltv_lte80_fico_a680b699", + "ltv_lte80_fico_lt680", + "ltv_gt80_fico_ge740", + "ltv_gt80_fico_a720b739", + "ltv_gt80_fico_a700b719", + "ltv_gt80_fico_a680b699", + "ltv_gt80_fico_lt680", + ], + } + } }, ) ) From 2122f2044d51fc793b265566b5cb41d230142ef0 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:46:02 -0700 Subject: [PATCH 11/19] tradingeconomics country choices --- openbb_platform/openbb/assets/reference.json | 212 +++++++++++++++++- openbb_platform/openbb/package/economy.py | 202 ++++++++++++++++- .../openbb_nasdaq/models/economic_calendar.py | 7 +- .../models/economic_calendar.py | 12 +- 4 files changed, 419 insertions(+), 14 deletions(-) diff --git a/openbb_platform/openbb/assets/reference.json b/openbb_platform/openbb/assets/reference.json index fec7626fbf43..3634dcf7449b 100644 --- a/openbb_platform/openbb/assets/reference.json +++ b/openbb_platform/openbb/assets/reference.json @@ -3872,7 +3872,205 @@ "description": "Country of the event. Multiple items allowed for provider(s): tradingeconomics.", "default": null, "optional": true, - "choices": null + "choices": [ + "afghanistan", + "albania", + "algeria", + "andorra", + "angola", + "antigua_and_barbuda", + "argentina", + "armenia", + "aruba", + "australia", + "austria", + "azerbaijan", + "bahamas", + "bahrain", + "bangladesh", + "barbados", + "belarus", + "belgium", + "belize", + "benin", + "bermuda", + "bhutan", + "bolivia", + "bosnia_and_herzegovina", + "botswana", + "brazil", + "brunei", + "bulgaria", + "burkina_faso", + "burundi", + "cambodia", + "cameroon", + "canada", + "cape_verde", + "cayman_islands", + "central_african_republic", + "chad", + "chile", + "china", + "colombia", + "comoros", + "congo", + "costa_rica", + "croatia", + "cuba", + "cyprus", + "czech_republic", + "denmark", + "djibouti", + "dominica", + "dominican_republic", + "east_timor", + "ecuador", + "egypt", + "el_salvador", + "equatorial_guinea", + "eritrea", + "estonia", + "ethiopia", + "euro_area", + "faroe_islands", + "fiji", + "finland", + "france", + "gabon", + "gambia", + "georgia", + "germany", + "ghana", + "greece", + "grenada", + "guatemala", + "guinea", + "guinea_bissau", + "guyana", + "haiti", + "honduras", + "hong_kong", + "hungary", + "iceland", + "india", + "indonesia", + "iran", + "iraq", + "ireland", + "isle_of_man", + "israel", + "italy", + "ivory_coast", + "jamaica", + "japan", + "jordan", + "kazakhstan", + "kenya", + "kiribati", + "kosovo", + "kuwait", + "kyrgyzstan", + "laos", + "latvia", + "lebanon", + "lesotho", + "liberia", + "libya", + "liechtenstein", + "lithuania", + "luxembourg", + "macao", + "madagascar", + "malawi", + "malaysia", + "maldives", + "mali", + "malta", + "mauritania", + "mauritius", + "mexico", + "moldova", + "monaco", + "mongolia", + "montenegro", + "morocco", + "mozambique", + "myanmar", + "namibia", + "nepal", + "netherlands", + "new_caledonia", + "new_zealand", + "nicaragua", + "niger", + "nigeria", + "north_korea", + "north_macedonia", + "norway", + "oman", + "pakistan", + "palestine", + "panama", + "papua_new_guinea", + "paraguay", + "peru", + "philippines", + "poland", + "portugal", + "puerto_rico", + "qatar", + "republic_of_the_congo", + "romania", + "russia", + "rwanda", + "samoa", + "sao_tome_and_principe", + "saudi_arabia", + "senegal", + "serbia", + "seychelles", + "sierra_leone", + "singapore", + "slovakia", + "slovenia", + "solomon_islands", + "somalia", + "south_africa", + "south_korea", + "south_sudan", + "spain", + "sri_lanka", + "sudan", + "suriname", + "swaziland", + "sweden", + "switzerland", + "syria", + "taiwan", + "tajikistan", + "tanzania", + "thailand", + "togo", + "tonga", + "trinidad_and_tobago", + "tunisia", + "turkey", + "turkmenistan", + "uganda", + "ukraine", + "united_arab_emirates", + "united_kingdom", + "united_states", + "uruguay", + "uzbekistan", + "vanuatu", + "venezuela", + "vietnam", + "yemen", + "zambia", + "zimbabwe" + ] }, { "name": "importance", @@ -3880,11 +4078,7 @@ "description": "Importance of the event.", "default": null, "optional": true, - "choices": [ - "low", - "medium", - "high" - ] + "choices": null }, { "name": "group", @@ -3914,7 +4108,11 @@ "description": "Get events by TradingEconomics Calendar ID. Multiple items allowed for provider(s): tradingeconomics.", "default": null, "optional": true, - "choices": null + "choices": [ + "low", + "medium", + "high" + ] } ] }, diff --git a/openbb_platform/openbb/package/economy.py b/openbb_platform/openbb/package/economy.py index aac8248adc18..ddc7ec7b26a1 100644 --- a/openbb_platform/openbb/package/economy.py +++ b/openbb_platform/openbb/package/economy.py @@ -370,13 +370,211 @@ def calendar( "country": { "tradingeconomics": { "multiple_items_allowed": True, - "choices": None, + "choices": [ + "afghanistan", + "albania", + "algeria", + "andorra", + "angola", + "antigua_and_barbuda", + "argentina", + "armenia", + "aruba", + "australia", + "austria", + "azerbaijan", + "bahamas", + "bahrain", + "bangladesh", + "barbados", + "belarus", + "belgium", + "belize", + "benin", + "bermuda", + "bhutan", + "bolivia", + "bosnia_and_herzegovina", + "botswana", + "brazil", + "brunei", + "bulgaria", + "burkina_faso", + "burundi", + "cambodia", + "cameroon", + "canada", + "cape_verde", + "cayman_islands", + "central_african_republic", + "chad", + "chile", + "china", + "colombia", + "comoros", + "congo", + "costa_rica", + "croatia", + "cuba", + "cyprus", + "czech_republic", + "denmark", + "djibouti", + "dominica", + "dominican_republic", + "east_timor", + "ecuador", + "egypt", + "el_salvador", + "equatorial_guinea", + "eritrea", + "estonia", + "ethiopia", + "euro_area", + "faroe_islands", + "fiji", + "finland", + "france", + "gabon", + "gambia", + "georgia", + "germany", + "ghana", + "greece", + "grenada", + "guatemala", + "guinea", + "guinea_bissau", + "guyana", + "haiti", + "honduras", + "hong_kong", + "hungary", + "iceland", + "india", + "indonesia", + "iran", + "iraq", + "ireland", + "isle_of_man", + "israel", + "italy", + "ivory_coast", + "jamaica", + "japan", + "jordan", + "kazakhstan", + "kenya", + "kiribati", + "kosovo", + "kuwait", + "kyrgyzstan", + "laos", + "latvia", + "lebanon", + "lesotho", + "liberia", + "libya", + "liechtenstein", + "lithuania", + "luxembourg", + "macao", + "madagascar", + "malawi", + "malaysia", + "maldives", + "mali", + "malta", + "mauritania", + "mauritius", + "mexico", + "moldova", + "monaco", + "mongolia", + "montenegro", + "morocco", + "mozambique", + "myanmar", + "namibia", + "nepal", + "netherlands", + "new_caledonia", + "new_zealand", + "nicaragua", + "niger", + "nigeria", + "north_korea", + "north_macedonia", + "norway", + "oman", + "pakistan", + "palestine", + "panama", + "papua_new_guinea", + "paraguay", + "peru", + "philippines", + "poland", + "portugal", + "puerto_rico", + "qatar", + "republic_of_the_congo", + "romania", + "russia", + "rwanda", + "samoa", + "sao_tome_and_principe", + "saudi_arabia", + "senegal", + "serbia", + "seychelles", + "sierra_leone", + "singapore", + "slovakia", + "slovenia", + "solomon_islands", + "somalia", + "south_africa", + "south_korea", + "south_sudan", + "spain", + "sri_lanka", + "sudan", + "suriname", + "swaziland", + "sweden", + "switzerland", + "syria", + "taiwan", + "tajikistan", + "tanzania", + "thailand", + "togo", + "tonga", + "trinidad_and_tobago", + "tunisia", + "turkey", + "turkmenistan", + "uganda", + "ukraine", + "united_arab_emirates", + "united_kingdom", + "united_states", + "uruguay", + "uzbekistan", + "vanuatu", + "venezuela", + "vietnam", + "yemen", + "zambia", + "zimbabwe", + ], } }, "calendar_id": { "tradingeconomics": { "multiple_items_allowed": True, - "choices": None, + "choices": ["low", "medium", "high"], } }, }, diff --git a/openbb_platform/providers/nasdaq/openbb_nasdaq/models/economic_calendar.py b/openbb_platform/providers/nasdaq/openbb_nasdaq/models/economic_calendar.py index e3f05441fd3f..2049fcc04a45 100644 --- a/openbb_platform/providers/nasdaq/openbb_nasdaq/models/economic_calendar.py +++ b/openbb_platform/providers/nasdaq/openbb_nasdaq/models/economic_calendar.py @@ -19,7 +19,12 @@ class NasdaqEconomicCalendarQueryParams(EconomicCalendarQueryParams): Source: https://www.nasdaq.com/market-activity/economic-calendar """ - __json_schema_extra__ = {"country": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "country": { + "multiple_items_allowed": True, + "choices": None, + } + } country: Optional[str] = Field( default=None, diff --git a/openbb_platform/providers/tradingeconomics/openbb_tradingeconomics/models/economic_calendar.py b/openbb_platform/providers/tradingeconomics/openbb_tradingeconomics/models/economic_calendar.py index e794bd74fef5..57887dd24d45 100644 --- a/openbb_platform/providers/tradingeconomics/openbb_tradingeconomics/models/economic_calendar.py +++ b/openbb_platform/providers/tradingeconomics/openbb_tradingeconomics/models/economic_calendar.py @@ -64,18 +64,22 @@ class TEEconomicCalendarQueryParams(EconomicCalendarQueryParams): """ __json_schema_extra__ = { - "country": {"multiple_items_allowed": True}, - "calendar_id": {"multiple_items_allowed": True}, + "country": { + "multiple_items_allowed": True, + "choices": sorted(COUNTRIES), + }, + "calendar_id": { + "multiple_items_allowed": True, + "choices": IMPORTANCE_CHOICES, + }, } country: Optional[str] = Field( default=None, description="Country of the event.", - json_schema_extra={"choices": sorted(COUNTRIES)}, # type: ignore[dict-item] ) importance: Optional[IMPORTANCE] = Field( default=None, description="Importance of the event.", - json_schema_extra={"choices": IMPORTANCE_CHOICES}, # type: ignore[dict-item] ) group: Optional[GROUPS] = Field( default=None, From 54f794e2d59f09d7d2bf839d93ccd50005a3de06 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:25:28 -0700 Subject: [PATCH 12/19] financial statement period choices --- .../provider/standard_models/balance_sheet.py | 10 - .../standard_models/balance_sheet_growth.py | 10 - .../provider/standard_models/cash_flow.py | 10 - .../standard_models/cash_flow_growth.py | 10 - .../standard_models/financial_ratios.py | 9 - .../standard_models/income_statement.py | 10 - .../income_statement_growth.py | 10 - .../provider/standard_models/key_metrics.py | 11 +- openbb_platform/openbb/assets/reference.json | 142 +++++---------- .../openbb/package/equity_fundamental.py | 171 ++++++++++++------ .../fmp/openbb_fmp/models/balance_sheet.py | 10 +- .../openbb_fmp/models/balance_sheet_growth.py | 11 +- .../fmp/openbb_fmp/models/cash_flow.py | 9 +- .../fmp/openbb_fmp/models/cash_flow_growth.py | 11 +- .../fmp/openbb_fmp/models/financial_ratios.py | 9 +- .../fmp/openbb_fmp/models/income_statement.py | 10 +- .../models/income_statement_growth.py | 10 +- .../fmp/openbb_fmp/models/key_metrics.py | 16 +- .../openbb_intrinio/models/balance_sheet.py | 9 +- .../openbb_intrinio/models/cash_flow.py | 9 +- .../models/financial_ratios.py | 11 +- .../models/income_statement.py | 9 +- .../openbb_polygon/models/balance_sheet.py | 10 +- .../openbb_polygon/models/cash_flow.py | 9 +- .../openbb_polygon/models/income_statement.py | 8 +- .../openbb_yfinance/models/balance_sheet.py | 11 +- .../openbb_yfinance/models/cash_flow.py | 9 +- .../models/income_statement.py | 9 +- 28 files changed, 320 insertions(+), 253 deletions(-) diff --git a/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet.py b/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet.py index 860b28bad1cc..c935d841b8cb 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet.py @@ -16,10 +16,6 @@ class BalanceSheetQueryParams(QueryParams): """Balance Sheet Query.""" symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) - period: str = Field( - default="annual", - description=QUERY_DESCRIPTIONS.get("period", ""), - ) limit: Optional[NonNegativeInt] = Field( default=5, description=QUERY_DESCRIPTIONS.get("limit", "") ) @@ -30,12 +26,6 @@ def to_upper(cls, v: str): """Convert field to uppercase.""" return v.upper() - @field_validator("period", mode="before", check_fields=False) - @classmethod - def to_lower(cls, v: Optional[str]) -> Optional[str]: - """Convert field to lowercase.""" - return v.lower() if v else v - class BalanceSheetData(Data): """Balance Sheet Data.""" diff --git a/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet_growth.py b/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet_growth.py index 429a623407cf..0506e0ad2ccf 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet_growth.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/balance_sheet_growth.py @@ -14,10 +14,6 @@ class BalanceSheetGrowthQueryParams(QueryParams): """Balance Sheet Statement Growth Query.""" symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) - period: str = Field( - default="annual", - description=QUERY_DESCRIPTIONS.get("period", ""), - ) limit: Optional[int] = Field( default=10, description=QUERY_DESCRIPTIONS.get("limit", "") ) @@ -28,12 +24,6 @@ def to_upper(cls, v: str): """Convert field to uppercase.""" return v.upper() - @field_validator("period", mode="before", check_fields=False) - @classmethod - def to_lower(cls, v: Optional[str]) -> Optional[str]: - """Convert field to lowercase.""" - return v.lower() if v else v - class BalanceSheetGrowthData(Data): """Balance Sheet Statement Growth Data.""" diff --git a/openbb_platform/core/openbb_core/provider/standard_models/cash_flow.py b/openbb_platform/core/openbb_core/provider/standard_models/cash_flow.py index c3c12e777bbd..938d4e63bae8 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/cash_flow.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/cash_flow.py @@ -14,10 +14,6 @@ class CashFlowStatementQueryParams(QueryParams): """Cash Flow Statement Query.""" symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) - period: str = Field( - default="annual", - description=QUERY_DESCRIPTIONS.get("period", ""), - ) limit: Optional[NonNegativeInt] = Field( default=5, description=QUERY_DESCRIPTIONS.get("limit", "") ) @@ -28,12 +24,6 @@ def to_upper(cls, v: str): """Convert field to uppercase.""" return v.upper() - @field_validator("period", mode="before", check_fields=False) - @classmethod - def to_lower(cls, v: Optional[str]) -> Optional[str]: - """Convert field to lowercase.""" - return v.lower() if v else v - class CashFlowStatementData(Data): """Cash Flow Statement Data.""" diff --git a/openbb_platform/core/openbb_core/provider/standard_models/cash_flow_growth.py b/openbb_platform/core/openbb_core/provider/standard_models/cash_flow_growth.py index 43d52fd3fbbb..79d07b520c26 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/cash_flow_growth.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/cash_flow_growth.py @@ -14,10 +14,6 @@ class CashFlowStatementGrowthQueryParams(QueryParams): """Cash Flow Statement Growth Query.""" symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) - period: str = Field( - default="annual", - description=QUERY_DESCRIPTIONS.get("period", ""), - ) limit: Optional[int] = Field( default=10, description=QUERY_DESCRIPTIONS.get("limit", "") ) @@ -28,12 +24,6 @@ def to_upper(cls, v: str) -> str: """Convert field to uppercase.""" return v.upper() - @field_validator("period", mode="before", check_fields=False) - @classmethod - def to_lower(cls, v: Optional[str]) -> Optional[str]: - """Convert field to lowercase.""" - return v.lower() if v else v - class CashFlowStatementGrowthData(Data): """Cash Flow Statement Growth Data.""" diff --git a/openbb_platform/core/openbb_core/provider/standard_models/financial_ratios.py b/openbb_platform/core/openbb_core/provider/standard_models/financial_ratios.py index b0f57915d58e..8d3fc02ede8e 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/financial_ratios.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/financial_ratios.py @@ -16,9 +16,6 @@ class FinancialRatiosQueryParams(QueryParams): """Financial Ratios Query.""" symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) - period: str = Field( - default="annual", description=QUERY_DESCRIPTIONS.get("period", "") - ) limit: NonNegativeInt = Field( default=12, description=QUERY_DESCRIPTIONS.get("limit", "") ) @@ -29,12 +26,6 @@ def to_upper(cls, v: str): """Convert field to uppercase.""" return v.upper() - @field_validator("period", mode="before", check_fields=False) - @classmethod - def to_lower(cls, v: Optional[str]) -> Optional[str]: - """Convert field to lowercase.""" - return v.lower() if v else v - class FinancialRatiosData(Data): """Financial Ratios Standard Model.""" diff --git a/openbb_platform/core/openbb_core/provider/standard_models/income_statement.py b/openbb_platform/core/openbb_core/provider/standard_models/income_statement.py index 2f2a2f98962d..23b8709af632 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/income_statement.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/income_statement.py @@ -16,10 +16,6 @@ class IncomeStatementQueryParams(QueryParams): """Income Statement Query.""" symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) - period: str = Field( - default="annual", - description=QUERY_DESCRIPTIONS.get("period", ""), - ) limit: Optional[NonNegativeInt] = Field( default=5, description=QUERY_DESCRIPTIONS.get("limit", "") ) @@ -30,12 +26,6 @@ def to_upper(cls, v: str): """Convert field to uppercase.""" return v.upper() - @field_validator("period", mode="before", check_fields=False) - @classmethod - def to_lower(cls, v: Optional[str]) -> Optional[str]: - """Convert field to lowercase.""" - return v.lower() if v else v - class IncomeStatementData(Data): """Income Statement Data.""" diff --git a/openbb_platform/core/openbb_core/provider/standard_models/income_statement_growth.py b/openbb_platform/core/openbb_core/provider/standard_models/income_statement_growth.py index 6bb031db0a9b..028783890f7e 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/income_statement_growth.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/income_statement_growth.py @@ -14,10 +14,6 @@ class IncomeStatementGrowthQueryParams(QueryParams): """Income Statement Growth Query.""" symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) - period: str = Field( - default="annual", - description=QUERY_DESCRIPTIONS.get("period", ""), - ) limit: Optional[int] = Field( default=10, description=QUERY_DESCRIPTIONS.get("limit", "") ) @@ -28,12 +24,6 @@ def to_upper(cls, v: str) -> str: """Convert field to uppercase.""" return v.upper() - @field_validator("period", mode="before", check_fields=False) - @classmethod - def to_lower(cls, v: Optional[str]) -> Optional[str]: - """Convert field to lowercase.""" - return v.lower() if v else v - class IncomeStatementGrowthData(Data): """Income Statement Growth Data.""" diff --git a/openbb_platform/core/openbb_core/provider/standard_models/key_metrics.py b/openbb_platform/core/openbb_core/provider/standard_models/key_metrics.py index d2580e481cf2..6eceb2ab02fa 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/key_metrics.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/key_metrics.py @@ -1,6 +1,6 @@ """Key Metrics Standard Model.""" -from typing import Literal, Optional +from typing import Optional from pydantic import Field, field_validator @@ -16,9 +16,6 @@ class KeyMetricsQueryParams(QueryParams): """Key Metrics Query.""" symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) - period: Optional[Literal["annual", "quarter"]] = Field( - default="annual", description=QUERY_DESCRIPTIONS.get("period", "") - ) limit: Optional[int] = Field( default=100, description=QUERY_DESCRIPTIONS.get("limit", "") ) @@ -29,12 +26,6 @@ def to_upper(cls, v: str) -> str: """Convert field to uppercase.""" return v.upper() - @field_validator("period", mode="before", check_fields=False) - @classmethod - def to_lower(cls, v: Optional[str]) -> Optional[str]: - """Convert field to lowercase.""" - return v.lower() if v else v - class KeyMetricsData(Data): """Key Metrics Data.""" diff --git a/openbb_platform/openbb/assets/reference.json b/openbb_platform/openbb/assets/reference.json index 3634dcf7449b..5cd193de7dbd 100644 --- a/openbb_platform/openbb/assets/reference.json +++ b/openbb_platform/openbb/assets/reference.json @@ -13409,7 +13409,7 @@ "message": null }, "description": "Get the balance sheet for a given company.", - "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.balance(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.balance(symbol='AAPL', period='annual', limit=5, provider='intrinio')\n```\n\n", + "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.balance(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.balance(symbol='AAPL', period=annual, limit=5, provider='intrinio')\n```\n\n", "parameters": { "standard": [ { @@ -13420,14 +13420,6 @@ "optional": false, "choices": null }, - { - "name": "period", - "type": "str", - "description": "Time period of the data to return.", - "default": "annual", - "optional": true, - "choices": null - }, { "name": "limit", "type": "Annotated[int, Ge(ge=0)]", @@ -13441,7 +13433,7 @@ { "name": "period", "type": "Literal['annual', 'quarter']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -13454,7 +13446,7 @@ { "name": "period", "type": "Literal['annual', 'quarter']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -13474,14 +13466,13 @@ "polygon": [ { "name": "period", - "type": "Literal['annual', 'quarter', 'ttm']", - "description": "None", + "type": "Literal['annual', 'quarter']", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ "annual", - "quarter", - "ttm" + "quarter" ] }, { @@ -13592,8 +13583,8 @@ "yfinance": [ { "name": "period", - "type": "Literal['annual', 'quarter']", - "description": "None", + "type": "Literal['annual', 'quarter', 'ttm']", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -15038,14 +15029,6 @@ "optional": false, "choices": null }, - { - "name": "period", - "type": "str", - "description": "Time period of the data to return.", - "default": "annual", - "optional": true, - "choices": null - }, { "name": "limit", "type": "int", @@ -15059,7 +15042,7 @@ { "name": "period", "type": "Literal['annual', 'quarter']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -15456,7 +15439,7 @@ "message": null }, "description": "Get the cash flow statement for a given company.", - "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.cash(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.cash(symbol='AAPL', period='annual', limit=5, provider='intrinio')\n```\n\n", + "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.cash(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.cash(symbol='AAPL', period=annual, limit=5, provider='intrinio')\n```\n\n", "parameters": { "standard": [ { @@ -15467,14 +15450,6 @@ "optional": false, "choices": null }, - { - "name": "period", - "type": "str", - "description": "Time period of the data to return.", - "default": "annual", - "optional": true, - "choices": null - }, { "name": "limit", "type": "Annotated[int, Ge(ge=0)]", @@ -15488,7 +15463,7 @@ { "name": "period", "type": "Literal['annual', 'quarter']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -15501,7 +15476,7 @@ { "name": "period", "type": "Literal['annual', 'quarter', 'ttm', 'ytd']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -15524,7 +15499,7 @@ { "name": "period", "type": "Literal['annual', 'quarter', 'ttm']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -15642,10 +15617,13 @@ { "name": "period", "type": "Literal['annual', 'quarter']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, - "choices": null + "choices": [ + "annual", + "quarter" + ] } ] }, @@ -16613,14 +16591,6 @@ "optional": false, "choices": null }, - { - "name": "period", - "type": "str", - "description": "Time period of the data to return.", - "default": "annual", - "optional": true, - "choices": null - }, { "name": "limit", "type": "int", @@ -16634,7 +16604,7 @@ { "name": "period", "type": "Literal['annual', 'quarter']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -17784,7 +17754,7 @@ "message": null }, "description": "Get the income statement for a given company.", - "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.income(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.income(symbol='AAPL', period='annual', limit=5, provider='intrinio')\n```\n\n", + "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.income(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.income(symbol='AAPL', period=annual, limit=5, provider='intrinio')\n```\n\n", "parameters": { "standard": [ { @@ -17795,14 +17765,6 @@ "optional": false, "choices": null }, - { - "name": "period", - "type": "str", - "description": "Time period of the data to return.", - "default": "annual", - "optional": true, - "choices": null - }, { "name": "limit", "type": "Annotated[int, Ge(ge=0)]", @@ -17816,7 +17778,7 @@ { "name": "period", "type": "Literal['annual', 'quarter']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -17829,7 +17791,7 @@ { "name": "period", "type": "Literal['annual', 'quarter', 'ttm', 'ytd']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -17852,7 +17814,7 @@ { "name": "period", "type": "Literal['annual', 'quarter', 'ttm']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -17970,7 +17932,7 @@ { "name": "period", "type": "Literal['annual', 'quarter']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -19292,7 +19254,7 @@ "message": null }, "description": "Get the growth of a company's income statement items over time.", - "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.income_growth(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.income_growth(symbol='AAPL', limit=10, period='annual', provider='fmp')\n```\n\n", + "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.income_growth(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.income_growth(symbol='AAPL', limit=10, period=annual, provider='fmp')\n```\n\n", "parameters": { "standard": [ { @@ -19303,14 +19265,6 @@ "optional": false, "choices": null }, - { - "name": "period", - "type": "str", - "description": "Time period of the data to return.", - "default": "annual", - "optional": true, - "choices": null - }, { "name": "limit", "type": "int", @@ -19324,7 +19278,7 @@ { "name": "period", "type": "Literal['annual', 'quarter']", - "description": "None", + "description": "Time period of the data to return.", "default": "annual", "optional": true, "choices": [ @@ -19617,7 +19571,7 @@ "message": null }, "description": "Get fundamental metrics for a given company.", - "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.metrics(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.metrics(symbol='AAPL', period='annual', limit=100, provider='intrinio')\n```\n\n", + "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.metrics(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.metrics(symbol='AAPL', period=annual, limit=100, provider='intrinio')\n```\n\n", "parameters": { "standard": [ { @@ -19628,14 +19582,6 @@ "optional": false, "choices": null }, - { - "name": "period", - "type": "Literal['annual', 'quarter']", - "description": "Time period of the data to return.", - "default": "annual", - "optional": true, - "choices": null - }, { "name": "limit", "type": "int", @@ -19646,6 +19592,17 @@ } ], "fmp": [ + { + "name": "period", + "type": "Literal['annual', 'quarter']", + "description": "Time period of the data to return.", + "default": "annual", + "optional": true, + "choices": [ + "annual", + "quarter" + ] + }, { "name": "with_ttm", "type": "bool", @@ -21086,7 +21043,7 @@ "message": null }, "description": "Get an extensive set of financial and accounting ratios for a given company over time.", - "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.ratios(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.ratios(symbol='AAPL', period='annual', limit=12, provider='intrinio')\n```\n\n", + "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.fundamental.ratios(symbol='AAPL', provider='fmp')\nobb.equity.fundamental.ratios(symbol='AAPL', period=annual, limit=12, provider='intrinio')\n```\n\n", "parameters": { "standard": [ { @@ -21097,14 +21054,6 @@ "optional": false, "choices": null }, - { - "name": "period", - "type": "str", - "description": "Time period of the data to return.", - "default": "annual", - "optional": true, - "choices": null - }, { "name": "limit", "type": "int", @@ -21121,7 +21070,11 @@ "description": "Time period of the data to return.", "default": "annual", "optional": true, - "choices": null + "choices": [ + "annual", + "quarter", + "ttm" + ] } ], "intrinio": [ @@ -21131,7 +21084,12 @@ "description": "Time period of the data to return.", "default": "annual", "optional": true, - "choices": null + "choices": [ + "annual", + "quarter", + "ttm", + "ytd" + ] }, { "name": "fiscal_year", diff --git a/openbb_platform/openbb/package/equity_fundamental.py b/openbb_platform/openbb/package/equity_fundamental.py index e0ca020b39ea..3b2e24d185f3 100644 --- a/openbb_platform/openbb/package/equity_fundamental.py +++ b/openbb_platform/openbb/package/equity_fundamental.py @@ -48,9 +48,6 @@ def __repr__(self) -> str: def balance( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - period: Annotated[ - str, OpenBBField(description="Time period of the data to return.") - ] = "annual", limit: Annotated[ Optional[Annotated[int, Ge(ge=0)]], OpenBBField(description="The number of data entries to return."), @@ -69,12 +66,12 @@ def balance( ---------- symbol : str Symbol to get data for. - period : str - Time period of the data to return. limit : Optional[Annotated[int, Ge(ge=0)]] The number of data entries to return. provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance. + period : Union[Literal['annual', 'quarter'], Literal['annual', 'quarter', 'ttm']] + Time period of the data to return. (provider: fmp, intrinio, polygon, yfinance) fiscal_year : Optional[int] The specific fiscal year. Reports do not go beyond 2008. (provider: intrinio) filing_date : Optional[datetime.date] @@ -392,10 +389,29 @@ def balance( }, standard_params={ "symbol": symbol, - "period": period, "limit": limit, }, extra_params=kwargs, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + "intrinio": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + "polygon": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + } + }, ) ) @@ -404,9 +420,6 @@ def balance( def balance_growth( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - period: Annotated[ - str, OpenBBField(description="Time period of the data to return.") - ] = "annual", limit: Annotated[ Optional[int], OpenBBField(description="The number of data entries to return."), @@ -425,12 +438,12 @@ def balance_growth( ---------- symbol : str Symbol to get data for. - period : str - Time period of the data to return. limit : Optional[int] The number of data entries to return. provider : Optional[Literal['fmp']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp. + period : Literal['annual', 'quarter'] + Time period of the data to return. (provider: fmp) Returns ------- @@ -554,10 +567,17 @@ def balance_growth( }, standard_params={ "symbol": symbol, - "period": period, "limit": limit, }, extra_params=kwargs, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + } + } + }, ) ) @@ -566,9 +586,6 @@ def balance_growth( def cash( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - period: Annotated[ - str, OpenBBField(description="Time period of the data to return.") - ] = "annual", limit: Annotated[ Optional[Annotated[int, Ge(ge=0)]], OpenBBField(description="The number of data entries to return."), @@ -587,12 +604,12 @@ def cash( ---------- symbol : str Symbol to get data for. - period : str - Time period of the data to return. limit : Optional[Annotated[int, Ge(ge=0)]] The number of data entries to return. provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance. + period : Union[Literal['annual', 'quarter'], Literal['annual', 'quarter', 'ttm', 'ytd'], Literal['annual', 'quarter', 'ttm']] + Time period of the data to return. (provider: fmp, intrinio, polygon, yfinance) fiscal_year : Optional[int] The specific fiscal year. Reports do not go beyond 2008. (provider: intrinio) filing_date : Optional[datetime.date] @@ -820,10 +837,29 @@ def cash( }, standard_params={ "symbol": symbol, - "period": period, "limit": limit, }, extra_params=kwargs, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + "intrinio": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm", "ytd"], + }, + "polygon": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + } + }, ) ) @@ -832,9 +868,6 @@ def cash( def cash_growth( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - period: Annotated[ - str, OpenBBField(description="Time period of the data to return.") - ] = "annual", limit: Annotated[ Optional[int], OpenBBField(description="The number of data entries to return."), @@ -853,12 +886,12 @@ def cash_growth( ---------- symbol : str Symbol to get data for. - period : str - Time period of the data to return. limit : Optional[int] The number of data entries to return. provider : Optional[Literal['fmp']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp. + period : Literal['annual', 'quarter'] + Time period of the data to return. (provider: fmp) Returns ------- @@ -964,10 +997,17 @@ def cash_growth( }, standard_params={ "symbol": symbol, - "period": period, "limit": limit, }, extra_params=kwargs, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + } + } + }, ) ) @@ -1588,9 +1628,6 @@ def historical_splits( def income( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - period: Annotated[ - str, OpenBBField(description="Time period of the data to return.") - ] = "annual", limit: Annotated[ Optional[Annotated[int, Ge(ge=0)]], OpenBBField(description="The number of data entries to return."), @@ -1609,12 +1646,12 @@ def income( ---------- symbol : str Symbol to get data for. - period : str - Time period of the data to return. limit : Optional[Annotated[int, Ge(ge=0)]] The number of data entries to return. provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance. + period : Union[Literal['annual', 'quarter'], Literal['annual', 'quarter', 'ttm', 'ytd'], Literal['annual', 'quarter', 'ttm']] + Time period of the data to return. (provider: fmp, intrinio, polygon, yfinance) fiscal_year : Optional[int] The specific fiscal year. Reports do not go beyond 2008. (provider: intrinio) filing_date : Optional[datetime.date] @@ -1936,10 +1973,29 @@ def income( }, standard_params={ "symbol": symbol, - "period": period, "limit": limit, }, extra_params=kwargs, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + "intrinio": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm", "ytd"], + }, + "polygon": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + }, + } + }, ) ) @@ -1948,9 +2004,6 @@ def income( def income_growth( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - period: Annotated[ - str, OpenBBField(description="Time period of the data to return.") - ] = "annual", limit: Annotated[ Optional[int], OpenBBField(description="The number of data entries to return."), @@ -1969,12 +2022,12 @@ def income_growth( ---------- symbol : str Symbol to get data for. - period : str - Time period of the data to return. limit : Optional[int] The number of data entries to return. provider : Optional[Literal['fmp']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp. + period : Literal['annual', 'quarter'] + Time period of the data to return. (provider: fmp) Returns ------- @@ -2072,10 +2125,17 @@ def income_growth( }, standard_params={ "symbol": symbol, - "period": period, "limit": limit, }, extra_params=kwargs, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + } + } + }, ) ) @@ -2361,10 +2421,6 @@ def metrics( description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance." ), ], - period: Annotated[ - Optional[Literal["annual", "quarter"]], - OpenBBField(description="Time period of the data to return."), - ] = "annual", limit: Annotated[ Optional[int], OpenBBField(description="The number of data entries to return."), @@ -2383,13 +2439,13 @@ def metrics( ---------- symbol : Union[str, List[str]] Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, intrinio, yfinance. - period : Optional[Literal['annual', 'quarter']] - Time period of the data to return. limit : Optional[int] The number of data entries to return. provider : Optional[Literal['fmp', 'intrinio', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, yfinance. - with_ttm : Optional[bool] + period : Literal['annual', 'quarter'] + Time period of the data to return. (provider: fmp) + with_ttm : bool Include trailing twelve months (TTM) data. (provider: fmp) Returns @@ -2655,7 +2711,6 @@ def metrics( }, standard_params={ "symbol": symbol, - "period": period, "limit": limit, }, extra_params=kwargs, @@ -2664,7 +2719,13 @@ def metrics( "fmp": {"multiple_items_allowed": True, "choices": None}, "intrinio": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}, - } + }, + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter"], + } + }, }, ) ) @@ -2866,9 +2927,6 @@ def multiples( def ratios( self, symbol: Annotated[str, OpenBBField(description="Symbol to get data for.")], - period: Annotated[ - str, OpenBBField(description="Time period of the data to return.") - ] = "annual", limit: Annotated[ int, OpenBBField(description="The number of data entries to return.") ] = 12, @@ -2886,12 +2944,12 @@ def ratios( ---------- symbol : str Symbol to get data for. - period : str - Time period of the data to return. limit : int The number of data entries to return. provider : Optional[Literal['fmp', 'intrinio']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio. + period : Union[Literal['annual', 'quarter', 'ttm'], Literal['annual', 'quarter', 'ttm', 'ytd']] + Time period of the data to return. (provider: fmp, intrinio) fiscal_year : Optional[int] The specific fiscal year. Reports do not go beyond 2008. (provider: intrinio) @@ -3049,10 +3107,21 @@ def ratios( }, standard_params={ "symbol": symbol, - "period": period, "limit": limit, }, extra_params=kwargs, + info={ + "period": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm"], + }, + "intrinio": { + "multiple_items_allowed": False, + "choices": ["annual", "quarter", "ttm", "ytd"], + }, + } + }, ) ) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet.py b/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet.py index 71bf7055158f..8ecbae6d59b7 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet.py @@ -12,6 +12,7 @@ BalanceSheetData, BalanceSheetQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from openbb_fmp.utils.helpers import create_url, get_data_many from pydantic import Field, model_validator @@ -22,8 +23,15 @@ class FMPBalanceSheetQueryParams(BalanceSheetQueryParams): Source: https://financialmodelingprep.com/developer/docs/#Balance-Sheet """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter"], + } + } + period: Literal["annual", "quarter"] = Field( - default="annual", json_schema_extra={"choices": ["annual", "quarter"]} + default="annual", + description=QUERY_DESCRIPTIONS.get("period", ""), ) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet_growth.py b/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet_growth.py index dd58e2a19810..b43feb323f61 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet_growth.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet_growth.py @@ -7,7 +7,7 @@ BalanceSheetGrowthData, BalanceSheetGrowthQueryParams, ) -from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS +from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS, QUERY_DESCRIPTIONS from openbb_fmp.utils.helpers import create_url, get_data_many from pydantic import Field, model_validator @@ -18,8 +18,15 @@ class FMPBalanceSheetGrowthQueryParams(BalanceSheetGrowthQueryParams): Source: https://site.financialmodelingprep.com/developer/docs/#Financial-Statements-Growth """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter"], + } + } + period: Literal["annual", "quarter"] = Field( - default="annual", json_schema_extra={"choices": ["annual", "quarter"]} + default="annual", + description=QUERY_DESCRIPTIONS.get("period", ""), ) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow.py b/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow.py index 9e4cc2e8f09a..a110ed2b7952 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow.py @@ -13,6 +13,7 @@ CashFlowStatementData, CashFlowStatementQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from openbb_fmp.utils.helpers import create_url, get_data_many from pydantic import Field, model_validator @@ -23,9 +24,15 @@ class FMPCashFlowStatementQueryParams(CashFlowStatementQueryParams): Source: https://financialmodelingprep.com/developer/docs/#Cash-Flow-Statement """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter"], + } + } + period: Literal["annual", "quarter"] = Field( default="annual", - json_schema_extra={"choices": ["annual", "quarter"]}, + description=QUERY_DESCRIPTIONS.get("period", ""), ) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow_growth.py b/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow_growth.py index 847bcebaae00..3aaec543b585 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow_growth.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow_growth.py @@ -7,7 +7,7 @@ CashFlowStatementGrowthData, CashFlowStatementGrowthQueryParams, ) -from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS +from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS, QUERY_DESCRIPTIONS from openbb_fmp.utils.helpers import create_url, get_data_many from pydantic import Field @@ -18,8 +18,15 @@ class FMPCashFlowStatementGrowthQueryParams(CashFlowStatementGrowthQueryParams): Source: https://site.financialmodelingprep.com/developer/docs/financial-statements-growth-api/ """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter"], + } + } + period: Literal["annual", "quarter"] = Field( - default="annual", json_schema_extra={"choices": ["annual", "quarter"]} + default="annual", + description=QUERY_DESCRIPTIONS.get("period", ""), ) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/financial_ratios.py b/openbb_platform/providers/fmp/openbb_fmp/models/financial_ratios.py index 2cc5b5f7d9b9..3b0aa38a5862 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/financial_ratios.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/financial_ratios.py @@ -23,12 +23,17 @@ class FMPFinancialRatiosQueryParams(FinancialRatiosQueryParams): Source: https://financialmodelingprep.com/developer/docs/#Company-Financial-Ratios """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter", "ttm"], + } + } period: Literal["annual", "quarter", "ttm"] = Field( - default="annual", description=QUERY_DESCRIPTIONS.get("period", "") + default="annual", + description=QUERY_DESCRIPTIONS.get("period", ""), ) - class FMPFinancialRatiosData(FinancialRatiosData): """FMP Financial Ratios Data.""" diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/income_statement.py b/openbb_platform/providers/fmp/openbb_fmp/models/income_statement.py index 5dcb3860221f..3537dd5fbac1 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/income_statement.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/income_statement.py @@ -12,6 +12,7 @@ IncomeStatementData, IncomeStatementQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from openbb_fmp.utils.helpers import get_data_many from pydantic import Field, model_validator @@ -22,8 +23,15 @@ class FMPIncomeStatementQueryParams(IncomeStatementQueryParams): Source: https://financialmodelingprep.com/developer/docs/#Income-Statement """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter"], + } + } + period: Literal["annual", "quarter"] = Field( - default="annual", json_schema_extra={"choices": ["annual", "quarter"]} + default="annual", + description=QUERY_DESCRIPTIONS.get("period", ""), ) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/income_statement_growth.py b/openbb_platform/providers/fmp/openbb_fmp/models/income_statement_growth.py index cd54bb7abeb1..7ccac4b3315e 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/income_statement_growth.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/income_statement_growth.py @@ -7,7 +7,7 @@ IncomeStatementGrowthData, IncomeStatementGrowthQueryParams, ) -from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS +from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS, QUERY_DESCRIPTIONS from openbb_fmp.utils.helpers import create_url, get_data_many from pydantic import Field, model_validator @@ -17,9 +17,15 @@ class FMPIncomeStatementGrowthQueryParams(IncomeStatementGrowthQueryParams): Source: https://site.financialmodelingprep.com/developer/docs/financial-statements-growth-api/ """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter"], + } + } period: Literal["annual", "quarter"] = Field( - default="annual", json_schema_extra={"choices": ["annual", "quarter"]} + default="annual", + description=QUERY_DESCRIPTIONS.get("period", ""), ) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/key_metrics.py b/openbb_platform/providers/fmp/openbb_fmp/models/key_metrics.py index 5b2ef4f2cb1c..ba8b706edf0d 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/key_metrics.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/key_metrics.py @@ -7,7 +7,7 @@ date as dateType, datetime, ) -from typing import Any, Dict, List, Optional +from typing import Any, Dict, List, Literal, Optional from warnings import warn from openbb_core.provider.abstract.data import ForceInt @@ -16,6 +16,7 @@ KeyMetricsData, KeyMetricsQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from openbb_core.provider.utils.errors import EmptyDataError from openbb_core.provider.utils.helpers import amake_request from openbb_fmp.utils.helpers import response_callback @@ -28,9 +29,18 @@ class FMPKeyMetricsQueryParams(KeyMetricsQueryParams): Source: https://site.financialmodelingprep.com/developer/docs/company-key-metrics-api/ """ - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "period": { + "choices": ["annual", "quarter"], + } + } - with_ttm: Optional[bool] = Field( + period: Literal["annual", "quarter"] = Field( + default="annual", + description=QUERY_DESCRIPTIONS.get("period", ""), + ) + with_ttm: bool = Field( default=False, description="Include trailing twelve months (TTM) data." ) diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/balance_sheet.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/balance_sheet.py index db6972b0face..d9522a3f1161 100644 --- a/openbb_platform/providers/intrinio/openbb_intrinio/models/balance_sheet.py +++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/balance_sheet.py @@ -10,6 +10,7 @@ BalanceSheetData, BalanceSheetQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from openbb_core.provider.utils.helpers import ClientResponse, amake_requests from openbb_intrinio.utils.helpers import get_data_one from pydantic import Field, field_validator, model_validator @@ -22,9 +23,15 @@ class IntrinioBalanceSheetQueryParams(BalanceSheetQueryParams): Source: https://docs.intrinio.com/documentation/web_api/get_fundamental_standardized_financials_v2 """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter"], + } + } + period: Literal["annual", "quarter"] = Field( default="annual", - json_schema_extra={"choices": ["annual", "quarter"]}, + description=QUERY_DESCRIPTIONS.get("period", ""), ) fiscal_year: Optional[int] = Field( default=None, diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/cash_flow.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/cash_flow.py index 2a1452450c65..e5cf1cb5797b 100644 --- a/openbb_platform/providers/intrinio/openbb_intrinio/models/cash_flow.py +++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/cash_flow.py @@ -11,6 +11,7 @@ CashFlowStatementData, CashFlowStatementQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from openbb_core.provider.utils.helpers import ClientResponse, amake_requests from openbb_intrinio.utils.helpers import get_data_one from pydantic import Field, field_validator, model_validator @@ -23,9 +24,15 @@ class IntrinioCashFlowStatementQueryParams(CashFlowStatementQueryParams): Source: https://docs.intrinio.com/documentation/web_api/get_fundamental_standardized_financials_v2 """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter", "ttm", "ytd"], + } + } + period: Literal["annual", "quarter", "ttm", "ytd"] = Field( default="annual", - json_schema_extra={"choices": ["annual", "quarter", "ttm", "ytd"]}, + description=QUERY_DESCRIPTIONS.get("period", ""), ) fiscal_year: Optional[int] = Field( default=None, diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/financial_ratios.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/financial_ratios.py index 7c52b59b37da..85967c72672c 100644 --- a/openbb_platform/providers/intrinio/openbb_intrinio/models/financial_ratios.py +++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/financial_ratios.py @@ -1,7 +1,7 @@ """Intrinio Financial Ratios Model.""" -import warnings from typing import Any, Dict, List, Literal, Optional +from warnings import warn from openbb_core.app.model.abstract.error import OpenBBError from openbb_core.provider.abstract.fetcher import Fetcher @@ -14,8 +14,6 @@ from openbb_intrinio.utils.helpers import get_data_one from pydantic import Field, field_validator -_warn = warnings.warn - class IntrinioFinancialRatiosQueryParams(FinancialRatiosQueryParams): """Intrinio Financial Ratios Query. @@ -24,6 +22,11 @@ class IntrinioFinancialRatiosQueryParams(FinancialRatiosQueryParams): Source: https://docs.intrinio.com/documentation/web_api/get_fundamental_standardized_financials_v2 """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter", "ttm", "ytd"], + } + } period: Literal["annual", "quarter", "ttm", "ytd"] = Field( default="annual", description=QUERY_DESCRIPTIONS.get("period", ""), @@ -172,7 +175,7 @@ async def aextract_data( ) if query.fiscal_year is not None: if query.fiscal_year < 2008: - _warn("Financials data is only available from 2008 and later.") + warn("Financials data is only available from 2008 and later.") query.fiscal_year = 2008 fundamentals_url = fundamentals_url + f"&fiscal_year={query.fiscal_year}" fundamentals_url = fundamentals_url + f"&api_key={api_key}" diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py index 59ff32e10022..fd59647bbb33 100644 --- a/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py +++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/income_statement.py @@ -11,6 +11,7 @@ IncomeStatementData, IncomeStatementQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from openbb_core.provider.utils.helpers import ( ClientResponse, ClientSession, @@ -27,9 +28,15 @@ class IntrinioIncomeStatementQueryParams(IncomeStatementQueryParams): Source: https://docs.intrinio.com/documentation/web_api/get_fundamental_standardized_financials_v2 """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter", "ttm", "ytd"], + } + } + period: Literal["annual", "quarter", "ttm", "ytd"] = Field( default="annual", - json_schema_extra={"choices": ["annual", "quarter", "ttm", "ytd"]}, + description=QUERY_DESCRIPTIONS.get("period", ""), ) fiscal_year: Optional[int] = Field( default=None, diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/balance_sheet.py b/openbb_platform/providers/polygon/openbb_polygon/models/balance_sheet.py index ae548fcb6ead..8286ee55c5eb 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/balance_sheet.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/balance_sheet.py @@ -10,6 +10,7 @@ BalanceSheetData, BalanceSheetQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from pydantic import Field, model_validator @@ -20,10 +21,15 @@ class PolygonBalanceSheetQueryParams(BalanceSheetQueryParams): """ __alias_dict__ = {"symbol": "ticker", "period": "timeframe"} + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter"], + } + } - period: Literal["annual", "quarter", "ttm"] = Field( + period: Literal["annual", "quarter"] = Field( default="annual", - json_schema_extra={"choices": ["annual", "quarter", "ttm"]}, + description=QUERY_DESCRIPTIONS.get("period", ""), ) filing_date: Optional[dateType] = Field( default=None, description="Filing date of the financial statement." diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/cash_flow.py b/openbb_platform/providers/polygon/openbb_polygon/models/cash_flow.py index fbb31fca0ee1..91fdd8491c67 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/cash_flow.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/cash_flow.py @@ -10,6 +10,7 @@ CashFlowStatementData, CashFlowStatementQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from pydantic import Field, model_validator @@ -20,12 +21,16 @@ class PolygonCashFlowStatementQueryParams(CashFlowStatementQueryParams): """ __alias_dict__ = {"symbol": "ticker", "period": "timeframe"} + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter", "ttm"], + } + } period: Literal["annual", "quarter", "ttm"] = Field( default="annual", - json_schema_extra={"choices": ["annual", "quarter", "ttm"]}, + description=QUERY_DESCRIPTIONS.get("period", ""), ) - filing_date: Optional[dateType] = Field( default=None, description="Filing date of the financial statement." ) diff --git a/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py b/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py index 7d69b7205597..4bd864caeb68 100644 --- a/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py +++ b/openbb_platform/providers/polygon/openbb_polygon/models/income_statement.py @@ -10,6 +10,7 @@ IncomeStatementData, IncomeStatementQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from pydantic import Field, model_validator @@ -20,10 +21,15 @@ class PolygonIncomeStatementQueryParams(IncomeStatementQueryParams): """ __alias_dict__ = {"symbol": "ticker", "period": "timeframe"} + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter", "ttm"], + } + } period: Literal["annual", "quarter", "ttm"] = Field( default="annual", - json_schema_extra={"choices": ["annual", "quarter", "ttm"]}, + description=QUERY_DESCRIPTIONS.get("period", ""), ) filing_date: Optional[dateType] = Field( default=None, description="Filing date of the financial statement." diff --git a/openbb_platform/providers/yfinance/openbb_yfinance/models/balance_sheet.py b/openbb_platform/providers/yfinance/openbb_yfinance/models/balance_sheet.py index 5477e7c365d3..df9e9ed1dee7 100644 --- a/openbb_platform/providers/yfinance/openbb_yfinance/models/balance_sheet.py +++ b/openbb_platform/providers/yfinance/openbb_yfinance/models/balance_sheet.py @@ -9,6 +9,7 @@ BalanceSheetData, BalanceSheetQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from openbb_core.provider.utils.errors import EmptyDataError from openbb_core.provider.utils.helpers import to_snake_case from pydantic import Field, field_validator @@ -19,13 +20,17 @@ class YFinanceBalanceSheetQueryParams(BalanceSheetQueryParams): Source: https://finance.yahoo.com/ """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter"], + } + } - period: Literal["annual", "quarter"] = Field( + period: Literal["annual", "quarter", "ttm"] = Field( default="annual", - json_schema_extra={"choices": ["annual", "quarter"]}, + description=QUERY_DESCRIPTIONS.get("period", ""), ) - class YFinanceBalanceSheetData(BalanceSheetData): """Yahoo Finance Balance Sheet Data.""" diff --git a/openbb_platform/providers/yfinance/openbb_yfinance/models/cash_flow.py b/openbb_platform/providers/yfinance/openbb_yfinance/models/cash_flow.py index 43a51fd581e7..523bc1926685 100644 --- a/openbb_platform/providers/yfinance/openbb_yfinance/models/cash_flow.py +++ b/openbb_platform/providers/yfinance/openbb_yfinance/models/cash_flow.py @@ -9,6 +9,7 @@ CashFlowStatementData, CashFlowStatementQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from openbb_core.provider.utils.errors import EmptyDataError from openbb_core.provider.utils.helpers import to_snake_case from pydantic import Field, field_validator @@ -20,9 +21,15 @@ class YFinanceCashFlowStatementQueryParams(CashFlowStatementQueryParams): Source: https://finance.yahoo.com/ """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter"], + } + } + period: Literal["annual", "quarter"] = Field( default="annual", - json_schema_extra={"chocies": ["annual", "quarter"]}, + description=QUERY_DESCRIPTIONS.get("period", ""), ) diff --git a/openbb_platform/providers/yfinance/openbb_yfinance/models/income_statement.py b/openbb_platform/providers/yfinance/openbb_yfinance/models/income_statement.py index 4531bdd03e76..825cb38d82b0 100644 --- a/openbb_platform/providers/yfinance/openbb_yfinance/models/income_statement.py +++ b/openbb_platform/providers/yfinance/openbb_yfinance/models/income_statement.py @@ -9,6 +9,7 @@ IncomeStatementData, IncomeStatementQueryParams, ) +from openbb_core.provider.utils.descriptions import QUERY_DESCRIPTIONS from openbb_core.provider.utils.errors import EmptyDataError from openbb_core.provider.utils.helpers import to_snake_case from pydantic import Field, field_validator @@ -20,9 +21,15 @@ class YFinanceIncomeStatementQueryParams(IncomeStatementQueryParams): Source: https://finance.yahoo.com/ """ + __json_schema_extra__ = { + "period": { + "choices": ["annual", "quarter"], + } + } + period: Literal["annual", "quarter"] = Field( default="annual", - json_schema_extra={"choices": ["annual", "quarter"]}, + description=QUERY_DESCRIPTIONS.get("period", ""), ) From d2c13995890c91e49e448630915ce577a7a94174 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:34:55 -0700 Subject: [PATCH 13/19] black --- .../providers/fmp/openbb_fmp/models/balance_sheet_growth.py | 5 ++++- .../providers/fmp/openbb_fmp/models/cash_flow_growth.py | 5 ++++- .../providers/fmp/openbb_fmp/models/financial_ratios.py | 2 ++ .../fmp/openbb_fmp/models/income_statement_growth.py | 6 +++++- .../providers/fmp/openbb_fmp/models/key_metrics.py | 2 +- .../yfinance/openbb_yfinance/models/balance_sheet.py | 2 ++ 6 files changed, 18 insertions(+), 4 deletions(-) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet_growth.py b/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet_growth.py index b43feb323f61..92d59b43bcc4 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet_growth.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/balance_sheet_growth.py @@ -7,7 +7,10 @@ BalanceSheetGrowthData, BalanceSheetGrowthQueryParams, ) -from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS, QUERY_DESCRIPTIONS +from openbb_core.provider.utils.descriptions import ( + DATA_DESCRIPTIONS, + QUERY_DESCRIPTIONS, +) from openbb_fmp.utils.helpers import create_url, get_data_many from pydantic import Field, model_validator diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow_growth.py b/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow_growth.py index 3aaec543b585..3b997f7c72ce 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow_growth.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/cash_flow_growth.py @@ -7,7 +7,10 @@ CashFlowStatementGrowthData, CashFlowStatementGrowthQueryParams, ) -from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS, QUERY_DESCRIPTIONS +from openbb_core.provider.utils.descriptions import ( + DATA_DESCRIPTIONS, + QUERY_DESCRIPTIONS, +) from openbb_fmp.utils.helpers import create_url, get_data_many from pydantic import Field diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/financial_ratios.py b/openbb_platform/providers/fmp/openbb_fmp/models/financial_ratios.py index 3b0aa38a5862..48f0a2caea55 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/financial_ratios.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/financial_ratios.py @@ -23,6 +23,7 @@ class FMPFinancialRatiosQueryParams(FinancialRatiosQueryParams): Source: https://financialmodelingprep.com/developer/docs/#Company-Financial-Ratios """ + __json_schema_extra__ = { "period": { "choices": ["annual", "quarter", "ttm"], @@ -34,6 +35,7 @@ class FMPFinancialRatiosQueryParams(FinancialRatiosQueryParams): description=QUERY_DESCRIPTIONS.get("period", ""), ) + class FMPFinancialRatiosData(FinancialRatiosData): """FMP Financial Ratios Data.""" diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/income_statement_growth.py b/openbb_platform/providers/fmp/openbb_fmp/models/income_statement_growth.py index 7ccac4b3315e..7ff7cd111f10 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/income_statement_growth.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/income_statement_growth.py @@ -7,7 +7,10 @@ IncomeStatementGrowthData, IncomeStatementGrowthQueryParams, ) -from openbb_core.provider.utils.descriptions import DATA_DESCRIPTIONS, QUERY_DESCRIPTIONS +from openbb_core.provider.utils.descriptions import ( + DATA_DESCRIPTIONS, + QUERY_DESCRIPTIONS, +) from openbb_fmp.utils.helpers import create_url, get_data_many from pydantic import Field, model_validator @@ -17,6 +20,7 @@ class FMPIncomeStatementGrowthQueryParams(IncomeStatementGrowthQueryParams): Source: https://site.financialmodelingprep.com/developer/docs/financial-statements-growth-api/ """ + __json_schema_extra__ = { "period": { "choices": ["annual", "quarter"], diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/key_metrics.py b/openbb_platform/providers/fmp/openbb_fmp/models/key_metrics.py index ba8b706edf0d..5e2e74d80090 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/key_metrics.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/key_metrics.py @@ -33,7 +33,7 @@ class FMPKeyMetricsQueryParams(KeyMetricsQueryParams): "symbol": {"multiple_items_allowed": True}, "period": { "choices": ["annual", "quarter"], - } + }, } period: Literal["annual", "quarter"] = Field( diff --git a/openbb_platform/providers/yfinance/openbb_yfinance/models/balance_sheet.py b/openbb_platform/providers/yfinance/openbb_yfinance/models/balance_sheet.py index df9e9ed1dee7..75c94f411e57 100644 --- a/openbb_platform/providers/yfinance/openbb_yfinance/models/balance_sheet.py +++ b/openbb_platform/providers/yfinance/openbb_yfinance/models/balance_sheet.py @@ -20,6 +20,7 @@ class YFinanceBalanceSheetQueryParams(BalanceSheetQueryParams): Source: https://finance.yahoo.com/ """ + __json_schema_extra__ = { "period": { "choices": ["annual", "quarter"], @@ -31,6 +32,7 @@ class YFinanceBalanceSheetQueryParams(BalanceSheetQueryParams): description=QUERY_DESCRIPTIONS.get("period", ""), ) + class YFinanceBalanceSheetData(BalanceSheetData): """Yahoo Finance Balance Sheet Data.""" From 6469589708416198692bb525454ae6ec5ea9c96e Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:38:10 -0700 Subject: [PATCH 14/19] mypy --- .../openbb_intrinio/models/financial_ratios.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/financial_ratios.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/financial_ratios.py index 85967c72672c..10139cf95ded 100644 --- a/openbb_platform/providers/intrinio/openbb_intrinio/models/financial_ratios.py +++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/financial_ratios.py @@ -189,10 +189,10 @@ async def callback(response: ClientResponse, _: Any) -> Dict: """Return the response.""" statement_data = await response.json() return { - "period_ending": statement_data["fundamental"]["end_date"], - "fiscal_year": statement_data["fundamental"]["fiscal_year"], - "fiscal_period": statement_data["fundamental"]["fiscal_period"], - "calculations": statement_data["standardized_financials"], + "period_ending": statement_data["fundamental"]["end_date"], # type: ignore + "fiscal_year": statement_data["fundamental"]["fiscal_year"], # type: ignore + "fiscal_period": statement_data["fundamental"]["fiscal_period"], # type: ignore + "calculations": statement_data["standardized_financials"], # type: ignore } urls = [ @@ -200,7 +200,7 @@ async def callback(response: ClientResponse, _: Any) -> Dict: for id in ids ] - return await amake_requests(urls, callback, **kwargs) + return await amake_requests(urls, callback, **kwargs) # type: ignore @staticmethod def transform_data( From dc01be957ac4f7106450fa6e3176706f9bb8b0d9 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 24 Jul 2024 11:49:57 -0700 Subject: [PATCH 15/19] test params --- .../extensions/equity/integration/test_equity_api.py | 2 +- .../extensions/equity/integration/test_equity_python.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openbb_platform/extensions/equity/integration/test_equity_api.py b/openbb_platform/extensions/equity/integration/test_equity_api.py index abde8aaa437d..3c34a69b8a57 100644 --- a/openbb_platform/extensions/equity/integration/test_equity_api.py +++ b/openbb_platform/extensions/equity/integration/test_equity_api.py @@ -673,7 +673,7 @@ def test_equity_calendar_ipo(params, headers): "with_ttm": False, } ), - ({"provider": "intrinio", "symbol": "AAPL", "period": "annual", "limit": 100}), + ({"provider": "intrinio", "symbol": "AAPL", "limit": 100}), ({"provider": "yfinance", "symbol": "AAPL"}), ({"provider": "finviz", "symbol": "AAPL,GOOG"}), ], diff --git a/openbb_platform/extensions/equity/integration/test_equity_python.py b/openbb_platform/extensions/equity/integration/test_equity_python.py index 765d907f0a3f..3115a03d42ea 100644 --- a/openbb_platform/extensions/equity/integration/test_equity_python.py +++ b/openbb_platform/extensions/equity/integration/test_equity_python.py @@ -554,7 +554,7 @@ def test_equity_calendar_ipo(params, obb): "with_ttm": False, } ), - ({"provider": "intrinio", "symbol": "AAPL", "period": "annual", "limit": 100}), + ({"provider": "intrinio", "symbol": "AAPL", "limit": 100}), ({"provider": "yfinance", "symbol": "AAPL"}), ({"provider": "finviz", "symbol": "AAPL,GOOG"}), ], From 172f0861d0cff64366a826937476228e4505e025 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 24 Jul 2024 14:24:28 -0700 Subject: [PATCH 16/19] price-historical interval choices --- .../standard_models/equity_historical.py | 4 - .../standard_models/index_historical.py | 10 - openbb_platform/openbb/assets/reference.json | 196 ++++++++++++++---- .../openbb/package/crypto_price.py | 30 ++- .../openbb/package/currency_price.py | 30 ++- .../openbb/package/equity_price.py | 56 ++++- openbb_platform/openbb/package/etf.py | 56 ++++- openbb_platform/openbb/package/index_price.py | 35 +++- .../models/equity_historical.py | 7 +- .../openbb_cboe/models/equity_historical.py | 5 +- .../openbb_cboe/models/index_historical.py | 5 +- .../openbb_fmp/models/crypto_historical.py | 5 +- .../openbb_fmp/models/currency_historical.py | 5 +- .../openbb_fmp/models/equity_historical.py | 5 +- .../fmp/openbb_fmp/models/index_historical.py | 5 +- .../models/equity_historical.py | 19 ++ .../openbb_tiingo/models/crypto_historical.py | 11 +- .../models/currency_historical.py | 11 +- .../openbb_tiingo/models/equity_historical.py | 11 +- .../models/equity_historical.py | 5 +- .../models/crypto_historical.py | 21 +- .../models/currency_historical.py | 21 +- .../models/equity_historical.py | 21 +- .../models/index_historical.py | 21 +- 24 files changed, 488 insertions(+), 107 deletions(-) diff --git a/openbb_platform/core/openbb_core/provider/standard_models/equity_historical.py b/openbb_platform/core/openbb_core/provider/standard_models/equity_historical.py index f25728fe99a2..74fb8c175c5f 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/equity_historical.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/equity_historical.py @@ -20,10 +20,6 @@ class EquityHistoricalQueryParams(QueryParams): """Equity Historical Price Query.""" symbol: str = Field(description=QUERY_DESCRIPTIONS.get("symbol", "")) - interval: Optional[str] = Field( - default="1d", - description=QUERY_DESCRIPTIONS.get("interval", ""), - ) start_date: Optional[dateType] = Field( default=None, description=QUERY_DESCRIPTIONS.get("start_date", ""), diff --git a/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py b/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py index ad5c1ecea46b..90f942fcf516 100644 --- a/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py +++ b/openbb_platform/core/openbb_core/provider/standard_models/index_historical.py @@ -27,10 +27,6 @@ class IndexHistoricalQueryParams(QueryParams): end_date: Optional[dateType] = Field( description=QUERY_DESCRIPTIONS.get("end_date", ""), default=None ) - interval: Optional[str] = Field( - default="1d", - description=QUERY_DESCRIPTIONS.get("interval", ""), - ) @field_validator("symbol", mode="before", check_fields=False) @classmethod @@ -38,12 +34,6 @@ def to_upper(cls, v: str) -> str: """Convert field to uppercase.""" return v.upper() - @field_validator("sort", mode="before", check_fields=False) - @classmethod - def to_lower(cls, v: Optional[str]) -> Optional[str]: - """Convert field to lowercase.""" - return v.lower() if v else v - class IndexHistoricalData(Data): """Index Historical Data.""" diff --git a/openbb_platform/openbb/assets/reference.json b/openbb_platform/openbb/assets/reference.json index 5cd193de7dbd..f78831925bdf 100644 --- a/openbb_platform/openbb/assets/reference.json +++ b/openbb_platform/openbb/assets/reference.json @@ -77,7 +77,15 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "5m", + "15m", + "30m", + "1h", + "4h", + "1d" + ] } ], "polygon": [ @@ -113,7 +121,15 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "5m", + "15m", + "30m", + "1h", + "4h", + "1d" + ] }, { "name": "exchanges", @@ -131,7 +147,21 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q" + ] } ] }, @@ -419,7 +449,15 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "5m", + "15m", + "30m", + "1h", + "4h", + "1d" + ] } ], "polygon": [ @@ -455,7 +493,15 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "5m", + "15m", + "30m", + "1h", + "4h", + "1d" + ] } ], "yfinance": [ @@ -465,7 +511,21 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q" + ] } ] }, @@ -24618,7 +24678,7 @@ "message": null }, "description": "Get historical price data for a given stock. This includes open, high, low, close, and volume.", - "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.price.historical(symbol='AAPL', provider='fmp')\nobb.equity.price.historical(symbol='AAPL', interval='1d', provider='intrinio')\n```\n\n", + "examples": "\nExamples\n--------\n\n```python\nfrom openbb import obb\nobb.equity.price.historical(symbol='AAPL', provider='fmp')\nobb.equity.price.historical(symbol='AAPL', interval=1d, provider='intrinio')\n```\n\n", "parameters": { "standard": [ { @@ -24629,14 +24689,6 @@ "optional": false, "choices": null }, - { - "name": "interval", - "type": "str", - "description": "Time interval of the data to return.", - "default": "1d", - "optional": true, - "choices": null - }, { "name": "start_date", "type": "Union[date, str]", @@ -24661,7 +24713,15 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "5m", + "15m", + "30m", + "1h", + "4h", + "1d" + ] } ], "intrinio": [ @@ -24763,7 +24823,15 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "5m", + "15m", + "30m", + "1h", + "4h", + "1d" + ] } ], "yfinance": [ @@ -24773,7 +24841,21 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q" + ] }, { "name": "extended_hours", @@ -27229,14 +27311,6 @@ "optional": false, "choices": null }, - { - "name": "interval", - "type": "str", - "description": "Time interval of the data to return.", - "default": "1d", - "optional": true, - "choices": null - }, { "name": "start_date", "type": "Union[date, str]", @@ -27261,7 +27335,15 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "5m", + "15m", + "30m", + "1h", + "4h", + "1d" + ] } ], "intrinio": [ @@ -27363,7 +27445,15 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "5m", + "15m", + "30m", + "1h", + "4h", + "1d" + ] } ], "yfinance": [ @@ -27373,7 +27463,21 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q" + ] }, { "name": "extended_hours", @@ -34273,14 +34377,6 @@ "default": null, "optional": true, "choices": null - }, - { - "name": "interval", - "type": "str", - "description": "Time interval of the data to return.", - "default": "1d", - "optional": true, - "choices": null } ], "fmp": [ @@ -34290,7 +34386,15 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "5m", + "15m", + "30m", + "1h", + "4h", + "1d" + ] } ], "intrinio": [ @@ -34336,7 +34440,21 @@ "description": "Time interval of the data to return.", "default": "1d", "optional": true, - "choices": null + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q" + ] } ] }, diff --git a/openbb_platform/openbb/package/crypto_price.py b/openbb_platform/openbb/package/crypto_price.py index a2f6be19f54f..5489f57765b3 100644 --- a/openbb_platform/openbb/package/crypto_price.py +++ b/openbb_platform/openbb/package/crypto_price.py @@ -139,7 +139,35 @@ def historical( "polygon": {"multiple_items_allowed": True, "choices": None}, "tiingo": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}, - } + }, + "interval": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "tiingo": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ], + }, + }, }, ) ) diff --git a/openbb_platform/openbb/package/currency_price.py b/openbb_platform/openbb/package/currency_price.py index 264b4aa78216..4288d5afd737 100644 --- a/openbb_platform/openbb/package/currency_price.py +++ b/openbb_platform/openbb/package/currency_price.py @@ -142,7 +142,35 @@ def historical( "polygon": {"multiple_items_allowed": True, "choices": None}, "tiingo": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}, - } + }, + "interval": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "tiingo": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ], + }, + }, }, ) ) diff --git a/openbb_platform/openbb/package/equity_price.py b/openbb_platform/openbb/package/equity_price.py index 4dad13a2581e..f521987dd6dc 100644 --- a/openbb_platform/openbb/package/equity_price.py +++ b/openbb_platform/openbb/package/equity_price.py @@ -32,10 +32,6 @@ def historical( description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance." ), ], - interval: Annotated[ - Optional[str], - OpenBBField(description="Time interval of the data to return."), - ] = "1d", start_date: Annotated[ Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), @@ -58,14 +54,14 @@ def historical( ---------- symbol : Union[str, List[str]] Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance. - interval : Optional[str] - Time interval of the data to return. start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'tiingo', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, tiingo, yfinance. + interval : Union[Literal['1m', '5m', '15m', '30m', '1h', '4h', '1d'], Literal['1m', '5m', '10m', '15m', '30m', '60m', '1h', '1d', '1W', '1M', '1Q', '1Y'], str, Literal['1d', '1W', '1M', '1Y'], Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1W', '1M', '1Q']] + Time interval of the data to return. (provider: fmp, intrinio, polygon, tiingo, yfinance) start_time : Optional[datetime.time] Return intervals starting at the specified time on the `start_date` formatted as 'HH:MM:SS'. (provider: intrinio) end_time : Optional[datetime.time] @@ -177,7 +173,6 @@ def historical( }, standard_params={ "symbol": symbol, - "interval": interval, "start_date": start_date, "end_date": end_date, }, @@ -185,10 +180,55 @@ def historical( info={ "symbol": { "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "5m", + "10m", + "15m", + "30m", + "60m", + "1h", + "1d", + "1W", + "1M", + "1Q", + "1Y", + ], + }, "polygon": {"multiple_items_allowed": True, "choices": None}, "tiingo": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}, - } + }, + "interval": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "tiingo": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ], + }, + }, }, ) ) diff --git a/openbb_platform/openbb/package/etf.py b/openbb_platform/openbb/package/etf.py index 6bef5d52410d..f85fb255dd41 100644 --- a/openbb_platform/openbb/package/etf.py +++ b/openbb_platform/openbb/package/etf.py @@ -191,10 +191,6 @@ def historical( description="Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance." ), ], - interval: Annotated[ - Optional[str], - OpenBBField(description="Time interval of the data to return."), - ] = "1d", start_date: Annotated[ Union[datetime.date, None, str], OpenBBField(description="Start date of the data, in YYYY-MM-DD format."), @@ -217,14 +213,14 @@ def historical( ---------- symbol : Union[str, List[str]] Symbol to get data for. Multiple comma separated items allowed for provider(s): fmp, polygon, tiingo, yfinance. - interval : Optional[str] - Time interval of the data to return. start_date : Union[date, None, str] Start date of the data, in YYYY-MM-DD format. end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'tiingo', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, tiingo, yfinance. + interval : Union[Literal['1m', '5m', '15m', '30m', '1h', '4h', '1d'], Literal['1m', '5m', '10m', '15m', '30m', '60m', '1h', '1d', '1W', '1M', '1Q', '1Y'], str, Literal['1d', '1W', '1M', '1Y'], Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1W', '1M', '1Q']] + Time interval of the data to return. (provider: fmp, intrinio, polygon, tiingo, yfinance) start_time : Optional[datetime.time] Return intervals starting at the specified time on the `start_date` formatted as 'HH:MM:SS'. (provider: intrinio) end_time : Optional[datetime.time] @@ -338,7 +334,6 @@ def historical( }, standard_params={ "symbol": symbol, - "interval": interval, "start_date": start_date, "end_date": end_date, }, @@ -346,10 +341,55 @@ def historical( info={ "symbol": { "fmp": {"multiple_items_allowed": True, "choices": None}, + "intrinio": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "5m", + "10m", + "15m", + "30m", + "60m", + "1h", + "1d", + "1W", + "1M", + "1Q", + "1Y", + ], + }, "polygon": {"multiple_items_allowed": True, "choices": None}, "tiingo": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}, - } + }, + "interval": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "tiingo": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ], + }, + }, }, ) ) diff --git a/openbb_platform/openbb/package/index_price.py b/openbb_platform/openbb/package/index_price.py index 590635649771..00106a55368a 100644 --- a/openbb_platform/openbb/package/index_price.py +++ b/openbb_platform/openbb/package/index_price.py @@ -37,10 +37,6 @@ def historical( Union[datetime.date, None, str], OpenBBField(description="End date of the data, in YYYY-MM-DD format."), ] = None, - interval: Annotated[ - Optional[str], - OpenBBField(description="Time interval of the data to return."), - ] = "1d", provider: Annotated[ Optional[Literal["fmp", "intrinio", "polygon", "yfinance"]], OpenBBField( @@ -59,10 +55,10 @@ def historical( Start date of the data, in YYYY-MM-DD format. end_date : Union[date, None, str] End date of the data, in YYYY-MM-DD format. - interval : Optional[str] - Time interval of the data to return. provider : Optional[Literal['fmp', 'intrinio', 'polygon', 'yfinance']] The provider to use, by default None. If None, the priority list configured in the settings is used. Default priority: fmp, intrinio, polygon, yfinance. + interval : Union[Literal['1m', '5m', '15m', '30m', '1h', '4h', '1d'], str, Literal['1m', '2m', '5m', '15m', '30m', '60m', '90m', '1h', '1d', '5d', '1W', '1M', '1Q']] + Time interval of the data to return. (provider: fmp, polygon, yfinance) limit : Optional[int] The number of data entries to return. (provider: intrinio, polygon) sort : Literal['asc', 'desc'] @@ -127,7 +123,6 @@ def historical( "symbol": symbol, "start_date": start_date, "end_date": end_date, - "interval": interval, }, extra_params=kwargs, info={ @@ -136,7 +131,31 @@ def historical( "intrinio": {"multiple_items_allowed": True, "choices": None}, "polygon": {"multiple_items_allowed": True, "choices": None}, "yfinance": {"multiple_items_allowed": True, "choices": None}, - } + }, + "interval": { + "fmp": { + "multiple_items_allowed": False, + "choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"], + }, + "yfinance": { + "multiple_items_allowed": False, + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ], + }, + }, }, ) ) diff --git a/openbb_platform/providers/alpha_vantage/openbb_alpha_vantage/models/equity_historical.py b/openbb_platform/providers/alpha_vantage/openbb_alpha_vantage/models/equity_historical.py index 005cdd548a3c..8384587a3b7d 100644 --- a/openbb_platform/providers/alpha_vantage/openbb_alpha_vantage/models/equity_historical.py +++ b/openbb_platform/providers/alpha_vantage/openbb_alpha_vantage/models/equity_historical.py @@ -29,7 +29,10 @@ class AVEquityHistoricalQueryParams(EquityHistoricalQueryParams): Source: https://www.alphavantage.co/documentation/#time-series-data """ - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": {"choices": ["1m", "5m", "15m", "30m", "60m", "1d", "1W", "1M"]}, + } interval: Literal["1m", "5m", "15m", "30m", "60m", "1d", "1W", "1M"] = Field( default="1d", @@ -39,7 +42,7 @@ class AVEquityHistoricalQueryParams(EquityHistoricalQueryParams): description="The adjustment factor to apply. 'splits_only' is not supported for intraday data.", default="splits_only", ) - extended_hours: Optional[bool] = Field( + extended_hours: bool = Field( description="Include Pre and Post market data.", default=False, ) diff --git a/openbb_platform/providers/cboe/openbb_cboe/models/equity_historical.py b/openbb_platform/providers/cboe/openbb_cboe/models/equity_historical.py index 9947daffbfbb..044b652aecb4 100644 --- a/openbb_platform/providers/cboe/openbb_cboe/models/equity_historical.py +++ b/openbb_platform/providers/cboe/openbb_cboe/models/equity_historical.py @@ -23,7 +23,10 @@ class CboeEquityHistoricalQueryParams(EquityHistoricalQueryParams): Source: https://www.cboe.com/ """ - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": {"choices": ["1m", "1d"]}, + } interval: Literal["1m", "1d"] = Field( default="1d", diff --git a/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py b/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py index 0fc5fe084e4b..55d9fd07541f 100644 --- a/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py +++ b/openbb_platform/providers/cboe/openbb_cboe/models/index_historical.py @@ -22,7 +22,10 @@ class CboeIndexHistoricalQueryParams(IndexHistoricalQueryParams): Source: https://www.cboe.com/ """ - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": {"choices": ["1m", "1d"]}, + } interval: Literal["1m", "1d"] = Field( default="1d", diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py index 9b94a92727bf..0b552baf7a10 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/crypto_historical.py @@ -35,7 +35,10 @@ class FMPCryptoHistoricalQueryParams(CryptoHistoricalQueryParams): """ __alias_dict__ = {"start_date": "from", "end_date": "to"} - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": {"choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, + } interval: Literal["1m", "5m", "15m", "30m", "1h", "4h", "1d"] = Field( default="1d", description=QUERY_DESCRIPTIONS.get("interval", "") diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py index 58565d1edeb4..c0234f4cc076 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/currency_historical.py @@ -33,7 +33,10 @@ class FMPCurrencyHistoricalQueryParams(CurrencyHistoricalQueryParams): """ __alias_dict__ = {"start_date": "from", "end_date": "to"} - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": {"choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, + } interval: Literal["1m", "5m", "15m", "30m", "1h", "4h", "1d"] = Field( default="1d", description=QUERY_DESCRIPTIONS.get("interval", "") diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/equity_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/equity_historical.py index fa4660c25ff6..0a2eba15047a 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/equity_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/equity_historical.py @@ -33,7 +33,10 @@ class FMPEquityHistoricalQueryParams(EquityHistoricalQueryParams): """ __alias_dict__ = {"start_date": "from", "end_date": "to"} - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": {"choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, + } interval: Literal["1m", "5m", "15m", "30m", "1h", "4h", "1d"] = Field( default="1d", description=QUERY_DESCRIPTIONS.get("interval", "") diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py b/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py index 20a5523a1e21..cb8b0d416182 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/index_historical.py @@ -33,7 +33,10 @@ class FMPIndexHistoricalQueryParams(IndexHistoricalQueryParams): """ __alias_dict__ = {"start_date": "from", "end_date": "to"} - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": {"choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, + } interval: Literal["1m", "5m", "15m", "30m", "1h", "4h", "1d"] = Field( default="1d", description=QUERY_DESCRIPTIONS.get("interval", "") diff --git a/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py b/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py index dfa4d271810f..b4e1d4c25bf7 100644 --- a/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py +++ b/openbb_platform/providers/intrinio/openbb_intrinio/models/equity_historical.py @@ -32,6 +32,25 @@ class IntrinioEquityHistoricalQueryParams(EquityHistoricalQueryParams): Source: https://docs.intrinio.com/documentation/web_api/get_security_interval_prices_v2 """ + __json_schema_extra__ = { + "symbol": { + "choices": [ + "1m", + "5m", + "10m", + "15m", + "30m", + "60m", + "1h", + "1d", + "1W", + "1M", + "1Q", + "1Y", + ], + }, + } + symbol: str = Field( description="A Security identifier (Ticker, FIGI, ISIN, CUSIP, Intrinio ID)." ) diff --git a/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py b/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py index 0df0e092c2f3..ac0fbc38c81c 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/crypto_historical.py @@ -2,9 +2,9 @@ # pylint: disable=unused-argument -import warnings from datetime import datetime from typing import Any, Dict, List, Literal, Optional +from warnings import warn from dateutil.relativedelta import relativedelta from openbb_core.provider.abstract.fetcher import Fetcher @@ -20,8 +20,6 @@ ) from pydantic import Field, PrivateAttr, model_validator -_warn = warnings.warn - class TiingoCryptoHistoricalQueryParams(CryptoHistoricalQueryParams): """Tiingo Crypto Historical Price Query. @@ -35,7 +33,10 @@ class TiingoCryptoHistoricalQueryParams(CryptoHistoricalQueryParams): "end_date": "endDate", "interval": "resampleFreq", } - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": {"choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, + } interval: Literal["1m", "5m", "15m", "30m", "1h", "4h", "1d"] = Field( default="1d", description=QUERY_DESCRIPTIONS.get("interval", "") @@ -131,7 +132,7 @@ async def callback(response: ClientResponse, _: Any) -> List[Dict]: result = await response.json() symbol = response.url.query.get("tickers", "") if not result: - _warn(f"No data found the the symbol: {symbol}") + warn(f"No data found the the symbol: {symbol}") return results data = result[0].get("priceData") if "," in query.symbol: diff --git a/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py b/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py index 537db364cd4f..bcc58760ee31 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/currency_historical.py @@ -2,9 +2,9 @@ # pylint: disable=unused-argument -import warnings from datetime import datetime from typing import Any, Dict, List, Literal, Optional +from warnings import warn from dateutil.relativedelta import relativedelta from openbb_core.provider.abstract.fetcher import Fetcher @@ -20,8 +20,6 @@ ) from pydantic import Field, PrivateAttr, model_validator -_warn = warnings.warn - class TiingoCurrencyHistoricalQueryParams(CurrencyHistoricalQueryParams): """Tiingo Currency Historical Price Query. @@ -35,7 +33,10 @@ class TiingoCurrencyHistoricalQueryParams(CurrencyHistoricalQueryParams): "end_date": "endDate", "interval": "resampleFreq", } - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": {"choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, + } interval: Literal["1m", "5m", "15m", "30m", "1h", "4h", "1d"] = Field( default="1d", description=QUERY_DESCRIPTIONS.get("interval", "") @@ -112,7 +113,7 @@ async def callback(response: ClientResponse, _: Any) -> List[Dict]: result = await response.json() symbol = response.url.query.get("tickers", "") if not result: - _warn(f"No data found the the symbol: {symbol}") + warn(f"No data found the the symbol: {symbol}") return results data = result if len(data) > 0: diff --git a/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py b/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py index 0af3a97606df..5e64bef2b7c0 100644 --- a/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py +++ b/openbb_platform/providers/tiingo/openbb_tiingo/models/equity_historical.py @@ -2,9 +2,9 @@ # pylint: disable=unused-argument -import warnings from datetime import datetime from typing import Any, Dict, List, Literal, Optional +from warnings import warn from dateutil.relativedelta import relativedelta from openbb_core.provider.abstract.fetcher import Fetcher @@ -23,8 +23,6 @@ ) from pydantic import Field, PrivateAttr, model_validator -_warn = warnings.warn - class TiingoEquityHistoricalQueryParams(EquityHistoricalQueryParams): """Tiingo Equity Historical Price Query. @@ -36,7 +34,10 @@ class TiingoEquityHistoricalQueryParams(EquityHistoricalQueryParams): "start_date": "startDate", "end_date": "endDate", } - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": {"choices": ["1m", "5m", "15m", "30m", "1h", "4h", "1d"]}, + } interval: Literal["1d", "1W", "1M", "1Y"] = Field( default="1d", description=QUERY_DESCRIPTIONS.get("interval", "") @@ -144,7 +145,7 @@ async def callback(response: ClientResponse, _: Any) -> List[Dict]: symbol = response.url.parts[-2] results: List[dict] = [] if not data: - _warn(f"No data found the the symbol: {symbol}") + warn(f"No data found the the symbol: {symbol}") return results if isinstance(data, List): diff --git a/openbb_platform/providers/tradier/openbb_tradier/models/equity_historical.py b/openbb_platform/providers/tradier/openbb_tradier/models/equity_historical.py index 30cc6b540b21..9e49c732d017 100644 --- a/openbb_platform/providers/tradier/openbb_tradier/models/equity_historical.py +++ b/openbb_platform/providers/tradier/openbb_tradier/models/equity_historical.py @@ -23,7 +23,10 @@ class TradierEquityHistoricalQueryParams(EquityHistoricalQueryParams): """Tradier Equity Historical Query.""" - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": {"choices": ["1m", "5m", "15m", "1d", "1W", "1M"]}, + } interval: Literal["1m", "5m", "15m", "1d", "1W", "1M"] = Field( description=QUERY_DESCRIPTIONS.get("interval", ""), diff --git a/openbb_platform/providers/yfinance/openbb_yfinance/models/crypto_historical.py b/openbb_platform/providers/yfinance/openbb_yfinance/models/crypto_historical.py index 63799cda8773..de044d0cd838 100644 --- a/openbb_platform/providers/yfinance/openbb_yfinance/models/crypto_historical.py +++ b/openbb_platform/providers/yfinance/openbb_yfinance/models/crypto_historical.py @@ -22,7 +22,26 @@ class YFinanceCryptoHistoricalQueryParams(CryptoHistoricalQueryParams): Source: https://finance.yahoo.com/crypto/ """ - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": { + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ] + }, + } interval: Literal[ "1m", diff --git a/openbb_platform/providers/yfinance/openbb_yfinance/models/currency_historical.py b/openbb_platform/providers/yfinance/openbb_yfinance/models/currency_historical.py index ef58aada1268..befeb5cc93cb 100644 --- a/openbb_platform/providers/yfinance/openbb_yfinance/models/currency_historical.py +++ b/openbb_platform/providers/yfinance/openbb_yfinance/models/currency_historical.py @@ -22,7 +22,26 @@ class YFinanceCurrencyHistoricalQueryParams(CurrencyHistoricalQueryParams): Source: https://finance.yahoo.com/currencies/ """ - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": { + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ] + }, + } interval: Literal[ "1m", diff --git a/openbb_platform/providers/yfinance/openbb_yfinance/models/equity_historical.py b/openbb_platform/providers/yfinance/openbb_yfinance/models/equity_historical.py index a69ef23b44e6..fa9e5b25abb1 100644 --- a/openbb_platform/providers/yfinance/openbb_yfinance/models/equity_historical.py +++ b/openbb_platform/providers/yfinance/openbb_yfinance/models/equity_historical.py @@ -26,7 +26,26 @@ class YFinanceEquityHistoricalQueryParams(EquityHistoricalQueryParams): Source: https://finance.yahoo.com/ """ - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": { + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ] + }, + } interval: Literal[ "1m", diff --git a/openbb_platform/providers/yfinance/openbb_yfinance/models/index_historical.py b/openbb_platform/providers/yfinance/openbb_yfinance/models/index_historical.py index 4d11ebf310c3..9eac8f2df5e2 100644 --- a/openbb_platform/providers/yfinance/openbb_yfinance/models/index_historical.py +++ b/openbb_platform/providers/yfinance/openbb_yfinance/models/index_historical.py @@ -23,7 +23,26 @@ class YFinanceIndexHistoricalQueryParams(IndexHistoricalQueryParams): Source: https://finance.yahoo.com/world-indices """ - __json_schema_extra__ = {"symbol": {"multiple_items_allowed": True}} + __json_schema_extra__ = { + "symbol": {"multiple_items_allowed": True}, + "interval": { + "choices": [ + "1m", + "2m", + "5m", + "15m", + "30m", + "60m", + "90m", + "1h", + "1d", + "5d", + "1W", + "1M", + "1Q", + ] + }, + } interval: Literal[ "1m", From c2f5959fb184ac7f7272289f7ac8eb494e6a9b1e Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 24 Jul 2024 14:54:01 -0700 Subject: [PATCH 17/19] test params --- openbb_platform/extensions/index/integration/test_index_api.py | 1 - .../extensions/index/integration/test_index_python.py | 1 - 2 files changed, 2 deletions(-) diff --git a/openbb_platform/extensions/index/integration/test_index_api.py b/openbb_platform/extensions/index/integration/test_index_api.py index ea39b72265b3..baba6ed5c205 100644 --- a/openbb_platform/extensions/index/integration/test_index_api.py +++ b/openbb_platform/extensions/index/integration/test_index_api.py @@ -106,7 +106,6 @@ def test_index_constituents(params, headers): ), ( { - "interval": "1d", "provider": "intrinio", "start_date": "2023-01-01", "end_date": "2023-06-06", diff --git a/openbb_platform/extensions/index/integration/test_index_python.py b/openbb_platform/extensions/index/integration/test_index_python.py index 604721e0a1f9..61fdb91b79d0 100644 --- a/openbb_platform/extensions/index/integration/test_index_python.py +++ b/openbb_platform/extensions/index/integration/test_index_python.py @@ -99,7 +99,6 @@ def test_index_constituents(params, obb): ), ( { - "interval": "1d", "provider": "intrinio", "start_date": "2023-01-01", "end_date": "2023-06-06", From 06310bbf2bc40bbd86627f04ab1650f1a7a29fc2 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:07:47 -0700 Subject: [PATCH 18/19] test cassettes --- ...o_index_historical_fetcher_urllib3_v1.yaml | 20 +++++++++---------- ...o_index_historical_fetcher_urllib3_v2.yaml | 20 +++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v1.yaml b/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v1.yaml index eb35d0493840..a866cc4ede09 100644 --- a/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v1.yaml +++ b/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v1.yaml @@ -13,15 +13,15 @@ interactions: response: body: string: !!binary | - H4sIAKrP4GUAA3TUPW/bMBAG4L8iEB3tw/FTojYDWZIhS9ulRSEwFtMIkKlUotw4Rv576Xghm8sm - iQ9I3sujzuxpWOI0D3s3dr2LjrU/zyw9eNYygUJtUWxRsw07unFNH2UjGwQu3jYfmciZ0QoUyXjO - NLfQqA+Mb2XBuEaQlMJcKVOD5AQTtqhASlCaYqZYEy0oalFR5IHKAieZyljdoAFpKSZzZlF/srci - XUQODVUpt8WiRkJDqSZXyjRgyMnqnAljwNQUy2OrpeFUfySWxRbWcaRIXmStrQBLbj/vjbrmHJBc - MG+O2lgNNXVOWESmhQZuKFZkZhoJSGVWXJYUrQFOsqI5lErtTd0CLJpDyXT1qB4qrl4KRAOSs/H/ - TuDXhg2h9y+sPbOhTzK9deL1eP+6S3I5HR6mMX39cnN3m96DO1xmu5n+VndT8Et1G/p1ifPgxmp3 - 9LP77ZPaTyEOwYeY6P00x6dqd/CXH8z72BrifEoj38MQfV99jWmHSzU9Zmh9vmy7e5z9n9WH/UX3 - bhhPaWh0S+yu4332SxH2G/KW81YpQMQfSU4Pi5+PLg5T6Jbo5vjOeeLyGmoOfChma9hbKta/xO75 - UtI1qn8AAAD//wMA0dGnzyoFAAA= + H4sIACh6oWYAA3TUPW/bMBAG4L8iEB1t4vgteTOQJRmytF1aFAJjMY0AmUolyo1j5L/3lBQFmVw3 + S3xA8l7d+cIe+jmNU3/wQ9v55Nnu+4Xhj8B2TILUW5BbMGzDTn5Y8KWqVQ1cyJfNRyZzZo3mmmQi + Z0Y0vNYfmNiqggkDXFEKcqWt40oQTDZFBUpxbShmizOh4Zo6VBZ5gG64IJnOmKvBctVQTOWsAfOf + uxXpAgheU5WKpjjUKl5Tqs6VtjW35GYuZ9Jabh3F8ticsoLqD2RZbHEZBorkRTrTSN6Q1897wzkh + OJAH5s3hbGO4o74TFJEZabiwFCsys7XiQGVWDAtGa7kgWdEcWmN7U1MARXNohaNH9VAxehiI4UDu + Jt59gR8b1scuPLHdhfUdSnxq5fPp9nmPcj4f78YB3366urnG5+iP625X4+/qZoxhrq5jt8xp6v1Q + 7U9h8j8DqsMYUx9DTEhvxyk9VPtjWP9gXteWmKYzrnyNfQpd9TnhDedqvM/Q8rheu72fwq8lxMOq + O98PZ1wa/Jzat/XuX10OJ+0LwE4IHAwOAN9QjndzmE4+9WNs5+Sn9MrFX/4OhFjsptgLFhueUvu4 + lvQW1R8AAAD//wMAP3H/JioFAAA= headers: Connection: - keep-alive @@ -30,7 +30,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 29 Feb 2024 18:40:42 GMT + - Wed, 24 Jul 2024 22:03:20 GMT Transfer-Encoding: - chunked Vary: diff --git a/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v2.yaml b/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v2.yaml index 7f34b11251c9..9c97efacebb7 100644 --- a/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v2.yaml +++ b/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v2.yaml @@ -13,15 +13,15 @@ interactions: response: body: string: !!binary | - H4sIAGw7fWYAA3TUPW/bMBAG4L8iEB3tw/Fb0mYgSzJkabu0KATGYhoBMpVKlBvHyH8vnRQFmVw3 - SXxA8l4edWYPwxKnedi7setddKz9fmbpwbOWCRRqi2KLmm3Y0Y1r+ihrWSNw8bL5yETOjFagSMZz - pnkDtfrA+FYWjGsESSnMlTIWJCeYaIoKpASlKWaKNbEBRS0qijxQNcBJpjJmazQgG4rJnDWo/7O3 - Il1EDjVVKW+KRY2EmlJ1rpSpwZCT2ZwJY8BYiuWxWWk41R+JZbGFdRwpkhdpdSOgIbef94a1nAOS - C+bNYU2jwVLnhEVkWmjghmJFZqaWgFRmxWVJ0RrgJCuaQ6nU3tQtwKI5lExXj+qh4uqlQDQgORt/ - dwI/NmwIvX9i7ZkNfZLprRPPx9vnXZLL6XA3jenrp6ub6/Qe3OEy29X0u7qZgl+q69CvS5wHN1a7 - o5/dT5/UfgpxCD7ERG+nOT5Uu4O//GBex9YQ51Ma+RqG6Pvqc0w7XKrpPkPr42Xb3f3sf60+7C+6 - d8N4SkOjW2L3Nt7/q8tshf2C2HLeKguI+C3J6W7x89HFYQrdEt0cXzn/y98BH4rZDHtJxfqn2D1e - SnqL6g8AAAD//wMAN/L/XSoFAAA= + H4sIAIp6oWYAA3TUPW/bMBAG4L8iEB1t4vgteTOQJRmytF1aFAJjMY0AmUolyo1j5L/3lBQFmVw3 + S3xA8l7d+cIe+jmNU3/wQ9v55Nnu+4Xhj8B2TILUW5BbMGzDTn5Y8KWqVQ1cyJfNRyZzZo3mmmQi + Z0Y0vNYfmNiqggkDXFEKcqWt40oQTDZFBUpxbShmizOh4Zo6VBZ5gG64IJnOmKvBctVQTOWsAfOf + uxXpAgheU5WKpjjUKl5Tqs6VtjW35GYuZ9Jabh3F8ticsoLqD2RZbHEZBorkRTrTSN6Q1897wzkh + OJAH5s3hbGO4o74TFJEZabiwFCsys7XiQGVWDAtGa7kgWdEcWmN7U1MARXNohaNH9VAxehiI4UDu + Jt59gR8b1scuPLHdhfUdSnxq5fPp9nmPcj4f78YB3366urnG5+iP625X4+/qZoxhrq5jt8xp6v1Q + 7U9h8j8DqsMYUx9DTEhvxyk9VPtjWP9gXteWmKYzrnyNfQpd9TnhDedqvM/Q8rheu72fwq8lxMOq + O98PZ1wa/Jzat/XuX10OJ+0LwE4IHAwOAN9QjndzmE4+9WNs5+Sn9MrFX/4OhFjsptgLFhueUvu4 + lvQW1R8AAAD//wMAP3H/JioFAAA= headers: Connection: - keep-alive @@ -30,7 +30,7 @@ interactions: Content-Type: - application/json Date: - - Thu, 27 Jun 2024 10:14:04 GMT + - Wed, 24 Jul 2024 22:04:58 GMT Transfer-Encoding: - chunked Vary: From 98428093d8209e06fa65df063ec661ef124cdb6e Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Wed, 24 Jul 2024 15:39:04 -0700 Subject: [PATCH 19/19] new test cassettes again --- .../test_intrinio_index_historical_fetcher_urllib3_v1.yaml | 6 +++--- .../test_intrinio_index_historical_fetcher_urllib3_v2.yaml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v1.yaml b/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v1.yaml index a866cc4ede09..e0a5614f961b 100644 --- a/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v1.yaml +++ b/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v1.yaml @@ -9,11 +9,11 @@ interactions: Connection: - keep-alive method: GET - uri: https://api-v2.intrinio.com/indices/stock_market/$DJI/historical_data/level?api_key=MOCK_API_KEY&end_date=2024-02-05&interval=1d&page_size=10000&start_date=2024-01-01 + uri: https://api-v2.intrinio.com/indices/stock_market/$DJI/historical_data/level?api_key=MOCK_API_KEY&end_date=2024-02-05&page_size=10000&start_date=2024-01-01 response: body: string: !!binary | - H4sIACh6oWYAA3TUPW/bMBAG4L8iEB1t4vgteTOQJRmytF1aFAJjMY0AmUolyo1j5L/3lBQFmVw3 + H4sIAHOCoWYAA3TUPW/bMBAG4L8iEB1t4vgteTOQJRmytF1aFAJjMY0AmUolyo1j5L/3lBQFmVw3 S3xA8l7d+cIe+jmNU3/wQ9v55Nnu+4Xhj8B2TILUW5BbMGzDTn5Y8KWqVQ1cyJfNRyZzZo3mmmQi Z0Y0vNYfmNiqggkDXFEKcqWt40oQTDZFBUpxbShmizOh4Zo6VBZ5gG64IJnOmKvBctVQTOWsAfOf uxXpAgheU5WKpjjUKl5Tqs6VtjW35GYuZ9Jabh3F8ticsoLqD2RZbHEZBorkRTrTSN6Q1897wzkh @@ -30,7 +30,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 24 Jul 2024 22:03:20 GMT + - Wed, 24 Jul 2024 22:38:43 GMT Transfer-Encoding: - chunked Vary: diff --git a/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v2.yaml b/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v2.yaml index 9c97efacebb7..9a3c076b42b1 100644 --- a/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v2.yaml +++ b/openbb_platform/providers/intrinio/tests/record/http/test_intrinio_fetchers/test_intrinio_index_historical_fetcher_urllib3_v2.yaml @@ -9,11 +9,11 @@ interactions: Connection: - keep-alive method: GET - uri: https://api-v2.intrinio.com/indices/stock_market/$DJI/historical_data/level?api_key=MOCK_API_KEY&end_date=2024-02-05&interval=1d&page_size=10000&start_date=2024-01-01 + uri: https://api-v2.intrinio.com/indices/stock_market/$DJI/historical_data/level?api_key=MOCK_API_KEY&end_date=2024-02-05&page_size=10000&start_date=2024-01-01 response: body: string: !!binary | - H4sIAIp6oWYAA3TUPW/bMBAG4L8iEB1t4vgteTOQJRmytF1aFAJjMY0AmUolyo1j5L/3lBQFmVw3 + H4sIAFmCoWYAA3TUPW/bMBAG4L8iEB1t4vgteTOQJRmytF1aFAJjMY0AmUolyo1j5L/3lBQFmVw3 S3xA8l7d+cIe+jmNU3/wQ9v55Nnu+4Xhj8B2TILUW5BbMGzDTn5Y8KWqVQ1cyJfNRyZzZo3mmmQi Z0Y0vNYfmNiqggkDXFEKcqWt40oQTDZFBUpxbShmizOh4Zo6VBZ5gG64IJnOmKvBctVQTOWsAfOf uxXpAgheU5WKpjjUKl5Tqs6VtjW35GYuZ9Jabh3F8ticsoLqD2RZbHEZBorkRTrTSN6Q1897wzkh @@ -30,7 +30,7 @@ interactions: Content-Type: - application/json Date: - - Wed, 24 Jul 2024 22:04:58 GMT + - Wed, 24 Jul 2024 22:38:17 GMT Transfer-Encoding: - chunked Vary: