# Keep connection alive

To keep the connection with the WebSocket node alive you need to notify the node that your peer is awake every 10 sec.&#x20;

### Example

```javascript
setInterval(function() {
  client.api.heartbeat()
}, 10 * 1000);
```
