magento2通过fixer.io自动更新汇率
汇率表是directory_currency_rate
前后截图如下

步骤:
一,开启cron
bin/magento cron:install -f
具体的见
https://www.kancloud.cn/zouhongzhao/magento2-in-action/628429
二,选择需要的币种
比如我选了欧元/美元/人民币这3种。默认是欧元

三,设置fixer
1,去 https://fixer.io/ 官方申请免费的API

2,开启自动更新

如果正常的话,可以在cron_schedule表里查看到,通过job_code=currency_rates_update过滤

四,执行完成后,如果有问题会给你发邮件报错。
没问题的话,可以在后台STORES -> Currency Rates 页面查看到。

或者你直接在数据库directory_currency_rate表里查看。

五,其他
导入的代码在 'vendor/magento/module-directory/Model/Observer.php' 里
