Skip to content

JavaScript NPM package to convert currencies through BACEN - Banco Central of Brazil

Notifications You must be signed in to change notification settings

grupomeza/BACEN-Converter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BACEN Converter

This API allows you to convert values between currencies using the public services of BACEN - Banco Central of Brazil. Almost all currencies of the world are accepted (USD, BRL, CAD, etc).

Simple usage

const { convertRate } = require('bacen-converter');

// After resolved prints the 1000 BRL converted to USD with today's rate
convertRate(1000.0, 'USD', 'BRL').then(console.log);

You can also specify a date and the API will use it's rate as below.

const { convertRate } = require('bacen-converter');

// Prints the value converted USD to BRL using rate of day 2021-07-03
convertRate(1000.0, 'USD', 'BRL', '2021-07-03').then(console.log);

Donation

If you want to contribute to author, donate using PayPal to e-mail [email protected]. Any value is appreciated. Hope you find this project useful. :-)

About

JavaScript NPM package to convert currencies through BACEN - Banco Central of Brazil

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published