Pull live data from a URL into a Kintone field (i.e. Exchange Rate)

Has anyone ever pulled data from a live URL and populated a field with a specific value?

For example - I’ve created a calculated field that converts (MXN) Pesos to USD. The Exchange Rate field is a Number field where they can enter what the exchange rate is for that day. However, it would be nice if it was possible to make that field a “live” field that references what the Exchange rate is in real time.

Any suggestions or ideas of how to do this - if someone else has already tackled this. :slight_smile:

A few things I’ve found:

https://openexchangerates.org/ - Website with an exchange rate API (and a free service of 1,000 hits per month). I imagine there are other non-pay options as well, if needed.

https://stackoverflow.com/questions/34058089/how-to-retrieve-exchange-rates-with-javascript - Someone else has asked this question and gotten (what looks like) a good answer.

 

Looks like you could implement something similar, and just add the JS to take the data from the API response and plug it in to the fight field.

Hello Heather!

The method that James mentioned is a way to go.

To be more specific, you could create a button that updates the exchange rate field upon clicking on it.
The flow should be something like the following:

  1. Find an API that obtains the exchange rate

  2. Create a custom button and add a click event that runs the process beyond step 3.

  3. Run the API obtained in step 1 using kintone.proxy variable

  4. Input the data obtained in step 3. to a number field

Reference:
Kintone Developer Program - Kintone Proxy
https://developer.kintone.io/hc/en-us/articles/213148917-Kintone-Proxy

Example Exchange Rates API
https://www1.oanda.com/lang/ja/fx-for-business/exchange-rates-api

I hope this helps!