Back to Projects

UniRate API

A currency conversion API that aggregates exchange rates from multiple central banks and financial sources into a single, reliable endpoint.

UniRate API screenshot

The Problem

Currency exchange rate APIs are surprisingly expensive-competitors charge $25-100/month for basic access, and many still rely on a single data source, making them vulnerable to outages or stale data. Developers building international e-commerce platforms, financial dashboards, or travel apps often struggle to find an affordable, reliable option that also includes historical data.

The Solution

What started as an internal tool for my own projects grew into a full product. UniRate pulls live exchange rates from multiple authoritative sources including the European Central Bank, Bank of England, Reserve Bank of Australia, and other central banks worldwide. Instead of trusting a single source, it uses a weighted averaging algorithm that factors in each source's reliability and data freshness-central bank rates are weighted higher than commercial APIs, and older data is gradually deprioritized. The result is a single, clean API that returns the most accurate rate possible at any given moment. The API also serves 26 years of historical exchange rate data, precious metals pricing, and VAT rates by country-features typically locked behind enterprise tiers at competitors.

How It Works

  1. 1 Data Collection: Automated scrapers fetch rates from multiple sources on a regular schedule-central banks publish XML feeds, exchanges offer JSON APIs, and commodity prices come from established market sources.
  2. 2 Weighted Aggregation: A custom algorithm scores each rate by source reliability and applies decay based on data age. The final rate is a weighted average of all available sources, prioritizing authoritative institutions over commercial feeds.
  3. 3 Caching Layer: Processed rates and historical data are stored in Redis. Live rates refresh regularly; historical lookups return in microseconds.
  4. 4 API Layer: Flask serves REST endpoints with API key authentication, tiered rate limiting, and multiple response formats including JSON, XML, and JSONP.

Tech Stack

  • Backend: Python, Flask, Gunicorn
  • Database: MySQL, SQLAlchemy ORM
  • Caching: Redis
  • Infrastructure: Nginx, Linux VPS
  • Payments: Polar.sh
  • Documentation: Swagger/OpenAPI

Results

  • 1,485 registered users with 680 actively making requests
  • 4.5 million API requests processed over 90 days (~50,000/day average)
  • 170+ currencies supported with real-time rates
  • 26 years of historical data spanning 1999-2025
  • Freemium model with Pro tier at $9/month-undercutting competitors by 60-80% while offering 25x more requests