poloniex-api-node is a simple node.js wrapper for Poloniex REST API.
npm install poloniex-api-node
To access the private Poloniex API methods you must supply your key id and key secret as the first two arguments. If you are only accessing the public API endpoints you can leave these two arguments out.
Example:
const Poloniex = require('poloniex-api-node');
let poloniex = new Poloniex('your_key', 'your_secret');
poloniex.returnLoanOrders('BTC', null, function (err, ticker) {
if (!err)
console.log(ticker);
});
For details about the API endpoints see full documentation at https://poloniex.com/support/api/
Note: For calling a method with optional parameters, the parameters, when not wanted, need to be passed as null
The arguments passed to the callback function for each method are:
- An error or
null
if no error occurred. - An object containing the data returned by the Poloniex API.
Example:
poloniex.returnTicker(function(err, ticker) {});
See detailed ChangeLog