💱 API wrapper for crypto currencies
JavaScript
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.babelrc
.eslintrc.js
.gitignore
.npmignore
README.md
circle.yml
package.json

README.md

cryptowatch CircleCI

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)
  })