kraken-api-xan

0.1.8 • Public • Published

Node Kraken

NodeJS Client Library for the Kraken (kraken.com) API

This is an asynchronous node js client for the kraken.com API.

It exposes all the API methods found here: https://www.kraken.com/help/api through the 'api' method:

Example Usage:

var KrakenClient = require('kraken-api');
var kraken = new KrakenClient('api_key', 'api_secret');

// Display user's balance
kraken.api('Balance', null, function(error, data) {
    if(error) {
        console.log(error);
    }
    else {
        console.log(data.result);
    }
});

// Get Ticker Info
kraken.api('Ticker', {"pair": 'XBTCXLTC'}, function(error, data) {
    if(error) {
        console.log(error);
    }
    else {
        console.log(data.result);
    }
});

Update:

As of version 0.1.0, the callback passed to the api function conforms to the Node.js standard of

function(error, data) {
    // ...
}

Thanks to @tehsenaus and @petermrg for pointing this out.

Credit:

I used the example php implementation at https://github.com/payward/kraken-api-client and the python implementation at https://github.com/veox/python3-krakenex as references.

Readme

Keywords

Package Sidebar

Install

npm i kraken-api-xan

Weekly Downloads

2

Version

0.1.8

License

MIT

Last publish

Collaborators

  • xanatas