Skip to navigation
DigitalOcean Referral Badge

Get $200 credit on DigitalOcean

Open extra topbar

? Action required: Important changes to exchange rates system

? Action required: Important changes to exchange rates system

You now need to provide an API key for the fixer.io service to the Bitcoin and Altcoin Wallets free WordPress plugin.

Summary: You need to get a free API key for the fixer.io service and provide it to the plugin.

The Bitcoin and Altcoin Wallets free WordPress plugin lets you use a number of online service providers to compute exchange rates between fiat currencies and cryptocurrencies. To translate between fiat and crypto, the fixer.io service is used. Release 3.4.0 of the plugin addresses some recent changes to the fixer API and brings some more improvements to the exchange rates system.

API key

Previously the fixer.io API was publicly available to all, but now it can only be accessed with an API key. You can register for a free API key here. Once you do, paste the key into the plugin at WalletsExchange RatesFixer API key. The plugin will only request data once per hour, so the free plan of 1000 requests per month is sufficient for this plugin. The new fixer API also provides data for more fiat currencies than before.

Be advised that unless you do this, fiat amounts will not be displayed correctly on the frontend. Additionally, some extensions such as the payment gateways require correct exchange rates to function properly. So get your key today!

Fixed/custom rates

If you have written custom code to provide your own manual exchange rates, be aware that the way to do this has changed. Hooking to the filters is now a lot simpler. Example code is here:

https://gist.github.com/alex-georgiou/492196184f206002c864225180ca8fbb

Multiple exchange rate providers

The plugin’s exchange rates system has been improved throughout. You can now mix and match multiple exchange rates providers if you need to. Most people should choose fixer for fiat rates, plus one more provider, such as coinmarketcap, for cryptocurrency exchange rates.

If you disable an exchange rate provider, its data is now retained on the DB, but is no longer updated. Data is updated for all the exchange rates that you have selected in the checkbox list. For performance reasons, do not enable all the providers, only enable the ones you need.

 

Comments:8

  1. Thanks for the info!
    1000 api calls per month doesn’t sound like much… unless I am misunderstanding how it works.

    Do any of the others on the list provide fiat exchange rates?

    1. This is only for the fiat exchange rates. Fiat currencies do not change that often. Refreshing the data once per hour should be OK for most uses. Cryptocurrency exchange rates are more volatile and they are updated every 5 minutes by default, although you are free to change that down to 1 minute. The limitation is only for fiat currency rates. If you are interested only in USD exchange rates you can use CoinMarketcap.

  2. Hi, Fixer show only exchange rate for BTC. What to do for other cryptocurrency? Where i can set 4 the number of decimal places for a given number to 2 without it being rounded up in exchange rate shortcode?

    1. Hello, for the other cryptocurrencies you should enable the other available exchange rate providers. The plugin will use the USD_BTC and the BTC_XYZ rates to figure out the USD_XYZ rate for coin XYZ. I am sorry but I did not understand your other question about decimal places? Could you please post it in the support forum and rephrase? Thank you.

    1. Not at first. To simplify things, I am removing exchange rates providers in favor of only using CoinGecko. I do this because one set of unique IDs is needed across all cryptocurrencies to avoid collisions.
      Having said this, the code to import exchange rates from other sources will be simple enough and I will provide examples.

        1. You are welcome! After wallets6 is out, I will be able to help you on how to extend the plugin to retrieve exchange rates from coinpaprika or other services and set them in the plugin.

Leave a Reply

Your email address will not be published. Required fields are marked *