""" API endpoints for the BTC funding-rate reversal signal. GET /api/funding/snapshot Live snapshot of current funding state + signal verdict + 7d history. Powers the BTC page "Funding" tab. Historical fired signals are returned via the standard /api/posts endpoint with source=funding_reversal — same plumbing as btc_bottom_reversal. """ from fastapi import APIRouter from app.services.scanners.funding_reversal import get_current_snapshot router = APIRouter(prefix="/funding", tags=["funding"]) @router.get("/snapshot") async def snapshot() -> dict: """Cheap (≤2 outbound requests). Frontend polls every ~5min.""" return await get_current_snapshot()