npm.io
1.0.0 • Published 8 years ago

bex-price

Licence
MIT
Version
1.0.0
Deps
1
Size
130 kB
Vulns
24
Weekly
0

BEX Price (USD)

Fetches BEX price from BitShares via CryptoFresh

Installation

npm i bex-price --save

Import

import getBexPrice from 'bex-price'

Usage

Simple usage:

  getBexPrice().then((r) => {
    console.log(r);
  }).catch(function(error) {
    console.error(error);
  });

Usage with options:

  const opts = {
    api: 'https://cryptofresh.com/api/asset/markets?asset=',
    bridge: 'BTS',
    token: 'BEX'
  };
  getBexPrice('USD', opts).then((r) => {
    console.log(r);
  }).catch(function(error) {
    console.error(error);
  });

license

MIT

Keywords