Skip to content

nolim1t/nl-poloniex

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 

Poloniex Node.js Library

npm version

About

This is my Node.js Library for Poloniex

Installing

npm i nl-poloniex --save

Contributing

All contributions are welcome and appreciated. Open Source is a meritocracy who doesn't care who you are.

Example Code

Initializing

const poloniex = require('nl-poloniex');

Get Order Book (BTC / ETC Pair)

// Depth : 10
poloniex.public({endpoint: "returnOrderBook", currencyPair: "BTC_ETC", depth: 10}, (cb) => console.log(cb));
// Depth default
poloniex.public({endpoint: "returnOrderBook", currencyPair: "BTC_ETC"}, (cb) => console.log(cb));

Get Volume for 24 hours

poloniex.public({endpoint: "return24hVolume"}, (cb) => console.log(cb));

Return Ticker

poloniex.public({endpoint: "returnTicker"}, (cb) => console.log(cb));

Get Balances

poloniex.private({command: "returnBalances", 'key': '', 'secret': ''}, (cb) => console.log(cb));

Return all balances (including margin accounts)

poloniex.private({command: "returnAvailableAccountBalances", 'key': '', 'secret': ''}, (cb) => console.log(cb));

Return Margin Summary

poloniex.private({command: "returnMarginAccountSummary", 'key': '', 'secret': ''}, (cb) => console.log(cb));