Fixer.io is a free JSON API for current and historical foreign exchange rates. It relies on daily feeds published by the European Central Bank.
The above script requires requests
$ apt-get install python-pip
$ pip install requests
Tested on
- Debian 7.8 (wheezy) with Python 2.7.3
- Mac OS X Yosemite 10.10.2 with Python 2.7.6