bitcoinity

0.1.0 • Public • Published

bitcoinity

Basic node.js interface to and parser for data from data.bitcoinity.org

Installation

npm install bitcoinity

Usage

var bitcoinity = require("bitcoinity");

{ 
        data_type : 'volume', // Type of data
        timespan : '3d', // The lookback amount of time over which to pull in the data 
        r : 'minute' // The time basis overwhich to aggregate the data
    },

bitcoinity.getCSV({ // Get string parameters for request; see various tabs in data.bitcoinity.org to configure
    data_type : "volume",
    timespan : "10m",
    volume_unit : "btc",
    r : 'minute'
}, function(err, csvData) {
    if (err) {
        console.log("Encountered a download error. Exiting.");
        throw err;
    }
    wideData = bitcoinity.parseCSV(csvData); // Parses data into an array of objects
    console.log(wideData);
    tallData = bitcoinity.parseCSVTall(csvData, function(timestamp) { // Converts listing of exchanges from wide to tall
        return timestamp.replace(" UTC", "+00");
    });
    console.log(tallData);
});

Versions

Current Tags

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

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 0.1.0
    4

Package Sidebar

Install

npm i bitcoinity

Weekly Downloads

4

Version

0.1.0

License

MIT

Last publish

Collaborators

  • gseshadri