Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

ecb-euro-exchange-rates

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ecb-euro-exchange-rates

Retrieve Euro foreign exchange reference rates from the European Central Bank

  • 1.1.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4.5K
decreased by-61.34%
Maintainers
1
Weekly downloads
 
Created
Source

Euro Exchange Rates by ECB

Run Status Coverage Badge npm version

Retrieve Euro foreign exchange reference rates from an API provided by the European Central Bank.

The API provides exchange rates updated daily for the following currencies:

  • USD: US dollar
  • JPY: Japanese yen
  • BGN: Bulgarian lev
  • CZK: Czech koruna
  • DKK: Danish krone
  • GBP: Pound sterling
  • HUF: Hungarian forint
  • PLN: Polish zloty
  • RON: Romanian leu
  • SEK: Swedish krona
  • CHF: Swiss franc
  • ISK: Icelandic krona
  • NOK: Norwegian krone
  • HRK: Croatian kuna
  • RUB: Russian rouble
  • TRY: Turkish lira
  • AUD: Australian dollar
  • BRL: Brazilian real
  • CAD: Canadian dollar
  • CNY: Chinese yuan renminbi
  • HKD: Hong Kong dollar
  • IDR: Indonesian rupiah
  • ILS: Israeli shekel
  • INR: Indian rupee
  • KRW: South Korean won
  • MXN: Mexican peso
  • MYR: Malaysian ringgit
  • NZD: New Zealand dollar
  • PHP: Philippine piso
  • SGD: Singapore dollar
  • THB: Thai baht
  • ZAR: South African rand

Installation

$ yarn add ecb-euro-exchange-rates

Usage

TS typings are available and you’ll get auto-completion for the supported currencies.

import * as exchangeRates from 'ecb-euro-exchange-rates';

const result = await exchangeRates.fetch();
console.log('Last update: ' + result.time);
console.log('USD: ' + result.rates.USD);

Historic rates are available via fetchHistoric90d (fetches previous 90 days) and fetchHistoric (fetches all rates back to 1999).

Development

Install NPM dependencies with yarn.

To execute the tests, run yarn test.

For the best development experience, make sure that your editor supports TSLint and EditorConfig.

Releasing to NPM

Commit all changes and run the following:

$ npm login
$ npm version <update_type>
$ npm publish

… where <update_type> is one of patch, minor, or major. This will update the package.json, and create a tagged Git commit with the version number.

Contributing

Pull requests are very welcome. Feel free to discuss bugs or new features by opening a new issue.


Copyright Philipp Katz, LineUpr GmbH, 2018

Keywords

FAQs

Package last updated on 26 Oct 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc