bitvalor-api
A [BitValor API](http://bitvalor.com/api) Node.js module
Last updated a year ago by marcelomorgado .
MIT · Original npm · Tarball · package.json
$ cnpm install bitvalor-api 
SYNC missed versions from official npm registry.

bitvalor-api

A BitValor API Node.js module

Installation

npm install bitvalor-api

Usage

var BitValor = require('bitvalor-api');

// Last Bitcoin price
BitValor.ticker().then(t => {
	let last = t.ticker_24h.total.last;
	return last;
}).then(console.log);

// Cheapest maker order fee among all exchanges
BitValor.exchanges().then(exchanges => {
	let cheapest = { exchange: undefined, price: undefined };

	for(let e in exchanges) {
		let ex = String(e);
		let p = exchanges[e].fees.trade_book[0];

		if(cheapest.price == undefined || p < cheapest.price) {
			cheapest.exchange = ex;
			cheapest.price = p;
		}
	}

	return cheapest;

}).then(console.log);

Test

npm run test

Current Tags

  • 1.0.2                                ...           latest (a year ago)

3 Versions

  • 1.0.2                                ...           a year ago
  • 1.0.1                                ...           a year ago
  • 1.0.0                                ...           a year ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 5
Last Day 0
Last Week 3
Last Month 8
Dependencies (3)
Dev Dependencies (2)
Dependents (0)
None

Copyright 2014 - 2016 © taobao.org |