Have ideas to improve npm?Join in the discussion! »

    bkam-wrapper

    1.0.1 • Public • Published

    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!

    Install

    npm i bkam-wrapper

    DownloadsWeekly Downloads

    0

    Version

    1.0.1

    License

    MIT

    Unpacked Size

    4.55 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar