feat: add dynamic advisor asset allocation
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
"""Analysis-only dynamic asset allocation endpoint."""
|
||||
|
||||
from fastapi import APIRouter, Depends
|
||||
|
||||
from app.api.dependencies.auth import build_request_context
|
||||
from app.api.dependencies.rate_limit import enforce_rate_limit
|
||||
from app.api.schemas.asset_allocation import AssetAllocationQuery
|
||||
from app.core.contracts import RequestContext
|
||||
from app.service.asset_allocation_service import AssetAllocationService
|
||||
|
||||
router = APIRouter(
|
||||
prefix="/api/v1/advisor", tags=["advisor-asset-allocation"],
|
||||
dependencies=[Depends(enforce_rate_limit)],
|
||||
)
|
||||
|
||||
|
||||
@router.post("/asset-allocation")
|
||||
async def generate_asset_allocation(
|
||||
payload: AssetAllocationQuery,
|
||||
context: RequestContext = Depends(build_request_context), # noqa: B008
|
||||
) -> dict[str, object]:
|
||||
return await AssetAllocationService().generate_for_agent(payload, context)
|
||||
Reference in New Issue
Block a user