Files
All-in-one-Financial-Analysis/atlas-terminal/server/routers/markets.py
T
shawnkim1997 38c56a5a43 feat: deliver multi-asset analytics, OCR exchange selection, and heatmap UX
Add asset-type aware market/overview flows, portfolio OCR reverse-engineering with exchange overrides, and interactive index heatmap features. Update README with recent updates and wire backend/frontend APIs for FX matrix, exchange options, and improved portfolio editing flows.

Made-with: Cursor
2026-03-21 17:08:00 +00:00

15 lines
462 B
Python

"""Markets router for index constituent heatmap."""
from fastapi import APIRouter, Query
router = APIRouter()
@router.get("/heatmap/{index_name}", summary="Index constituent heatmap data")
async def heatmap(index_name: str, top_n: int = Query(default=50, ge=1, le=200)):
from server.services.heatmap import get_heatmap_data
stocks = await get_heatmap_data(index_name, top_n)
return {"index": index_name, "count": len(stocks), "stocks": stocks}