1 |
|
2 | const bittrex = require('../node.bittrex.api');
|
3 | const APIKEY = 'KEY';
|
4 | const APISECRET = 'SECRET';
|
5 |
|
6 | bittrex.options({
|
7 | 'apikey' : APIKEY,
|
8 | 'apisecret' : APISECRET,
|
9 | 'stream' : false,
|
10 | 'verbose' : false,
|
11 | 'cleartext' : false
|
12 | });
|
13 |
|
14 |
|
15 |
|
16 |
|
17 | bittrex.sendCustomRequest( 'https://bittrex.com/api/v1.1/public/getmarketsummary?market=btc-ltc', function( data ) {
|
18 | console.log( data );
|
19 | }, true);
|
20 |
|
21 |
|
22 |
|
23 |
|
24 | bittrex.getmarkethistory( { market : 'BTC-LTC' }, function( data ) {
|
25 | console.log( data.result );
|
26 | });
|
27 |
|
28 |
|
29 |
|
30 |
|
31 | bittrex.getorderbook( { market : 'BTC-PIVX', depth : 10, type : 'both' }, function( data ) {
|
32 |
|
33 | data.result.buy.forEach(function(dataset) { console.log(dataset); });
|
34 | data.result.sell.forEach(function(dataset) { console.log(dataset); });
|
35 | });
|