summaryrefslogtreecommitdiff
path: root/frontend/types/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/types/api.ts
parent37ac7be64d18bf1957e5400597abfb9d2d73c0c5 (diff)
feat: add RatioPoint, RatiosResponse types and api.ratios()
Diffstat (limited to 'frontend/types/api.ts')
-rw-r--r--frontend/types/api.ts30
1 files changed, 30 insertions, 0 deletions
diff --git a/frontend/types/api.ts b/frontend/types/api.ts
index 998f618..7efe628 100644
--- a/frontend/types/api.ts
+++ b/frontend/types/api.ts
@@ -156,3 +156,33 @@ export type ValuationResponse = {
ev_revenue: MultipleResult;
price_to_book: MultipleResult;
};
+
+export type RatioPoint = {
+ value: number | null;
+ spark: (number | null)[];
+ vs_sector: number | null;
+};
+
+export type RatiosResponse = {
+ pe_ttm: RatioPoint;
+ ev_ebitda: RatioPoint;
+ gross_margin: RatioPoint;
+ net_margin: RatioPoint;
+ price_to_book: RatioPoint;
+ price_to_sales: RatioPoint;
+ ev_to_sales: RatioPoint;
+ p_fcf: RatioPoint;
+ forward_pe: RatioPoint;
+ operating_margin: RatioPoint;
+ ebitda_margin: RatioPoint;
+ fcf_margin: RatioPoint;
+ roe: RatioPoint;
+ roa: RatioPoint;
+ roic: RatioPoint;
+ debt_to_equity: RatioPoint;
+ current_ratio: RatioPoint;
+ quick_ratio: RatioPoint;
+ interest_coverage: RatioPoint;
+ dividend_yield: RatioPoint;
+ dividend_payout: RatioPoint;
+};