Skip to content
This repository was archived by the owner on Mar 20, 2023. It is now read-only.
/ frankfurter Public archive
forked from lineofflight/frankfurter

Foreign exchange rates and currency conversion API

License

Notifications You must be signed in to change notification settings

crobox/frankfurter

 
 

Repository files navigation

Frankfurter

Deploy

Frankfurter is a free and open source API for current and historical foreign exchange rates. It tracks data published by the European Central Bank. Rates update around 4PM CET every working day.

Use our public instance or self host with Heroku or Docker.

Examples

Get the current foreign exchange rates.

GET /latest HTTP/1.1

Get historical rates for any day since 1999.

GET /2000-01-03 HTTP/1.1

Get historical rates for a time period.

GET /2010-01-01..2010-01-31 HTTP/1.1

Get historical rates for a time period up to the present.

GET /2010-01-01.. HTTP/1.1

Get a list of available currency symbols, along with their full names.

GET /currencies HTTP/1.1

Rates quote against the Euro by default. Quote against a different currency.

GET /latest?from=USD HTTP/1.1

Request specific exchange rates.

GET /latest?to=USD,GBP HTTP/1.1

Convert a specific amount.

GET /latest?amount=1000&from=GBP&to=USD HTTP/1.1

With a full list of currencies, time series grow large in size. For better performance, use the to parameter to reduce the response weight.

GET /2016-01-01..2016-12-31?from=GBP&to=USD HTTP/1.1

Here we return the current GBP/USD currency pair with JavaScript.

// Fetch and display GBP/USD
fetch('/latest?from=GBP&to=USD')
  .then(resp => resp.json())
  .then((data) => { alert(`GBPUSD = ${data.rates.USD}`); });

Cache data whenever possible.

About

Foreign exchange rates and currency conversion API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 76.2%
  • HTML 9.6%
  • Shell 8.6%
  • CSS 2.7%
  • JavaScript 2.4%
  • Dockerfile 0.5%