API DOCUMENTATION
All endpoints return JSON unless otherwise specified. Base: http://localhost:8000
Company Data
| GET | /api/companies | List all 1,544 tickers |
| GET | /api/financials/{ticker}?year=2025 | Financial statements as JSON |
| GET | /api/peek/{ticker}?year=2025 | Quick peek: minimal financial summary for tooltips |
| GET | /api/analyst/{ticker}?window_days=90&limit=100 | Consensus + opinions (full) + opinions_window (same rolling window as consensus) |
| GET | /api/batch?tickers=VNM,FPT,HPG&year=2025 | Batch data for multiple tickers (up to 50) |
| GET | /api/search?q=FPT | Search by ticker or company name |
| GET | /api/aggregate?tickers=VNM,FPT,HPG&year=2025 | Custom aggregate for any set of tickers |
Industry & Market
| GET | /api/industry/{name}?year=2025 | Industry aggregate with all companies |
| GET | /api/market?year=2025&exchange=HOSE | Market-level aggregates |
| GET | /api/industries/compare?year=2025 | Compare all industries side by side |
| GET | /api/quick-stats?year=2025 | Quick summary stats for dashboards |
Excel Downloads
| GET | /api/download/{ticker}?year=2025 | One company: full raw BS / IS / CF + ratios + growth |
| GET | /api/download/industry/{name}?year=2025&max_tickers=0 | Industry: 5 sheets per company; max_tickers=0 = all |
| GET | /api/download/market/all?year=2025&exchange=&max_tickers=0 | Market: 5 sheets per company; optional cap |
| GET | /api/download/comprehensive?year=2025&max_tickers=0 | Full market stacked workbooks; max_tickers to cap |
| GET | /api/download/selected?tickers=VNM,FPT&year=2025 | Selected: full depth (tabs TICKER_BS, TICKER_IS, …) |
| GET | /api/download/group/{group}?year=2025 | Index group: full depth per member |
| GET | /api/download/industries/compare?year=2025&max_tickers=0 | Same as comprehensive; optional max_tickers |
| GET | /api/download/industry/{name}/trend?year=2025 | Industry: full per-company sheets; optional max_tickers |
| GET | /api/download-all?year=2025&industry= | Bulk ZIP of individual company .xlsx |
CSV Downloads
| GET | /api/csv/{ticker}?year=2025 | Company data as CSV |
| GET | /api/csv/industry/{name}?year=2025 | Industry data as CSV |
| GET | /api/csv/market?year=2025&exchange= | Market data as CSV |
| GET | /api/csv/group/{group}?year=2025 | Index group CSV — VN30 / HNX30 / VN100 / VNALL |
System
| GET | /api/health | Health check with cache info |
| POST | /api/cache/clear | Clear all cached data |
| POST | /api/cache/warm?year=2025 | Pre-fetch data for all companies |
Example Usage
# Get VNM financial data
curl http://localhost:8000/api/financials/VNM?year=2025
# Batch data for multiple companies
curl http://localhost:8000/api/batch?tickers=VNM,FPT,HPG,TCB&year=2025
# Get Banking industry aggregate
curl http://localhost:8000/api/industry/Banking?year=2025
# Custom aggregate for selected tickers
curl http://localhost:8000/api/aggregate?tickers=VNM,FPT,HPG,TCB&year=2025
# Download comprehensive market Excel
curl -O http://localhost:8000/api/download/comprehensive?year=2025
# Quick stats for dashboard integration
curl http://localhost:8000/api/quick-stats?year=2025
Pages
HOME
Company directory with search and filters
MARKET
Full market data with industry breakdown
INDUSTRIES
Browse 25 industry sectors
HEATMAP
Cross-industry visual comparison
EXCHANGES
HOSE vs HNX vs UPCOM
RANKINGS
Top performers by any metric
SCREENER
Multi-criteria stock screening
COMPARE
Side-by-side company comparison
WATCHLIST
Bookmarked companies
GLOSSARY
Financial terms EN/VI
STATUS
System health and cache info