1.0.8 • Published 4 years ago
exchange-rate-dolarhoy v1.0.8
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
}