2

I am interested to find exchange rates by a certain date. Do you guys know what API I can use for this? (Preferably, a free API.)

I create an object with creation date the 20th of May, 2016. That object has a price in EUR. I want to be able to get the exchange rate of EUR to USD for that date and convert it to USD.

Polygnome
  • 7,639
  • 2
  • 37
  • 57
2dor
  • 851
  • 3
  • 15
  • 35

1 Answers1

3

It seems like fixer.io should suit your needs:

http://fixer.io/

Your example:

http://api.fixer.io/2016-05-20?base=EUR&symbols=USD

Note that apparently your referrer header can make you get a 403 response. (so copy and paste this link in the browser, don't click on it - thanks @Arnauld)

mszymborski
  • 1,615
  • 1
  • 20
  • 28
  • 2
    You may have to copy/paste the provided example link in the address bar of your browser in order to test it. A direct click results in a 403 / forbidden (probably because of the referrer). At least it does for me. – Arnauld Jul 24 '16 at 14:48
  • @Arnauld: you are right, sorry for that. Weirdly enough the HTTP link works fine. – mszymborski Jul 24 '16 at 14:49
  • @Arnauld: actualy that doesn't work either, the answer was cachhed. – mszymborski Jul 24 '16 at 14:51
  • Your example works @mszymborski. Arnauld was right, copying the link works. Thank you for the assist – 2dor Jul 25 '16 at 10:16