diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-18 00:46:27 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-18 00:46:27 -0700 |
| commit | 45f3eff514a7b4c2f03e801b204920f13671dd5d (patch) | |
| tree | a71e4cd06a4af8357003c9942760e019f52414dc /backend/app/schemas.py | |
| parent | 147664128fa0281333ba3150e007ed8e2f6a616a (diff) | |
| parent | 1e349b8904c6fa52c6f0925453513354c1a4e392 (diff) | |
Merge worktree-financials-tab: add financials tab (income/balance/cashflow)
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 |
