How to get Currency Converter API to function on Bubble App

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

1 Like

Thank you.
I would appreciate any advice on how to use the API called “Currency Converter”.

API link?

Hi @counter0430culture,

Looks like there’s a bug. Might want to reach out to the plugin creator.

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.

1 Like

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