Table of Content
Exchange rate example – API
There are several ways we can get exchange rates.
Unlike the weather API we used in last chapter that is free for use. For the finance data, each free source comes with its limitations. Take Currency API as example, it only comes with currencies from 16 countries and CNY is not in the list. And for the Open Exchange Rate API, the free one doesn’t allow to change the base currency for the conversion.
In our example, we will use the Open Exchange Rate service. I also suggest to check out the documentation or API on how to use the service.
Example of using Open Exchange Rate to calculate CNY -> MOP conversion.
What’s next? We’re going to take a look at “Exchange rate example – Exchange function”.