currexchange

1.0.1 • Public • Published

💱 CurrExchange

Foreign currency exchange rates

NPM PKG: currexchange

📚 API Documentation

fn converter({ from: string, to: string, amount: number })

(async () => {
  const data = await converter({ from: 'USD', to: 'EUR', amount: 1 });
})();
{
  "amount": "0.9270",
  "code": "EUR",
  "timestamp": "Apr 18, 2022 15:55 UTC"
}

fn getCurrencies({ defaultCurrency: string, amount: number })

(async () => {
  const data = await getCurrencies({ defaultCurrency: 'USD', amount: 1 });
})();
{
  "ratesTimestamp": "Apr 18, 2022 15:57 UTC",
  "currencies": [
    {
      "country": "Argentine Peso",
      "currencyName": "ARS",
      "currency": 113.552167
    },
    {
      "country": "Australian Dollar",
      "currencyName": "AUD",
      "currency": 1.360368
    },
    { "country": "Bahraini Dinar", "currencyName": "BHD", "currency": 0.376 },
    {
      "country": "Botswana Pula",
      "currencyName": "BWP",
      "currency": 11.514289
    },
    {
      "country": "Brazilian Real",
      "currencyName": "BRL",
      "currency": 4.681556
    },
    {
      "country": "Bruneian Dollar",
      "currencyName": "BND",
      "currency": 1.361736
    }
    // more ...
  ]
}

🤝 Contributing

  • Fork it!
  • Create your feature branch: git checkout -b my-new-feature
  • Commit your changes: git commit -am 'Add some feature'
  • Push to the branch: git push origin my-new-feature
  • Submit a pull request

👥 Credits


💢 Troubleshootings

This is just a personal project created for study / demonstration purpose and to simplify my working life, it may or may not be a good fit for your project(s).


❤️ Show your support

Please ⭐ this repository if you like it or this project helped you!
Feel free to open issues or submit pull-requests to help me improving my work.


🤖 Author

Chris M. Perez

You can follow me on github · twitter


Copyright ©2022 currexchange.


Package Sidebar

Install

npm i currexchange

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

5.65 kB

Total Files

9

Last publish

Collaborators

  • chris5855