Skip to content

imadarchid/bkam-wrapper

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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');

// 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!

About

A Node.js wrapper for Bank Al-Maghrib's API

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published