From 95ee9bb80774c97f4b1f238aaa8698af14fac845 Mon Sep 17 00:00:00 2001 From: Karim Sakhibgareev Date: Tue, 4 Jun 2024 18:02:51 +0100 Subject: [PATCH 1/3] Update UpdateApiKeyParamsV5 --- src/rest-client-v5.ts | 7 ++++--- src/types/request/v5-user.ts | 1 + 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/rest-client-v5.ts b/src/rest-client-v5.ts index 3634703..ad5814d 100644 --- a/src/rest-client-v5.ts +++ b/src/rest-client-v5.ts @@ -1345,10 +1345,11 @@ export class RestClientV5 extends BaseRestClient { /** * This endpoint modifies the settings of a sub API key. - * Use the API key pending to be modified to call the endpoint. - * Only the API key that calls this interface can be modified. + * Use the API key pending to be modified to call the endpoint or use master account api key to manage its sub account api key. + * The API key must have one of the below permissions in order to call this endpoint * - * The API key must own "Account Transfer" permission to be allowed to call this API endpoint. + * - sub API key: "Account Transfer", "Sub Member Transfer" + * - master API Key: "Account Transfer", "Sub Member Transfer", "Withdrawal" */ updateSubApiKey( params: UpdateApiKeyParamsV5, diff --git a/src/types/request/v5-user.ts b/src/types/request/v5-user.ts index 09e65c2..42a0c7e 100644 --- a/src/types/request/v5-user.ts +++ b/src/types/request/v5-user.ts @@ -25,6 +25,7 @@ export interface CreateSubApiKeyParamsV5 { } export interface UpdateApiKeyParamsV5 { + apikey?: string; readOnly?: 0 | 1; ips?: string[]; permissions: PermissionsV5; From a86a34063b04c497d3665d4909557c7beb1060b5 Mon Sep 17 00:00:00 2001 From: Karim Sakhibgareev Date: Tue, 4 Jun 2024 20:27:58 +0100 Subject: [PATCH 2/3] Fix documentation --- src/rest-client-v5.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rest-client-v5.ts b/src/rest-client-v5.ts index ad5814d..4e9f37f 100644 --- a/src/rest-client-v5.ts +++ b/src/rest-client-v5.ts @@ -1349,7 +1349,7 @@ export class RestClientV5 extends BaseRestClient { * The API key must have one of the below permissions in order to call this endpoint * * - sub API key: "Account Transfer", "Sub Member Transfer" - * - master API Key: "Account Transfer", "Sub Member Transfer", "Withdrawal" + * - master API Key: "Account Transfer", "Sub Member Transfer", "Withdrawal" */ updateSubApiKey( params: UpdateApiKeyParamsV5, From ceae8a568e5145bc0afea625f25bbb96e6aa818e Mon Sep 17 00:00:00 2001 From: Karim Sakhibgareev Date: Tue, 4 Jun 2024 22:12:56 +0100 Subject: [PATCH 3/3] Bump version --- package-lock.json | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 3843b27..34070e8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bybit-api", - "version": "3.10.4", + "version": "3.10.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bybit-api", - "version": "3.10.4", + "version": "3.10.5", "license": "MIT", "dependencies": { "axios": "^1.6.6", diff --git a/package.json b/package.json index 546c64a..84e0f57 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "3.10.4", + "version": "3.10.5", "description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.", "main": "lib/index.js", "types": "lib/index.d.ts",