diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-17 14:27:18 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-17 14:27:18 -0700 |
| commit | 5f270f75bb73092d89fd2d797173febf8c6ed08b (patch) | |
| tree | c6724d036817902db0693a042e9ad109675c890f /backend/app/schemas.py | |
| parent | fb52ef3e4ffee2be8efadd0928223a81564ab422 (diff) | |
feat: add FinancialRow/Statement/Response schemas
Diffstat (limited to 'backend/app/schemas.py')
| -rw-r--r-- | backend/app/schemas.py | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/backend/app/schemas.py b/backend/app/schemas.py index 2ee6dac..86f586c 100644 --- a/backend/app/schemas.py +++ b/backend/app/schemas.py @@ -107,6 +107,27 @@ class HistoryPoint(BaseModel): volume: float | None = None +class FinancialRow(BaseModel): + label: str + indent: int = 0 + is_total: bool = False + is_section: bool = False + is_margin: bool = False + values: list[float | None] = Field(default_factory=list) + + +class FinancialStatement(BaseModel): + columns: list[str] = Field(default_factory=list) + rows: list[FinancialRow] = Field(default_factory=list) + + +class FinancialsResponse(BaseModel): + period: Literal["annual", "quarterly"] + income: FinancialStatement + balance: FinancialStatement + cash_flow: FinancialStatement + + class WatchlistItem(BaseModel): symbol: str created_at: str |
