Exchange rate api feed

In Bahrain, we are required by law to use Central Bank official exchange rate for foreign currency transactions for tax purposes.Our central bank provides an api url which you can use to retrieve the exchange rate. See: https://www.cbb.gov.bh/apis/

@lubos I was wondering if we can feed some sort of liquid code somewhere to generate the required url so we can retrieve the exchange rate from the CBB directly during entry. If not, could you please consider this as an idea?