mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-11-26 11:12:50 +00:00
feat: balance sheet growth
This commit is contained in:
@@ -21,11 +21,9 @@ class BalanceSheetGrowthQueryParams(QueryParams):
|
||||
|
||||
@field_validator("symbol", mode="before", check_fields=False)
|
||||
@classmethod
|
||||
def upper_symbol(cls, v: Union[str, List[str], Set[str]]):
|
||||
def upper_symbol(cls, v: str):
|
||||
"""Convert symbol to uppercase."""
|
||||
if isinstance(v, str):
|
||||
return v.upper()
|
||||
return ",".join([symbol.upper() for symbol in list(v)])
|
||||
return v.upper()
|
||||
|
||||
|
||||
class BalanceSheetGrowthData(Data):
|
||||
|
||||
@@ -8,6 +8,7 @@ from openbb_core.provider.standard_models.balance_sheet_growth import (
|
||||
BalanceSheetGrowthData,
|
||||
BalanceSheetGrowthQueryParams,
|
||||
)
|
||||
from openbb_core.provider.utils.validators import check_single
|
||||
from openbb_fmp.utils.helpers import create_url, get_data_many
|
||||
from pydantic import field_validator
|
||||
|
||||
@@ -18,6 +19,11 @@ class FMPBalanceSheetGrowthQueryParams(BalanceSheetGrowthQueryParams):
|
||||
Source: https://site.financialmodelingprep.com/developer/docs/#Financial-Statements-Growth
|
||||
"""
|
||||
|
||||
@field_validator("symbol", mode="before", check_fields=False)
|
||||
@classmethod
|
||||
def validate_symbol(cls, v: str) -> str:
|
||||
return check_single(v)
|
||||
|
||||
|
||||
class FMPBalanceSheetGrowthData(BalanceSheetGrowthData):
|
||||
"""FMP Balance Sheet Growth Data."""
|
||||
|
||||
Reference in New Issue
Block a user