From 155b9884090e5adec1d8ed17a9be80cd97276773 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Thu, 12 Oct 2023 08:47:49 -0700 Subject: [PATCH 1/6] coerce string type, add default=None --- .../providers/cboe/openbb_cboe/models/stock_search.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openbb_platform/providers/cboe/openbb_cboe/models/stock_search.py b/openbb_platform/providers/cboe/openbb_cboe/models/stock_search.py index 2b9a916f6f4c..c2f8f7312cb4 100644 --- a/openbb_platform/providers/cboe/openbb_cboe/models/stock_search.py +++ b/openbb_platform/providers/cboe/openbb_cboe/models/stock_search.py @@ -52,12 +52,12 @@ def extract_data( query: CboeStockSearchQueryParams, credentials: Optional[Dict[str, str]], **kwargs: Any, - ) -> dict: + ) -> Dict: """Return the raw data from the CBOE endpoint.""" data = {} - symbols = get_cboe_directory().reset_index().replace("nan", None) - target = "name" if not query.is_symbol else "symbol" + symbols = get_cboe_directory().reset_index() + target = "name" if query.is_symbol is False else "symbol" idx = symbols[target].str.contains(query.query, case=False) result = symbols[idx].to_dict("records") data.update({"results": result}) From e00207713f4915ee01942405341502c46bcc2a1b Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Fri, 27 Oct 2023 22:33:56 -0700 Subject: [PATCH 2/6] add price_performance endpoint from FMP --- .../etf/integration/test_etf_api.py | 21 +++++- .../etf/integration/test_etf_python.py | 20 ++++- .../extensions/etf/openbb_etf/etf_router.py | 11 +++ .../stocks/integration/test_stocks_api.py | 15 ++++ .../stocks/integration/test_stocks_python.py | 14 ++++ .../stocks/openbb_stocks/stocks_router.py | 11 +++ .../providers/fmp/openbb_fmp/__init__.py | 2 + .../openbb_fmp/models/price_performance.py | 74 +++++++++++++++++++ .../test_fmp_price_performance_fetcher.yaml | 62 ++++++++++++++++ .../providers/fmp/tests/test_fmp_fetchers.py | 10 +++ 10 files changed, 234 insertions(+), 6 deletions(-) create mode 100644 openbb_platform/providers/fmp/openbb_fmp/models/price_performance.py create mode 100644 openbb_platform/providers/fmp/tests/record/http/test_fmp_fetchers/test_fmp_price_performance_fetcher.yaml diff --git a/openbb_platform/extensions/etf/integration/test_etf_api.py b/openbb_platform/extensions/etf/integration/test_etf_api.py index e07edd1835c1..ec859942c1b7 100644 --- a/openbb_platform/extensions/etf/integration/test_etf_api.py +++ b/openbb_platform/extensions/etf/integration/test_etf_api.py @@ -20,7 +20,7 @@ def headers(): @pytest.mark.parametrize( "params", - [({})], + [({"query": None, "provider": "fmp"})], ) @pytest.mark.integration def test_etf_search(params, headers): @@ -36,8 +36,8 @@ def test_etf_search(params, headers): @pytest.mark.parametrize( "params", [ - ({"symbol": "IOO", "start_date": "2023-01-01", "end_date": "2023-06-06"}), - ({"symbol": "MISL", "start_date": "2023-01-01", "end_date": "2023-06-06"}), + ({"symbol": "IOO", "start_date": "2023-01-01", "end_date": "2023-06-06", "provider": "yfinance"}), + ({"symbol": "MISL", "start_date": "2023-01-01", "end_date": "2023-06-06", "provider": "yfinance"}), ], ) @pytest.mark.integration @@ -49,3 +49,18 @@ def test_etf_historical(params, headers): result = requests.get(url, headers=headers, timeout=10) assert isinstance(result, requests.Response) assert result.status_code == 200 + + +@pytest.mark.parametrize( + "params", + [({"symbol": "SPY,VOO,QQQ,IWM,IWN,GOVT,JNK", "provider": "fmp"})], +) +@pytest.mark.integration +def test_etf_price_performance(params, headers): + params = {p: v for p, v in params.items() if v} + + query_str = get_querystring(params, []) + url = f"http://0.0.0.0:8000/api/v1/etf/price_performance?{query_str}" + result = requests.get(url, headers=headers, timeout=10) + assert isinstance(result, requests.Response) + assert result.status_code == 200 diff --git a/openbb_platform/extensions/etf/integration/test_etf_python.py b/openbb_platform/extensions/etf/integration/test_etf_python.py index fdc8769696b3..503de3dd7260 100644 --- a/openbb_platform/extensions/etf/integration/test_etf_python.py +++ b/openbb_platform/extensions/etf/integration/test_etf_python.py @@ -19,7 +19,7 @@ def obb(pytestconfig): # pylint: disable=inconsistent-return-statements @pytest.mark.parametrize( "params", [ - ({}), + ({"query": None, "provider": "fmp"}), ], ) @pytest.mark.integration @@ -35,8 +35,8 @@ def test_etf_search(params, obb): @pytest.mark.parametrize( "params", [ - ({"symbol": "IOO", "start_date": "2023-01-01", "end_date": "2023-06-06"}), - ({"symbol": "MISL", "start_date": "2023-01-01", "end_date": "2023-06-06"}), + ({"symbol": "IOO", "start_date": "2023-01-01", "end_date": "2023-06-06", "provider": "yfinance"}), + ({"symbol": "MISL", "start_date": "2023-01-01", "end_date": "2023-06-06", "provider": "yfinance"}), ], ) @pytest.mark.integration @@ -47,3 +47,17 @@ def test_etf_historical(params, obb): assert result assert isinstance(result, OBBject) assert len(result.results) > 0 + + +@pytest.mark.parametrize( + "params", + [({"symbol": "SPY,VOO,QQQ,IWM,IWN,GOVT,JNK", "provider": "fmp"})], +) +@pytest.mark.integration +def test_etf_price_performance(params, obb): + params = {p: v for p, v in params.items() if v} + + result = obb.etf.price_performance(**params) + assert result + assert isinstance(result, OBBject) + assert len(result.results) > 0 diff --git a/openbb_platform/extensions/etf/openbb_etf/etf_router.py b/openbb_platform/extensions/etf/openbb_etf/etf_router.py index 654b8d0adfbc..470501dc4851 100644 --- a/openbb_platform/extensions/etf/openbb_etf/etf_router.py +++ b/openbb_platform/extensions/etf/openbb_etf/etf_router.py @@ -38,3 +38,14 @@ def historical( ) -> OBBject[BaseModel]: """ETF Historical Market Price.""" return OBBject(results=Query(**locals()).execute()) + + +@router.command(model="PricePerformance") +def price_performance( + cc: CommandContext, + provider_choices: ProviderChoices, + standard_params: StandardParams, + extra_params: ExtraParams, +) -> OBBject[BaseModel]: + """Price performance as a return, over different periods..""" + return OBBject(results=Query(**locals()).execute()) diff --git a/openbb_platform/extensions/stocks/integration/test_stocks_api.py b/openbb_platform/extensions/stocks/integration/test_stocks_api.py index 1469edc6af23..071be5b39679 100644 --- a/openbb_platform/extensions/stocks/integration/test_stocks_api.py +++ b/openbb_platform/extensions/stocks/integration/test_stocks_api.py @@ -946,3 +946,18 @@ def test_stocks_info(params, headers): result = requests.get(url, headers=headers, timeout=10) assert isinstance(result, requests.Response) assert result.status_code == 200 + + +@pytest.mark.parametrize( + "params", + [({"symbol": "AAPL,NVDA,QQQ,INTC", "provider": "fmp"})], +) +@pytest.mark.integration +def test_stocks_price_performance(params, headers): + params = {p: v for p, v in params.items() if v} + + query_str = get_querystring(params, []) + url = f"http://0.0.0.0:8000/api/v1/stocks/price_performance?{query_str}" + result = requests.get(url, headers=headers, timeout=10) + assert isinstance(result, requests.Response) + assert result.status_code == 200 diff --git a/openbb_platform/extensions/stocks/integration/test_stocks_python.py b/openbb_platform/extensions/stocks/integration/test_stocks_python.py index 9ce6bdb186d1..123a4446effb 100644 --- a/openbb_platform/extensions/stocks/integration/test_stocks_python.py +++ b/openbb_platform/extensions/stocks/integration/test_stocks_python.py @@ -894,3 +894,17 @@ def test_stocks_info(params, obb): assert result assert isinstance(result, OBBject) assert len(result.results) > 0 + + +@pytest.mark.parametrize( + "params", + [({"symbol": "AAPL,NVDA,QQQ,INTC", "provider": "fmp"})], +) +@pytest.mark.integration +def test_stocks_price_performance(params, obb): + params = {p: v for p, v in params.items() if v} + + result = obb.stocks.price_performance(**params) + assert result + assert isinstance(result, OBBject) + assert len(result.results) > 0 diff --git a/openbb_platform/extensions/stocks/openbb_stocks/stocks_router.py b/openbb_platform/extensions/stocks/openbb_stocks/stocks_router.py index 07e3a3158196..83d2fdb01a9a 100644 --- a/openbb_platform/extensions/stocks/openbb_stocks/stocks_router.py +++ b/openbb_platform/extensions/stocks/openbb_stocks/stocks_router.py @@ -97,3 +97,14 @@ def info( ) -> OBBject[BaseModel]: """Stock Info. Get general price and performance metrics of a stock.""" return OBBject(results=Query(**locals()).execute()) + + +@router.command(model="PricePerformance") +def price_performance( + cc: CommandContext, + provider_choices: ProviderChoices, + standard_params: StandardParams, + extra_params: ExtraParams, +) -> OBBject[BaseModel]: + """Price performance as a return, over different periods..""" + return OBBject(results=Query(**locals()).execute()) diff --git a/openbb_platform/providers/fmp/openbb_fmp/__init__.py b/openbb_platform/providers/fmp/openbb_fmp/__init__.py index 5b03b72e2b67..78a3730358c2 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/__init__.py +++ b/openbb_platform/providers/fmp/openbb_fmp/__init__.py @@ -29,6 +29,7 @@ FMPMajorIndicesConstituentsFetcher, ) from openbb_fmp.models.major_indices_historical import FMPMajorIndicesHistoricalFetcher +from openbb_fmp.models.price_performance import FMPPricePerformanceFetcher from openbb_fmp.models.price_target import FMPPriceTargetFetcher from openbb_fmp.models.price_target_consensus import FMPPriceTargetConsensusFetcher from openbb_fmp.models.revenue_business_line import FMPRevenueBusinessLineFetcher @@ -96,5 +97,6 @@ "DividendCalendar": FMPDividendCalendarFetcher, "StockQuote": FMPStockQuoteFetcher, "FinancialRatios": FMPFinancialRatiosFetcher, + "PricePerformance": FMPPricePerformanceFetcher }, ) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/price_performance.py b/openbb_platform/providers/fmp/openbb_fmp/models/price_performance.py new file mode 100644 index 000000000000..b8e5f6c9ebb8 --- /dev/null +++ b/openbb_platform/providers/fmp/openbb_fmp/models/price_performance.py @@ -0,0 +1,74 @@ +"""FMP Price Performance Model""" + + +from datetime import date +from typing import Any, Dict, List, Optional + +from dateutil.relativedelta import relativedelta +from openbb_fmp.utils.helpers import create_url, get_data_one +from openbb_provider.abstract.fetcher import Fetcher +from openbb_provider.standard_models.recent_performance import ( + RecentPerformanceData, + RecentPerformanceQueryParams, +) +from pydantic import Field + + +class FMPPricePerformanceQueryParams(RecentPerformanceQueryParams): + """FMP Price Performance query. + + Source: https://site.financialmodelingprep.com/developer/docs/stock-split-calendar-api/ + """ + + +class FMPPricePerformanceData(RecentPerformanceData): + """FMP Price Performance data.""" + + symbol: str = Field(description="The ticker symbol.") + + __alias_dict__ = { + "one_day": "1D", + "one_week": "5D", + "one_month": "1M", + "three_month": "3M", + "six_month": "6M", + "one_year": "1Y", + "three_year": "3Y", + "five_year": "5Y", + "ten_year": "10Y", + } + + +class FMPPricePerformanceFetcher( + Fetcher[ + FMPPricePerformanceQueryParams, + List[FMPPricePerformanceData], + ] +): + """Transform the query, extract and transform the data from the FMP endpoints.""" + + @staticmethod + def transform_query(params: Dict[str, Any]) -> FMPPricePerformanceQueryParams: + """Transform the query params.""" + return FMPPricePerformanceQueryParams(**params) + + @staticmethod + def extract_data( + query: FMPPricePerformanceQueryParams, + credentials: Optional[Dict[str, str]], + **kwargs: Any, + ) -> Dict: + """Return the raw data from the FMP endpoint.""" + api_key = credentials.get("fmp_api_key") if credentials else "" + + url = f"https://financialmodelingprep.com/api/v3/stock-price-change/{query.symbol}?apikey={api_key}" + + data = get_data_one(url, **kwargs) + return data if 0 in data else {0: data} + + @staticmethod + def transform_data( + data: Dict, + **kwargs: Any, + ) -> List[FMPPricePerformanceData]: + return [FMPPricePerformanceData.model_validate(data[i]) for i in data] diff --git a/openbb_platform/providers/fmp/tests/record/http/test_fmp_fetchers/test_fmp_price_performance_fetcher.yaml b/openbb_platform/providers/fmp/tests/record/http/test_fmp_fetchers/test_fmp_price_performance_fetcher.yaml new file mode 100644 index 000000000000..d268286ee737 --- /dev/null +++ b/openbb_platform/providers/fmp/tests/record/http/test_fmp_fetchers/test_fmp_price_performance_fetcher.yaml @@ -0,0 +1,62 @@ +interactions: +- request: + body: null + headers: + Accept: + - '*/*' + Accept-Encoding: + - gzip, deflate, br + Connection: + - keep-alive + method: GET + uri: https://financialmodelingprep.com/api/v3/stock-price-change/AAPL,SPY,QQQ,MSFT,AMZN,GOOG?apikey=MOCK_API_KEY + response: + body: + string: !!binary | + H4sIAAAAAAAAA32UP28UQQzF+3yK09WJNf47HrqTEGk4klNoQkQBoiSigIII8d3x7qyHzIlQbPO0 + 6/X7+dkPF7vdr3h2u/33p8fP377uX+32h8Pt2/1lV/F1KAVqs7YpuihXAkWELN86LhoCNau0adw1 + gsZuKdoqFkAkx5Yln358CZkFtBTzrHkfGhpglcJZc9FEgCoWzH4WjbBC4cr5HyyLWt2hYZNUHz/9 + XGpyacYgzUlD/335LwZ3t/cTguhZlLOPzoBBGw6/nQGDlarJpTNoQNxa+koEEo25Sr7aGVRwKa0+ + R+BQauOUuLsFiZKjm0VTBRNGmQAgc2Cx8XUH4EHa2FFedH86nc4CIP4X+Ga+sckcAIKYlWYL3bwD + I8s0/xpxQkke2/ALqKGPeqtNA5Uqo96qEaDJ0FbriBgvOs7D58iOcNWk1L1rNSAnf9H68e7N+zPv + 6mOgumVBq1Y3TySrfQURZJ3cl4iqolbKLlYADjH7mtIGoIJZZP05AImSWtoEQGN26p6/GelX55Ji + B+BUgZDH5x0Ac1tS0fB/6T8cP7ybIBg4U04sIZBQaTRiuEJA4FbLOYTQzIpPKYjxMFZLhJ2CeCyA + jbj0G6CARDptwFXkgAznHJhBoUjMRMGQY/3I5xjEDWCtsUVO/CKF65ub6/MjUJjGP1cJCzQrnKes + L0JcLUacF0GgxcmbCDC4NUxYIwdqbb6CMa8wy3MOeCGFUw5QcGmmjo/7IsQVRKaWpDsBcbbF+cXH + P2eCaLUEBgAA + headers: + Access-Control-Allow-Credentials: + - 'true' + Access-Control-Allow-Headers: + - X-Requested-With, content-type, auth-token, Authorization, stripe-signature, + APPS + Access-Control-Allow-Methods: + - GET, POST, OPTIONS + Access-Control-Allow-Origin: + - '*' + Access-Control-Max-Age: + - '3600' + Connection: + - keep-alive + Content-Encoding: + - gzip + Content-Type: + - application/json; charset=utf-8 + Date: + - Sat, 28 Oct 2023 05:22:03 GMT + ETag: + - W/"604-kWkPmala6K7vrDTi6htNqwejLFY" + Server: + - nginx/1.18.0 (Ubuntu) + Transfer-Encoding: + - chunked + Vary: + - Accept-Encoding + X-Frame-Options: + - SAMEORIGIN + X-Powered-By: + - Express + status: + code: 200 + message: OK +version: 1 diff --git a/openbb_platform/providers/fmp/tests/test_fmp_fetchers.py b/openbb_platform/providers/fmp/tests/test_fmp_fetchers.py index 3152cbed6e35..261bc417414a 100644 --- a/openbb_platform/providers/fmp/tests/test_fmp_fetchers.py +++ b/openbb_platform/providers/fmp/tests/test_fmp_fetchers.py @@ -32,6 +32,7 @@ FMPMajorIndicesConstituentsFetcher, ) from openbb_fmp.models.major_indices_historical import FMPMajorIndicesHistoricalFetcher +from openbb_fmp.models.price_performance import FMPPricePerformanceFetcher from openbb_fmp.models.price_target import FMPPriceTargetFetcher from openbb_fmp.models.price_target_consensus import FMPPriceTargetConsensusFetcher from openbb_fmp.models.revenue_business_line import FMPRevenueBusinessLineFetcher @@ -465,3 +466,12 @@ def test_fmp_etf_search_fetcher(credentials=test_credentials): fetcher = FMPEtfSearchFetcher() result = fetcher.test(params, credentials) assert result is None + + +@pytest.mark.record_http +def test_fmp_price_performance_fetcher(credentials=test_credentials): + params = {"symbol": "AAPL,SPY,QQQ,MSFT,AMZN,GOOG"} + + fetcher = FMPPricePerformanceFetcher() + result = fetcher.test(params, credentials) + assert result is None From 61105c277796de268aa6627daa54427e6fe07b47 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Fri, 27 Oct 2023 22:50:02 -0700 Subject: [PATCH 3/6] black --- .../extensions/etf/integration/test_etf_api.py | 18 ++++++++++++++++-- .../etf/integration/test_etf_python.py | 18 ++++++++++++++++-- .../providers/fmp/openbb_fmp/__init__.py | 2 +- 3 files changed, 33 insertions(+), 5 deletions(-) diff --git a/openbb_platform/extensions/etf/integration/test_etf_api.py b/openbb_platform/extensions/etf/integration/test_etf_api.py index ec859942c1b7..f9c52259c3d1 100644 --- a/openbb_platform/extensions/etf/integration/test_etf_api.py +++ b/openbb_platform/extensions/etf/integration/test_etf_api.py @@ -36,8 +36,22 @@ def test_etf_search(params, headers): @pytest.mark.parametrize( "params", [ - ({"symbol": "IOO", "start_date": "2023-01-01", "end_date": "2023-06-06", "provider": "yfinance"}), - ({"symbol": "MISL", "start_date": "2023-01-01", "end_date": "2023-06-06", "provider": "yfinance"}), + ( + { + "symbol": "IOO", + "start_date": "2023-01-01", + "end_date": "2023-06-06", + "provider": "yfinance", + } + ), + ( + { + "symbol": "MISL", + "start_date": "2023-01-01", + "end_date": "2023-06-06", + "provider": "yfinance", + } + ), ], ) @pytest.mark.integration diff --git a/openbb_platform/extensions/etf/integration/test_etf_python.py b/openbb_platform/extensions/etf/integration/test_etf_python.py index 503de3dd7260..4d9273a91f86 100644 --- a/openbb_platform/extensions/etf/integration/test_etf_python.py +++ b/openbb_platform/extensions/etf/integration/test_etf_python.py @@ -35,8 +35,22 @@ def test_etf_search(params, obb): @pytest.mark.parametrize( "params", [ - ({"symbol": "IOO", "start_date": "2023-01-01", "end_date": "2023-06-06", "provider": "yfinance"}), - ({"symbol": "MISL", "start_date": "2023-01-01", "end_date": "2023-06-06", "provider": "yfinance"}), + ( + { + "symbol": "IOO", + "start_date": "2023-01-01", + "end_date": "2023-06-06", + "provider": "yfinance", + } + ), + ( + { + "symbol": "MISL", + "start_date": "2023-01-01", + "end_date": "2023-06-06", + "provider": "yfinance", + } + ), ], ) @pytest.mark.integration diff --git a/openbb_platform/providers/fmp/openbb_fmp/__init__.py b/openbb_platform/providers/fmp/openbb_fmp/__init__.py index 78a3730358c2..38669df16f69 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/__init__.py +++ b/openbb_platform/providers/fmp/openbb_fmp/__init__.py @@ -97,6 +97,6 @@ "DividendCalendar": FMPDividendCalendarFetcher, "StockQuote": FMPStockQuoteFetcher, "FinancialRatios": FMPFinancialRatiosFetcher, - "PricePerformance": FMPPricePerformanceFetcher + "PricePerformance": FMPPricePerformanceFetcher, }, ) From d11e8d19bc311de95e345216d0402dabf4c91bfe Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Fri, 27 Oct 2023 22:53:00 -0700 Subject: [PATCH 4/6] extra period in docstring --- openbb_platform/extensions/etf/openbb_etf/etf_router.py | 2 +- .../extensions/stocks/openbb_stocks/stocks_router.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/openbb_platform/extensions/etf/openbb_etf/etf_router.py b/openbb_platform/extensions/etf/openbb_etf/etf_router.py index 470501dc4851..4a78607664c7 100644 --- a/openbb_platform/extensions/etf/openbb_etf/etf_router.py +++ b/openbb_platform/extensions/etf/openbb_etf/etf_router.py @@ -47,5 +47,5 @@ def price_performance( standard_params: StandardParams, extra_params: ExtraParams, ) -> OBBject[BaseModel]: - """Price performance as a return, over different periods..""" + """Price performance as a return, over different periods.""" return OBBject(results=Query(**locals()).execute()) diff --git a/openbb_platform/extensions/stocks/openbb_stocks/stocks_router.py b/openbb_platform/extensions/stocks/openbb_stocks/stocks_router.py index 83d2fdb01a9a..19408ff6d5e7 100644 --- a/openbb_platform/extensions/stocks/openbb_stocks/stocks_router.py +++ b/openbb_platform/extensions/stocks/openbb_stocks/stocks_router.py @@ -106,5 +106,5 @@ def price_performance( standard_params: StandardParams, extra_params: ExtraParams, ) -> OBBject[BaseModel]: - """Price performance as a return, over different periods..""" + """Price performance as a return, over different periods.""" return OBBject(results=Query(**locals()).execute()) From 73264ab1dd9bf6b304cbcc57244e363e77f44e37 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Fri, 27 Oct 2023 22:56:48 -0700 Subject: [PATCH 5/6] ruff --- .../providers/fmp/openbb_fmp/models/price_performance.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/openbb_platform/providers/fmp/openbb_fmp/models/price_performance.py b/openbb_platform/providers/fmp/openbb_fmp/models/price_performance.py index b8e5f6c9ebb8..edae55a5dbdd 100644 --- a/openbb_platform/providers/fmp/openbb_fmp/models/price_performance.py +++ b/openbb_platform/providers/fmp/openbb_fmp/models/price_performance.py @@ -1,11 +1,9 @@ """FMP Price Performance Model""" -from datetime import date from typing import Any, Dict, List, Optional -from dateutil.relativedelta import relativedelta -from openbb_fmp.utils.helpers import create_url, get_data_one +from openbb_fmp.utils.helpers import get_data_one from openbb_provider.abstract.fetcher import Fetcher from openbb_provider.standard_models.recent_performance import ( RecentPerformanceData, From 1f721595167a058d08fea90b94e3535f82b3bfc2 Mon Sep 17 00:00:00 2001 From: Danglewood <85772166+deeleeramone@users.noreply.github.com> Date: Mon, 30 Oct 2023 13:16:32 -0700 Subject: [PATCH 6/6] forgot one file --- .../providers/cboe/openbb_cboe/models/stock_search.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/openbb_platform/providers/cboe/openbb_cboe/models/stock_search.py b/openbb_platform/providers/cboe/openbb_cboe/models/stock_search.py index b10adad8b87c..6a5969f43361 100644 --- a/openbb_platform/providers/cboe/openbb_cboe/models/stock_search.py +++ b/openbb_platform/providers/cboe/openbb_cboe/models/stock_search.py @@ -56,11 +56,7 @@ def extract_data( """Return the raw data from the CBOE endpoint.""" data = {} -<<<<<<< HEAD - symbols = get_cboe_directory().reset_index() -======= symbols = get_cboe_directory().reset_index().replace("nan", None) ->>>>>>> 5c0b856816e091f17a5ee6804fe0bf3c12333f34 target = "name" if query.is_symbol is False else "symbol" idx = symbols[target].str.contains(query.query, case=False) result = symbols[idx].to_dict("records")