Node Bittrex API is an asynchronous node.js library for the Bittrex API - https://bittrex.com/. The Bittrex API data can be received either as a GET request or a Stream.
Documentation to the Bittrex API: https://bittrex.com/Home/Api
Thanks go to the people who have contributed code to this Library.
install it most convenient via npm:
$ npm install node.bittrex.api
fetch the project via git:
$ git clone https://github.com/n0mad01/node.bittrex.api.git
then meet the package dependencies:
$ cd node-bittrex-api/$ npm install
include node.bittrex.api.js into your project:
var bittrex = ;
bittrexoptions'apikey' : API_KEY'apisecret' : API_SECRET'stream' : true'verbose' : true'cleartext' : false;
By default the returned data is an object, in order to get clear text you have to add the option cleartext (streams will always return objects):
'cleartext' : true
The baseUrl itself can also be set via options
'baseUrl' : ''
To activate Streaming simply add to your options:
'stream' : true
Streaming depends on the following npm packages:
After configuration you can use the object right away: example #1
Other libraries utilized:
For HmacSHA512 this package is using a part of Googles Crypto.js (the node crypt package could not provide any appropriate result).
Optional parameters may have to be looked up at https://bittrex.com/Home/Api.
It may happen that some Bittrex API methods are missing, also they could have been forgotten in the documentation. In this case, if this strikes you, feel free to open a issue or send me a pull request.
Also: the method sendCustomRequest enables completely custom requests, regardless the specific API methods.
var url = '';bittrex;
example #2 (credentials applied to request/stream)
bittrex;will result in the Header is being set too:https://bittrex.com/api/v1.1/account/getbalances?currency=BTC&apikey=API_KEY&nonce=4456490600