-
Notifications
You must be signed in to change notification settings - Fork 320
GDAX Heartbeat Channel #113
Comments
I did like below and don't have any issues. Are you passing API KEY's properly? const websocket = new Gdax.WebsocketClient(['LTC-USD']);
websocket.on('message', function(data) {
/* work with data */
if (data['type'] == 'received') {
console.log(data);
}
}); |
This is a shortcoming of the backwards compatibility for heartbeats. If you authenticate the heartbeat will be processed before the other request, resulting in a failed subscription. This library's heartbeat implementation should be switched to use the heartbeat channel instead. |
Occasionally, GDAX web socket connection will be disconnected even subscribing to heartbeat channel. @fb55 could you please let me know how to reconnect when it is disconnected? |
- Automatically adds the `heartbeat` channel if not already subscribed - Removes redundant `keepalive` ping on the socket Fixes coinbase#113
Please review #150 for a fix of the heartbeat subscription. |
@nengine You can reconnect by calling const client = new Gdax.WebsocketClient(...);
client.on('close', () => client.connect()); Of course, you might want to delay the re-connect and/or retry if the connection if it continues to fail. |
- Automatically adds the `heartbeat` channel if not already subscribed - Removes redundant `keepalive` ping on the socket Fixes coinbase#113
- Automatically adds the `heartbeat` channel if not already subscribed - Removes redundant `keepalive` ping on the socket Fixes coinbase#113
- Automatically adds the `heartbeat` channel if not already subscribed - Removes redundant `keepalive` ping on the socket Fixes coinbase#113
* Fix heartbeat channel subscriptions - Automatically adds the `heartbeat` channel if not already subscribed - Removes redundant `keepalive` ping on the socket Fixes #113 * Remove heartbeat from OrderbookSync signature
Fixed in #150 |
Hi there. I'm looking at the documentation and trying to subscribe to the heartbeat channel, with this code:
But I keep receiving the following error, despite passing BTC-USD
//error
{ type: 'error',message: 'Failed to subscribe',reason: 'You need to specify at least one product ID for channel heartbeat'
I'm guessing this is more to do with my ignorance on how the code works than anything else. Is there a more appropriate, centralized place to put these comments?
The text was updated successfully, but these errors were encountered: