Skip to content
This repository was archived by the owner on May 1, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,15 @@ bittrex.websockets.subscribe(['BTC-ETH','BTC-SC','BTC-ZEN'], function(data, clie
});
```

#### websockets.unsubscribe
This will close your websocket connection. Please note that by default the websocket client will
try to recoonect so don't forget to set `autoReconnect` to `false`.
```javascript
bittrexApi.options({ websockets: { autoReconnect: false } });
/...
bittrex.websockets.unsubscribe();
```


#### Websocket serviceHandlers example
You can override the libraries logic for the following events. Note, this will
Expand Down
3 changes: 3 additions & 0 deletions node.bittrex.api.js
Original file line number Diff line number Diff line change
Expand Up @@ -321,6 +321,9 @@ var NodeBittrexApi = function() {
websocketMarketsCallback = callback;
setMessageReceivedWs();
}, force);
},
unsubscribe: function() {
wsclient.end();
}
},
sendCustomRequest: function(request_string, callback, credentials) {
Expand Down