Go to file
2016-04-11 14:40:48 +01:00
config Use Rubocop 2016-04-11 14:39:15 +01:00
db/migrate Rename to db/migrate 2014-03-14 12:04:47 +00:00
deploy Load rates when deploying 2016-04-11 14:40:23 +01:00
lib Suppress warnings 2016-04-11 14:40:24 +01:00
public Add public folder 2015-12-22 20:20:34 +00:00
spec Refactor quote validation 2016-04-11 14:40:24 +01:00
.gitignore Deploy to Digital Ocean 2015-03-09 14:56:52 +00:00
.pryrc Deploy to Digital Ocean 2015-03-09 14:56:52 +00:00
.rubocop.yml Use Rubocop 2016-04-11 14:39:15 +01:00
.travis.yml Update Travis config 2015-12-30 20:01:48 +00:00
config.ru Move middleware to api file 2014-05-13 11:39:27 +01:00
docker-compose.yml Simplify Docker files 2016-04-11 14:40:44 +01:00
Dockerfile Simplify Docker files 2016-04-11 14:40:44 +01:00
Gemfile Update gems 2016-04-11 14:39:49 +01:00
Gemfile.lock Update gems 2016-04-11 14:39:49 +01:00
LICENSE Add license 2015-07-23 13:23:02 +02:00
Procfile First commit 2012-11-20 16:36:12 +00:00
Rakefile Remove Rollbar 2015-08-30 11:54:49 +01:00
README.md Update README 2016-04-11 14:40:48 +01:00

Fixer.io

fixer

Travis

Fixer.io is a free JSON API for current and historical foreign exchange rates published by the European Central Bank.

The rates are updated daily around 3PM CET.

Usage

Get the latest foreign exchange reference rates in JSON format.

GET /latest
Host: api.fixer.io

Get historical rates for any day since 1999.

GET /2000-01-03
Host: api.fixer.io

Rates are quoted against the Euro by default. Quote against a different currency by setting the base parameter in your request.

GET /latest?base=USD
Host: api.fixer.io

Request specific exchange rates by setting the symbols or currencies parameter.

GET /latest?symbols=USD,GBP
Host: api.fixer.io

Make cross-domain JSONP requests.

GET /latest?callback=?
Host: api.fixer.io

An HTTPS endpoint is also available at https://api.fixer.io.

Use money.js in the browser.

var demo = function(data) {
  fx.rates = data.rates
  var rate = fx(1).from("GBP").to("USD")
  alert("£1 = $" + rate.toFixed(4))
}

$.getJSON("http://api.fixer.io/latest", demo)

Docker

Bring the stack up.

docker-compose up -d

Initialize the database and seed data.

docker-compose run web rake db:migrate rates:load