fixes: major_indices_eod for intraday, optional company_overview atrs

This commit is contained in:
tehcoderer
2023-08-21 11:37:30 -04:00
parent 2d8d80bdf6
commit da7b1c8d7e
2 changed files with 13 additions and 9 deletions

View File

@@ -66,7 +66,9 @@ class FMPMajorIndicesEODData(MajorIndicesEODData):
cls, v, values: Dict[str, Any]
) -> datetime:
"""Return the date as a datetime object."""
return datetime.strptime(v, "%Y-%m-%d")
if values.get("changeOverTime", None) is not None:
return datetime.strptime(v, "%Y-%m-%d")
return datetime.strptime(v, "%Y-%m-%d %H:%M:%S")
class FMPMajorIndicesEODFetcher(

View File

@@ -37,17 +37,19 @@ class CompanyOverviewData(Data, BaseSymbol):
exchange_short_name: str = Field(description="Exchange short name of the company.")
industry: str = Field(description="Industry of the company.")
website: str = Field(description="Website of the company.")
description: str = Field(description="Description of the company.")
description: Optional[str] = Field(description="Description of the company.")
ceo: str = Field(description="CEO of the company.")
sector: str = Field(description="Sector of the company.")
country: str = Field(description="Country of the company.")
full_time_employees: str = Field(description="Full time employees of the company.")
phone: str = Field(description="Phone of the company.")
address: str = Field(description="Address of the company.")
city: str = Field(description="City of the company.")
state: str = Field(description="State of the company.")
zip: str = Field(description="Zip of the company.")
dcf_diff: float = Field(
full_time_employees: Optional[str] = Field(
description="Full time employees of the company."
)
phone: Optional[str] = Field(description="Phone of the company.")
address: Optional[str] = Field(description="Address of the company.")
city: Optional[str] = Field(description="City of the company.")
state: Optional[str] = Field(description="State of the company.")
zip: Optional[str] = Field(description="Zip of the company.")
dcf_diff: Optional[float] = Field(
description="Discounted cash flow difference of the company."
)
dcf: float = Field(description="Discounted cash flow of the company.")