diff options
| author | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-18 22:45:59 -0700 |
|---|---|---|
| committer | Tyler Hoang <tyler@tylerhoang.xyz> | 2026-05-18 22:45:59 -0700 |
| commit | 66cfb26ebd8fa44b24e37b4ffc796ab29dcbd704 (patch) | |
| tree | 4d98b268502c6aa7c8988957d6e41dffd319534d /backend/app/main.py | |
| parent | 7fc2f0177518d70114aa75b7874a0ef59bdaec61 (diff) | |
| parent | 52635efd7d435b091b4f13897511ca8e2c48f0b9 (diff) | |
Merge branch 'feat/key-ratios-tab'
Diffstat (limited to 'backend/app/main.py')
| -rw-r--r-- | backend/app/main.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/backend/app/main.py b/backend/app/main.py index 1cc127e..7e02cbe 100644 --- a/backend/app/main.py +++ b/backend/app/main.py @@ -9,7 +9,7 @@ from fastapi import FastAPI, HTTPException, Query, status from fastapi.middleware.cors import CORSMiddleware from app.db import watchlist -from app.schemas import FinancialsResponse, HistoryPoint, MarketIndex, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse +from app.schemas import FinancialsResponse, HistoryPoint, MarketIndex, RatiosResponse, SearchResult, TickerOverview, ValuationResponse, WatchlistResponse from app.services import data_service load_dotenv() @@ -75,6 +75,11 @@ def ticker_valuation(symbol: str) -> dict: return data_service.get_valuation(symbol) +@app.get("/api/tickers/{symbol}/ratios", response_model=RatiosResponse) +def ticker_ratios(symbol: str) -> dict: + return data_service.get_ratios(symbol) + + @app.get("/api/watchlist", response_model=WatchlistResponse) def get_watchlist() -> dict: items = [] |
