summaryrefslogtreecommitdiff
path: root/frontend/types/api.ts
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-06-09 19:19:44 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-06-09 19:19:44 -0700
commitd5e321089b6b82f5425c2b3fae142db5223ce599 (patch)
treeafdb1e7753938d00bb0a7adb2275525c76482dd9 /frontend/types/api.ts
parent9e2a23855d29d9763044b8a0a9e5f326cfcad878 (diff)
Add Insiders tab with diverging bar chart and transaction table
- Backend: get_insider_transactions() in data_service (yfinance, 1hr TTL) - Backend: InsidersResponse schema + GET /api/tickers/{symbol}/insiders - Frontend: InsidersPage with 4-KPI strip, SVG diverging bar chart (), psm-insider transaction rows, pill filter toggles, shimmer skeleton, empty/error states - Enable Insiders nav item (remove disabled flag)
Diffstat (limited to 'frontend/types/api.ts')
-rw-r--r--frontend/types/api.ts28
1 files changed, 28 insertions, 0 deletions
diff --git a/frontend/types/api.ts b/frontend/types/api.ts
index c8fc26b..c65d3d2 100644
--- a/frontend/types/api.ts
+++ b/frontend/types/api.ts
@@ -164,6 +164,34 @@ export type RatioPoint = {
vs_sector: number | null;
};
+export type InsiderTransaction = {
+ date: string | null;
+ insider: string;
+ position: string;
+ direction: "buy" | "sell" | "other";
+ shares: number | null;
+ value: number | null;
+};
+
+export type InsiderMonthPoint = {
+ month: string;
+ buy: number;
+ sell: number;
+};
+
+export type InsiderSummary = {
+ buy_count: number;
+ sell_count: number;
+ buy_value: number;
+ sell_value: number;
+};
+
+export type InsidersResponse = {
+ summary: InsiderSummary;
+ monthly_chart: InsiderMonthPoint[];
+ transactions: InsiderTransaction[];
+};
+
export type RatiosResponse = {
pe_ttm: RatioPoint;
ev_ebitda: RatioPoint;