currencyapi for Meteor
- Website: https://currencyapi.com
- Docs: https://currencyapi.com/docs
Install
meteor add everapi:currencyapi
Quickstart: latest rates with Meteor
1import { CurrencyApi } from 'meteor/everapi:currencyapi'; 2 3const client = CurrencyApi.createClient(process.env.CURRENCYAPI_KEY); 4 5const latest = await client.latest({ base_currency: 'USD', currencies: 'EUR,GBP' }); 6console.log(latest);
Other endpoints
1const status = await client.status(); 2const list = await client.currencies(); 3const hist = await client.historical({ date: '2024-12-31', base_currency: 'USD' }); 4const range = await client.range({ start_date: '2024-12-01', end_date: '2024-12-31', base_currency: 'USD' }); 5const converted = await client.convert({ value: 10, base_currency: 'USD', currencies: 'EUR' });
Set CURRENCYAPI_KEY
in your environment or Meteor settings.
License
MIT