npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bonbast-api

v1.0.1

Published

receive price from bonbast site

Downloads

1

Readme

BonBast Api For Nodejs

A node library to get exchange rates from the bonbast site

Taken from the bonbast library

Installation

npm:

npm install bonbast-api

yarn:

yarn add bonbast-api

Usage

import es5 or javascript:

const {BonbastApi} = require("bonbast-api")

import es6 or typescript:

import {BonbastApi} from 'bonbast-api';

Get Response:

const getResponse = await BonbastApi.getResponse();

options:

| name | type | default | description | |---------------|---------|---------|---------------------------------| | sellAddCommas | boolean | true | for add / remove commas numbers | | buyAddCommas | boolean | true | for add / remove commas numbers |

simple response:

 {
  aed1: '14120',
  aed2: '14070',
  afn1: '730',
  afn2: '725',
  amd1: '1270',
  amd2: '1265',
  aud1: '34400',
  aud2: '34300'

  // and more ...
}

Get Currency:

const getCurrency = await BonbastApi.getCurrency();

options:

| name | type | default | description | |---------------|---------|---------|---------------------------------| | sellAddCommas | boolean | true | for add / remove commas numbers | | buyAddCommas | boolean | true | for add / remove commas numbers |

simple response:

[
  {
    code: 'bhd',
    name: 'Bahraini Dinar',
    sell: '136,100',
    buy: '135,600'
  },
  {
    code: 'cad',
    name: 'Canadian Dollar',
    sell: '38,400',
    buy: '38,300'
  },
  {
    code: 'eur',
    name: 'Euro',
    sell: '56,150',
    buy: '56,050'
  }

  // and more ...
]

Get Coin:

const getCoin = await BonbastApi.getCoin();

options:

| name | type | default | description | |---------------|---------|---------|---------------------------------| | sellAddCommas | boolean | true | for add / remove commas numbers | | buyAddCommas | boolean | true | for add / remove commas numbers |

simple response:

[
  {
    code: 'emami',
    name: 'Emami',
    sell: '30,750,000',
    buy: '30,450,000'
  },
  {
    code: 'azadi',
    name: 'Gerami',
    sell: '5,950,000',
    buy: '5,800,000'
  }

  // and more ...
]

Get Gold:

const getCoin = await BonbastApi.getGold({priceAddCommas: false});

options:

| name | type | default | description | |----------------|---------|---------|---------------------------------| | priceAddCommas | boolean | true | for add / remove commas numbers |

simple response:

[
  {
    code: 'mithqal',
    name: 'Gold Mithqal',
    price: 11219000
  },
  {
    code: 'gol18',
    name: 'Gold Gram',
    price: 2589916
  },
  {
    code: 'ounce',
    name: 'Ounce',
    price: 2029.24
  },
  {
    code: 'bitcoin',
    name: 'Bitcoin',
    price: 46873.93
  }
]

description:

List of supported currencies:

| Flag | Currency | Code | |:----:|-------------------|:----:| | 🇺🇸 | US Dollar | USD | | 🇪🇺 | Euro | EUR | | 🇬🇧 | British Pound | GBP | | 🇨🇭 | Swiss Franc | CHF | | 🇨🇦 | Canadian Dollar | CAD | | 🇦🇺 | Australian Dollar | AUD | | 🇸🇪 | Swedish Krona | SEK | | 🇳🇴 | Norwegian Krone | NOK | | 🇷🇺 | Russian Ruble | RUB | | 🇹🇭 | Thai Baht | THB | | 🇸🇬 | Singapore Dollar | SGD | | 🇭🇰 | Hong Kong Dollar | HKD | | 🇦🇿 | Azerbaijani Manat | AZN | | 🇦🇲 | 10 Armenian Dram | AMD | | 🇩🇰 | Danish Krone | DKK | | 🇦🇪 | UAE Dirham | AED | | 🇯🇵 | 10 Japanese Yen | JPY | | 🇹🇷 | Turkish Lira | TRY | | 🇨🇳 | Chinese Yuan | CNY | | 🇸🇦 | Saudi Riyal | SAR | | 🇮🇳 | Indian Rupee | INR | | 🇲🇾 | Malaysian Ringgit | MYR | | 🇦🇫 | Afghan Afghani | AFN | | 🇰🇼 | Kuwaiti Dinar | KWD | | 🇮🇶 | 100 Iraqi Dinar | IQD | | 🇧🇭 | Bahraini Dinar | BHD | | 🇴🇲 | Omani Rial | OMR | | 🇶🇦 | Qatari Rial | QAR |