~ / projects / ratewatch
REST API FX Aggregation Service

RateWatch

FastAPI service that aggregates FX rates from multiple providers, computes a consensus value, serves live data from Redis cache, and persists historical snapshots to SQL.

Tech Stack

  • FastAPI
  • Redis Cache
  • SQLAlchemy
  • Alembic

Overview

RateWatch solves a common fintech problem: FX rates vary across providers. This service aggregates them, computes a weighted consensus, and serves the result with sub-millisecond latency from Redis.

Architecture

The system is built around three layers: an aggregation layer that polls providers on a schedule, a consensus engine that computes the weighted average, and a serving layer that reads from Redis cache.

Key Endpoints

  • GET /rates/{currency_pair} — live rate from cache
  • GET /rates/{currency_pair}/history — historical snapshots from SQL
  • POST /rates/refresh — manually trigger provider polling