summaryrefslogtreecommitdiff
path: root/backend/app/schemas.py
diff options
context:
space:
mode:
Diffstat (limited to 'backend/app/schemas.py')
-rw-r--r--backend/app/schemas.py28
1 files changed, 28 insertions, 0 deletions
diff --git a/backend/app/schemas.py b/backend/app/schemas.py
index c84b4c6..b1d934a 100644
--- a/backend/app/schemas.py
+++ b/backend/app/schemas.py
@@ -206,5 +206,33 @@ class RatiosResponse(BaseModel):
dividend_payout: RatioPoint
+class InsiderTransaction(BaseModel):
+ date: str | None = None
+ insider: str
+ position: str
+ direction: Literal["buy", "sell", "other"]
+ shares: int | None = None
+ value: float | None = None
+
+
+class InsiderMonthPoint(BaseModel):
+ month: str
+ buy: float
+ sell: float
+
+
+class InsiderSummary(BaseModel):
+ buy_count: int
+ sell_count: int
+ buy_value: float
+ sell_value: float
+
+
+class InsidersResponse(BaseModel):
+ summary: InsiderSummary
+ monthly_chart: list[InsiderMonthPoint] = Field(default_factory=list)
+ transactions: list[InsiderTransaction] = Field(default_factory=list)
+
+
class ErrorResponse(BaseModel):
detail: str