Getting a history of conversion rates between currencies automatically – no code required
There are a lot of situations where knowing the historical data of currencies can be very useful for a company. If you have international operations, you may want to know how a local currency is faring, and invest or protect yourself accordingly. Or maybe you want to know the latest rates when drafting an overseas contract. Getting this information in a historical series can be somewhat time consuming. That is, if you don’t automate it.
We’ll teach you how to schedule webhook calls to get this data automatically without a single line of code.
Platforms used:
Time to build the tool ⏱:
- 4min 20sec on average.
CurrencyConverterAPI.com ($0 for up to 100 requests/hour) + Jestor ($0 under 200 actions/mo) = $0.00**costs may vary according to different providers pricing changes.
6 Steps to Get a history of conversion rates between currencies automatically – no code required
1. Get your API token.
For this tutorial, we’re using CurrencyConverterAPI.com, which per the date of this tutorial sends you an API token in your email as soon as you sign up. You can use other currencies APIs to do this, but bear in mind that it will change how you set up the requests (make sure to read their documentation).
2. Create a table for the historical rates.
Create a table in Jestor, name it “Rates”, and add all the fields you’ll need for the process. In this case, a currency field for the rate.
3. Create your automation.
Open the tricks panel (by clicking on the Automations icon) and create a new trick. Give it a name and description so you can later identify this trick should you need to edit or deactivate it.
In this automation, we’ll fetch the rate of one US Dollar to Euro everyday. So, as the trigger for this automation, select Scheduled actions and choose the Rates table. For Type, choose Days. For Interval, type in 1. For First run, write when you want the automation to start in the YYYY-MM-DD HH:MM format, like 2021-12-31 13:30. Preferably, set this up 10 minutes in the future to test it.
4. Set up the request.
Choose the “Webhook” action. As per the documentation, set the URL to https://free.currconv.com/api/v7/convert. In Method, select GET. In Query params, set up three pairs of parameters:
- Key = q / Value = USD_EUR
- Key = compact / Value = ultra
- Key = apiKey / Value = {{the API key you got on step one}}
Finally, for Content Type, choose form/ulrencoded.
5. Create a record with the exchange rate.
Choose the “Jestor – Create a new record” action. You’ll only need to set up two things:
- For name, type “Rate of 1 USD to EUR.
- For the currency field, write {{[event][1].response_api.USD_EUR}} to get the response to the request.
6. Test your automation to make sure everything is working as planned.
Just wait for the date and time you scheduled in step three. If you’ve done everything correctly, a new record will be created with the exchange rate at the moment of the request!
You will now have an automatic daily update of the exchange rates, and the rates history will be saved in your Rates table. That way, you can always have the information at hand when the need arises. You can even take advantage of the Created At field to create an app with a chart to keep track of it in a more visual manner!
What’s Jestor?
Jestor is a no-code tool to build scalable internal systems, fast. You can create apps, automations, workflows and databases tailor-made for your company. Unlimited users, records, apps and automations. Try it for free here ?