Flight-Search / backend /api /currency.py
fyliu's picture
Add backend endpoints for currency, geolocation, and destinations
8ae2973
raw
history blame contribute delete
408 Bytes
"""Currency exchange rate endpoint."""
from fastapi import APIRouter
from ..config import CURRENCY_SYMBOLS, EXCHANGE_RATES
router = APIRouter(prefix="/api/currency", tags=["currency"])
@router.get("/rates")
async def get_rates():
"""Return all exchange rates (USD base) with symbols."""
return {
"base": "USD",
"rates": EXCHANGE_RATES,
"symbols": CURRENCY_SYMBOLS,
}