Skip to main content
All CollectionsUser Guides
Plugins: Connect Exchange Rates APIs with Ubidots
Plugins: Connect Exchange Rates APIs with Ubidots

Add currency exchange data to your IoT application in just a few clicks

David Sepúlveda avatar
Written by David Sepúlveda
Updated over a month ago

Though not exactly sensor data from a physical device, currency exchange data has proven to be useful when used in conjunction with Ubidots:

  • As a complement to your IoT Application. Some examples: (1) multiply the savings of an energy efficiency application times an exchange rate, (2) multiply the volume of an industrial storage tank times its unit market value, or (3) use the Bitcoin price to automatically turn on / off a mining farm.

  • Ubidots as a data analysis tool for financial applications: Some of our customers use Ubidots dashboards, reports, alerts, and end-user app deployment capabilities, to nicely present live financial reports to end customers, or to simply act upon a sudden change in an exchange rate.

Currently, these Exchange Rates APIs are supported:

  • Fixer API: A simple and lightweight API for current and historical foreign exchange (forex) rates. This plugin will retrieve user-defined exchange rates from Fixer API, using your own Fixer API Access Key.

  • Exchange Rates API: A free service for current and historical foreign exchange rates published by the European Central Bank, and created by Madis Väin. This plugin will retrieve user-defined exchange rates from the free and publicly available Exchange Rates API (updated only 1x per day!). As a free service, this API comes with no warranty and is maintained by the author under a best-effort basis.

Integrating these APIs to Ubidots' ecosystem allows you to add currency exchange data to your IoT application in just a few clicks:

Requirements

1. Creating a Currency Exchange Plugin

In your Ubidots account, click on the "Plugins" option under the "Devices" navbar menu, then click on the "+" icon in the upper right corner and select the Currency Exchange service you'd like to use:

Configure your Plugin according to the provided input fields:

Inputs

  • API Key: A valid Fixer API Access Key. In the case of the Daily Exchange Rates plugin, this field is not required as it is a free and open service that does not require any authentication.

  • Base currency: The three-letter code of the currency to which exchange rates are relative to. (If 1 USD = X EUR, then USD is the base currency). See Fixer codes. See Exchange Rates API codes.

  • Target currencies: A comma-separated list of the target currencies (in three-letter code format). Example: "EUR, BTC, AUD". See Fixer codes. See Exchange Rates API codes.

  • Your Ubidots token

  • Time interval: How often you'd like to retrieve the currency values from Fixer API (in minutes). Please note that Fixer limits data updates based on your account's plan. Entry-level plans only support hourly updates. Check out their pricing to learn more.

Output

This plugin creates a new device named after the Base currency, which will contain one variable for each target currency. Data is updated at the specified time interval.

Note: The Exchange Rates API offers rates from the European Central Bank, which are usually updated around 16:00 CET on every working day, except on TARGET closing days.

After configuring the Plugin, a new item will appear on the Plugins list. Please allow a few seconds for the plugin to finish its provisioning process, and then refresh your browser. When the status of the Plugin goes from "Configuring" to "Running" then you should see a new device in your Devices list.

2. Editing a Currency Exchange Plugin

To edit the Plugin, simply click on the Edit button in the Plugins list view. The same "Input" fields that appeared during the creation process will appear. Please note that, every time the Plugin is updated, a provisioning script will run, overriding the current attributes of the target device:

  • Device name

  • Device label

  • Device icon

  • Device description

  • Device color

  • Variable names

3. Feedback

If you have any ideas on how we could improve this plugin, or add other sources of useful financial data, we'd be happy to hear them. Please leave us a note at sales@ubidots.com.

Others also found helpful...

Did this answer your question?