bitmex-realtime-api
Advanced tools
Comparing version 0.5.3 to 1.5.4
@@ -34,3 +34,4 @@ const _ = require('lodash'); | ||
wsClient.onmessage = function(data) { | ||
wsClient.onmessage = function(input, isBinary) { | ||
let data = isBinary ? input : input.toString(); | ||
try { | ||
@@ -37,0 +38,0 @@ if (data === "pong") { |
@@ -21,10 +21,9 @@ const _ = require('lodash'); | ||
var nonceCounter = 0; | ||
module.exports.getWSAuthQuery = function getWSAuthQuery(apiKey, apiSecret) { | ||
const nonce = Date.now() * 1000 + (nonceCounter++ % 1000); // prevents colliding nonces. Otherwise, use expires | ||
const expires = Date.now() / 1000 + 5; | ||
const query = { | ||
'api-nonce': nonce, | ||
'api-expires': expires, | ||
'api-key': apiKey, | ||
'api-signature': module.exports(apiSecret, 'GET', '/realtime', nonce) | ||
'api-signature': module.exports(apiSecret, 'GET', '/realtime', expires) | ||
}; | ||
@@ -31,0 +30,0 @@ |
{ | ||
"name": "bitmex-realtime-api", | ||
"version": "0.5.3", | ||
"version": "1.5.4", | ||
"description": "A library for interacting with BitMEX's websocket API.", | ||
@@ -8,3 +8,3 @@ "main": "index.js", | ||
"engines": { | ||
"node": ">=8" | ||
"node": ">=14" | ||
}, | ||
@@ -25,7 +25,7 @@ "scripts": { | ||
"dependencies": { | ||
"debug": "^4.2.0", | ||
"eventemitter2": "^6.4.3", | ||
"debug": "^4.3.4", | ||
"eventemitter2": "^6.4.9", | ||
"lodash": "^4.17.21", | ||
"superagent": "^6.1.0", | ||
"ws": "^7.3.1" | ||
"superagent": "^8.1.2", | ||
"ws": "^8.16.0" | ||
}, | ||
@@ -32,0 +32,0 @@ "devDependencies": { |
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
0
31365
+ Addedasap@2.0.6(transitive)
+ Addeddezalgo@1.0.4(transitive)
+ Addedform-data@4.0.0(transitive)
+ Addedformidable@2.1.2(transitive)
+ Addedhexoid@1.0.0(transitive)
+ Addedonce@1.4.0(transitive)
+ Addedsuperagent@8.1.2(transitive)
+ Addedwrappy@1.0.2(transitive)
+ Addedws@8.17.0(transitive)
- Removedform-data@3.0.1(transitive)
- Removedformidable@1.2.6(transitive)
- Removedinherits@2.0.4(transitive)
- Removedreadable-stream@3.6.2(transitive)
- Removedsafe-buffer@5.2.1(transitive)
- Removedstring_decoder@1.3.0(transitive)
- Removedsuperagent@6.1.0(transitive)
- Removedutil-deprecate@1.0.2(transitive)
- Removedws@7.5.9(transitive)
Updateddebug@^4.3.4
Updatedeventemitter2@^6.4.9
Updatedsuperagent@^8.1.2
Updatedws@^8.16.0