Skip to content

Latest commit

 

History

History
35 lines (24 loc) · 584 Bytes

README.md

File metadata and controls

35 lines (24 loc) · 584 Bytes

cryptowatch

API for interacting with price of bitcoin/altcoins from cryptowa.ch.

Install

$ npm install --save cryptowatch

Usage

To get the price from coinbase for BTC in USD.

import Cryptowatch from 'cryptowatch'

const cw = new Cryptowatch()

cw.price('btc', 'usd', 'coinbase')
  .then(p => console.log(p.price))
  .catch(err => console.log(err))

Alternatively, in ES5

var cryptowatch = require('cryptowatch')

cw = new cryptowatch()

cw.price('btc', 'usd', 'coinbase')
  .then(function(p) {
    console.log(p.price)
  })