Skip to content

Commit

Permalink
chore(): remove deprecated endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagosiebler committed Jun 14, 2024
1 parent 7651721 commit 9013c17
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 29 deletions.
31 changes: 12 additions & 19 deletions src/rest-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -703,10 +703,6 @@ export class RestClient extends BaseRestClient {
return this.getPrivate('/api/v5/account/interest-limits', params);
}

positionBuilder(params?: any): Promise<any[]> {
return this.postPrivate('/api/v5/account/simulated_margin', params);
}

getGreeks(ccy?: string): Promise<any[]> {
return this.getPrivate('/api/v5/account/greeks', { ccy });
}
Expand Down Expand Up @@ -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<any[]> {
return this.postPrivate('/api/v5/broker/nd/create-subaccount', params);
}

deleteSubAccount(params: {
subAcct:string,
}): Promise<any[]> {
deleteSubAccount(params: { subAcct: string }): Promise<any[]> {
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<any[]> {
return this.postPrivate('/api/v5/broker/nd/subaccount/apikey', params);
}

}
}
10 changes: 0 additions & 10 deletions test/private.write.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand Down

0 comments on commit 9013c17

Please sign in to comment.