Files
All-in-one-Financial-Analysis/atlas-terminal/server/routers/search.py
T
shawnkim1997 ef429e93c4 feat: daily news workbench and Korean-aware ticker search
- /daily-news route fetches FT ePaper headlines with Gemini-backed Korean translation, plus calendar selector and cached translation TTL
- /api/search and use-ticker-search wire async sidebar search through a unified backend that merges static aliases with the local KOSPI/KOSDAQ universe (162 names) and yfinance metadata
- ticker-alias gains Korean display names, currency and market hints; PeerComparison formats KRW/JPY with locale-aware zero decimals
- EquityOverview surfaces HQ city/country, with Korean Naver snapshot fallback when yfinance info is empty
- market_data adds /korean-universe/search for autocomplete
- New tests for FT ingestion, Korean universe lookups, and updated smoke prefixes
2026-05-10 23:56:27 +01:00

21 lines
598 B
Python

"""Search router for ticker autocomplete."""
from fastapi import APIRouter, Query
from server.services.korean_market import search_korean_tickers
router = APIRouter()
@router.get("/tickers", summary="Ticker autocomplete with full KOSPI/KOSDAQ coverage")
async def ticker_search(
q: str = Query(..., min_length=1, description="Ticker, company name, or Korean company name"),
limit: int = Query(8, ge=1, le=20),
):
suggestions = await search_korean_tickers(q, limit=limit)
return {
"query": q,
"count": len(suggestions),
"suggestions": suggestions,
}