mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-03 07:51:49 +00:00
Merge branch 'develop' into feature/charting-obbject
This commit is contained in:
@@ -101,6 +101,7 @@ class CboeIndexHistoricalFetcher(
|
||||
|
||||
return CboeIndexHistoricalQueryParams(**transformed_params)
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
@staticmethod
|
||||
async def aextract_data(
|
||||
query: CboeIndexHistoricalQueryParams,
|
||||
@@ -108,7 +109,6 @@ class CboeIndexHistoricalFetcher(
|
||||
**kwargs: Any,
|
||||
) -> List[Dict]:
|
||||
"""Return the raw data from the Cboe endpoint."""
|
||||
|
||||
symbols = query.symbol.split(",")
|
||||
INDEXES = await get_index_directory(use_cache=query.use_cache)
|
||||
INDEXES = INDEXES.set_index("index_symbol")
|
||||
@@ -156,6 +156,7 @@ class CboeIndexHistoricalFetcher(
|
||||
|
||||
return await amake_requests(urls, **kwargs)
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
@staticmethod
|
||||
def transform_data(
|
||||
query: CboeIndexHistoricalQueryParams, data: List[Dict], **kwargs: Any
|
||||
|
||||
@@ -78,9 +78,10 @@ class FREDDiscountWindowPrimaryCreditRateFetcher(
|
||||
|
||||
return data
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
@staticmethod
|
||||
def transform_data(
|
||||
query: FREDDiscountWindowPrimaryCreditRateParams, data: list, **kwargs: Any
|
||||
) -> List[FREDDiscountWindowPrimaryCreditRateData]:
|
||||
"""Transform data"""
|
||||
"""Transform data."""
|
||||
return [FREDDiscountWindowPrimaryCreditRateData.model_validate(d) for d in data]
|
||||
|
||||
@@ -122,7 +122,6 @@ class FredSeriesFetcher(
|
||||
**kwargs: Any,
|
||||
) -> Dict:
|
||||
"""Extract data."""
|
||||
|
||||
api_key = credentials.get("fred_api_key") if credentials else ""
|
||||
|
||||
base_url = "https://api.stlouisfed.org/fred/series/observations"
|
||||
@@ -186,6 +185,7 @@ class FredSeriesFetcher(
|
||||
|
||||
return data
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
@staticmethod
|
||||
def transform_data(
|
||||
query: FredSeriesQueryParams, data: Dict, **kwargs: Any
|
||||
|
||||
@@ -38,6 +38,7 @@ class NasdaqSP500MultiplesFetcher(
|
||||
|
||||
@staticmethod
|
||||
def transform_query(params: Dict[str, Any]) -> NasdaqSP500MultiplesQueryParams:
|
||||
"""Transform the query."""
|
||||
return NasdaqSP500MultiplesQueryParams(**params)
|
||||
|
||||
@staticmethod
|
||||
@@ -71,6 +72,7 @@ class NasdaqSP500MultiplesFetcher(
|
||||
|
||||
return data.to_dict("records")
|
||||
|
||||
# pylint: disable=unused-argument
|
||||
@staticmethod
|
||||
def transform_data(
|
||||
query: NasdaqSP500MultiplesQueryParams,
|
||||
|
||||
@@ -310,7 +310,6 @@ class SecEtfHoldingsFetcher(
|
||||
**kwargs: Any,
|
||||
) -> Dict:
|
||||
"""Return the raw data from the SEC endpoint."""
|
||||
|
||||
filing_candidates = pd.DataFrame.from_records(
|
||||
get_nport_candidates(symbol=query.symbol, use_cache=query.use_cache)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user