privateer
v0.5.5
Published
Integrate with exchanges like Bitfinex for crypto-currency trading.
Readme
privateer
Integrate with exchanges like Bitfinex for crypto-currency trading in your JavaScript / Node.js / Sails.js app. Supports Bitcoin, Ethereum, and more.

WARNING
This package does not yet necessarily use IEEE-floating-point-safe math yet (see TODOs in the code). Pull requests welcome!
As of the time of writing this note, you can find the latest abstract method definitions here.
-@mikermcneil, May 11, 2018
Installation 
To install this package, run:
$ npm install privateerThen require it from the actions or helpers in your Sails app, a command-line script, or any other Node.js module.
Usage
privateer supports await, with fallback support for callbacks (.exec()), and promise-chaining (.then()) via the parley interface (an extension of bluebird). Other than the special case of .configure(), all exchange methods are parley Callables, which means they can use Deferreds that support .intercept(), .tolerate(), .toPromise(), .now(), and .log().
Exchanges
To see all available exchanges:
require('privateer');Configuration
Set credentials as global defaults for a particular exchange:
privateer('gdax').configure({
apiKey: '«YOUR API KEY->',
secret: '«YOUR API SECRET->',
password: '«YOUR GDAX PASSPHRASE->',
});Methods
To see all available methods:
privateer('gdax');See Docs
Other stuff
For convenience, privateer exposes the underlying ccxt library as ._ccxt.
WARNING: The underlying version of ccxt might change at any time between major (or even minor) releases of privateer.
require('privateer')._ccxt
// e.g.
// { version: '1.9.346',
// Exchange: { [Function: Exchange] ccxtVersion: '1.9.346' },
// exchanges:
// [ '_1broker',
//
// …and so onSee http://npmjs.com/package/ccxt for more information.
Similarly, privateer exposes the exchange-specific ccxt dao as _ccxtExchange:
require('privateer')('bittrex')._ccxtExchangeCompatibility
Node.js v8.x and up.
License
This package is available under the MIT license.
Copyright © 2017-present Mike McNeil, St. Nicholas Crumrine, Sails Co.

