summaryrefslogtreecommitdiff
path: root/frontend/lib/api.ts
diff options
context:
space:
mode:
Diffstat (limited to 'frontend/lib/api.ts')
-rw-r--r--frontend/lib/api.ts7
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`
+ );
}
};