diff --git a/agent-office/app/service_proxy.py b/agent-office/app/service_proxy.py index 31a1d54..e650aa7 100644 --- a/agent-office/app/service_proxy.py +++ b/agent-office/app/service_proxy.py @@ -43,6 +43,20 @@ async def refresh_screener_snapshot() -> Dict[str, Any]: return resp.json() +async def refresh_ai_news_sentiment() -> Dict[str, Any]: + """stock-lab의 AI 뉴스 sentiment 분석 트리거 (08:00 cron). + + 네이버 100종목 스크래핑 + Claude Haiku 100콜 병렬 = 약 30-60초. + 여유있게 240s timeout. + """ + async with httpx.AsyncClient(timeout=240.0) as client: + resp = await client.post( + f"{STOCK_LAB_URL}/api/stock/screener/snapshot/refresh-news-sentiment" + ) + resp.raise_for_status() + return resp.json() + + async def run_stock_screener(mode: str = "auto") -> Dict[str, Any]: """stock-lab의 스크리너 실행.