node-coindesk

0.2.0 • Public • Published

Node-CoinDesk

Unofficial Node JS client for the CoinDesk API.

Installing

npm install node-coindesk

Example usage

Quick usage: Get the current prices in USD

CoinDesk = require("node-coindesk");
coindesk = new CoinDesk();
coindesk.currentPrice(function(data){
  console.log(data);
});

Set up another currency

CoinDesk = require("node-coindesk");
coindesk = new CoinDesk({currency: "EUR"});

Retrieve historical data

CoinBase = require("node-coindesk");
coindesk = new CoinDesk();
var start_date = new Date();
var end_date = new Date();
end_date.setDate(end_date.getDate() - 60);
coindesk.historical({start_date: new Date(), end_date: end_date }, function(data) {
  console.log(data);
});

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 0.2.0
    4
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.2.0
    4
  • 0.1.1
    2
  • 0.1.0
    2

Package Sidebar

Install

npm i node-coindesk

Weekly Downloads

4

Version

0.2.0

License

none

Last publish

Collaborators

  • erlapso