I'm looking at the documentation on Coinbase's Github for the GDAX API and trying to subscribe to the heartbeat channel, this is the code:
var websocket = new Gdax.WebsocketClient(
['BTC-USD'],
'wss://ws-feed.gdax.com',
{
key: API_KEY,
secret: API_SECRET,
passphrase: API_PASSPHRASE,
},
{ heartbeat: true }
)
webSocket.on('message', data => {
console.log(data);
});
I get this Error:
{
type: 'error',
message: 'Failed to subscribe',
reason: 'You need to specify at least one product ID for channel heartbeat'
}