bkam-wrapper
v1.0.1
Published
A Node.js wrapper for Bank Al-Maghrib's API
Downloads
6
Readme
bkam-wrapper
A Node.js wrapper for Bank Al-Maghrib's API
This might help you get data from BKAM's API in your node.js apps easily. Make sure to register on the Developer's portal to get access to your API keys & take a look at the documentation.
For now only two products are offered: Currency Exchange Rates & Treasury Bonds reference interest rates
Install
[npm][]:
npm install bkam-wrapper
Usage
const BkamWrapper = require('bkam-wrapper');
const bkamWrapper = new BkamWrapper();
// Include your API keys from BKAM developer account
const getData = new bkamWrapper({
currency_key: YOUR_CURRENCY_KEY,
bonds_key: YOUR_BONDS_KEY
})
Methods
- Getting currency exchange rates - Banknotes
getData.getCoursBBE(options)
options: libDevise: String, optional | date: String, optional
- Getting currency exchange rates - Transfers
getData.getCoursVIR(options)
options: libDevise: String, optional | date: String, optional
- Getting reference interest rate of TBs data
getData.getCourbeBDT(options)
options: dateCourbe: String, optional
Contribute & Future Work
You're welcome to contribute or open issues to improve the code! It should be easy to adapt this project if new products are offered by Bank Al Maghrib's API.
P.S: I am still learning, feel free to contact me if something needs to be improved in the project!