Hello! Can somebody walk me through how to get Currency Converter API to function on a Bubble App?
Thank you!
Hi, you can use the API Connector to connect to https://currencylayer.com for instance.
Clovis
Thank you.
I would appreciate any advice on how to use the API called āCurrency Converterā.
API link?
A couple of those currency converters are not maintained very well it seems, so I set it up myself using money.js, openexchange rates and the JS element:
<script src="https://cdnjs.cloudflare.com/ajax/libs/money.js/0.2.0/money.min.js"></script>
<script type="text/javascript">
// Load exchange rates data via AJAX:
$.getJSON(
// NB: using Open Exchange Rates here, but you can use any source!
'https://openexchangerates.org/api/latest.json?app_id=YOURAPPID',
function(data) {
// Check money.js has finished loading:
if ( typeof fx !== "undefined" && fx.rates ) {
fx.rates = data.rates;
fx.base = data.base;
} else {
// If not, apply to fxSetup global:
var fxSetup = {
rates : data.rates,
base : data.base
}
}
}
);
</script>
Put a JStoBubble element on the page, set to number, publish value.
On button click I want to convert an amount from USD to EUR, add workflow ārun javascriptā:
var result; result = fx.convert(yourinputfield's value, {from: "USD", to: "EUR"});
bubble_fn_YOUR-JS-TO-BUBBLE-ELEMENR(result);
That should work
Hi, do you know if CAD currency source is supported? Where the exchange rates are coming from? Polling rate allow? I am building a fintech app which a third party API (9$/month) to get exchange rates.
Yes, it comes from openexchange rates: https://openexchangerates.org/signup/free
Iām using the free plan but Iām on the verge of having to upgrade.
I seeā¦Thanks
Hi
@BubbleCoach,
did you manage to do this? Iām also looking for a way to get rates into Bubble and your fintech usecase is probably very close to mine.
@vincent56,
Sorry for not being very technically capable - would you mind explaining further how you did this? I havenāt been able to find how to set up a JS or JStoBubble element so perhaps itās something simple Iām missing.
Thanks everyone
