mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 05:21:48 +00:00
Improvements
This commit is contained in:
@@ -19,7 +19,7 @@ from builtin_providers.polygon.types import PolygonFundamentalQueryParams
|
||||
|
||||
|
||||
class PolygonBalanceSheetQueryParams(PolygonFundamentalQueryParams):
|
||||
"""Source: https://polygon.io/docs/stocks#!/get_vx_reference_financials"""
|
||||
__doc__ = PolygonFundamentalQueryParams.__doc__
|
||||
|
||||
|
||||
class PolygonBalanceSheetData(Data):
|
||||
|
||||
@@ -24,7 +24,7 @@ from builtin_providers.polygon.types import PolygonFundamentalQueryParams
|
||||
|
||||
|
||||
class PolygonCashFlowStatementQueryParams(PolygonFundamentalQueryParams):
|
||||
"""Source: https://polygon.io/docs/stocks#!/get_vx_reference_financials"""
|
||||
__doc__ = PolygonFundamentalQueryParams.__doc__
|
||||
|
||||
|
||||
class PolygonCashFlowStatementData(Data):
|
||||
@@ -34,7 +34,6 @@ class PolygonCashFlowStatementData(Data):
|
||||
filing_date: dateType
|
||||
acceptance_datetime: Optional[datetime]
|
||||
fiscal_period: Optional[str] = Field(alias="period")
|
||||
# exchange_gain_losses: int
|
||||
net_cash_flow: int
|
||||
net_cash_flow_from_financing_activities: int
|
||||
net_cash_flow_from_investing_activities: int
|
||||
|
||||
@@ -22,7 +22,7 @@ from builtin_providers.polygon.types import PolygonFundamentalQueryParams
|
||||
|
||||
|
||||
class PolygonIncomeStatementQueryParams(PolygonFundamentalQueryParams):
|
||||
"""Source: https://polygon.io/docs/stocks#!/get_vx_reference_financials"""
|
||||
__doc__ = PolygonFundamentalQueryParams.__doc__
|
||||
|
||||
|
||||
class PolygonIncomeStatementData(Data):
|
||||
|
||||
@@ -23,6 +23,54 @@ class Timespan(str, Enum):
|
||||
|
||||
|
||||
class PolygonFundamentalQueryParams(QueryParams):
|
||||
"""Polygon Fundamental QueryParams.
|
||||
|
||||
Source: https://polygon.io/docs/stocks#!/get_vx_reference_financials
|
||||
|
||||
Parameter
|
||||
---------
|
||||
symbol : Optional[str]
|
||||
The symbol of the company if no CIK is provided.
|
||||
cik : Optional[str]
|
||||
The CIK of the company if no symbol is provided.
|
||||
company_name : Optional[str]
|
||||
The name of the company.
|
||||
company_name_search : Optional[str]
|
||||
The name of the company to search.
|
||||
sic : Optional[str]
|
||||
The Standard Industrial Classification (SIC) of the company.
|
||||
filing_date : Optional[date]
|
||||
The filing date of the financial statement.
|
||||
filing_date_lt : Optional[date]
|
||||
The filing date less than the given date.
|
||||
filing_date_lte : Optional[date]
|
||||
The filing date less than or equal to the given date.
|
||||
filing_date_gt : Optional[date]
|
||||
The filing date greater than the given date.
|
||||
filing_date_gte : Optional[date]
|
||||
The filing date greater than or equal to the given date.
|
||||
period_of_report_date : Optional[date]
|
||||
The period of report date of the financial statement.
|
||||
period_of_report_date_lt : Optional[date]
|
||||
The period of report date less than the given date.
|
||||
period_of_report_date_lte : Optional[date]
|
||||
The period of report date less than or equal to the given date.
|
||||
period_of_report_date_gt : Optional[date]
|
||||
The period of report date greater than the given date.
|
||||
period_of_report_date_gte : Optional[date]
|
||||
The period of report date greater than or equal to the given date.
|
||||
timeframe : Optional[Literal["annual", "quarterly", "ttm"]]
|
||||
The timeframe of the financial statement.
|
||||
include_sources : Optional[bool]
|
||||
Whether to include the sources of the financial statement.
|
||||
order : Optional[Literal["asc", "desc"]]
|
||||
The order of the financial statement.
|
||||
limit : Optional[PositiveInt]
|
||||
The limit of the financial statement.
|
||||
sort : Optional[Literal["filing_date", "period_of_report_date"]]
|
||||
The sort of the financial statement.
|
||||
"""
|
||||
|
||||
ticker: Optional[str] = Field(alias="symbol")
|
||||
cik: Optional[str]
|
||||
company_name: Optional[str]
|
||||
|
||||
@@ -356,6 +356,7 @@ class DocstringGenerator:
|
||||
|
||||
available_providers = ", ".join(docstring_mapping.keys())
|
||||
available_providers = available_providers.replace("openbb, ", "")
|
||||
available_providers = available_providers.replace("openbb", "")
|
||||
|
||||
docstring += f"\n\nAvailable providers: {available_providers}\n"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user