diff options
Diffstat (limited to 'backend/app/schemas.py')
| -rw-r--r-- | backend/app/schemas.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/backend/app/schemas.py b/backend/app/schemas.py index 86664e4..351de06 100644 --- a/backend/app/schemas.py +++ b/backend/app/schemas.py @@ -273,3 +273,27 @@ class FilingsResponse(BaseModel): class ErrorResponse(BaseModel): detail: str + + +class NewsItem(BaseModel): + id: str + title: str + summary: str + source: str + url: str + sentiment: Literal["bullish", "neutral", "bearish"] + published_at: str + + +class NewsAggregate(BaseModel): + buzz_articles_last_week: int + bullish_pct: float + neutral_pct: float + bearish_pct: float + + +class NewsResponse(BaseModel): + items: list[NewsItem] = Field(default_factory=list) + aggregate: NewsAggregate | None = None + provider: Literal["finnhub", "fmp"] | None = None + fetched_at: str |
