palitanx-api

1.0.0 • Public • Published

node-palitanx-api

Nodejs wrapper for palitanx.com

Build Status

NPM

API Implementation

const Palitanx = require('palitanx-api');
const palitanx = new Palitanx();

Methods:

getMarkets(callback)
getCurrencies(callback)
getTicker(market, callback) - example getTicker('BTC-CIV', function)
getMarketSummaries(callback)
getMarketSummary(market, callback) - example getMarketSummary('BTC-CIV', function)
getOrderBook(market, type, callback) - example getOrderBook('BTC-CIV', 'both', function...)
getMarketHistory(market, callback) - example getMarketSummary('BTC-CIV', function)

Examples:

const Palitanx = require('palitanx-api');
const palitanx = new Palitanx();
 
palitanx.getMarketSummary('BTC-CIV', function(err, data){
    console.log(err, data) //error should be false and you should get the data
})
 
palitanx.getTicker('BTC-CIV', function(err, data){
    if (!err) {
        console.log(data) // normal data
    }else{
        console.log(err, data) //problem with api err=true and data = ""
    };
})

Check examples folder for more

Package Sidebar

Install

npm i palitanx-api

Weekly Downloads

0

Version

1.0.0

License

MIT

Unpacked Size

15.9 kB

Total Files

7

Last publish

Collaborators

  • slorunner