Inspiration

Calls fail silently — latency drifts before the 500. Inspired by prediction-market math that spots stale quotes in milliseconds, we built a fleet that spots drift for CALL-E before users hear failed.

What it does

API Sentinel Fleet — CALL-E Edition polls N endpoints every 8s, scores each with a 3-model ensemble (latency-z vs rolling median, momentum tilt, staleness HEALTHY → WARN → FAILOVER), and triggers human-first failover + alerts. Generalized from predictrader-ai: loadMarkets() → loadEndpoints(), SpotHistory → LatencyHistory — same Φ k=√2/π, 120-sample ring.

Live: https://api-sentinel-fleet.vercel.app · GitHub: https://github.com/binasalama12/api-sentinel-fleet

How we built it

  • Stack: Next.js 14, TypeScript, Node fetch, Docker (Cloud Run node:20-slim, $PORT), OpenAPI 3.1 (5 routes, X-Fleet-Key)
  • Infra: Vercel + Cloud Run — one fleet covers API + Cloud + AI
  • Demo-safe: DEMO_FALLBACK keeps dashboard live when endpoints idle

Challenges we ran into

Generalizing trading drift to call latency — z-score and 35% muzzle recalibration. Wiring openapi.yaml X-Fleet-Key to handlers (declared, not yet enforced — noted).

Accomplishments that we're proud of

  • One base → 5 sentinels, all live 200 on Vercel — reuse >90%
  • Clean OpenAPI + Dockerfile; single build hits multiple tracks
  • Live demo + video + GitHub ready on first day

What we learned

Trading infra is call infra — same polling, same ensemble. Human-in-loop failover beats silent auto-retry for trust.

What's next for API Sentinel Fleet — CALL-E Edition

Wire X-Fleet-Key enforcement, add telco webhooks on FAILOVER for CALL-E routing, and scale fleet to N regions. PRs at binasalama12/api-sentinel-fleet.

Built With

Share this project:

Updates

Submission history