diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-18 01:33:41 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-18 01:33:41 -0700 |
| commit | fdaef36d7ede89e6711ae65948b7c85d23c8f716 (patch) | |
| tree | b14399309f0cc871304aedea14d87b950a3e3dfa /frontend/lib | |
| parent | 0662a31869ad60dbb76b2f534fe294d15b3b3492 (diff) | |
feat: add ValuationResponse types and api.valuation() method
Diffstat (limited to 'frontend/lib')
| -rw-r--r-- | frontend/lib/api.ts | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/frontend/lib/api.ts b/frontend/lib/api.ts index 05af5ae..53b3dd3 100644 --- a/frontend/lib/api.ts +++ b/frontend/lib/api.ts @@ -1,4 +1,4 @@ -import type { FinancialsResponse, HistoryPoint, MarketIndex, SearchResult, TickerOverview, WatchlistResponse } from "@/types/api"; +import type { FinancialsResponse, HistoryPoint, MarketIndex, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse } from "@/types/api"; const API_BASE = process.env.NEXT_PUBLIC_API_BASE_URL || "http://localhost:8000"; @@ -53,5 +53,10 @@ export const api = { return request<FinancialsResponse>( `/api/tickers/${encodeURIComponent(symbol)}/financials?period=${encodeURIComponent(period)}` ); + }, + valuation(symbol: string) { + return request<ValuationResponse>( + `/api/tickers/${encodeURIComponent(symbol)}/valuation` + ); } }; |
