summaryrefslogtreecommitdiff
path: root/frontend/lib/api.ts
diff options
context:
space:
mode:
authorTyler Hoang <tyler@tylerhoang.xyz>2026-05-18 02:37:36 -0700
committerTyler Hoang <tyler@tylerhoang.xyz>2026-05-18 02:37:36 -0700
commit7a2cea0a26001d8a7b94423606b650d878df8162 (patch)
tree351593304ab71f0b6844007d52c5c2da6b9f6b57 /frontend/lib/api.ts
parent37ac7be64d18bf1957e5400597abfb9d2d73c0c5 (diff)
feat: add RatioPoint, RatiosResponse types and api.ratios()
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 53b3dd3..b23edee 100644
--- a/frontend/lib/api.ts
+++ b/frontend/lib/api.ts
@@ -1,4 +1,4 @@
-import type { FinancialsResponse, HistoryPoint, MarketIndex, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse } from "@/types/api";
+import type { FinancialsResponse, HistoryPoint, MarketIndex, RatiosResponse, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse } from "@/types/api";
const API_BASE = process.env.NEXT_PUBLIC_API_BASE_URL || "http://localhost:8000";
@@ -58,5 +58,10 @@ export const api = {
return request<ValuationResponse>(
`/api/tickers/${encodeURIComponent(symbol)}/valuation`
);
+ },
+ ratios(symbol: string) {
+ return request<RatiosResponse>(
+ `/api/tickers/${encodeURIComponent(symbol)}/ratios`
+ );
}
};