diff --git a/package-lock.json b/package-lock.json index 2d8b2d2..bd268b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "binance", - "version": "2.11.4", + "version": "2.11.5", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "binance", - "version": "2.11.4", + "version": "2.11.5", "license": "MIT", "dependencies": { "axios": "^1.6.2", diff --git a/package.json b/package.json index 77c94fa..de6016f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "binance", - "version": "2.11.4", + "version": "2.11.5", "description": "Node.js & JavaScript SDK for Binance REST APIs & WebSockets, with TypeScript & end-to-end tests.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/main-client.ts b/src/main-client.ts index 18598f0..fc26c2c 100644 --- a/src/main-client.ts +++ b/src/main-client.ts @@ -29,6 +29,7 @@ import { import { AccountInformation, AddBSwapLiquidityParams, + AddIpRestriction, AggregateTrade, AllCoinsInformationResponse, ApiKeyBrokerSubAccount, @@ -138,7 +139,7 @@ import { SubAccountListParams, SubAccountListResponse, SubAccountMarginAccountDetail, - SubAccountnableOrDisableIPRestriction, + SubAccountEnableOrDisableIPRestriction, SubAccountsMarginAccountSummary, SubAccountSpotAssetsSummary, SubAccountSpotAssetsSummaryParams, @@ -538,7 +539,7 @@ export class MainClient extends BaseRestClient { subAccountEnableOrDisableIPRestriction( params: EnableOrDisableIPRestrictionForSubAccountParams, - ): Promise { + ): Promise { return this.postPrivate( 'sapi/v1/sub-account/subAccountApi/ipRestriction', params, @@ -546,7 +547,7 @@ export class MainClient extends BaseRestClient { } subAccountAddIPList( - params: SubAccountnableOrDisableIPRestriction, + params: SubAccountEnableOrDisableIPRestriction, ): Promise { return this.postPrivate( 'sapi/v1/sub-account/subAccountApi/ipRestriction/ipList', @@ -554,9 +555,18 @@ export class MainClient extends BaseRestClient { ); } + subAccountAddIPRestriction( + params: AddIpRestriction, + ): Promise { + return this.postPrivate( + 'sapi/v2/sub-account/subAccountApi/ipRestriction', + params, + ); + } + getSubAccountIPRestriction( params: BasicSubAccount, - ): Promise { + ): Promise { return this.getPrivate( 'sapi/v1/sub-account/subAccountApi/ipRestriction', params, @@ -564,8 +574,8 @@ export class MainClient extends BaseRestClient { } subAccountDeleteIPList( - params: SubAccountnableOrDisableIPRestriction, - ): Promise { + params: SubAccountEnableOrDisableIPRestriction, + ): Promise { return this.deletePrivate( 'sapi/v1/sub-account/subAccountApi/ipRestriction/ipList', params, diff --git a/src/types/futures.ts b/src/types/futures.ts index 1e11c5e..8660df2 100644 --- a/src/types/futures.ts +++ b/src/types/futures.ts @@ -595,6 +595,7 @@ export interface FuturesAccountInformation { canDeposit: boolean; canWithdraw: boolean; updateTime: numberInString; + multiAssetsMargin: boolean; totalInitialMargin: numberInString; totalMaintMargin: numberInString; totalWalletBalance: numberInString; diff --git a/src/types/spot.ts b/src/types/spot.ts index 23de46b..e4eed28 100644 --- a/src/types/spot.ts +++ b/src/types/spot.ts @@ -1557,7 +1557,13 @@ export interface EnableOrDisableIPRestrictionForSubAccountParams ipRestrict: boolean; } -export interface SubAccountnableOrDisableIPRestriction { +export interface AddIpRestriction + extends BasicSubAccount { + status: string; + ipAddress: string; +} + +export interface SubAccountEnableOrDisableIPRestriction { ipRestrict: boolean; ipList: string[]; updateTime: number;