Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const Bitstamp_WS = function(opts) {
if (opts) {
this.opts = opts
} else {
this.opts = {
encrypted: true,
}
}
this.client = new Pusher(BITSTAMP_PUSHER_KEY, {
encrypted: this.opts.encrypted,
// encrypted: true
})
// bitstamp publishes all data over just 2 channels
// make sure we only subscribe to each channel once
this.bound = {
trade: false,
data: false,
}
this.subscribe()
}