0.0.6 • Published 6 years ago

crypto-price v0.0.6

Weekly downloads
138
License
MIT
Repository
github
Last release
6 years ago

Crypto-Price

Crypto Price is a Node.js Module that provides an Easy API which allows users to easily get crypto currency price in their Local / Base Currency and returns a Promise that gives you the price.

Supported Crypto Currencies

  • Ethereum (ETH)
  • Bitcoin (BTC)
  • Litecoin (LTC)
  • Monero (XMR)
  • Ripple (XRP)
  • ZCash (ZEC)
  • Many More (Here's a list of them.)

API (with Example)

getCryptoPrice

The getCryptoPrice allows you to get the price of crypto currency from your base currency.

let price = require('crypto-price')
price.getCryptoPrice(base, crypto).then(obj => { // Base for ex - USD, Crypto for ex - ETH 
	console.log(obj.price)
}).catch(err => {
	console.log(err)
})

getBasePrice

The getBasePrice allows you to get the price of base currency from your crypto currency.

let price = require('crypto-price')
price.getBasePrice(base, crypto).then(obj => { // Base for ex - USD, Crypto for ex - ETH 
	console.log(obj.price)
}).catch(err => {
	console.log(err)
})

License

Copyright Daksh Miglani, Licensed Under MIT 2017.