From cd958970aa61ac4d5bc218718cf840f62726d592 Mon Sep 17 00:00:00 2001 From: Jerko J <83344666+JJ-Cro@users.noreply.github.com> Date: Thu, 30 May 2024 12:55:37 +0200 Subject: [PATCH 1/3] feat(): added BGB convert --- .gitignore | 3 ++- src/rest-client-v2.ts | 30 ++++++++++++++++++++++++++---- 2 files changed, 28 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 33326b4..21cbed0 100644 --- a/.gitignore +++ b/.gitignore @@ -21,4 +21,5 @@ node_modules/ .cache lib bundleReport.html -.history/ \ No newline at end of file +.history/ +tiagoSpot.ts \ No newline at end of file diff --git a/src/rest-client-v2.ts b/src/rest-client-v2.ts index 9a83899..f0cfd9d 100644 --- a/src/rest-client-v2.ts +++ b/src/rest-client-v2.ts @@ -167,6 +167,24 @@ export class RestClientV2 extends BaseRestClient { return this.getPrivate(`/api/v2/convert/convert-record`, params); } + /** + * + * * Common | BGB Convert + * + */ + + getBGBConvertCoins(): Promise> { + return this.getPrivate(`/api/v2/convert/bgb-convert-coin-list`); + } + + convertBGB(params: object): Promise> { + return this.postPrivate(`/api/v2/convert/bgb-convert`, params); + } + + getBGBConvertHistory(params: object): Promise> { + return this.getPrivate(`/api/v2/convert/bgb-convert-records`, params); + } + /** * * @@ -347,15 +365,19 @@ export class RestClientV2 extends BaseRestClient { } getSpotMainSubTransferRecord(params: object): Promise> { - return this.getPrivate(`/api/v2/spot/account/sub-main-trans-record`,params); + return this.getPrivate( + `/api/v2/spot/account/sub-main-trans-record`, + params, + ); } getSubAccountDepositRecords(params: object): Promise> { - return this.getPrivate(`/api/v2/spot/wallet/subaccount-deposit-records`,params); + return this.getPrivate( + `/api/v2/spot/wallet/subaccount-deposit-records`, + params, + ); } - - /** * * From fe1d7187a37130163996a6d6a0b6693eee19e36d Mon Sep 17 00:00:00 2001 From: Jerko J <83344666+JJ-Cro@users.noreply.github.com> Date: Thu, 30 May 2024 13:02:09 +0200 Subject: [PATCH 2/3] feat(): Added BGB API --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f6e6962..8ed61b1 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bitget-api", - "version": "2.0.5", + "version": "2.0.6", "description": "Node.js & JavaScript SDK for Bitget REST APIs & WebSockets, with TypeScript & end-to-end tests.", "main": "lib/index.js", "types": "lib/index.d.ts", From 2a88403616d20054fc7e16b11d958573ca908c2a Mon Sep 17 00:00:00 2001 From: Jerko J <83344666+JJ-Cro@users.noreply.github.com> Date: Tue, 4 Jun 2024 15:58:33 +0200 Subject: [PATCH 3/3] chore(): updated names --- src/rest-client-v2.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/rest-client-v2.ts b/src/rest-client-v2.ts index f0cfd9d..59ed470 100644 --- a/src/rest-client-v2.ts +++ b/src/rest-client-v2.ts @@ -173,7 +173,7 @@ export class RestClientV2 extends BaseRestClient { * */ - getBGBConvertCoins(): Promise> { + getConvertBGBCoins(): Promise> { return this.getPrivate(`/api/v2/convert/bgb-convert-coin-list`); } @@ -181,7 +181,7 @@ export class RestClientV2 extends BaseRestClient { return this.postPrivate(`/api/v2/convert/bgb-convert`, params); } - getBGBConvertHistory(params: object): Promise> { + getConvertBGBHistory(params: object): Promise> { return this.getPrivate(`/api/v2/convert/bgb-convert-records`, params); }