feat: add remaining 5 endpoints (VWAP, relative rotation, fred-regional, primary dealer)

Complete all 67 planned endpoints:
- VWAP and Relative Rotation technical indicators
- FRED regional data (by state/county/MSA)
- Primary dealer positioning (Fed data)
This commit is contained in:
Yaojia Wang
2026-03-19 17:31:08 +01:00
parent 87260f4b10
commit 615f17a3bb
4 changed files with 111 additions and 0 deletions

View File

@@ -153,3 +153,25 @@ async def stock_cones(symbol: str = Path(..., min_length=1, max_length=20)):
symbol = validate_symbol(symbol)
data = await technical_service.get_cones(symbol)
return ApiResponse(data=data)
@router.get("/stock/{symbol}/technical/vwap", response_model=ApiResponse)
@safe
async def stock_vwap(symbol: str = Path(..., min_length=1, max_length=20)):
"""Volume Weighted Average Price -- intraday fair value benchmark."""
symbol = validate_symbol(symbol)
data = await technical_service.get_vwap(symbol)
return ApiResponse(data=data)
@router.get("/stock/{symbol}/technical/relative-rotation", response_model=ApiResponse)
@safe
async def stock_relative_rotation(
symbol: str = Path(..., min_length=1, max_length=20),
benchmark: str = Query(default="SPY", min_length=1, max_length=20),
):
"""Relative Rotation -- strength vs benchmark (sector rotation analysis)."""
symbol = validate_symbol(symbol)
benchmark = validate_symbol(benchmark)
data = await technical_service.get_relative_rotation(symbol, benchmark=benchmark)
return ApiResponse(data=data)