crypto-exchange-manager
Client for multiple exchanges, supporting tickers informations, as well as additio features as I implement them.
If you only need tickers (different currencies' values) you can use https://github.com/donbobvanbirt/coin-ticker which is dedicated to ticks information. crypto-manager was first a rewrite of this package so give the original module some love ;)
Install
$ npm install crypto-exchange-manager
Usage
Require:
const cryptoManager = require('crypto-exchange-manager');
Get available asset pairs by exchange:
Use the (always implemented) getPairs() method
const cryptoManager = require('crypto-exchange-manager');
const polynex = new cryptoManager['polynex']();
polynex.getPairs()
.then((pairs) => {
console.log(pairs);
})
Get Ticker Data:
Use the (always implemented) tick() method
const cryptoManager = require('crypto-exchange-manager');
const polynex = new cryptoManager['polynex']();
polynex.tick('BCN_BTC')
.then((tick) => {
console.log(tick);
})
Will return an object containing the following values (all values are string) :
{
last:
ask:
bid:
low:
high:
vol:
timestamp:
exchange:
pair:
rawData:
}
Authenticate user
Currently supported :
- bifinex
const cryptoManager = require('crypto-exchange-manager');
const bifinex = new cryptoManager['bifinex']({
key: '123',
secret: '123'
});
get wallet
Currently supported :
- bifinex
const cryptoManager = require('crypto-exchange-manager');
const bifinex = new cryptoManager['bifinex']({
key: '123',
secret: '123'
});
bifinex.getWallet().then(result => {
console.log(result);
})
Will return an array of currencies with their value in the wallet.
[
{currency: 'ETH', wallet: '1.8'}
]
get wallet
Currently supported :
- bifinex
const cryptoManager = require('crypto-exchange-manager');
const bifinex = new cryptoManager['bifinex']({
key: '123',
secret: '123'
});
bifinex.getBook('ETH').then(result => {
console.log(result);
})
Will return an array of movement in / out of the account of the user for a specific currency.
[
{currency: 'ETH', value: '1.8', completed: true, issued: '154787488'}
]