From 7069c30c9c199b6d509a2d8edabdbc156fc83e64 Mon Sep 17 00:00:00 2001 From: Wei-Chieh Hsia Date: Tue, 11 Oct 2022 23:14:43 +0100 Subject: [PATCH 1/2] missing unifiedPrivate in WS_AUTH_ON_CONNECT_KEYS the fix of getting 3303001 from WebSocket --- src/util/websocket-util.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/util/websocket-util.ts b/src/util/websocket-util.ts index 5e137c6..d8dc899 100644 --- a/src/util/websocket-util.ts +++ b/src/util/websocket-util.ts @@ -145,6 +145,7 @@ export const WS_AUTH_ON_CONNECT_KEYS: WsKey[] = [ WS_KEY_MAP.spotV3Private, WS_KEY_MAP.usdcOptionPrivate, WS_KEY_MAP.usdcPerpPrivate, + WS_KEY_MAP.unifiedPrivate, ]; export const PUBLIC_WS_KEYS = [ From 2a2eee1ddf8110032ce61e8ff5ec166980e02f07 Mon Sep 17 00:00:00 2001 From: twxia Date: Wed, 12 Oct 2022 09:45:40 +0100 Subject: [PATCH 2/2] update package version & add 3303001 error code --- package-lock.json | 4 ++-- package.json | 2 +- src/constants/enum.ts | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index b2a6666..61cfaeb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bybit-api", - "version": "2.3.0", + "version": "3.1.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bybit-api", - "version": "2.3.0", + "version": "3.1.1", "license": "MIT", "dependencies": { "axios": "^0.21.0", diff --git a/package.json b/package.json index b4dc95a..42be513 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "3.1.0", + "version": "3.1.1", "description": "Complete & robust node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & integration tests.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/constants/enum.ts b/src/constants/enum.ts index 4843930..8526efc 100644 --- a/src/constants/enum.ts +++ b/src/constants/enum.ts @@ -18,6 +18,7 @@ export const API_ERROR_CODE = { PARAMS_MISSING_OR_WRONG: 10001, INVALID_API_KEY_OR_PERMISSIONS: 10003, INCORRECT_API_KEY_PERMISSIONS: 10005, + INCORRECT_PRIVATE_OPERATIONS: 3303001, /** Account not unified margin, update required */ ACCOUNT_NOT_UNIFIED: 10020, BALANCE_INSUFFICIENT_SPOT_V3: 12131,