A (unofficial) Node.js API client for the Poloniex.
The client supports both public (unauthenticated) and private (authenticated) calls to the Poloniex API.
For private calls, the user secret is never exposed to other parts of the program or over the Web. The user key is sent as a header to the API, along with a signed request.
Includes new margin trading API calls.
Repo home: github.com/sigwo/node-poloniex
MIT, open source. See LICENSE file.
npm install node-poloniex
git clone https://github.com/sigwo/node-poloniex.git
cd node-poloniex
npm install
In your app, require the module:
var Poloniex = require('node-poloniex');
If not installed via NPM, then provide the path to poloniex.js
If only public API calls are needed, then no API key or secret is required:
var poloniex = new Poloniex();
Or, to use Poloniex's trading API, your API key and secret must be provided:
var poloniex = new Poloniex('API_KEY', 'API_SECRET');
All Poloniex API methods are supported (with some name changes to avoid naming collisions). All methods require a callback function.
The callback is passed two arguments:
- An error object, or
null
if the API request was successful - A data object, the response from the API
For the most up-to-date API documentation, see poloniex.com/api.