Personal projectJun 2019 – Apr 2021

Exchange Rates

An open source npm library for exchange rate APIs.

A Node.js wrapper for fixer.io-compatible APIs that performs exchange rate lookups sourced from the European Central Bank. Small surface, boring API, still installed roughly 1,500 times a week.

At a glance
RoleSole authorPlatformNode.jsStackJavaScript, Node.jsPublished2019
1,500+Weekly downloads
ECBRates at the source
fixer.ioCompatible APIs
Open sourceOn GitHub and npm
Usage

Roughly the whole API

Install it, point it at a provider, ask for an exchange rate.

$ npm install exchange-rates-api
const { exchangeRates } = require('exchange-rates-api');
// latest rates, EUR base by default
await exchangeRates().latest().fetch();
// {THB: 34.978, PHP: 58.159, …, HUF: 323.58}
// one specific rate
await exchangeRates().latest().symbols('USD').fetch();
// 1.1307
// any day since 1999, quoted against another currency
await exchangeRates().at('2018-03-26').base('USD').fetch();
// a whole period, limited to the symbols you need
await exchangeRates()
  .from('2018-01-01').to('2018-09-01')
  .symbols(['ILS', 'JPY'])
  .fetch();
The work

What I own

A small personal library, published on npm: written, documented and maintained on my own.

A wrapper, not a service

It talks to any fixer.io-compatible endpoint, so you keep your own provider instead of routing data through someone else’s service.

Chainable by design

Latest rates, a single date, a whole period, base currency and symbol filters read as a short chain ending in one fetch().

Deliberately small

One job, a documented API and no dependency tree to audit — the kind of library you can read in an afternoon.

Built for one project, kept for everyone

Written because a project needed ECB exchange rates, then published in case anyone else did. Enough people did.