exchange-rate-dolarhoy

1.0.8 • Public • Published

Retreieve the exchange rate from Dolarhoy

The default rate is USD to ARS but you can specify others currencies:

  • USD_BRZ ==> Real ( BRZ )
  • USD_CLP ==> Peso Chile ( CLP )
  • USD_UYU ==> Peso Uruguay ( UYU )

Installation

npm

npm install --save  exchange-rate-dolarhoy

Usage

1- Import the component into your project

import { exchangeRate }     from "exchange-rate-dolarhoy" ;
 

2- Call the widget ( Default is USD to ARS )

exchangeRate.getRateDolarHoy({conversion:'USD_ARS'})
    .then((rate)=>{
        console.log('...rate: ',rate) ;
    })
    .catch((err)=>{
        console.log('...error: ',err);
    }) ;

Result:

{
    "date": "YYYY-MM-DD",
    "rate": 9999.999
}

Package Sidebar

Install

npm i exchange-rate-dolarhoy

Weekly Downloads

1

Version

1.0.8

License

ISC

Unpacked Size

2.15 MB

Total Files

9

Last publish

Collaborators

  • sebaeze