Last active
October 25, 2018 13:55
-
-
Save KolevDarko/9e515bc88dffc68de3409f5aee3f64c9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Install with: > npm install bitcoinaverage | |
const ba = require('bitcoinaverage'); | |
var pub = '<your public key>'; | |
var secret = '<your secret key>'; | |
var wsClient = ba.websocketClient(pub, secret); | |
wsClient.connectToTickerWebsocketV2('global', ['ETHUSD', 'BCHUSD', 'LTCUSD', 'ETCUSD'], function(response) { | |
console.log(response.data.global); | |
}, function(error){ | |
console.log(error) | |
}, function(){ | |
console.log("websocket closed"); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment