Socket
Socket
Sign inDemoInstall

bitmex-realtime-api

Package Overview
Dependencies
42
Maintainers
3
Versions
17
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.5.3 to 1.5.4

3

lib/createSocket.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc