mirror of
https://github.com/shawnkim1997/All-in-one-Financial-Analysis.git
synced 2026-08-18 21:08:07 +00:00
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
15 lines
462 B
Python
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}
|
|
|