diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-06-09 19:19:44 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-06-09 19:19:44 -0700 |
| commit | d5e321089b6b82f5425c2b3fae142db5223ce599 (patch) | |
| tree | afdb1e7753938d00bb0a7adb2275525c76482dd9 /frontend/lib/api.ts | |
| parent | 9e2a23855d29d9763044b8a0a9e5f326cfcad878 (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/lib/api.ts')
| -rw-r--r-- | frontend/lib/api.ts | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/frontend/lib/api.ts b/frontend/lib/api.ts index 2c65ef2..84df997 100644 --- a/frontend/lib/api.ts +++ b/frontend/lib/api.ts @@ -1,4 +1,4 @@ -import type { FinancialsResponse, HistoryPoint, MarketIndex, RatiosResponse, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse } from "@/types/api"; +import type { FinancialsResponse, HistoryPoint, InsidersResponse, MarketIndex, RatiosResponse, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse } from "@/types/api"; const API_BASE = (process.env.NEXT_PUBLIC_API_BASE_URL || "").trim().replace(/\/$/, ""); @@ -63,5 +63,10 @@ export const api = { return request<RatiosResponse>( `/api/tickers/${encodeURIComponent(symbol)}/ratios` ); - } + }, + insiders(symbol: string) { + return request<InsidersResponse>( + `/api/tickers/${encodeURIComponent(symbol)}/insiders` + ); + }, }; |
