mirror of
https://github.com/shawnkim1997/All-in-one-Financial-Analysis.git
synced 2026-08-21 22:58:04 +00:00
- /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
21 lines
598 B
Python
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,
|
|
}
|