All services can retrieve TWD currency rate.

YahooFinance

Fixer.io

I can receive rates from Fixer.io but not from Yahoo or Webservicex.
Magento 2.2.3
http://api.fixer.io/latest
"This API endpoint is deprecated and has now been shut down. To keep using the Fixer API, please update your integration to use the new Fixer API endpoint, designed as a simple drop-in replacement."
The API endpoint needs to be updated.
In summary, there are no longer any working currency providers in M2. Fixer.io has a new version that requires a free API key. So the admin interface needs to be changed to accept the API key, and the url updated for fixer.io to work again. The other two (Yahoo, Webservicex) no longer work at all and should be dropped.
This issue should be marked with high priority since it means having to update currency rates manually every day until it's fixed.
After looking into it a bit more Fixer.io wouldn't work at all as the free plan only lets you use € as the base currency.
It's EUR by default, but you can provide any base currency you want:
Rates are quoted against the Euro by default. Quote against a different currency by setting the base parameter in your request.
GET /latest?base=USD
See here: https://github.com/fixerAPI/fixer#readme
I believe that's only available on the paid plan.
"...Minor limitations include our new 1000 requests/month limit and EUR being the only available base currency for customers using a free account."
You're right, I missed that. I just did a quick search and there are other free api services, but most appear to have the same limitation (can't change base currency).
Here are a few that don't appear to have this limitation:
https://www.amdoren.com/currency-api/
https://currex.info/
Can we look at using one of these?
Ignore the above. Having a fixed base currency isn't a deal-breaker, it just means an extra step to to convert the API base into the store base.
For example, fixer.io forces base currency to be EUR. In my store, the base currency is GBP, but we also display prices in USD and AUD.
1) Convert API base to store base (EUR/GBP). Using today's rates, this is 0.876.
2) Get other rates from API using its base currency:
USD/EUR = 0.849
AUD/EUR = 0.6505
3) Now multiply the conversion factor to get rates in desired base currency:
0.849 USD/EUR x 0.876 EUR/GBP = 0.745 USD/GBP
0.6505 AUD/EUR x 0.876 EUR/GBP = 0.571 AUD/GBP
So I suggest we stick with fixer.io, but add in the above logic to first convert API base currency to shop base currency.
This guy created a fixer.io alternative, https://github.com/fixerAPI/fixer/issues/107#issue-313114059
It should be as easy as replacing api.fixer.io with exchangeratesapi.io/api in https://github.com/magento/magento2/blob/10f84fdd222f085fcb007631976b113775b02143/app/code/Magento/Directory/Model/Currency/Import/FixerIo.php#L16
Result: https://exchangeratesapi.io/api/latest?base=USD&symbols=EUR
I've noticed on exchangeratesapi.io/api that when EUR is the base currency and you have multiple currencies it won't work.
Since the base currency also gets included in the desired currency list.
Solution:
But if you replace http://api.fixer.io with https://frankfurter.app it works flawlessly, also with multiple currencies.
For example: https://frankfurter.app/latest?base=EUR&symbols=CHF,CNY,EUR,GBP,USD
@MaikelZwey I get a forbidden when I open your link, I have to remove a symbol so seems there is a limit of 4. I'll try to use that though, thanks!
Also, here someone copy/pasted a module in a stackexchange thread: https://magento.stackexchange.com/questions/228588/free-currency-converter-fixer-io-stopped-working
I'm just not sure how reliable that service is or if this works with multiple currencies.
@HirokazuNishi, thank you for your report.
We've acknowledged the issue and added to our backlog.
Hi @HirokazuNishi. Thank you for your report.
The issue has been fixed in magento/magento2#15542 by @HirokazuNishi in 2.3-develop branch
Related commit(s):
The fix will be available with the upcoming 2.3.0 release.
Hi @TomashKhamlai. Thank you for working on this issue.
Looks like this issue is already verified and confirmed. But if your want to validate it one more time, please, go though the following instruction:
Component: XXXXX label(s) to the ticket, indicating the components it may be related to.[x] 2. Verify that the issue is reproducible on 2.3-develop branchDetails
- Add the comment @magento-engcom-team give me 2.3-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.3-develop branch, please, add the label Reproduced on 2.3.x.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and _stop verification process here_!
[ ] 3. Verify that the issue is reproducible on 2.2-develop branch. Details
- Add the comment @magento-engcom-team give me 2.2-develop instance to deploy test instance on Magento infrastructure.
- If the issue is reproducible on 2.2-develop branch, please add the label Reproduced on 2.2.x
[ ] 4. If the issue is not relevant or is not reproducible any more, feel free to close it.
The issue was re-tested and we can confirm that it was fixed on the 2.3 release branch. We closing this issue as fixed due to upcoming 2.3 release that will be available soon.
@TomashKhamlai Is this issue valid for backport to 2.2?
@Ctucker9233, yes, but I am not sure that this is easy task.
This issue has NOT been fixed in #15542.
The new CurrencyConcerterAPI introduced in 2.3 does not process EUR.
@PascalBrouwers, please provide steps to reproduce and reopen the issue or consider with creating a new issue but mention this one in the description. Thank you for your interest in this problem
Most helpful comment
This guy created a fixer.io alternative, https://github.com/fixerAPI/fixer/issues/107#issue-313114059
It should be as easy as replacing
api.fixer.iowithexchangeratesapi.io/apiin https://github.com/magento/magento2/blob/10f84fdd222f085fcb007631976b113775b02143/app/code/Magento/Directory/Model/Currency/Import/FixerIo.php#L16Result: https://exchangeratesapi.io/api/latest?base=USD&symbols=EUR