For a recent Shopify job, I had to update a variety of prices by converting them to a different currency.
I found this great API from Fixr.io. It’s super fast to use (response times in less than 7ms), and responses themselves are simple JSON objects. The exchange rates are updated almost every day from the European Central Bank.
To demo it to you, I decided to build a currency conversion app that converted USD to NZD. You can view and play with this app online here.
The source code for it is all on GitHub as a gist:
https://gist.github.com/magician11/3e26a4f6c4bcb5621538169c1a2c4df0
What I realised that’s kinda amazing after I built this, is that a currency conversion app can be built in less than 75 lines of code. And that includes all the comments and styling. I also used the numeral.js library to format the numbers and jQuery for the DOM updates and Ajax request.
And, here is a video overview of the whole process you can watch:
Any questions or comments let me know! Thanks!