exchange-rates icon indicating copy to clipboard operation
exchange-rates copied to clipboard

Convert with different API

Open Batur123 opened this issue 3 years ago • 0 comments

How do you use convert function with using different api like;

let result = await exchangeRates()
        .setApiBaseUrl('https://api.exchangerate.host')
const { convert } = require('exchange-rates-api');

(async () => {
    let amount = await convert(2000, 'USD', 'EUR', '2018-01-01');
    console.log(amount);    // 1667.6394564000002
})();

Batur123 avatar Apr 23 '22 20:04 Batur123