From 9013c17927d2d5c1f858cc44805a1f5e06afda73 Mon Sep 17 00:00:00 2001 From: Tiago Siebler Date: Fri, 14 Jun 2024 14:04:10 +0100 Subject: [PATCH] chore(): remove deprecated endpoint --- src/rest-client.ts | 31 ++++++++++++------------------- test/private.write.test.ts | 10 ---------- 2 files changed, 12 insertions(+), 29 deletions(-) diff --git a/src/rest-client.ts b/src/rest-client.ts index da34da8..27a8d8c 100644 --- a/src/rest-client.ts +++ b/src/rest-client.ts @@ -703,10 +703,6 @@ export class RestClient extends BaseRestClient { return this.getPrivate('/api/v5/account/interest-limits', params); } - positionBuilder(params?: any): Promise { - return this.postPrivate('/api/v5/account/simulated_margin', params); - } - getGreeks(ccy?: string): Promise { return this.getPrivate('/api/v5/account/greeks', { ccy }); } @@ -1356,28 +1352,25 @@ export class RestClient extends BaseRestClient { } createSubAccount(params: { - subAcct:string, - label?:string, - clientIP?:string, - mainAcct: string, + subAcct: string; + label?: string; + clientIP?: string; + mainAcct: string; }): Promise { return this.postPrivate('/api/v5/broker/nd/create-subaccount', params); } - deleteSubAccount(params: { - subAcct:string, - }): Promise { + deleteSubAccount(params: { subAcct: string }): Promise { return this.postPrivate('/api/v5/broker/nd/delete-subaccount', params); - } + } createSubAccountAPIKey(params: { - subAcct:string, - label: string, - passphrase: string, - ip?:string, - perm?:string, + subAcct: string; + label: string; + passphrase: string; + ip?: string; + perm?: string; }): Promise { return this.postPrivate('/api/v5/broker/nd/subaccount/apikey', params); - } - + } } diff --git a/test/private.write.test.ts b/test/private.write.test.ts index 4f82883..37dae82 100644 --- a/test/private.write.test.ts +++ b/test/private.write.test.ts @@ -492,16 +492,6 @@ describe('Private REST API Endpoints (POST)', () => { ); } }); - - it('positionBuilder()', async () => { - try { - expect(await api.positionBuilder()).toMatchObject( - successResponseList() - ); - } catch (e) { - expect(e).toBeFalsy(); - } - }); }); describe('SubAccount Endpoints', () => {