diff --git a/openbb_platform/extensions/platform_api/openbb_platform_api/main.py b/openbb_platform/extensions/platform_api/openbb_platform_api/main.py index f8741410ccf..44800d4c44d 100644 --- a/openbb_platform/extensions/platform_api/openbb_platform_api/main.py +++ b/openbb_platform/extensions/platform_api/openbb_platform_api/main.py @@ -94,7 +94,15 @@ if not dont_filter and os.path.exists(WIDGET_SETTINGS): def check_for_platform_extensions(fastapi_app, widgets_to_exclude) -> list: """Check for data-processing Platform extensions and add them to the widget exclude filter.""" to_check_for = ["econometrics", "quantitative", "technical"] - tags = [d["name"] for d in fastapi_app.openapi_tags if d["name"] in to_check_for] + tags = ( + [ + d.get("name") if isinstance(d, dict) and d.get("name") else d + for d in fastapi_app.openapi_tags + if d and d in to_check_for + ] + if fastapi_app.openapi_tags + else [] + ) if tags and (any(f"openbb_{mod}" in sys.modules for mod in to_check_for)): api_prefix = SystemService().system_settings.api_settings.prefix for tag in tags: diff --git a/openbb_platform/providers/nasdaq/openbb_nasdaq/app.py b/openbb_platform/providers/nasdaq/openbb_nasdaq/app.py index 75c2ce6b22e..46d65da681a 100644 --- a/openbb_platform/providers/nasdaq/openbb_nasdaq/app.py +++ b/openbb_platform/providers/nasdaq/openbb_nasdaq/app.py @@ -1,12 +1,11 @@ """OpenBB Workspace Application. This includes widgets and endpoints for fetching and displaying -SEC filings, as well as calendars for earnings, dividends, ipos, -and global economic events from the public Nasdaq website. +SEC filings, as well as calendars for earnings, dividends, and IPOs. To use this app, launch it with: -```bash +```sh openbb-api --app openbb_nasdaq.app:main --factory ``` @@ -22,7 +21,7 @@ def main(): """Return a FastAPI app instance.""" # pylint: disable=import-outside-toplevel from datetime import datetime - from typing import Annotated, Literal, Optional + from typing import Annotated, Any, Literal, Optional from async_lru import alru_cache from fastapi import Depends, FastAPI @@ -32,6 +31,9 @@ def main(): from openbb_nasdaq.models.company_filings import NasdaqCompanyFilingsFetcher from openbb_nasdaq.models.economic_calendar import NasdaqEconomicCalendarFetcher from openbb_nasdaq.models.equity_search import NasdaqEquitySearchFetcher + from openbb_nasdaq.models.historical_dividends import ( + NasdaqHistoricalDividendsFetcher, + ) from pandas import DataFrame listings = DataFrame() @@ -128,7 +130,65 @@ def main(): return docs + @alru_cache(maxsize=128) + async def download_pdf_file(document_url: str): + """Download a PDF file from the given URL.""" + # pylint: disable=import-outside-toplevel + import base64 # noqa + from openbb_core.provider.utils.helpers import make_request + + response = make_request(document_url) + response.raise_for_status() + encoded_content = base64.b64encode(response.content).decode("utf-8") + + return encoded_content + @app.get( + "/open_document", + include_in_schema=False, + ) + async def open_document( + document_url: str, + ) -> dict[str, Any]: + """Open the selected PDF filing document.""" + encoded_content: str = "" + error_message: str = "" + + try: + if document_url and document_url.startswith("http"): + encoded_content = await download_pdf_file(document_url) + + except Exception as e: # pylint: disable=broad-except + error_message = f"Error fetching document: {e.args[0]}" + + symbol = document_url.split("&symbol=", maxsplit=1)[1].split("&", maxsplit=1)[0] + form_type = ( + document_url.split("&formType=", maxsplit=1)[1] + .split("&", maxsplit=1)[0] + .replace("-", "") + ) + date_str = document_url.split("&dateFiled=", maxsplit=1)[1][:10].replace( + "-", "" + ) + filename = f"{symbol}-{date_str}-{form_type}.pdf" + content: dict[str, Any] = {} + if error_message != "": + content = { + "error_type": "download_error", + "content": error_message, + } + else: + content = { + "content": encoded_content, + "data_format": { + "data_type": "pdf", + "filename": filename, + }, + } + + return content + + @app.post( "/open_document", openapi_extra={ "widget_config": { @@ -138,6 +198,18 @@ def main(): "refetchInterval": False, "widgetId": "nasdaq_company_filings", "params": [ + { + "paramName": "symbol", + "label": "Symbol", + "description": ( + "Ticker symbol for the company." + " Foreign (dual-listed) companies may not be required to file with the SEC." + ), + "type": "endpoint", + "value": "AAPL", + "optionsEndpoint": "/get_symbol_choices", + "style": {"popupWidth": 850}, + }, { "paramName": "document_url", "label": "Document URL", @@ -153,18 +225,6 @@ def main(): "roles": ["fileSelector"], "multiSelect": True, }, - { - "paramName": "symbol", - "label": "Symbol", - "description": ( - "Ticker symbol for the company." - " Foreign (dual-listed) companies may not be required to file with the SEC." - ), - "type": "endpoint", - "value": "AAPL", - "optionsEndpoint": "/get_symbol_choices", - "style": {"popupWidth": 850}, - }, { "paramName": "year", "label": "Calendar Year", @@ -194,27 +254,20 @@ def main(): } }, ) - async def open_document( - document_url: str, - ) -> dict: - """Open the selected PDF filing document.""" - import base64 # noqa - from openbb_core.provider.utils.helpers import make_request + async def post_open_document( + params: dict, + ) -> list: + """POST request to open the selected PDF filing document(s).""" + urls = params.get("document_url", []) + documents: list = [] + if urls: + for document_url in urls: + if document_url.startswith("http"): + document = await open_document(document_url) + if document: + documents.append(document) - encoded_content: str = "" - - if document_url and document_url.startswith("http"): - response = make_request(document_url) - response.raise_for_status() - encoded_content = base64.b64encode(response.content).decode("utf-8") - - return { - "data_format": { - "data_type": "pdf", - "filename": document_url.split("/")[-1], - }, - "content": encoded_content, - } + return documents @app.get( "/earnings_calendar", @@ -229,6 +282,14 @@ def main(): "widgetId": "nasdaq_earnings_calendar", "refetchInterval": False, "params": [ + { + "paramName": "symbol", + "show": False, + "type": "endpoint", + "value": "AAPL", + "optionsEndpoint": "/get_symbol_choices", + "style": {"popupWidth": 850}, + }, { "label": "Start Date", "description": "Start date of the data.", @@ -247,6 +308,7 @@ def main(): "gridData": {"w": 40, "h": 20}, "data": { "table": { + "enableAdvanced": True, "columnsDefs": [ { "field": "surprise_percent", @@ -254,7 +316,16 @@ def main(): "cellDataType": "number", "renderFn": "greenRed", }, - ] + { + "field": "symbol", + "headerTooltip": "Click on a ticker in the column to change the SEC documents viewer.", + "renderFn": "cellOnClick", + "renderFnParams": { + "actionType": "groupBy", + "groupByParamName": "symbol", + }, + }, + ], } }, }, @@ -287,6 +358,14 @@ def main(): "widgetId": "nasdaq_dividends_calendar", "refetchInterval": False, "params": [ + { + "paramName": "symbol2", + "show": False, + "type": "endpoint", + "value": "AAPL", + "optionsEndpoint": "/get_symbol_choices", + "style": {"popupWidth": 850}, + }, { "label": "Start Date", "description": "Start date of the data.", @@ -303,6 +382,22 @@ def main(): }, ], "gridData": {"w": 40, "h": 20}, + "data": { + "table": { + "enableAdvanced": True, + "columnsDefs": [ + { + "field": "symbol", + "headerTooltip": "Click on a ticker in the column to update the historical dividends.", + "renderFn": "cellOnClick", + "renderFnParams": { + "actionType": "groupBy", + "groupByParamName": "symbol2", + }, + }, + ], + } + }, } }, ) @@ -320,6 +415,75 @@ def main(): return await fetcher.fetch_data(params, {}) # type: ignore + @app.get( + "/historical_dividends", + openapi_extra={ + "widget_config": { + "name": "Historical Dividends", + "description": "Historical dividend payments for a given symbol.", + "category": "Equity", + "subCategory": "Dividends", + "type": "table", + "searchCategory": "Equity", + "widgetId": "nasdaq_historical_dividends", + "refetchInterval": False, + "params": [ + { + "paramName": "symbol2", + "label": "Symbol", + "description": ( + "Select a ticker from the dividend calendar to update the historical dividends." + ), + "type": "endpoint", + "value": "AAPL", + "optionsEndpoint": "/get_symbol_choices", + "style": {"popupWidth": 850}, + }, + { + "label": "Start Date", + "description": ( + "Start date of the data, in YYYY-MM-DD format." + "(Default: 5 years ago)" + ), + "optional": True, + "type": "date", + "value": None, + "show": True, + "paramName": "start_date", + }, + { + "label": "End Date", + "description": ( + "End date of the data, in YYYY-MM-DD format." + "(Default: today)" + ), + "optional": True, + "type": "date", + "value": None, + "show": True, + "paramName": "end_date", + }, + ], + } + }, + response_model=list[NasdaqHistoricalDividendsFetcher.data_type], + ) + async def historical_dividends( + symbol2: str, + start_date: Optional[str] = None, + end_date: Optional[str] = None, + ): + """Get historical dividends for a given symbol.""" + fetcher = NasdaqHistoricalDividendsFetcher() + + params = { + "symbol": symbol2, + "start_date": start_date, + "end_date": end_date, + } + + return await fetcher.fetch_data(params, {}) + @app.get( "/ipo_calendar", openapi_extra={ @@ -333,6 +497,14 @@ def main(): "widgetId": "nasdaq_ipo_calendar", "refetchInterval": False, "params": [ + { + "paramName": "symbol3", + "show": False, + "type": "endpoint", + "value": "AAPL", + "optionsEndpoint": "/get_symbol_choices", + "style": {"popupWidth": 850}, + }, { "label": "Start Date", "description": "Start date of the data, in YYYY-MM-DD format.", @@ -377,6 +549,22 @@ def main(): }, ], "gridData": {"w": 40, "h": 20}, + "data": { + "table": { + "enableAdvanced": True, + "columnsDefs": [ + { + "field": "symbol", + "headerTooltip": "Click on a ticker in the column to update the historical dividends.", + "renderFn": "cellOnClick", + "renderFnParams": { + "actionType": "groupBy", + "groupByParamName": "symbol3", + }, + }, + ], + } + }, } }, ) @@ -437,6 +625,7 @@ def main(): "data": { "table": { "showAll": False, + "enableAdvanced": True, "columnsDefs": [ { "field": "date", @@ -663,7 +852,14 @@ def main(): } }, }, - } + }, + { + "i": "nasdaq_historical_dividends", + "x": 0, + "y": 12, + "w": 40, + "h": 30, + }, ], }, "ipo-calendar": { @@ -675,7 +871,7 @@ def main(): "x": 0, "y": 2, "w": 40, - "h": 21, + "h": 15, "state": { "chartView": {"enabled": False, "chartType": "line"}, "columnState": { @@ -704,7 +900,19 @@ def main(): } }, }, - } + }, + { + "i": "nasdaq_company_filings", + "x": 0, + "y": 16, + "w": 40, + "h": 30, + "state": { + "params": { + "form_group": "registration", + } + }, + }, ], }, "economic-calendar": { @@ -717,11 +925,55 @@ def main(): "y": 2, "w": 40, "h": 20, + "state": { + "chartView": {"enabled": False, "chartType": "line"}, + "columnState": { + "default": { + "sort": { + "sortModel": [ + {"colId": "date", "sort": "desc"} + ] + }, + "columnPinning": { + "leftColIds": ["date"], + "rightColIds": [], + }, + } + }, + }, } ], }, }, - "groups": [], + "groups": [ + { + "name": "Group 1", + "type": "endpointParam", + "paramName": "symbol", + "defaultValue": "AAPL", + "widgetIds": [ + "nasdaq_earnings_calendar", + "nasdaq_company_filings", + ], + }, + { + "name": "Group 2", + "type": "endpointParam", + "paramName": "symbol2", + "defaultValue": "AAPL", + "widgetIds": [ + "nasdaq_dividends_calendar", + "nasdaq_historical_dividends", + ], + }, + { + "name": "Group 3", + "type": "endpointParam", + "paramName": "document_url", + "defaultValue": "AAPL", + "widgetIds": ["nasdaq_ipo_calendar", "nasdaq_company_filings"], + }, + ], } return app 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 2049fcc04a4..2572ec2f2a5 100644 --- a/openbb_platform/providers/nasdaq/openbb_nasdaq/models/economic_calendar.py +++ b/openbb_platform/providers/nasdaq/openbb_nasdaq/models/economic_calendar.py @@ -124,6 +124,15 @@ class NasdaqEconomicCalendarFetcher( response: List = [] url = f"https://api.nasdaq.com/api/calendar/economicevents?date={date}" r_json = await amake_request(url=url, headers=IPO_HEADERS) + if ( + isinstance(r_json, dict) + and (status := r_json.get("status", {})) + and (messages := status.get("bCodeMessage", [])) + and (error_message := messages[0].get("errorMessage", "")) + ): + raise OpenBBError( + f"Nasdaq Error -> {error_message}", + ) if r_json is not None and r_json.get("data"): # type: ignore response = r_json["data"].get("rows") # type: ignore if response: diff --git a/openbb_platform/providers/nasdaq/tests/record/expected_apps.json b/openbb_platform/providers/nasdaq/tests/record/expected_apps.json index dc92c5cf18e..d2ab874a58b 100644 --- a/openbb_platform/providers/nasdaq/tests/record/expected_apps.json +++ b/openbb_platform/providers/nasdaq/tests/record/expected_apps.json @@ -6,183 +6,257 @@ "description": "View company filings and market calendars, downloaded from the public Nasdaq website. This app is not affiliated with, or authoriazed by, Nasdaq.", "allowCustomization": true, "tabs": { - "earnings": { - "id": "earnings", - "name": "Earnings Calendar & Filings", - "layout": [ - { - "i": "nasdaq_earnings_calendar", - "x": 0, - "y": 2, - "w": 40, - "h": 10, - "state": { - "chartView": { - "enabled": false, - "chartType": "line" - }, - "columnState": { - "default": { - "sort": { - "sortModel": [ - { - "colId": "market_cap", - "sort": "desc" - } - ] - }, - "columnPinning": { - "leftColIds": [ - "symbol", - "name", - "period_ending" - ], - "rightColIds": [] - }, - "columnOrder": { - "orderedColIds": [ - "report_date", - "reporting_time", - "symbol", - "name", - "market_cap", - "eps_previous", - "eps_consensus", - "num_estimates", - "eps_actual", - "surprise_percent", - "period_ending", - "previous_report_date" - ] - } - } - } - } - }, - { - "i": "nasdaq_company_filings", - "x": 0, - "y": 12, - "w": 40, - "h": 30 + "earnings": { + "id": "earnings", + "name": "Earnings Calendar & Filings", + "layout": [ + { + "i": "nasdaq_earnings_calendar", + "x": 0, + "y": 2, + "w": 40, + "h": 10, + "state": { + "chartView": { + "enabled": false, + "chartType": "line" + }, + "columnState": { + "default": { + "sort": { + "sortModel": [ + { + "colId": "market_cap", + "sort": "desc" + } + ] + }, + "columnPinning": { + "leftColIds": [ + "symbol", + "name", + "period_ending" + ], + "rightColIds": [] + }, + "columnOrder": { + "orderedColIds": [ + "report_date", + "reporting_time", + "symbol", + "name", + "market_cap", + "eps_previous", + "eps_consensus", + "num_estimates", + "eps_actual", + "surprise_percent", + "period_ending", + "previous_report_date" + ] + } } - ] - }, - "dividend-calendar": { - "id": "dividend-calendar", - "name": "Dividend Calendar", - "layout": [ - { - "i": "nasdaq_dividends_calendar", - "x": 0, - "y": 2, - "w": 40, - "h": 20, - "state": { - "chartView": { - "enabled": false, - "chartType": "line" - }, - "columnState": { - "default": { - "sort": { - "sortModel": [ - { - "colId": "ex_dividend_date", - "sort": "asc" - }, - { - "colId": "amount", - "sort": "desc" - }, - { - "colId": "annualized_amount", - "sort": "desc" - } - ] - }, - "columnPinning": { - "leftColIds": [ - "symbol", - "name" - ], - "rightColIds": [] - }, - "columnOrder": { - "orderedColIds": [ - "ex_dividend_date", - "symbol", - "amount", - "name", - "record_date", - "payment_date", - "declaration_date", - "annualized_amount" - ] - } - } - } - } + } + } + }, + { + "i": "nasdaq_company_filings", + "x": 0, + "y": 12, + "w": 40, + "h": 30 + } + ] + }, + "dividend-calendar": { + "id": "dividend-calendar", + "name": "Dividend Calendar", + "layout": [ + { + "i": "nasdaq_dividends_calendar", + "x": 0, + "y": 2, + "w": 40, + "h": 20, + "state": { + "chartView": { + "enabled": false, + "chartType": "line" + }, + "columnState": { + "default": { + "sort": { + "sortModel": [ + { + "colId": "ex_dividend_date", + "sort": "asc" + }, + { + "colId": "amount", + "sort": "desc" + }, + { + "colId": "annualized_amount", + "sort": "desc" + } + ] + }, + "columnPinning": { + "leftColIds": [ + "symbol", + "name" + ], + "rightColIds": [] + }, + "columnOrder": { + "orderedColIds": [ + "ex_dividend_date", + "symbol", + "amount", + "name", + "record_date", + "payment_date", + "declaration_date", + "annualized_amount" + ] + } } - ] - }, - "ipo-calendar": { - "id": "ipo-calendar", - "name": "IPO Calendar", - "layout": [ - { - "i": "nasdaq_ipo_calendar", - "x": 0, - "y": 2, - "w": 40, - "h": 21, - "state": { - "chartView": { - "enabled": false, - "chartType": "line" - }, - "columnState": { - "default": { - "columnPinning": { - "leftColIds": [ - "ipo_date", - "symbol", - "name" - ], - "rightColIds": [] - }, - "columnOrder": { - "orderedColIds": [ - "ipo_date", - "symbol", - "name", - "offer_amount", - "share_count", - "share_price", - "deal_status", - "exchange", - "id" - ] - } - } - } - } + } + } + }, + { + "i": "nasdaq_historical_dividends", + "x": 0, + "y": 12, + "w": 40, + "h": 30 + } + ] + }, + "ipo-calendar": { + "id": "ipo-calendar", + "name": "IPO Calendar", + "layout": [ + { + "i": "nasdaq_ipo_calendar", + "x": 0, + "y": 2, + "w": 40, + "h": 15, + "state": { + "chartView": { + "enabled": false, + "chartType": "line" + }, + "columnState": { + "default": { + "columnPinning": { + "leftColIds": [ + "ipo_date", + "symbol", + "name" + ], + "rightColIds": [] + }, + "columnOrder": { + "orderedColIds": [ + "ipo_date", + "symbol", + "name", + "offer_amount", + "share_count", + "share_price", + "deal_status", + "exchange", + "id" + ] + } } - ] - }, - "economic-calendar": { - "id": "economic-calendar", - "name": "Economic Calendar", - "layout": [ - { - "i": "nasdaq_economic_calendar", - "x": 0, - "y": 2, - "w": 40, - "h": 20 + } + } + }, + { + "i": "nasdaq_company_filings", + "x": 0, + "y": 16, + "w": 40, + "h": 30, + "state": { + "params": { + "form_group": "registration" + } + } + } + ] + }, + "economic-calendar": { + "id": "economic-calendar", + "name": "Economic Calendar", + "layout": [ + { + "i": "nasdaq_economic_calendar", + "x": 0, + "y": 2, + "w": 40, + "h": 20, + "state": { + "chartView": { + "enabled": false, + "chartType": "line" + }, + "columnState": { + "default": { + "sort": { + "sortModel": [ + { + "colId": "date", + "sort": "desc" + } + ] + }, + "columnPinning": { + "leftColIds": [ + "date" + ], + "rightColIds": [] + } } - ] - } + } + } + } + ] + } }, - "groups": [] + "groups": [ + { + "name": "Group 1", + "type": "endpointParam", + "paramName": "symbol", + "defaultValue": "AAPL", + "widgetIds": [ + "nasdaq_earnings_calendar", + "nasdaq_company_filings" + ] + }, + { + "name": "Group 2", + "type": "endpointParam", + "paramName": "symbol2", + "defaultValue": "AAPL", + "widgetIds": [ + "nasdaq_dividends_calendar", + "nasdaq_historical_dividends" + ] + }, + { + "name": "Group 3", + "type": "endpointParam", + "paramName": "document_url", + "defaultValue": "AAPL", + "widgetIds": [ + "nasdaq_ipo_calendar", + "nasdaq_company_filings" + ] + } + ] } \ No newline at end of file diff --git a/openbb_platform/providers/nasdaq/tests/record/expected_widgets.json b/openbb_platform/providers/nasdaq/tests/record/expected_widgets.json index 9a78296cc26..35a23234601 100644 --- a/openbb_platform/providers/nasdaq/tests/record/expected_widgets.json +++ b/openbb_platform/providers/nasdaq/tests/record/expected_widgets.json @@ -1,809 +1,962 @@ { "nasdaq_company_filings": { - "name": "SEC Filings", - "description": "View SEC filings by company.", - "category": "Open Document", - "type": "multi_file_viewer", - "searchCategory": "Open Document", - "widgetId": "nasdaq_company_filings", - "params": [ - { - "label": "Document URL", - "description": "Select the document to open.", - "optional": false, - "type": "endpoint", - "value": null, - "show": false, - "paramName": "document_url", - "optionsEndpoint": "/get_symbol_choices", - "optionsParams": { - "symbol": "$symbol", - "year": "$year", - "form_group": "$form_group" - }, - "roles": [ - "fileSelector" - ], - "multiSelect": true - }, - { - "paramName": "symbol", - "label": "Symbol", - "description": "Ticker symbol for the company. Foreign (dual-listed) companies may not be required to file with the SEC.", - "type": "endpoint", - "value": "AAPL", - "optionsEndpoint": "/get_symbol_choices", - "style": { - "popupWidth": 850 - } - }, - { - "paramName": "year", - "label": "Calendar Year", - "description": "Calendar year for the filings.", - "value": 2025, - "type": "number", - "options": [ - { - "label": "2025", - "value": 2025 - }, - { - "label": "2024", - "value": 2024 - }, - { - "label": "2023", - "value": 2023 - }, - { - "label": "2022", - "value": 2022 - }, - { - "label": "2021", - "value": 2021 - }, - { - "label": "2020", - "value": 2020 - }, - { - "label": "2019", - "value": 2019 - }, - { - "label": "2018", - "value": 2018 - }, - { - "label": "2017", - "value": 2017 - }, - { - "label": "2016", - "value": 2016 - }, - { - "label": "2015", - "value": 2015 - }, - { - "label": "2014", - "value": 2014 - }, - { - "label": "2013", - "value": 2013 - }, - { - "label": "2012", - "value": 2012 - }, - { - "label": "2011", - "value": 2011 - }, - { - "label": "2010", - "value": 2010 - }, - { - "label": "2009", - "value": 2009 - }, - { - "label": "2008", - "value": 2008 - }, - { - "label": "2007", - "value": 2007 - }, - { - "label": "2006", - "value": 2006 - }, - { - "label": "2005", - "value": 2005 - }, - { - "label": "2004", - "value": 2004 - }, - { - "label": "2003", - "value": 2003 - }, - { - "label": "2002", - "value": 2002 - }, - { - "label": "2001", - "value": 2001 - }, - { - "label": "2000", - "value": 2000 - }, - { - "label": "1999", - "value": 1999 - }, - { - "label": "1998", - "value": 1998 - }, - { - "label": "1997", - "value": 1997 - }, - { - "label": "1996", - "value": 1996 - }, - { - "label": "1995", - "value": 1995 - }, - { - "label": "1994", - "value": 1994 - } - ] - }, - { - "paramName": "form_group", - "label": "Form Group", - "description": "Form group for the filings.", - "value": "8k", - "type": "text", - "options": [ - { - "label": "Annual", - "value": "annual" - }, - { - "label": "Quarterly", - "value": "quarterly" - }, - { - "label": "Proxy", - "value": "proxy" - }, - { - "label": "Insider", - "value": "insider" - }, - { - "label": "8-K", - "value": "8k" - }, - { - "label": "Registration", - "value": "registration" - }, - { - "label": "Comment", - "value": "comment" - } - ] - } - ], - "endpoint": "open_document", - "runButton": false, - "gridData": { - "w": 40, - "h": 30 + "name": "SEC Filings", + "description": "View SEC filings by company.", + "category": "Open Document", + "type": "multi_file_viewer", + "searchCategory": "Open Document", + "widgetId": "nasdaq_company_filings", + "params": [ + { + "paramName": "symbol", + "label": "Symbol", + "description": "Ticker symbol for the company. Foreign (dual-listed) companies may not be required to file with the SEC.", + "type": "endpoint", + "value": "AAPL", + "optionsEndpoint": "/get_symbol_choices", + "style": { + "popupWidth": 850 + } }, - "data": { - "dataKey": "", - "table": { - "showAll": true - } + { + "paramName": "document_url", + "label": "Document URL", + "description": "Select the document to open.", + "type": "endpoint", + "optionsEndpoint": "/get_symbol_choices", + "optionsParams": { + "symbol": "$symbol", + "year": "$year", + "form_group": "$form_group" + }, + "show": false, + "roles": [ + "fileSelector" + ], + "multiSelect": true }, - "source": [ - "Custom" - ], - "refetchInterval": false + { + "paramName": "year", + "label": "Calendar Year", + "description": "Calendar year for the filings.", + "value": 2025, + "type": "number", + "options": [ + { + "label": "2025", + "value": 2025 + }, + { + "label": "2024", + "value": 2024 + }, + { + "label": "2023", + "value": 2023 + }, + { + "label": "2022", + "value": 2022 + }, + { + "label": "2021", + "value": 2021 + }, + { + "label": "2020", + "value": 2020 + }, + { + "label": "2019", + "value": 2019 + }, + { + "label": "2018", + "value": 2018 + }, + { + "label": "2017", + "value": 2017 + }, + { + "label": "2016", + "value": 2016 + }, + { + "label": "2015", + "value": 2015 + }, + { + "label": "2014", + "value": 2014 + }, + { + "label": "2013", + "value": 2013 + }, + { + "label": "2012", + "value": 2012 + }, + { + "label": "2011", + "value": 2011 + }, + { + "label": "2010", + "value": 2010 + }, + { + "label": "2009", + "value": 2009 + }, + { + "label": "2008", + "value": 2008 + }, + { + "label": "2007", + "value": 2007 + }, + { + "label": "2006", + "value": 2006 + }, + { + "label": "2005", + "value": 2005 + }, + { + "label": "2004", + "value": 2004 + }, + { + "label": "2003", + "value": 2003 + }, + { + "label": "2002", + "value": 2002 + }, + { + "label": "2001", + "value": 2001 + }, + { + "label": "2000", + "value": 2000 + }, + { + "label": "1999", + "value": 1999 + }, + { + "label": "1998", + "value": 1998 + }, + { + "label": "1997", + "value": 1997 + }, + { + "label": "1996", + "value": 1996 + }, + { + "label": "1995", + "value": 1995 + }, + { + "label": "1994", + "value": 1994 + } + ] + }, + { + "paramName": "form_group", + "label": "Form Group", + "description": "Form group for the filings.", + "value": "8k", + "type": "text", + "options": [ + { + "label": "Annual", + "value": "annual" + }, + { + "label": "Quarterly", + "value": "quarterly" + }, + { + "label": "Proxy", + "value": "proxy" + }, + { + "label": "Insider", + "value": "insider" + }, + { + "label": "8-K", + "value": "8k" + }, + { + "label": "Registration", + "value": "registration" + }, + { + "label": "Comment", + "value": "comment" + } + ] + } + ], + "endpoint": "open_document", + "runButton": false, + "gridData": { + "w": 40, + "h": 30 + }, + "data": { + "dataKey": "", + "table": { + "showAll": true + } + }, + "source": [ + "Custom" + ], + "refetchInterval": false }, "nasdaq_earnings_calendar": { - "name": "Earnings Calendar", - "description": "Upcoming, and historical, company earnings releases (US Markets).", - "category": "Equity", - "type": "table", - "searchCategory": "Equity", - "widgetId": "nasdaq_earnings_calendar", - "params": [ + "name": "Earnings Calendar", + "description": "Upcoming, and historical, company earnings releases (US Markets).", + "category": "Equity", + "type": "table", + "searchCategory": "Equity", + "widgetId": "nasdaq_earnings_calendar", + "params": [ + { + "label": "Start Date", + "description": "Start date of the data.", + "optional": true, + "type": "date", + "value": null, + "show": true, + "paramName": "start_date" + }, + { + "label": "End Date", + "description": "End date of the data.", + "optional": true, + "type": "date", + "value": null, + "show": true, + "paramName": "end_date" + }, + { + "paramName": "symbol", + "show": false, + "type": "endpoint", + "value": "AAPL", + "optionsEndpoint": "/get_symbol_choices", + "style": { + "popupWidth": 850 + } + } + ], + "endpoint": "earnings_calendar", + "runButton": false, + "gridData": { + "w": 40, + "h": 20 + }, + "data": { + "dataKey": "", + "table": { + "showAll": true, + "columnsDefs": [ { - "label": "Start Date", - "description": "Start date of the data.", - "optional": true, - "type": "date", - "value": null, - "show": true, - "paramName": "start_date" + "field": "report_date", + "formatterFn": null, + "headerName": "Report Date", + "headerTooltip": "The date of the earnings report.", + "cellDataType": "date" }, { - "label": "End Date", - "description": "End date of the data.", - "optional": true, - "type": "date", - "value": null, - "show": true, - "paramName": "end_date" + "field": "symbol", + "pinned": "left", + "formatterFn": "none", + "headerName": "Symbol", + "headerTooltip": "Click on a ticker in the column to change the SEC documents viewer.", + "cellDataType": "text", + "renderFn": "cellOnClick", + "renderFnParams": { + "actionType": "groupBy", + "groupByParamName": "symbol" + } + }, + { + "field": "name", + "pinned": "left", + "formatterFn": null, + "headerName": "Name", + "headerTooltip": "Name of the entity.", + "cellDataType": "text" + }, + { + "field": "eps_previous", + "formatterFn": null, + "headerName": "EPS Previous", + "headerTooltip": "The earnings-per-share from the same previously reported period.", + "cellDataType": "number" + }, + { + "field": "eps_consensus", + "formatterFn": null, + "headerName": "EPS Consensus", + "headerTooltip": "The analyst conesus earnings-per-share estimate.", + "cellDataType": "number" + }, + { + "field": "eps_actual", + "formatterFn": null, + "headerName": "EPS Actual", + "headerTooltip": "The actual earnings per share (USD) announced.", + "cellDataType": "number" + }, + { + "field": "surprise_percent", + "formatterFn": "normalizedPercent", + "headerName": "Surprise Percent", + "headerTooltip": "The earnings surprise as normalized percentage points.", + "cellDataType": "number", + "renderFn": "greenRed" + }, + { + "field": "num_estimates", + "formatterFn": null, + "headerName": "Num Estimates", + "headerTooltip": "The number of analysts providing estimates for the consensus.", + "cellDataType": "number" + }, + { + "field": "period_ending", + "formatterFn": null, + "headerName": "Period Ending", + "headerTooltip": "The fiscal period end date.", + "cellDataType": "text" + }, + { + "field": "previous_report_date", + "formatterFn": null, + "headerName": "Previous Report Date", + "headerTooltip": "The previous report date for the same period last year.", + "cellDataType": "date" + }, + { + "field": "reporting_time", + "formatterFn": null, + "headerName": "Reporting Time", + "headerTooltip": "The reporting time - e.g. after market close.", + "cellDataType": "text" + }, + { + "field": "market_cap", + "formatterFn": null, + "headerName": "Market Cap", + "headerTooltip": "The market cap (USD) of the reporting entity.", + "cellDataType": "number" } - ], - "endpoint": "earnings_calendar", - "runButton": false, - "gridData": { - "w": 40, - "h": 20 - }, - "data": { - "dataKey": "", - "table": { - "showAll": true, - "columnsDefs": [ - { - "field": "report_date", - "formatterFn": null, - "headerName": "Report Date", - "headerTooltip": "The date of the earnings report.", - "cellDataType": "date" - }, - { - "field": "symbol", - "pinned": "left", - "formatterFn": "none", - "headerName": "Symbol", - "headerTooltip": "Symbol representing the entity requested in the data.", - "cellDataType": "text", - "renderFn": null - }, - { - "field": "name", - "pinned": "left", - "formatterFn": null, - "headerName": "Name", - "headerTooltip": "Name of the entity.", - "cellDataType": "text" - }, - { - "field": "eps_previous", - "formatterFn": null, - "headerName": "EPS Previous", - "headerTooltip": "The earnings-per-share from the same previously reported period.", - "cellDataType": "number" - }, - { - "field": "eps_consensus", - "formatterFn": null, - "headerName": "EPS Consensus", - "headerTooltip": "The analyst conesus earnings-per-share estimate.", - "cellDataType": "number" - }, - { - "field": "eps_actual", - "formatterFn": null, - "headerName": "EPS Actual", - "headerTooltip": "The actual earnings per share (USD) announced.", - "cellDataType": "number" - }, - { - "field": "surprise_percent", - "formatterFn": "normalizedPercent", - "headerName": "Surprise Percent", - "headerTooltip": "The earnings surprise as normalized percentage points.", - "cellDataType": "number", - "renderFn": "greenRed" - }, - { - "field": "num_estimates", - "formatterFn": null, - "headerName": "Num Estimates", - "headerTooltip": "The number of analysts providing estimates for the consensus.", - "cellDataType": "number" - }, - { - "field": "period_ending", - "formatterFn": null, - "headerName": "Period Ending", - "headerTooltip": "The fiscal period end date.", - "cellDataType": "text" - }, - { - "field": "previous_report_date", - "formatterFn": null, - "headerName": "Previous Report Date", - "headerTooltip": "The previous report date for the same period last year.", - "cellDataType": "date" - }, - { - "field": "reporting_time", - "formatterFn": null, - "headerName": "Reporting Time", - "headerTooltip": "The reporting time - e.g. after market close.", - "cellDataType": "text" - }, - { - "field": "market_cap", - "formatterFn": null, - "headerName": "Market Cap", - "headerTooltip": "The market cap (USD) of the reporting entity.", - "cellDataType": "number" - } - ] - } - }, - "source": [ - "Custom" - ], - "subCategory": "Calendar", - "refetchInterval": false + ], + "enableAdvanced": true + } + }, + "source": [ + "Custom" + ], + "subCategory": "Calendar", + "refetchInterval": false }, "nasdaq_dividends_calendar": { - "name": "Dividend Calendar", - "description": "Upcoming, and historical, dividend payments (US Markets).", - "category": "Equity", - "type": "table", - "searchCategory": "Equity", - "widgetId": "nasdaq_dividends_calendar", - "params": [ + "name": "Dividend Calendar", + "description": "Upcoming, and historical, dividend payments (US Markets).", + "category": "Equity", + "type": "table", + "searchCategory": "Equity", + "widgetId": "nasdaq_dividends_calendar", + "params": [ + { + "label": "Start Date", + "description": "Start date of the data.", + "optional": true, + "type": "date", + "value": null, + "show": true, + "paramName": "start_date" + }, + { + "label": "End Date", + "description": "End date of the data.", + "optional": true, + "type": "date", + "value": null, + "show": true, + "paramName": "end_date" + }, + { + "paramName": "symbol2", + "show": false, + "type": "endpoint", + "value": "AAPL", + "optionsEndpoint": "/get_symbol_choices", + "style": { + "popupWidth": 850 + } + } + ], + "endpoint": "dividend_calendar", + "runButton": false, + "gridData": { + "w": 40, + "h": 20 + }, + "data": { + "dataKey": "", + "table": { + "showAll": true, + "columnsDefs": [ { - "label": "Start Date", - "description": "Start date of the data.", - "optional": true, - "type": "date", - "value": null, - "show": true, - "paramName": "start_date" + "field": "ex_dividend_date", + "formatterFn": null, + "headerName": "Ex Dividend Date", + "headerTooltip": "The ex-dividend date - the date on which the stock begins trading without rights to the dividend.", + "cellDataType": "date" }, { - "label": "End Date", - "description": "End date of the data.", - "optional": true, - "type": "date", - "value": null, - "show": true, - "paramName": "end_date" + "field": "symbol", + "pinned": "left", + "formatterFn": "none", + "headerName": "Symbol", + "headerTooltip": "Click on a ticker in the column to update the historical dividends.", + "cellDataType": "text", + "renderFn": "cellOnClick", + "renderFnParams": { + "actionType": "groupBy", + "groupByParamName": "symbol2" + } + }, + { + "field": "amount", + "formatterFn": null, + "headerName": "Amount", + "headerTooltip": "The dividend amount per share.", + "cellDataType": "number" + }, + { + "field": "name", + "pinned": "left", + "formatterFn": null, + "headerName": "Name", + "headerTooltip": "Name of the entity.", + "cellDataType": "text" + }, + { + "field": "record_date", + "formatterFn": null, + "headerName": "Record Date", + "headerTooltip": "The record date of ownership for eligibility.", + "cellDataType": "date" + }, + { + "field": "payment_date", + "formatterFn": null, + "headerName": "Payment Date", + "headerTooltip": "The payment date of the dividend.", + "cellDataType": "date" + }, + { + "field": "declaration_date", + "formatterFn": null, + "headerName": "Declaration Date", + "headerTooltip": "Declaration date of the dividend.", + "cellDataType": "date" + }, + { + "field": "annualized_amount", + "formatterFn": null, + "headerName": "Annualized Amount", + "headerTooltip": "The indicated annualized dividend amount.", + "cellDataType": "number" } - ], - "endpoint": "dividend_calendar", - "runButton": false, - "gridData": { - "w": 40, - "h": 20 + ], + "enableAdvanced": true + } + }, + "source": [ + "Custom" + ], + "subCategory": "Calendar", + "refetchInterval": false + }, + "nasdaq_historical_dividends": { + "name": "Historical Dividends", + "description": "Historical dividend payments for a given symbol.", + "category": "Equity", + "type": "table", + "searchCategory": "Equity", + "widgetId": "nasdaq_historical_dividends", + "params": [ + { + "label": "Symbol", + "description": "Select a ticker from the dividend calendar to update the historical dividends.", + "optional": false, + "type": "endpoint", + "value": "AAPL", + "show": true, + "paramName": "symbol2", + "optionsEndpoint": "/get_symbol_choices", + "style": { + "popupWidth": 850 + } }, - "data": { - "dataKey": "", - "table": { - "showAll": true, - "columnsDefs": [ - { - "field": "ex_dividend_date", - "formatterFn": null, - "headerName": "Ex Dividend Date", - "headerTooltip": "The ex-dividend date - the date on which the stock begins trading without rights to the dividend.", - "cellDataType": "date" - }, - { - "field": "symbol", - "pinned": "left", - "formatterFn": "none", - "headerName": "Symbol", - "headerTooltip": "Symbol representing the entity requested in the data.", - "cellDataType": "text", - "renderFn": null - }, - { - "field": "amount", - "formatterFn": null, - "headerName": "Amount", - "headerTooltip": "The dividend amount per share.", - "cellDataType": "number" - }, - { - "field": "name", - "pinned": "left", - "formatterFn": null, - "headerName": "Name", - "headerTooltip": "Name of the entity.", - "cellDataType": "text" - }, - { - "field": "record_date", - "formatterFn": null, - "headerName": "Record Date", - "headerTooltip": "The record date of ownership for eligibility.", - "cellDataType": "date" - }, - { - "field": "payment_date", - "formatterFn": null, - "headerName": "Payment Date", - "headerTooltip": "The payment date of the dividend.", - "cellDataType": "date" - }, - { - "field": "declaration_date", - "formatterFn": null, - "headerName": "Declaration Date", - "headerTooltip": "Declaration date of the dividend.", - "cellDataType": "date" - }, - { - "field": "annualized_amount", - "formatterFn": null, - "headerName": "Annualized Amount", - "headerTooltip": "The indicated annualized dividend amount.", - "cellDataType": "number" - } - ] + { + "label": "Start Date", + "description": "Start date of the data, in YYYY-MM-DD format.(Default: 5 years ago)", + "optional": true, + "type": "date", + "value": null, + "show": true, + "paramName": "start_date" + }, + { + "label": "End Date", + "description": "End date of the data, in YYYY-MM-DD format.(Default: today)", + "optional": true, + "type": "date", + "value": null, + "show": true, + "paramName": "end_date" + } + ], + "endpoint": "historical_dividends", + "runButton": false, + "gridData": { + "w": 40, + "h": 15 + }, + "data": { + "dataKey": "", + "table": { + "showAll": true, + "columnsDefs": [ + { + "field": "ex_dividend_date", + "formatterFn": null, + "headerName": "Ex Dividend Date", + "headerTooltip": "The ex-dividend date - the date on which the stock begins trading without rights to the dividend.", + "cellDataType": "date" + }, + { + "field": "amount", + "formatterFn": null, + "headerName": "Amount", + "headerTooltip": "The dividend amount per share.", + "cellDataType": "number" + }, + { + "field": "dividend_type", + "formatterFn": null, + "headerName": "Dividend Type", + "headerTooltip": "The type of dividend - i.e., cash, stock.", + "cellDataType": "text" + }, + { + "field": "currency", + "formatterFn": null, + "headerName": "Currency", + "headerTooltip": "The currency in which the dividend is paid.", + "cellDataType": "text" + }, + { + "field": "record_date", + "formatterFn": null, + "headerName": "Record Date", + "headerTooltip": "The record date of ownership for eligibility.", + "cellDataType": "date" + }, + { + "field": "payment_date", + "formatterFn": null, + "headerName": "Payment Date", + "headerTooltip": "The payment date of the dividend.", + "cellDataType": "date" + }, + { + "field": "declaration_date", + "formatterFn": null, + "headerName": "Declaration Date", + "headerTooltip": "Declaration date of the dividend.", + "cellDataType": "date" } - }, - "source": [ - "Custom" - ], - "subCategory": "Calendar", - "refetchInterval": false + ] + } + }, + "source": [ + "Custom" + ], + "subCategory": "Dividends", + "refetchInterval": false }, "nasdaq_ipo_calendar": { - "name": "IPO Calendar", - "description": "IPO announcements and calendar.", - "category": "Equity", - "type": "table", - "searchCategory": "Equity", - "widgetId": "nasdaq_ipo_calendar", - "params": [ - { - "label": "Start Date", - "description": "Start date of the data, in YYYY-MM-DD format.", - "optional": true, - "type": "date", - "value": null, - "show": true, - "paramName": "start_date" - }, - { - "label": "End Date", - "description": "End date of the data, in YYYY-MM-DD format.", - "optional": true, - "type": "date", - "value": null, - "show": true, - "paramName": "end_date" - }, - { - "label": "Status", - "description": "Status of the IPO. [upcoming, priced, or withdrawn]", - "optional": true, - "type": "text", - "show": true, - "options": [ - { - "label": "upcoming", - "value": "upcoming" - }, - { - "label": "priced", - "value": "priced" - }, - { - "label": "filed", - "value": "filed" - }, - { - "label": "withdrawn", - "value": "withdrawn" - } - ], - "paramName": "status" - }, - { - "label": "Is SPO", - "description": "If True, returns data for secondary public offerings (SPOs).", - "optional": true, - "type": "boolean", - "value": false, - "show": true, - "paramName": "is_spo" - } - ], - "endpoint": "ipo_calendar", - "runButton": false, - "gridData": { - "w": 40, - "h": 20 + "name": "IPO Calendar", + "description": "IPO announcements and calendar.", + "category": "Equity", + "type": "table", + "searchCategory": "Equity", + "widgetId": "nasdaq_ipo_calendar", + "params": [ + { + "label": "Start Date", + "description": "Start date of the data, in YYYY-MM-DD format.", + "optional": true, + "type": "date", + "value": null, + "show": true, + "paramName": "start_date" }, - "data": { - "dataKey": "", - "table": { - "showAll": true, - "columnsDefs": [ - { - "field": "symbol", - "pinned": "left", - "formatterFn": "none", - "headerName": "Symbol", - "headerTooltip": "Symbol representing the entity requested in the data.", - "cellDataType": "text", - "renderFn": null - }, - { - "field": "ipo_date", - "formatterFn": null, - "headerName": "IPO Date", - "headerTooltip": "The date of the IPO, when the stock first trades on a major exchange.", - "cellDataType": "date" - }, - { - "field": "name", - "pinned": "left", - "formatterFn": null, - "headerName": "Name", - "headerTooltip": "The name of the company.", - "cellDataType": "text" - }, - { - "field": "offer_amount", - "formatterFn": null, - "headerName": "Offer Amount", - "headerTooltip": "The dollar value of the shares offered.", - "cellDataType": "number" - }, - { - "field": "share_count", - "formatterFn": null, - "headerName": "Share Count", - "headerTooltip": "The number of shares offered.", - "cellDataType": "number" - }, - { - "field": "expected_price_date", - "formatterFn": null, - "headerName": "Expected Price Date", - "headerTooltip": "The date the pricing is expected.", - "cellDataType": "date" - }, - { - "field": "filed_date", - "formatterFn": null, - "headerName": "Filed Date", - "headerTooltip": "The date the IPO was filed.", - "cellDataType": "date" - }, - { - "field": "withdraw_date", - "formatterFn": null, - "headerName": "Withdraw Date", - "headerTooltip": "The date the IPO was withdrawn.", - "cellDataType": "date" - }, - { - "field": "deal_status", - "formatterFn": null, - "headerName": "Deal Status", - "headerTooltip": "The status of the deal.", - "cellDataType": "text" - } - ] - } + { + "label": "End Date", + "description": "End date of the data, in YYYY-MM-DD format.", + "optional": true, + "type": "date", + "value": null, + "show": true, + "paramName": "end_date" }, - "source": [ - "Custom" - ], - "subCategory": "Calendar", - "refetchInterval": false + { + "paramName": "symbol3", + "show": false, + "type": "endpoint", + "value": "AAPL", + "optionsEndpoint": "/get_symbol_choices", + "style": { + "popupWidth": 850 + } + }, + { + "label": "Status", + "description": "Status of the IPO. [upcoming, priced, or withdrawn]", + "optional": true, + "type": "text", + "show": true, + "options": [ + { + "label": "upcoming", + "value": "upcoming" + }, + { + "label": "priced", + "value": "priced" + }, + { + "label": "filed", + "value": "filed" + }, + { + "label": "withdrawn", + "value": "withdrawn" + } + ], + "paramName": "status" + }, + { + "label": "Is SPO", + "description": "If True, returns data for secondary public offerings (SPOs).", + "optional": true, + "type": "boolean", + "value": false, + "show": true, + "paramName": "is_spo" + } + ], + "endpoint": "ipo_calendar", + "runButton": false, + "gridData": { + "w": 40, + "h": 20 + }, + "data": { + "dataKey": "", + "table": { + "showAll": true, + "columnsDefs": [ + { + "field": "symbol", + "pinned": "left", + "formatterFn": "none", + "headerName": "Symbol", + "headerTooltip": "Click on a ticker in the column to update the historical dividends.", + "cellDataType": "text", + "renderFn": "cellOnClick", + "renderFnParams": { + "actionType": "groupBy", + "groupByParamName": "symbol3" + } + }, + { + "field": "ipo_date", + "formatterFn": null, + "headerName": "IPO Date", + "headerTooltip": "The date of the IPO, when the stock first trades on a major exchange.", + "cellDataType": "date" + }, + { + "field": "name", + "pinned": "left", + "formatterFn": null, + "headerName": "Name", + "headerTooltip": "The name of the company.", + "cellDataType": "text" + }, + { + "field": "offer_amount", + "formatterFn": null, + "headerName": "Offer Amount", + "headerTooltip": "The dollar value of the shares offered.", + "cellDataType": "number" + }, + { + "field": "share_count", + "formatterFn": null, + "headerName": "Share Count", + "headerTooltip": "The number of shares offered.", + "cellDataType": "number" + }, + { + "field": "expected_price_date", + "formatterFn": null, + "headerName": "Expected Price Date", + "headerTooltip": "The date the pricing is expected.", + "cellDataType": "date" + }, + { + "field": "filed_date", + "formatterFn": null, + "headerName": "Filed Date", + "headerTooltip": "The date the IPO was filed.", + "cellDataType": "date" + }, + { + "field": "withdraw_date", + "formatterFn": null, + "headerName": "Withdraw Date", + "headerTooltip": "The date the IPO was withdrawn.", + "cellDataType": "date" + }, + { + "field": "deal_status", + "formatterFn": null, + "headerName": "Deal Status", + "headerTooltip": "The status of the deal.", + "cellDataType": "text" + } + ], + "enableAdvanced": true + } + }, + "source": [ + "Custom" + ], + "subCategory": "Calendar", + "refetchInterval": false }, "nasdaq_economic_calendar": { - "name": "Economic Calendar", - "description": "Upcoming, and historical, macroeconomic events.", - "category": "Economy", - "type": "table", - "searchCategory": "Equity", - "widgetId": "nasdaq_economic_calendar", - "params": [ + "name": "Economic Calendar", + "description": "Upcoming, and historical, macroeconomic events.", + "category": "Economy", + "type": "table", + "searchCategory": "Equity", + "widgetId": "nasdaq_economic_calendar", + "params": [ + { + "label": "Start Date", + "description": "Start Date", + "optional": true, + "type": "date", + "value": null, + "show": true, + "paramName": "start_date" + }, + { + "label": "End Date", + "description": "End Date", + "optional": true, + "type": "date", + "value": null, + "show": true, + "paramName": "end_date" + }, + { + "label": "Country", + "description": "Country", + "optional": true, + "type": "text", + "value": null, + "show": true, + "paramName": "country", + "options": [ { - "label": "Start Date", - "description": "Start Date", - "optional": true, - "type": "date", - "value": null, - "show": true, - "paramName": "start_date" + "label": "United States", + "value": "united_states" }, { - "label": "End Date", - "description": "End Date", - "optional": true, - "type": "date", - "value": null, - "show": true, - "paramName": "end_date" + "label": "China", + "value": "china" }, { - "label": "Country", - "description": "Country", - "optional": true, - "type": "text", - "value": null, - "show": true, - "paramName": "country", - "options": [ - { - "label": "United States", - "value": "united_states" - }, - { - "label": "China", - "value": "china" - }, - { - "label": "Hong Kong", - "value": "hong_kong" - }, - { - "label": "Japan", - "value": "japan" - }, - { - "label": "Singapore", - "value": "signapore" - }, - { - "label": "South Korea", - "value": "south_korea" - }, - { - "label": "India", - "value": "india" - }, - { - "label": "Russia", - "value": "russia" - }, - { - "label": "Euro Zone", - "value": "euro_zone" - }, - { - "label": "Germany", - "value": "germany" - }, - { - "label": "United Kingdom", - "value": "united_kingdom" - }, - { - "label": "France", - "value": "france" - }, - { - "label": "Spain", - "value": "spain" - }, - { - "label": "Italy", - "value": "italy" - }, - { - "label": "Switzerland", - "value": "switzerland" - }, - { - "label": "Canada", - "value": "canada" - }, - { - "label": "Australia", - "value": "australia" - }, - { - "label": "New Zealand", - "value": "new_zealand" - }, - { - "label": "South Africa", - "value": "south_africa" - }, - { - "label": "Brazil", - "value": "brazil" - } - ] + "label": "Hong Kong", + "value": "hong_kong" + }, + { + "label": "Japan", + "value": "japan" + }, + { + "label": "Singapore", + "value": "signapore" + }, + { + "label": "South Korea", + "value": "south_korea" + }, + { + "label": "India", + "value": "india" + }, + { + "label": "Russia", + "value": "russia" + }, + { + "label": "Euro Zone", + "value": "euro_zone" + }, + { + "label": "Germany", + "value": "germany" + }, + { + "label": "United Kingdom", + "value": "united_kingdom" + }, + { + "label": "France", + "value": "france" + }, + { + "label": "Spain", + "value": "spain" + }, + { + "label": "Italy", + "value": "italy" + }, + { + "label": "Switzerland", + "value": "switzerland" + }, + { + "label": "Canada", + "value": "canada" + }, + { + "label": "Australia", + "value": "australia" + }, + { + "label": "New Zealand", + "value": "new_zealand" + }, + { + "label": "South Africa", + "value": "south_africa" + }, + { + "label": "Brazil", + "value": "brazil" } - ], - "endpoint": "economic_calendar", - "runButton": false, - "gridData": { - "w": 40, - "h": 20 - }, - "data": { - "dataKey": "", - "table": { - "showAll": false, - "columnsDefs": [ - { - "field": "date", - "pinned": "left", - "headerName": "Date", - "headerTooltip": "The date of the data.", - "cellDataType": "date" - }, - { - "field": "country", - "headerName": "Country", - "headerTooltip": "Country of event.", - "cellDataType": "text" - }, - { - "field": "event", - "renderFn": "hoverCard", - "renderFnParams": { - "hoverCard": { - "cellField": "value", - "markdown": "{description}" - } - }, - "headerName": "Event", - "headerTooltip": "Event name.", - "cellDataType": "text" - }, - { - "field": "consensus", - "headerName": "Consensus", - "headerTooltip": "Average forecast among a representative group of economists.", - "cellDataType": "number" - }, - { - "field": "actual", - "headerName": "Actual", - "headerTooltip": "Latest released value.", - "cellDataType": "number" - }, - { - "field": "previous", - "headerName": "Previous", - "headerTooltip": "Value for the previous period after the revision (if revision is applicable).", - "cellDataType": "number" - }, - { - "field": "revised", - "headerName": "Revised", - "headerTooltip": "Revised previous value, if applicable.", - "cellDataType": "number" - } - ] + ] + } + ], + "endpoint": "economic_calendar", + "runButton": false, + "gridData": { + "w": 40, + "h": 20 + }, + "data": { + "dataKey": "", + "table": { + "showAll": false, + "enableAdvanced": true, + "columnsDefs": [ + { + "field": "date", + "pinned": "left", + "headerName": "Date", + "headerTooltip": "The date of the data.", + "cellDataType": "date" + }, + { + "field": "country", + "headerName": "Country", + "headerTooltip": "Country of event.", + "cellDataType": "text" + }, + { + "field": "event", + "renderFn": "hoverCard", + "renderFnParams": { + "hoverCard": { + "cellField": "value", + "markdown": "{description}" + } + }, + "headerName": "Event", + "headerTooltip": "Event name.", + "cellDataType": "text" + }, + { + "field": "consensus", + "headerName": "Consensus", + "headerTooltip": "Average forecast among a representative group of economists.", + "cellDataType": "number" + }, + { + "field": "actual", + "headerName": "Actual", + "headerTooltip": "Latest released value.", + "cellDataType": "number" + }, + { + "field": "previous", + "headerName": "Previous", + "headerTooltip": "Value for the previous period after the revision (if revision is applicable).", + "cellDataType": "number" + }, + { + "field": "revised", + "headerName": "Revised", + "headerTooltip": "Revised previous value, if applicable.", + "cellDataType": "number" } - }, - "source": [ - "Custom" - ], - "subCategory": "Calendar", - "refetchInterval": false + ] + } + }, + "source": [ + "Custom" + ], + "subCategory": "Calendar", + "refetchInterval": false } } \ No newline at end of file diff --git a/openbb_platform/providers/nasdaq/tests/test_nasdaq_fetchers.py b/openbb_platform/providers/nasdaq/tests/test_nasdaq_fetchers.py index e0ce583dd39..0a2db50686d 100644 --- a/openbb_platform/providers/nasdaq/tests/test_nasdaq_fetchers.py +++ b/openbb_platform/providers/nasdaq/tests/test_nasdaq_fetchers.py @@ -45,6 +45,7 @@ def test_nasdaq_equity_search_fetcher(credentials=test_credentials): assert result is None +@pytest.mark.skip("This function is currently not working at the source.") @pytest.mark.record_http def test_nasdaq_economic_calendar_fetcher(credentials=test_credentials): """Test the Nasdaq Economic Calendar fetcher."""