poloniex-api-node
poloniex-api-node copied to clipboard
Websocket permission error
I added these lines in my app.js
poloniex.openWebSocket();
poloniex.subscribe('accountNotifications');
poloniex.on('message', (channelName, data) => {
if (channelName === 'accountNotifications') {
console.log(`account notifications update: ${JSON.stringify(data)}`);
}
})
and it is giving me errors below
throw err; // Unhandled 'error' event
^
Error [ERR_UNHANDLED_ERROR]: Unhandled error. ('Permission denied.')
at Poloniex.emit (events.js:300:17)
at WebSocket.ws.onmessage (/var/www/html/nodepoloniex/node_modules/poloniex-api-node/lib/poloniex.js:624:25)