diff --git a/README.md b/README.md index 7ba14f5..6d04f24 100644 --- a/README.md +++ b/README.md @@ -6,9 +6,9 @@ An API wrapper for Binance. Build your application faster ! ## Benefits -- Built with Typescript (autocomplete on request/response) -- Use native Promises -- Updated with the latest version +- Built with Typescript (autocomplete on request/response) +- Use native Promises +- Updated with the latest version ## Disclaimer @@ -18,27 +18,28 @@ An API wrapper for Binance. Build your application faster ! ## Installation - npm install binance.js --save + npm install binance.js --save ## Usage ### Node + ```js const { Binance } = require('binance.js'); -const binance = new Binance.Api(API_KEY, TEST_SECRET_KEY, true); // 3rd parameter is testMode. Set explicitly to false if you want to use Live API. +const binance = new Binance.Api(API_KEY, TEST_SECRET_KEY, true); // 3rd parameter is testMode. Set explicitly to false if you want to use Live API. binance -.spotAllOrders({ - symbol: 'BTCUSDT', -}) -.then((res) => { - console.log(res); -}); + .spotAllOrders({ + symbol: 'BTCUSDT', + }) + .then((res) => { + console.log(res); + }); ``` ### Browser - + ```js import { Binance } from 'binance.js'; @@ -58,33 +59,34 @@ binance ``` ### Functions + All functions have the same name as described on the official documentation and are prefixed by the domain: [https://binance-docs.github.io/apidocs/](https://binance-docs.github.io/apidocs/). -**Example:** *Spot > New Order* becomes *spotNewOrder* +**Example:** _Spot > New Order_ becomes _spotNewOrder_ -**Example:** *Savings > Purchase Fixed/Activity Project* becomes *savingsPurchaseFixedActivityProject* +**Example:** _Savings > Purchase Fixed/Activity Project_ becomes _savingsPurchaseFixedActivityProject_ ### Streams -Stream functions return a *Websocket* instance from the *ws* package. A cache is set up to prevent opening a same stream twice. +Stream functions return a _Websocket_ instance from the _ws_ package. A cache is set up to prevent opening a same stream twice. ## Progress - - [x] API Structure - - [x] Wallet endpoints - - [x] Market endpoints - - [x] Spot endpoints - - [x] Margin endpoints - - [x] Saving endpoints - - [x] Futures endpoints - - [x] Streams - - [x] Mining endpoints - - [x] BLVT endpoints - - [x] BSwap endpoints - - [ ] Streams typings - - [ ] Sub-accounts endpoints - - [ ] Better error handling +- [x] API Structure +- [x] Wallet endpoints +- [x] Market endpoints +- [x] Spot endpoints +- [x] Margin endpoints +- [x] Saving endpoints +- [x] Futures endpoints +- [x] Streams +- [x] Mining endpoints +- [x] BLVT endpoints +- [x] BSwap endpoints +- [x] Sub-accounts endpoints +- [ ] Streams typings +- [ ] Better error handling ## License -[MIT License](LICENSE) \ No newline at end of file +[MIT License](LICENSE) diff --git a/dist/Binance.d.ts b/dist/Binance.d.ts index 38a4427..c2250ed 100644 --- a/dist/Binance.d.ts +++ b/dist/Binance.d.ts @@ -151,6 +151,42 @@ export declare namespace Binance { bSwapRequestQuote: (this: Api, params: import("./lib/BSwap").IBSwapRequestQuoteParameters) => Promise; bSwapSwap: (this: Api, params: import("./lib/BSwap").IBSwapSwapParameters) => Promise; bSwapGetSwapHistory: (this: Api, params?: import("./lib/BSwap").IBSwapGetSwapHistoryParameters) => Promise; + /** SubAccounts endpoints */ + subAccountsList: (this: Api) => Promise; + subAccountsTransferHistory: (this: Api) => Promise; + subAccountsAssets: (this: Api) => Promise; + subAccountsCreateVirtualSubAccount: (this: Api, params: import("./lib/SubAccount").ISubAccountsCreateVirtualSubAccountParameters) => Promise; + subAccountsQuerySubAccountListSAPI: (this: Api, params: import("./lib/SubAccount").ISubAccountsQuerySubAccountListSAPIParameters) => Promise; + subAccountsQuerySubAccountList: (this: Api, params: import("./lib/SubAccount").ISubAccountsQuerySubAccountListParameters) => Promise; + subAccountsQuerySubAccountSpotAssetTransferHistory: (this: Api, params: import("./lib/SubAccount").ISubAccountsQuerySubAccountSpotAssetTransferHistoryParameters) => Promise; + subAccountsQuerySubAccountSpotAssetTransferHistorySAPI: (this: Api, params: import("./lib/SubAccount").ISubAccountsQuerySubAccountSpotAssetTransferHistorySAPIParameters) => Promise; + subAccountsSubAccountSpotAssetTransfer: (this: Api, params: import("./lib/SubAccount").ISubAccountsSubAccountSpotAssetTransferParameters) => Promise; + subAccountsQuerySubAccountFuturesAssetTransferHistory: (this: Api, params: import("./lib/SubAccount").ISubAccountsQuerySubAccountFuturesAssetTransferHistoryParameters) => Promise; + subAccountsSubAccountFuturesAssetTransfer: (this: Api, params: import("./lib/SubAccount").ISubAccountsQuerySubAccountFuturesAssetTransferHistoryParameters) => Promise; + subAccountsQuerySubAccountsAssets: (this: Api, params: import("./lib/SubAccount").ISubAccountsQuerySubAccountAssetsParameters) => Promise; + subAccountsQuerySubAccountsAssetsSAPI: (this: Api, params: import("./lib/SubAccount").ISubAccountsQuerySubAccountAssetsSAPIParameters) => Promise; + subAccountsQuerySubAccountSpotAssetsSummary: (this: Api, params: import("./lib/SubAccount").ISubAccountsQuerySubAccountSpotAssetsSummaryParameters) => Promise; + subAccountsGetSubAccountDepositAddress: (this: Api, params: import("./lib/SubAccount").ISubAccountsGetSubAccountDepositAddressParameters) => Promise; + subAccountsGetSubAccountDepositHistory: (this: Api, params: import("./lib/SubAccount").ISubAccountsGetSubAccountDepositAddressHistoryParameters) => Promise; + subAccountsGetSubAccountStatusMarginFutures: (this: Api, params: import("./lib/SubAccount").ISubAccountsGetSubAccountStatusMarginFuturesParameters) => Promise; + subAccountsEnableMarginSubAccount: (this: Api, params: import("./lib/SubAccount").ISubAccountsEnableMarginSubAccountParameters) => Promise; + subAccountsGetDetailSubAccountMarginAccount: (this: Api, params: import("./lib/SubAccount").ISubAccountsGetDetailSubAccountMarginAccountParameters) => Promise; + subAccountsGetSummarySubAccountMarginAccount: (this: Api, params: import("./lib/SubAccount").ISubAccountsGetSummarySubAccountMarginAccountParameters) => Promise; + subAccountsEnableFuturesSubAccount: (this: Api, params: import("./lib/SubAccount").ISubAccountsEnableFuturesSubAccountParameters) => Promise; + subAccountsGetDetailSubAccountFuturesAccount: (this: Api, params: import("./lib/SubAccount").ISubAccountsGetDetailSubAccountFuturesAccountParameters) => Promise; + subAccountsGetSummarySubAccountFuturesAccount: (this: Api, params: import("./lib/SubAccount").ISubAccountsGetSummarySubAccountFuturesAccountParameters) => Promise; + subAccountsGetFuturesPositionRiskSubAccount: (this: Api, params: import("./lib/SubAccount").ISubAccountsGetFuturesPositionRiskSubAccountParameters) => Promise; + subAccountsFuturesTransferSubAccount: (this: Api, params: import("./lib/SubAccount").ISubAccountsFuturesTransferSubAccountParameters) => Promise; + subAccountsMarginTransferSubAccount: (this: Api, params: import("./lib/SubAccount").ISubAccountsMarginTransferSubAccountParameters) => Promise; + subAccountsTransferSubAccountSameMaster: (this: Api, params: import("./lib/SubAccount").ISubAccountsTransferSubAccountSameMasterParameters) => Promise; + subAccountsTransferToMaster: (this: Api, params: import("./lib/SubAccount").ISubAccountsTransferToMasterParameters) => Promise; + subAccountsSubAccountTransferHistory: (this: Api, params: import("./lib/SubAccount").ISubAccountsSubAccountTransferHistoryParameters) => Promise; + subAccountsUniversalTransfer: (this: Api) => Promise; + subAccountsQueryUniversalTransferHistory: (this: Api, params: import("./lib/SubAccount").ISubAccountsQueryUniversalTransferHistoryParameters) => Promise; + subAccountsGetDetailSubAccountFuturesAccountV2: (this: Api, params: import("./lib/SubAccount").ISubAccountsGetDetailSubAccountFuturesAccountV2Parameters) => Promise; + subAccountsGetSummarySubAccountFuturesAccountV2: (this: Api, params: import("./lib/SubAccount").ISubAccountsGetSummarySubAccountFuturesAccountV2Parameters) => Promise; + subAccountsGetFuturesPositionRiskSubAccountV2: (this: Api, params: import("./lib/SubAccount").ISubAccountsGetFuturesPositionRiskSubAccountV2Parameters) => Promise; + subAccountsEnableLeverageTokenSubAccount: (this: Api, params: import("./lib/SubAccount").ISubAccountsEnableLeverageTokenSubAccountParameters) => Promise; } interface IRequest { headers: IRequestHeaders; @@ -268,4 +304,13 @@ export declare namespace Binance { FROM_SPOT_TO_COINFUTURS = 3, FROM_COINFUTURES_TO_SPOT = 4 } + enum EAccountType { + SPOT = "SPOT", + USDT_FUTURE = "USDT_FUTURE", + COIN_FUTURE = "COIN_FUTURE" + } + enum ESubAccountFuturesType { + USDT = 1, + COIN = 2 + } } diff --git a/dist/Binance.js b/dist/Binance.js index a50bcb3..e297354 100644 --- a/dist/Binance.js +++ b/dist/Binance.js @@ -14,6 +14,7 @@ const Mining_1 = require("./lib/Mining"); const Futures_1 = require("./lib/Futures"); const BLVT_1 = require("./lib/BLVT"); const BSwap_1 = require("./lib/BSwap"); +const SubAccount_1 = require("./lib/SubAccount"); var Binance; (function (Binance) { class Api { @@ -160,6 +161,42 @@ var Binance; this.bSwapRequestQuote = BSwap_1.BSwap.prototype.bSwapRequestQuote; this.bSwapSwap = BSwap_1.BSwap.prototype.bSwapSwap; this.bSwapGetSwapHistory = BSwap_1.BSwap.prototype.bSwapGetSwapHistory; + /** SubAccounts endpoints */ + this.subAccountsList = SubAccount_1.SubAccounts.prototype.subAccountsList; + this.subAccountsTransferHistory = SubAccount_1.SubAccounts.prototype.subAccountsTransferHistory; + this.subAccountsAssets = SubAccount_1.SubAccounts.prototype.subAccountsAssets; + this.subAccountsCreateVirtualSubAccount = SubAccount_1.SubAccounts.prototype.subAccountsCreateVirtualSubAccount; + this.subAccountsQuerySubAccountListSAPI = SubAccount_1.SubAccounts.prototype.subAccountsQuerySubAccountListSAPI; + this.subAccountsQuerySubAccountList = SubAccount_1.SubAccounts.prototype.subAccountsQuerySubAccountList; + this.subAccountsQuerySubAccountSpotAssetTransferHistory = SubAccount_1.SubAccounts.prototype.subAccountsQuerySubAccountSpotAssetTransferHistory; + this.subAccountsQuerySubAccountSpotAssetTransferHistorySAPI = SubAccount_1.SubAccounts.prototype.subAccountsQuerySubAccountSpotAssetTransferHistorySAPI; + this.subAccountsSubAccountSpotAssetTransfer = SubAccount_1.SubAccounts.prototype.subAccountsSubAccountSpotAssetTransfer; + this.subAccountsQuerySubAccountFuturesAssetTransferHistory = SubAccount_1.SubAccounts.prototype.subAccountsQuerySubAccountFuturesAssetTransferHistory; + this.subAccountsSubAccountFuturesAssetTransfer = SubAccount_1.SubAccounts.prototype.subAccountsSubAccountFuturesAssetTransfer; + this.subAccountsQuerySubAccountsAssets = SubAccount_1.SubAccounts.prototype.subAccountsQuerySubAccountsAssets; + this.subAccountsQuerySubAccountsAssetsSAPI = SubAccount_1.SubAccounts.prototype.subAccountsQuerySubAccountsAssetsSAPI; + this.subAccountsQuerySubAccountSpotAssetsSummary = SubAccount_1.SubAccounts.prototype.subAccountsQuerySubAccountSpotAssetsSummary; + this.subAccountsGetSubAccountDepositAddress = SubAccount_1.SubAccounts.prototype.subAccountsGetSubAccountDepositAddress; + this.subAccountsGetSubAccountDepositHistory = SubAccount_1.SubAccounts.prototype.subAccountsGetSubAccountDepositHistory; + this.subAccountsGetSubAccountStatusMarginFutures = SubAccount_1.SubAccounts.prototype.subAccountsGetSubAccountStatusMarginFutures; + this.subAccountsEnableMarginSubAccount = SubAccount_1.SubAccounts.prototype.subAccountsEnableMarginSubAccount; + this.subAccountsGetDetailSubAccountMarginAccount = SubAccount_1.SubAccounts.prototype.subAccountsGetDetailSubAccountMarginAccount; + this.subAccountsGetSummarySubAccountMarginAccount = SubAccount_1.SubAccounts.prototype.subAccountsGetSummarySubAccountMarginAccount; + this.subAccountsEnableFuturesSubAccount = SubAccount_1.SubAccounts.prototype.subAccountsEnableFuturesSubAccount; + this.subAccountsGetDetailSubAccountFuturesAccount = SubAccount_1.SubAccounts.prototype.subAccountsGetDetailSubAccountFuturesAccount; + this.subAccountsGetSummarySubAccountFuturesAccount = SubAccount_1.SubAccounts.prototype.subAccountsGetSummarySubAccountFuturesAccount; + this.subAccountsGetFuturesPositionRiskSubAccount = SubAccount_1.SubAccounts.prototype.subAccountsGetFuturesPositionRiskSubAccount; + this.subAccountsFuturesTransferSubAccount = SubAccount_1.SubAccounts.prototype.subAccountsFuturesTransferSubAccount; + this.subAccountsMarginTransferSubAccount = SubAccount_1.SubAccounts.prototype.subAccountsMarginTransferSubAccount; + this.subAccountsTransferSubAccountSameMaster = SubAccount_1.SubAccounts.prototype.subAccountsTransferSubAccountSameMaster; + this.subAccountsTransferToMaster = SubAccount_1.SubAccounts.prototype.subAccountsTransferToMaster; + this.subAccountsSubAccountTransferHistory = SubAccount_1.SubAccounts.prototype.subAccountsSubAccountTransferHistory; + this.subAccountsUniversalTransfer = SubAccount_1.SubAccounts.prototype.subAccountsList; + this.subAccountsQueryUniversalTransferHistory = SubAccount_1.SubAccounts.prototype.subAccountsQueryUniversalTransferHistory; + this.subAccountsGetDetailSubAccountFuturesAccountV2 = SubAccount_1.SubAccounts.prototype.subAccountsGetDetailSubAccountFuturesAccountV2; + this.subAccountsGetSummarySubAccountFuturesAccountV2 = SubAccount_1.SubAccounts.prototype.subAccountsGetSummarySubAccountFuturesAccountV2; + this.subAccountsGetFuturesPositionRiskSubAccountV2 = SubAccount_1.SubAccounts.prototype.subAccountsGetFuturesPositionRiskSubAccountV2; + this.subAccountsEnableLeverageTokenSubAccount = SubAccount_1.SubAccounts.prototype.subAccountsEnableLeverageTokenSubAccount; if (!apiKey) throw new Error('A valid API key is required'); if (!secretKey) @@ -342,5 +379,16 @@ var Binance; EFuturesType[EFuturesType["FROM_SPOT_TO_COINFUTURS"] = 3] = "FROM_SPOT_TO_COINFUTURS"; EFuturesType[EFuturesType["FROM_COINFUTURES_TO_SPOT"] = 4] = "FROM_COINFUTURES_TO_SPOT"; })(EFuturesType = Binance.EFuturesType || (Binance.EFuturesType = {})); + let EAccountType; + (function (EAccountType) { + EAccountType["SPOT"] = "SPOT"; + EAccountType["USDT_FUTURE"] = "USDT_FUTURE"; + EAccountType["COIN_FUTURE"] = "COIN_FUTURE"; + })(EAccountType = Binance.EAccountType || (Binance.EAccountType = {})); + let ESubAccountFuturesType; + (function (ESubAccountFuturesType) { + ESubAccountFuturesType[ESubAccountFuturesType["USDT"] = 1] = "USDT"; + ESubAccountFuturesType[ESubAccountFuturesType["COIN"] = 2] = "COIN"; + })(ESubAccountFuturesType = Binance.ESubAccountFuturesType || (Binance.ESubAccountFuturesType = {})); })(Binance = exports.Binance || (exports.Binance = {})); //# sourceMappingURL=Binance.js.map \ No newline at end of file diff --git a/dist/Binance.js.map b/dist/Binance.js.map index 475b1f4..ae75900 100644 --- a/dist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,sBAAc,KAAd,sBAAc,QAIzB;IAED,IAAY,YAGX;IAHD,WAAY,YAAY;QACtB,6BAAa,CAAA;QACb,iCAAiB,CAAA;IACnB,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB;IAED,IAAY,cAKX;IALD,WAAY,cAAc;QACxB,2CAAyB,CAAA;QACzB,uCAAqB,CAAA;QACrB,iDAA+B,CAAA;QAC/B,uCAAqB,CAAA;IACvB,CAAC,EALW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAKzB;IAED,IAAY,YAKX;IALD,WAAY,YAAY;QACtB,qFAA2B,CAAA;QAC3B,uFAA4B,CAAA;QAC5B,qFAA2B,CAAA;QAC3B,uFAA4B,CAAA;IAC9B,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;AACH,CAAC,EApYgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAoYvB"} \ No newline at end of file +{"version":3,"file":"Binance.js","sourceRoot":"","sources":["../src/Binance.ts"],"names":[],"mappings":";;;AAAA,oCAAqC;AACrC,oDAAqD;AACrD,gCAAiC;AAEjC,yCAAsC;AACtC,yCAAsC;AACtC,qCAAkC;AAClC,yCAAsC;AACtC,yCAAsC;AACtC,2CAAwC;AACxC,yCAAsC;AACtC,2CAAwC;AACxC,qCAAkC;AAClC,uCAAoC;AACpC,iDAA+C;AAE/C,IAAiB,OAAO,CAobvB;AApbD,WAAiB,OAAO;IACtB,MAAa,GAAG;QAcd,YAAY,MAAc,EAAE,SAAiB,EAAE,WAAoB,IAAI;YAT/D,mBAAc,GAAG,yBAAyB,CAAC;YAC3C,mBAAc,GAAG,gCAAgC,CAAC;YAElD,kBAAa,GAAG,+BAA+B,CAAC;YAEhD,YAAO,GAA2B,IAAI,GAAG,EAAqB,CAAC;YAE/D,mCAA8B,GAAoB,CAAC,aAAa,CAAC,KAAK,EAAE,aAAa,CAAC,SAAS,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;YA+F/H,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BAAkB,CAAA;QAClB,+BAAkB,CAAA;IACpB,CAAC,EAhBW,SAAS,GAAT,iBAAS,KAAT,iBAAS,QAgBpB;IAED,IAAY,cAIX;IAJD,WAAY,cAAc;QACxB,6BAAW,CAAA;QACX,+CAA6B,CAAA;QAC7B,mDAAiC,CAAA;IACnC,CAAC,EAJW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAIzB;IAED,IAAY,YAGX;IAHD,WAAY,YAAY;QACtB,6BAAa,CAAA;QACb,iCAAiB,CAAA;IACnB,CAAC,EAHW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAGvB;IAED,IAAY,cAKX;IALD,WAAY,cAAc;QACxB,2CAAyB,CAAA;QACzB,uCAAqB,CAAA;QACrB,iDAA+B,CAAA;QAC/B,uCAAqB,CAAA;IACvB,CAAC,EALW,cAAc,GAAd,sBAAc,KAAd,sBAAc,QAKzB;IAED,IAAY,YAKX;IALD,WAAY,YAAY;QACtB,qFAA2B,CAAA;QAC3B,uFAA4B,CAAA;QAC5B,qFAA2B,CAAA;QAC3B,uFAA4B,CAAA;IAC9B,CAAC,EALW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAKvB;IAED,IAAY,YAIX;IAJD,WAAY,YAAY;QACtB,6BAAa,CAAA;QACb,2CAA2B,CAAA;QAC3B,2CAA2B,CAAA;IAC7B,CAAC,EAJW,YAAY,GAAZ,oBAAY,KAAZ,oBAAY,QAIvB;IAED,IAAY,sBAGX;IAHD,WAAY,sBAAsB;QAChC,mEAAQ,CAAA;QACR,mEAAQ,CAAA;IACV,CAAC,EAHW,sBAAsB,GAAtB,8BAAsB,KAAtB,8BAAsB,QAGjC;AACH,CAAC,EApbgB,OAAO,GAAP,eAAO,KAAP,eAAO,QAobvB"} \ No newline at end of file diff --git a/dist/lib/SubAccount.d.ts b/dist/lib/SubAccount.d.ts index 46d326e..def7a75 100644 --- a/dist/lib/SubAccount.d.ts +++ b/dist/lib/SubAccount.d.ts @@ -1,8 +1,145 @@ import { Binance } from '../Binance'; export declare class SubAccounts { + /** + * Warning: This function hasn't been tested. + */ subAccountsList(this: Binance.Api): Promise; + /** + * Warning: This function hasn't been tested. + */ subAccountsTransferHistory(this: Binance.Api): Promise; + /** + * Warning: This function hasn't been tested. + */ subAccountsAssets(this: Binance.Api): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsCreateVirtualSubAccount(this: Binance.Api, params: ISubAccountsCreateVirtualSubAccountParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountListSAPI(this: Binance.Api, params: ISubAccountsQuerySubAccountListSAPIParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountList(this: Binance.Api, params: ISubAccountsQuerySubAccountListParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountSpotAssetTransferHistory(this: Binance.Api, params: ISubAccountsQuerySubAccountSpotAssetTransferHistoryParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountSpotAssetTransferHistorySAPI(this: Binance.Api, params: ISubAccountsQuerySubAccountSpotAssetTransferHistorySAPIParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsSubAccountSpotAssetTransfer(this: Binance.Api, params: ISubAccountsSubAccountSpotAssetTransferParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountFuturesAssetTransferHistory(this: Binance.Api, params: ISubAccountsQuerySubAccountFuturesAssetTransferHistoryParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsSubAccountFuturesAssetTransfer(this: Binance.Api, params: ISubAccountsQuerySubAccountFuturesAssetTransferHistoryParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountsAssets(this: Binance.Api, params: ISubAccountsQuerySubAccountAssetsParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountsAssetsSAPI(this: Binance.Api, params: ISubAccountsQuerySubAccountAssetsSAPIParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountSpotAssetsSummary(this: Binance.Api, params: ISubAccountsQuerySubAccountSpotAssetsSummaryParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSubAccountDepositAddress(this: Binance.Api, params: ISubAccountsGetSubAccountDepositAddressParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSubAccountDepositHistory(this: Binance.Api, params: ISubAccountsGetSubAccountDepositAddressHistoryParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSubAccountStatusMarginFutures(this: Binance.Api, params: ISubAccountsGetSubAccountStatusMarginFuturesParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsEnableMarginSubAccount(this: Binance.Api, params: ISubAccountsEnableMarginSubAccountParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetDetailSubAccountMarginAccount(this: Binance.Api, params: ISubAccountsGetDetailSubAccountMarginAccountParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSummarySubAccountMarginAccount(this: Binance.Api, params: ISubAccountsGetSummarySubAccountMarginAccountParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsEnableFuturesSubAccount(this: Binance.Api, params: ISubAccountsEnableFuturesSubAccountParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetDetailSubAccountFuturesAccount(this: Binance.Api, params: ISubAccountsGetDetailSubAccountFuturesAccountParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSummarySubAccountFuturesAccount(this: Binance.Api, params: ISubAccountsGetSummarySubAccountFuturesAccountParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetFuturesPositionRiskSubAccount(this: Binance.Api, params: ISubAccountsGetFuturesPositionRiskSubAccountParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsFuturesTransferSubAccount(this: Binance.Api, params: ISubAccountsFuturesTransferSubAccountParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsMarginTransferSubAccount(this: Binance.Api, params: ISubAccountsMarginTransferSubAccountParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsTransferSubAccountSameMaster(this: Binance.Api, params: ISubAccountsTransferSubAccountSameMasterParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsTransferToMaster(this: Binance.Api, params: ISubAccountsTransferToMasterParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsSubAccountTransferHistory(this: Binance.Api, params: ISubAccountsSubAccountTransferHistoryParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsUniversalTransfer(this: Binance.Api, params: ISubAccountsUniversalTransferParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsQueryUniversalTransferHistory(this: Binance.Api, params: ISubAccountsQueryUniversalTransferHistoryParameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetDetailSubAccountFuturesAccountV2(this: Binance.Api, params: ISubAccountsGetDetailSubAccountFuturesAccountV2Parameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSummarySubAccountFuturesAccountV2(this: Binance.Api, params: ISubAccountsGetSummarySubAccountFuturesAccountV2Parameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetFuturesPositionRiskSubAccountV2(this: Binance.Api, params: ISubAccountsGetFuturesPositionRiskSubAccountV2Parameters): Promise; + /** + * Warning: This function hasn't been tested. + */ + subAccountsEnableLeverageTokenSubAccount(this: Binance.Api, params: ISubAccountsEnableLeverageTokenSubAccountParameters): Promise; } export interface ISubAccountsList { success: boolean; @@ -169,3 +306,365 @@ export interface ISubAccountsQuerySubAccountAssetsSAPIItem { free: number; locked: number; } +export interface ISubAccountsQuerySubAccountSpotAssetsSummaryParameters extends Binance.IRequestParameters { + email?: string; + page?: number; + size?: number; +} +export interface ISubAccountsQuerySubAccountSpotAssetsSummary { + totalCount: number; + masterAccountTotalAsset: string; + spotSubUserAssetBtcVoList: ISubAccountsQuerySubAccountSpotAssetsSummaryItem[]; +} +export interface ISubAccountsQuerySubAccountSpotAssetsSummaryItem { + email: string; + totalAsset: string; +} +export interface ISubAccountsGetSubAccountDepositAddressParameters extends Binance.IRequestParameters { + email: string; + coin: string; + network?: string; +} +export interface ISubAccountsGetSubAccountDepositAddress { + address: string; + coin: string; + tag: string; + url: string; +} +export interface ISubAccountsGetSubAccountDepositAddressHistoryParameters extends Binance.IRequestParameters { + email: string; + coin?: string; + status?: number; + startTime?: number; + endTime?: number; + limit?: number; + offset?: number; +} +export interface ISubAccountsGetSubAccountDepositAddressHistory { + amount: string; + coin: string; + network: string; + status: number; + address: string; + addressTag: string; + txId: string; + insertTime: number; + transferType: number; + confirmTimes: string; +} +export interface ISubAccountsGetSubAccountStatusMarginFuturesParameters extends Binance.IRequestParameters { + email?: string; +} +export interface ISubAccountsGetSubAccountStatusMarginFutures { + email: string; + isSubUserEnabled: boolean; + isUserActive: boolean; + insertTime: number; + isMarginEnabled: boolean; + isFutureEnabled: boolean; + mobile: number; +} +export interface ISubAccountsEnableMarginSubAccountParameters extends Binance.IRequestParameters { + email: string; +} +export interface ISubAccountsEnableMarginSubAccount { + email: string; + isMarginEnabled: boolean; +} +export interface ISubAccountsGetDetailSubAccountMarginAccountParameters extends Binance.IRequestParameters { + email: string; +} +export interface ISubAccountsGetDetailSubAccountMarginAccount { + email: string; + marginLevel: string; + totalAssetOfBtc: string; + totalLiabilityOfBtc: string; + totalNetAssetOfBtc: string; + marginTradeCoeffVo: { + forceLiquidationBar: string; + marginCallBar: string; + normalBar: string; + }; + marginUserAssetVoList: ISubAccountsGetDetailSubAccountMarginAccountAsset[]; +} +export interface ISubAccountsGetDetailSubAccountMarginAccountAsset { + asset: string; + borrowed: string; + free: string; + interest: string; + locked: string; + netAsset: string; +} +export interface ISubAccountsGetSummarySubAccountMarginAccountParameters extends Binance.IRequestParameters { +} +export interface ISubAccountsGetSummarySubAccountMarginAccount { + totalAssetOfBtc: string; + totalLiabilityOfBtc: string; + totalNetAssetOfBtc: string; + subAccountList: ISubAccountsGetSummarySubAccountMarginAccountItem[]; +} +export interface ISubAccountsGetSummarySubAccountMarginAccountItem { + email: string; + totalAssetOfBtc: string; + totalLiabilityOfBtc: string; + totalNetAssetOfBtc: string; +} +export interface ISubAccountsEnableFuturesSubAccountParameters extends Binance.IRequestParameters { + email: string; +} +export interface ISubAccountsEnableFuturesSubAccount { + email: string; + isFuturesEnabled: boolean; +} +export interface ISubAccountsGetDetailSubAccountFuturesAccountParameters extends Binance.IRequestParameters { + email: string; +} +export interface ISubAccountsGetDetailSubAccountFuturesAccount { + email: string; + asset: string; + assets: ISubAccountsGetDetailSubAccountFuturesAccountItem[]; + canDeposit: boolean; + canTrade: boolean; + canWithdraw: boolean; + feeTier: number; + maxWithdrawAmount: string; + totalInitialMargin: string; + totalMaintenanceMargin: string; + totalMarginBalance: string; + totalOpenOrderInitialMargin: string; + totalPositionInitialMargin: string; + totalUnrealizedProfit: string; + totalWalletBalance: string; + updateTime: number; +} +export interface ISubAccountsGetDetailSubAccountFuturesAccountItem { + asset: string; + initialMargin: string; + maintenanceMargin: string; + marginBalance: string; + maxWithdrawAmount: string; + openOrderInitialMargin: string; + positionInitialMargin: string; + unrealizedProfit: string; + walletBalance: string; +} +export interface ISubAccountsGetSummarySubAccountFuturesAccountParameters extends Binance.IRequestParameters { +} +export interface ISubAccountsGetSummarySubAccountFuturesAccount { + totalInitialMargin: string; + totalMaintenanceMargin: string; + totalMarginBalance: string; + totalOpenOrderInitialMargin: string; + totalPositionInitialMargin: string; + totalUnrealizedProfit: string; + totalWalletBalance: string; + asset: string; + subAccountList: ISubAccountsGetSummarySubAccountFuturesAccountItem[]; +} +export interface ISubAccountsGetSummarySubAccountFuturesAccountItem { + email: string; + totalInitialMargin: string; + totalMaintenanceMargin: string; + totalMarginBalance: string; + totalOpenOrderInitialMargin: string; + totalPositionInitialMargin: string; + totalUnrealizedProfit: string; + totalWalletBalance: string; + asset: string; +} +export interface ISubAccountsGetFuturesPositionRiskSubAccountParameters extends Binance.IRequestParameters { + email: string; +} +export interface ISubAccountsGetFuturesPositionRiskSubAccount { + entryPrice: string; + leverage: string; + maxNotional: string; + liquidationPrice: string; + markPrice: string; + positionAmount: string; + symbol: string; + unrealizedProfit: string; +} +export interface ISubAccountsFuturesTransferSubAccountParameters extends Binance.IRequestParameters { + email: string; + asset: string; + amount: number; + type: number; +} +export interface ISubAccountsFuturesTransferSubAccount { + txnId: string; +} +export interface ISubAccountsMarginTransferSubAccountParameters extends Binance.IRequestParameters { + email: string; + asset: string; + amount: number; + type: number; +} +export interface ISubAccountsMarginTransferSubAccount { + txnId: string; +} +export interface ISubAccountsTransferSubAccountSameMasterParameters extends Binance.IRequestParameters { + toEmail: string; + asset: string; + amount: number; + type: number; +} +export interface ISubAccountsTransferSubAccountSameMaster { + txnId: string; +} +export interface ISubAccountsTransferToMasterParameters extends Binance.IRequestParameters { + asset: string; + amount: number; + type: number; +} +export interface ISubAccountsTransferToMaster { + txnId: string; +} +export interface ISubAccountsSubAccountTransferHistoryParameters extends Binance.IRequestParameters { + asset?: string; + type?: number; + startTime?: number; + endTime?: number; + limit?: number; +} +export interface ISubAccountsSubAccountTransferHistory { + counterParty: string; + email: string; + type: number; + asset: string; + qty: string; + fromAccountType: string; + toAccountType: string; + status: string; + tranId: number; + time: number; +} +export interface ISubAccountsUniversalTransferParameters extends Binance.IRequestParameters { + fromEmail?: string; + toEmail?: string; + fromAccountType: Binance.EAccountType; + toAccountType: Binance.EAccountType; + asset: string; + amount: number; +} +export interface ISubAccountsUniversalTransfer { + txnId: string; +} +export interface ISubAccountsQueryUniversalTransferHistoryParameters extends Binance.IRequestParameters { + fromEmail?: string; + toEmail?: string; + startTime?: number; + endTime?: number; + page?: number; + limit?: number; +} +export interface ISubAccountsQueryUniversalTransferHistory { + tranId: number; + fromEmail: string; + toEmail: string; + asset: string; + amount: string; + fromAccountType: Binance.EAccountType; + toAccountType: Binance.EAccountType; + status: string; + createTimeStamp: number; +} +export interface ISubAccountsGetDetailSubAccountFuturesAccountV2Parameters extends Binance.IRequestParameters { + email: string; + futuresType: Binance.ESubAccountFuturesType; +} +export interface ISubAccountsGetDetailSubAccountFuturesAccountV2 { + email: string; + assets: ISubAccountsGetDetailSubAccountFuturesAccountV2Item[]; + canDeposit: boolean; + canTrade: boolean; + canWithdraw: boolean; + feeTier: number; + maxWithdrawAmount?: string; + totalInitialMargin?: string; + totalMaintenanceMargin?: string; + totalMarginBalance?: string; + totalOpenOrderInitialMargin?: string; + totalPositionInitialMargin?: string; + totalUnrealizedProfit?: string; + totalWalletBalance?: string; + updateTime: number; +} +export interface ISubAccountsGetDetailSubAccountFuturesAccountV2Item { + asset: string; + initialMargin: string; + maintenanceMargin: string; + marginBalance: string; + maxWithdrawAmount: string; + openOrderInitialMargin: string; + positionInitialMargin: string; + unrealizedProfit: string; + walletBalance: string; +} +export interface ISubAccountsGetSummarySubAccountFuturesAccountV2Parameters extends Binance.IRequestParameters { + futuresTypes: Binance.ESubAccountFuturesType; + page?: number; + limit?: number; +} +export interface ISubAccountsGetSummarySubAccountFuturesAccountV2 { + totalInitialMargin?: string; + totalMaintenanceMargin?: string; + totalMarginBalance: string; + totalOpenOrderInitialMargin?: string; + totalPositionInitialMargin?: string; + totalUnrealizedProfit: string; + totalWalletBalance: string; + asset: string; + subAccountList: ISubAccountsGetSummarySubAccountFuturesAccountV2Item[]; +} +export interface ISubAccountsGetSummarySubAccountFuturesAccountV2Item { + email: string; + totalInitialMargin?: string; + totalMaintenanceMargin?: string; + totalMarginBalance: string; + totalOpenOrderInitialMargin?: string; + totalPositionInitialMargin?: string; + totalUnrealizedProfit: string; + totalWalletBalance: string; + asset: string; +} +export interface ISubAccountsGetFuturesPositionRiskSubAccountV2Parameters extends Binance.IRequestParameters { + futuresTypes: Binance.ESubAccountFuturesType; + page?: number; + limit?: number; +} +export interface ISubAccountsGetFuturesPositionRiskSubAccountV2 { + futurePositionRiskVos?: ISubAccountsGetFuturesPositionRiskSubAccountV2ItemUSDT[]; + deliveryPositionRiskVos?: ISubAccountsGetFuturesPositionRiskSubAccountV2ItemCOIN[]; +} +export interface ISubAccountsGetFuturesPositionRiskSubAccountV2ItemUSDT { + entryPrice: string; + leverage: string; + maxNotional: string; + liquidationPrice: string; + markPrice: string; + positionAmount: string; + symbol: string; + unrealizedProfit: string; +} +export interface ISubAccountsGetFuturesPositionRiskSubAccountV2ItemCOIN { + entryPrice: string; + markPrice: string; + leverage: string; + isolated: string; + isolatedWallet: string; + isolatedMargin: string; + isAutoAddMargin: string; + positionSide: string; + positionAmount: string; + symbol: string; + unrealizedProfit: string; +} +export interface ISubAccountsEnableLeverageTokenSubAccountParameters extends Binance.IRequestParameters { + emai: string; + enableBlvt: boolean; +} +export interface ISubAccountsEnableLeverageTokenSubAccount { + emai: string; + enableBlvt: boolean; +} diff --git a/dist/lib/SubAccount.js b/dist/lib/SubAccount.js index 54f9323..0a77575 100644 --- a/dist/lib/SubAccount.js +++ b/dist/lib/SubAccount.js @@ -3,15 +3,216 @@ Object.defineProperty(exports, "__esModule", { value: true }); exports.SubAccounts = void 0; const Binance_1 = require("../Binance"); class SubAccounts { + /** + * Warning: This function hasn't been tested. + */ subAccountsList() { return this.sendRequest('/wapi/v3/sub-account/list.html', {}, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); } + /** + * Warning: This function hasn't been tested. + */ subAccountsTransferHistory() { return this.sendRequest('/wapi/v3/sub-account/transfer/history.html', {}, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); } + /** + * Warning: This function hasn't been tested. + */ subAccountsAssets() { return this.sendRequest('/wapi/v3/sub-account/assets.html', {}, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); } + /** + * Warning: This function hasn't been tested. + */ + subAccountsCreateVirtualSubAccount(params) { + return this.sendRequest('/sapi/v1/sub-account/virtualSubAccount', params, Binance_1.Binance.ERequestMethod.POST, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountListSAPI(params) { + return this.sendRequest('/sapi/v1/sub-account/list', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountList(params) { + return this.sendRequest('/wapi/v3/sub-account/list.html', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountSpotAssetTransferHistory(params) { + return this.sendRequest('/wapi/v3/sub-account/transfer/history.html', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountSpotAssetTransferHistorySAPI(params) { + return this.sendRequest('/sapi/v1/sub-account/sub/transfer/history', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsSubAccountSpotAssetTransfer(params) { + return this.sendRequest('/wapi/v3/sub-account/transfer.html', params, Binance_1.Binance.ERequestMethod.POST, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountFuturesAssetTransferHistory(params) { + return this.sendRequest('/sapi/v1/sub-account/futures/internalTransfer', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsSubAccountFuturesAssetTransfer(params) { + return this.sendRequest('/sapi/v1/sub-account/futures/internalTransfer', params, Binance_1.Binance.ERequestMethod.POST, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountsAssets(params) { + return this.sendRequest('/wapi/v3/sub-account/assets.html', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountsAssetsSAPI(params) { + return this.sendRequest('/sapi/v3/sub-account/assets', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountSpotAssetsSummary(params) { + return this.sendRequest('/sapi/v1/sub-account/spotSummary', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSubAccountDepositAddress(params) { + return this.sendRequest('/sapi/v1/capital/deposit/subAddress', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSubAccountDepositHistory(params) { + return this.sendRequest('/sapi/v1/capital/deposit/subHisrec', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSubAccountStatusMarginFutures(params) { + return this.sendRequest('/sapi/v1/sub-account/status', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsEnableMarginSubAccount(params) { + return this.sendRequest('/sapi/v1/sub-account/margin/enable', params, Binance_1.Binance.ERequestMethod.POST, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetDetailSubAccountMarginAccount(params) { + return this.sendRequest('/sapi/v1/sub-account/margin/account', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSummarySubAccountMarginAccount(params) { + return this.sendRequest('/sapi/v1/sub-account/margin/accountSummary', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsEnableFuturesSubAccount(params) { + return this.sendRequest('/sapi/v1/sub-account/futures/enable', params, Binance_1.Binance.ERequestMethod.POST, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetDetailSubAccountFuturesAccount(params) { + return this.sendRequest('/sapi/v1/sub-account/futures/account', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSummarySubAccountFuturesAccount(params) { + return this.sendRequest('/sapi/v1/sub-account/futures/accountSummary', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetFuturesPositionRiskSubAccount(params) { + return this.sendRequest('/sapi/v1/sub-account/futures/positionRisk', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsFuturesTransferSubAccount(params) { + return this.sendRequest('/sapi/v1/sub-account/futures/transfer', params, Binance_1.Binance.ERequestMethod.POST, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsMarginTransferSubAccount(params) { + return this.sendRequest('/sapi/v1/sub-account/margin/transfer', params, Binance_1.Binance.ERequestMethod.POST, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsTransferSubAccountSameMaster(params) { + return this.sendRequest('/sapi/v1/sub-account/transfer/subToSub', params, Binance_1.Binance.ERequestMethod.POST, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsTransferToMaster(params) { + return this.sendRequest('/sapi/v1/sub-account/transfer/subToMaster', params, Binance_1.Binance.ERequestMethod.POST, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsSubAccountTransferHistory(params) { + return this.sendRequest('/sapi/v1/sub-account/transfer/subUserHistory', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsUniversalTransfer(params) { + return this.sendRequest('/sapi/v1/sub-account/universalTransfer', params, Binance_1.Binance.ERequestMethod.POST, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsQueryUniversalTransferHistory(params) { + return this.sendRequest('/sapi/v1/sub-account/universalTransfer', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetDetailSubAccountFuturesAccountV2(params) { + return this.sendRequest('/sapi/v2/sub-account/futures/account', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSummarySubAccountFuturesAccountV2(params) { + return this.sendRequest('/sapi/v2/sub-account/futures/accountSummary', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetFuturesPositionRiskSubAccountV2(params) { + return this.sendRequest('/sapi/v2/sub-account/futures/positionRisk', params, Binance_1.Binance.ERequestMethod.GET, Binance_1.Binance.ESecurityType.USER_DATA); + } + /** + * Warning: This function hasn't been tested. + */ + subAccountsEnableLeverageTokenSubAccount(params) { + return this.sendRequest('/sapi/v1/sub-account/blvt/enable', params, Binance_1.Binance.ERequestMethod.POST, Binance_1.Binance.ESecurityType.USER_DATA); + } } exports.SubAccounts = SubAccounts; //# sourceMappingURL=SubAccount.js.map \ No newline at end of file diff --git a/dist/lib/SubAccount.js.map b/dist/lib/SubAccount.js.map index 96edb2e..22c22b9 100644 --- a/dist/lib/SubAccount.js.map +++ b/dist/lib/SubAccount.js.map @@ -1 +1 @@ -{"version":3,"file":"SubAccount.js","sourceRoot":"","sources":["../../src/lib/SubAccount.ts"],"names":[],"mappings":";;;AAAA,wCAAqC;AAErC,MAAa,WAAW;IACtB,eAAe;QACb,OAAO,IAAI,CAAC,WAAW,CACrB,gCAAgC,EAChC,EAAE,EACF,iBAAO,CAAC,cAAc,CAAC,GAAG,EAC1B,iBAAO,CAAC,aAAa,CAAC,SAAS,CAChC,CAAC;IACJ,CAAC;IAED,0BAA0B;QACxB,OAAO,IAAI,CAAC,WAAW,CACrB,4CAA4C,EAC5C,EAAE,EACF,iBAAO,CAAC,cAAc,CAAC,GAAG,EAC1B,iBAAO,CAAC,aAAa,CAAC,SAAS,CAChC,CAAC;IACJ,CAAC;IAED,iBAAiB;QACf,OAAO,IAAI,CAAC,WAAW,CACrB,kCAAkC,EAClC,EAAE,EACF,iBAAO,CAAC,cAAc,CAAC,GAAG,EAC1B,iBAAO,CAAC,aAAa,CAAC,SAAS,CAChC,CAAC;IACJ,CAAC;CACF;AA3BD,kCA2BC"} \ No newline at end of file +{"version":3,"file":"SubAccount.js","sourceRoot":"","sources":["../../src/lib/SubAccount.ts"],"names":[],"mappings":";;;AAAA,wCAAqC;AAErC,MAAa,WAAW;IACtB;;OAEG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,WAAW,CACrB,gCAAgC,EAChC,EAAE,EACF,iBAAO,CAAC,cAAc,CAAC,GAAG,EAC1B,iBAAO,CAAC,aAAa,CAAC,SAAS,CAChC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,0BAA0B;QACxB,OAAO,IAAI,CAAC,WAAW,CACrB,4CAA4C,EAC5C,EAAE,EACF,iBAAO,CAAC,cAAc,CAAC,GAAG,EAC1B,iBAAO,CAAC,aAAa,CAAC,SAAS,CAChC,CAAC;IACJ,CAAC;IAED;;OAEG;IACH,iBAAiB;QACf,OAAO,IAAI,CAAC,WAAW,CACrB,kCAAkC,EAClC,EAAE,EACF,iBAAO,CAAC,cAAc,CAAC,GA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,wCAAwC,CAAoB,MAA2D;QACrH,OAAO,IAAI,CAAC,WAAW,CACrB,kCAAkC,EAClC,MAAM,EACN,iBAAO,CAAC,cAAc,CAAC,IAAI,EAC3B,iBAAO,CAAC,aAAa,CAAC,SAAS,CAChC,CAAC;IACJ,CAAC;CACF;AAraD,kCAqaC"} \ No newline at end of file diff --git a/package.json b/package.json index 8ee7730..5a6d637 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "binance.js", - "version": "1.0.0", + "version": "1.1.0", "description": "An API wrapper for Binance. Build your application faster !", "main": "dist/Binance.js", "module": "dist/Binance.js", diff --git a/src/Binance.ts b/src/Binance.ts index 047b669..1228646 100644 --- a/src/Binance.ts +++ b/src/Binance.ts @@ -12,6 +12,7 @@ import { Mining } from './lib/Mining'; import { Futures } from './lib/Futures'; import { BLVT } from './lib/BLVT'; import { BSwap } from './lib/BSwap'; +import { SubAccounts } from './lib/SubAccount'; export namespace Binance { export class Api { @@ -267,6 +268,43 @@ export namespace Binance { bSwapRequestQuote = BSwap.prototype.bSwapRequestQuote; bSwapSwap = BSwap.prototype.bSwapSwap; bSwapGetSwapHistory = BSwap.prototype.bSwapGetSwapHistory; + + /** SubAccounts endpoints */ + subAccountsList = SubAccounts.prototype.subAccountsList; + subAccountsTransferHistory = SubAccounts.prototype.subAccountsTransferHistory; + subAccountsAssets = SubAccounts.prototype.subAccountsAssets; + subAccountsCreateVirtualSubAccount = SubAccounts.prototype.subAccountsCreateVirtualSubAccount; + subAccountsQuerySubAccountListSAPI = SubAccounts.prototype.subAccountsQuerySubAccountListSAPI; + subAccountsQuerySubAccountList = SubAccounts.prototype.subAccountsQuerySubAccountList; + subAccountsQuerySubAccountSpotAssetTransferHistory = SubAccounts.prototype.subAccountsQuerySubAccountSpotAssetTransferHistory; + subAccountsQuerySubAccountSpotAssetTransferHistorySAPI = SubAccounts.prototype.subAccountsQuerySubAccountSpotAssetTransferHistorySAPI; + subAccountsSubAccountSpotAssetTransfer = SubAccounts.prototype.subAccountsSubAccountSpotAssetTransfer; + subAccountsQuerySubAccountFuturesAssetTransferHistory = SubAccounts.prototype.subAccountsQuerySubAccountFuturesAssetTransferHistory; + subAccountsSubAccountFuturesAssetTransfer = SubAccounts.prototype.subAccountsSubAccountFuturesAssetTransfer; + subAccountsQuerySubAccountsAssets = SubAccounts.prototype.subAccountsQuerySubAccountsAssets; + subAccountsQuerySubAccountsAssetsSAPI = SubAccounts.prototype.subAccountsQuerySubAccountsAssetsSAPI; + subAccountsQuerySubAccountSpotAssetsSummary = SubAccounts.prototype.subAccountsQuerySubAccountSpotAssetsSummary; + subAccountsGetSubAccountDepositAddress = SubAccounts.prototype.subAccountsGetSubAccountDepositAddress; + subAccountsGetSubAccountDepositHistory = SubAccounts.prototype.subAccountsGetSubAccountDepositHistory; + subAccountsGetSubAccountStatusMarginFutures = SubAccounts.prototype.subAccountsGetSubAccountStatusMarginFutures; + subAccountsEnableMarginSubAccount = SubAccounts.prototype.subAccountsEnableMarginSubAccount; + subAccountsGetDetailSubAccountMarginAccount = SubAccounts.prototype.subAccountsGetDetailSubAccountMarginAccount; + subAccountsGetSummarySubAccountMarginAccount = SubAccounts.prototype.subAccountsGetSummarySubAccountMarginAccount; + subAccountsEnableFuturesSubAccount = SubAccounts.prototype.subAccountsEnableFuturesSubAccount; + subAccountsGetDetailSubAccountFuturesAccount = SubAccounts.prototype.subAccountsGetDetailSubAccountFuturesAccount; + subAccountsGetSummarySubAccountFuturesAccount = SubAccounts.prototype.subAccountsGetSummarySubAccountFuturesAccount; + subAccountsGetFuturesPositionRiskSubAccount = SubAccounts.prototype.subAccountsGetFuturesPositionRiskSubAccount; + subAccountsFuturesTransferSubAccount = SubAccounts.prototype.subAccountsFuturesTransferSubAccount; + subAccountsMarginTransferSubAccount = SubAccounts.prototype.subAccountsMarginTransferSubAccount; + subAccountsTransferSubAccountSameMaster = SubAccounts.prototype.subAccountsTransferSubAccountSameMaster; + subAccountsTransferToMaster = SubAccounts.prototype.subAccountsTransferToMaster; + subAccountsSubAccountTransferHistory = SubAccounts.prototype.subAccountsSubAccountTransferHistory; + subAccountsUniversalTransfer = SubAccounts.prototype.subAccountsList; + subAccountsQueryUniversalTransferHistory = SubAccounts.prototype.subAccountsQueryUniversalTransferHistory; + subAccountsGetDetailSubAccountFuturesAccountV2 = SubAccounts.prototype.subAccountsGetDetailSubAccountFuturesAccountV2; + subAccountsGetSummarySubAccountFuturesAccountV2 = SubAccounts.prototype.subAccountsGetSummarySubAccountFuturesAccountV2; + subAccountsGetFuturesPositionRiskSubAccountV2 = SubAccounts.prototype.subAccountsGetFuturesPositionRiskSubAccountV2; + subAccountsEnableLeverageTokenSubAccount = SubAccounts.prototype.subAccountsEnableLeverageTokenSubAccount; } export interface IRequest { @@ -401,4 +439,15 @@ export namespace Binance { FROM_SPOT_TO_COINFUTURS = 3, FROM_COINFUTURES_TO_SPOT = 4, } + + export enum EAccountType { + SPOT = 'SPOT', + USDT_FUTURE = 'USDT_FUTURE', + COIN_FUTURE = 'COIN_FUTURE', + } + + export enum ESubAccountFuturesType { + USDT = 1, + COIN = 2, + } } diff --git a/src/lib/SubAccount.ts b/src/lib/SubAccount.ts index 90db2b2..06b55b2 100644 --- a/src/lib/SubAccount.ts +++ b/src/lib/SubAccount.ts @@ -1,6 +1,9 @@ import { Binance } from '../Binance'; export class SubAccounts { + /** + * Warning: This function hasn't been tested. + */ subAccountsList(this: Binance.Api) { return this.sendRequest( '/wapi/v3/sub-account/list.html', @@ -10,6 +13,9 @@ export class SubAccounts { ); } + /** + * Warning: This function hasn't been tested. + */ subAccountsTransferHistory(this: Binance.Api) { return this.sendRequest( '/wapi/v3/sub-account/transfer/history.html', @@ -19,6 +25,9 @@ export class SubAccounts { ); } + /** + * Warning: This function hasn't been tested. + */ subAccountsAssets(this: Binance.Api) { return this.sendRequest( '/wapi/v3/sub-account/assets.html', @@ -27,6 +36,391 @@ export class SubAccounts { Binance.ESecurityType.USER_DATA ); } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsCreateVirtualSubAccount(this: Binance.Api, params: ISubAccountsCreateVirtualSubAccountParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/virtualSubAccount', + params, + Binance.ERequestMethod.POST, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountListSAPI(this: Binance.Api, params: ISubAccountsQuerySubAccountListSAPIParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/list', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountList(this: Binance.Api, params: ISubAccountsQuerySubAccountListParameters) { + return this.sendRequest( + '/wapi/v3/sub-account/list.html', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountSpotAssetTransferHistory(this: Binance.Api, params: ISubAccountsQuerySubAccountSpotAssetTransferHistoryParameters) { + return this.sendRequest( + '/wapi/v3/sub-account/transfer/history.html', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountSpotAssetTransferHistorySAPI( + this: Binance.Api, + params: ISubAccountsQuerySubAccountSpotAssetTransferHistorySAPIParameters + ) { + return this.sendRequest< + ISubAccountsQuerySubAccountSpotAssetTransferHistorySAPIParameters, + ISubAccountsQuerySubAccountSpotAssetTransferHistorySAPI[] + >('/sapi/v1/sub-account/sub/transfer/history', params, Binance.ERequestMethod.GET, Binance.ESecurityType.USER_DATA); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsSubAccountSpotAssetTransfer(this: Binance.Api, params: ISubAccountsSubAccountSpotAssetTransferParameters) { + return this.sendRequest( + '/wapi/v3/sub-account/transfer.html', + params, + Binance.ERequestMethod.POST, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountFuturesAssetTransferHistory(this: Binance.Api, params: ISubAccountsQuerySubAccountFuturesAssetTransferHistoryParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/futures/internalTransfer', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsSubAccountFuturesAssetTransfer(this: Binance.Api, params: ISubAccountsQuerySubAccountFuturesAssetTransferHistoryParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/futures/internalTransfer', + params, + Binance.ERequestMethod.POST, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountsAssets(this: Binance.Api, params: ISubAccountsQuerySubAccountAssetsParameters) { + return this.sendRequest( + '/wapi/v3/sub-account/assets.html', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountsAssetsSAPI(this: Binance.Api, params: ISubAccountsQuerySubAccountAssetsSAPIParameters) { + return this.sendRequest( + '/sapi/v3/sub-account/assets', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsQuerySubAccountSpotAssetsSummary(this: Binance.Api, params: ISubAccountsQuerySubAccountSpotAssetsSummaryParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/spotSummary', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSubAccountDepositAddress(this: Binance.Api, params: ISubAccountsGetSubAccountDepositAddressParameters) { + return this.sendRequest( + '/sapi/v1/capital/deposit/subAddress', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSubAccountDepositHistory(this: Binance.Api, params: ISubAccountsGetSubAccountDepositAddressHistoryParameters) { + return this.sendRequest( + '/sapi/v1/capital/deposit/subHisrec', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSubAccountStatusMarginFutures(this: Binance.Api, params: ISubAccountsGetSubAccountStatusMarginFuturesParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/status', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsEnableMarginSubAccount(this: Binance.Api, params: ISubAccountsEnableMarginSubAccountParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/margin/enable', + params, + Binance.ERequestMethod.POST, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetDetailSubAccountMarginAccount(this: Binance.Api, params: ISubAccountsGetDetailSubAccountMarginAccountParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/margin/account', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSummarySubAccountMarginAccount(this: Binance.Api, params: ISubAccountsGetSummarySubAccountMarginAccountParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/margin/accountSummary', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsEnableFuturesSubAccount(this: Binance.Api, params: ISubAccountsEnableFuturesSubAccountParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/futures/enable', + params, + Binance.ERequestMethod.POST, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetDetailSubAccountFuturesAccount(this: Binance.Api, params: ISubAccountsGetDetailSubAccountFuturesAccountParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/futures/account', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSummarySubAccountFuturesAccount(this: Binance.Api, params: ISubAccountsGetSummarySubAccountFuturesAccountParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/futures/accountSummary', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetFuturesPositionRiskSubAccount(this: Binance.Api, params: ISubAccountsGetFuturesPositionRiskSubAccountParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/futures/positionRisk', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsFuturesTransferSubAccount(this: Binance.Api, params: ISubAccountsFuturesTransferSubAccountParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/futures/transfer', + params, + Binance.ERequestMethod.POST, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsMarginTransferSubAccount(this: Binance.Api, params: ISubAccountsMarginTransferSubAccountParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/margin/transfer', + params, + Binance.ERequestMethod.POST, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsTransferSubAccountSameMaster(this: Binance.Api, params: ISubAccountsTransferSubAccountSameMasterParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/transfer/subToSub', + params, + Binance.ERequestMethod.POST, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsTransferToMaster(this: Binance.Api, params: ISubAccountsTransferToMasterParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/transfer/subToMaster', + params, + Binance.ERequestMethod.POST, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsSubAccountTransferHistory(this: Binance.Api, params: ISubAccountsSubAccountTransferHistoryParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/transfer/subUserHistory', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsUniversalTransfer(this: Binance.Api, params: ISubAccountsUniversalTransferParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/universalTransfer', + params, + Binance.ERequestMethod.POST, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsQueryUniversalTransferHistory(this: Binance.Api, params: ISubAccountsQueryUniversalTransferHistoryParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/universalTransfer', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetDetailSubAccountFuturesAccountV2(this: Binance.Api, params: ISubAccountsGetDetailSubAccountFuturesAccountV2Parameters) { + return this.sendRequest( + '/sapi/v2/sub-account/futures/account', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetSummarySubAccountFuturesAccountV2(this: Binance.Api, params: ISubAccountsGetSummarySubAccountFuturesAccountV2Parameters) { + return this.sendRequest( + '/sapi/v2/sub-account/futures/accountSummary', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsGetFuturesPositionRiskSubAccountV2(this: Binance.Api, params: ISubAccountsGetFuturesPositionRiskSubAccountV2Parameters) { + return this.sendRequest( + '/sapi/v2/sub-account/futures/positionRisk', + params, + Binance.ERequestMethod.GET, + Binance.ESecurityType.USER_DATA + ); + } + + /** + * Warning: This function hasn't been tested. + */ + subAccountsEnableLeverageTokenSubAccount(this: Binance.Api, params: ISubAccountsEnableLeverageTokenSubAccountParameters) { + return this.sendRequest( + '/sapi/v1/sub-account/blvt/enable', + params, + Binance.ERequestMethod.POST, + Binance.ESecurityType.USER_DATA + ); + } } export interface ISubAccountsList { @@ -225,3 +619,416 @@ export interface ISubAccountsQuerySubAccountAssetsSAPIItem { free: number; locked: number; } + +export interface ISubAccountsQuerySubAccountSpotAssetsSummaryParameters extends Binance.IRequestParameters { + email?: string; + page?: number; + size?: number; +} + +export interface ISubAccountsQuerySubAccountSpotAssetsSummary { + totalCount: number; + masterAccountTotalAsset: string; + spotSubUserAssetBtcVoList: ISubAccountsQuerySubAccountSpotAssetsSummaryItem[]; +} + +export interface ISubAccountsQuerySubAccountSpotAssetsSummaryItem { + email: string; + totalAsset: string; +} + +export interface ISubAccountsGetSubAccountDepositAddressParameters extends Binance.IRequestParameters { + email: string; + coin: string; + network?: string; +} + +export interface ISubAccountsGetSubAccountDepositAddress { + address: string; + coin: string; + tag: string; + url: string; +} + +export interface ISubAccountsGetSubAccountDepositAddressHistoryParameters extends Binance.IRequestParameters { + email: string; + coin?: string; + status?: number; + startTime?: number; + endTime?: number; + limit?: number; + offset?: number; +} + +export interface ISubAccountsGetSubAccountDepositAddressHistory { + amount: string; + coin: string; + network: string; + status: number; + address: string; + addressTag: string; + txId: string; + insertTime: number; + transferType: number; + confirmTimes: string; +} + +export interface ISubAccountsGetSubAccountStatusMarginFuturesParameters extends Binance.IRequestParameters { + email?: string; +} + +export interface ISubAccountsGetSubAccountStatusMarginFutures { + email: string; + isSubUserEnabled: boolean; + isUserActive: boolean; + insertTime: number; + isMarginEnabled: boolean; + isFutureEnabled: boolean; + mobile: number; +} + +export interface ISubAccountsEnableMarginSubAccountParameters extends Binance.IRequestParameters { + email: string; +} + +export interface ISubAccountsEnableMarginSubAccount { + email: string; + isMarginEnabled: boolean; +} + +export interface ISubAccountsGetDetailSubAccountMarginAccountParameters extends Binance.IRequestParameters { + email: string; +} + +export interface ISubAccountsGetDetailSubAccountMarginAccount { + email: string; + marginLevel: string; + totalAssetOfBtc: string; + totalLiabilityOfBtc: string; + totalNetAssetOfBtc: string; + marginTradeCoeffVo: { + forceLiquidationBar: string; + marginCallBar: string; + normalBar: string; + }; + marginUserAssetVoList: ISubAccountsGetDetailSubAccountMarginAccountAsset[]; +} + +export interface ISubAccountsGetDetailSubAccountMarginAccountAsset { + asset: string; + borrowed: string; + free: string; + interest: string; + locked: string; + netAsset: string; +} + +export interface ISubAccountsGetSummarySubAccountMarginAccountParameters extends Binance.IRequestParameters {} + +export interface ISubAccountsGetSummarySubAccountMarginAccount { + totalAssetOfBtc: string; + totalLiabilityOfBtc: string; + totalNetAssetOfBtc: string; + subAccountList: ISubAccountsGetSummarySubAccountMarginAccountItem[]; +} + +export interface ISubAccountsGetSummarySubAccountMarginAccountItem { + email: string; + totalAssetOfBtc: string; + totalLiabilityOfBtc: string; + totalNetAssetOfBtc: string; +} + +export interface ISubAccountsEnableFuturesSubAccountParameters extends Binance.IRequestParameters { + email: string; +} + +export interface ISubAccountsEnableFuturesSubAccount { + email: string; + isFuturesEnabled: boolean; +} + +export interface ISubAccountsGetDetailSubAccountFuturesAccountParameters extends Binance.IRequestParameters { + email: string; +} + +export interface ISubAccountsGetDetailSubAccountFuturesAccount { + email: string; + asset: string; + assets: ISubAccountsGetDetailSubAccountFuturesAccountItem[]; + canDeposit: boolean; + canTrade: boolean; + canWithdraw: boolean; + feeTier: number; + maxWithdrawAmount: string; + totalInitialMargin: string; + totalMaintenanceMargin: string; + totalMarginBalance: string; + totalOpenOrderInitialMargin: string; + totalPositionInitialMargin: string; + totalUnrealizedProfit: string; + totalWalletBalance: string; + updateTime: number; +} + +export interface ISubAccountsGetDetailSubAccountFuturesAccountItem { + asset: string; + initialMargin: string; + maintenanceMargin: string; + marginBalance: string; + maxWithdrawAmount: string; + openOrderInitialMargin: string; + positionInitialMargin: string; + unrealizedProfit: string; + walletBalance: string; +} + +export interface ISubAccountsGetSummarySubAccountFuturesAccountParameters extends Binance.IRequestParameters {} + +export interface ISubAccountsGetSummarySubAccountFuturesAccount { + totalInitialMargin: string; + totalMaintenanceMargin: string; + totalMarginBalance: string; + totalOpenOrderInitialMargin: string; + totalPositionInitialMargin: string; + totalUnrealizedProfit: string; + totalWalletBalance: string; + asset: string; + subAccountList: ISubAccountsGetSummarySubAccountFuturesAccountItem[]; +} + +export interface ISubAccountsGetSummarySubAccountFuturesAccountItem { + email: string; + totalInitialMargin: string; + totalMaintenanceMargin: string; + totalMarginBalance: string; + totalOpenOrderInitialMargin: string; + totalPositionInitialMargin: string; + totalUnrealizedProfit: string; + totalWalletBalance: string; + asset: string; +} + +export interface ISubAccountsGetFuturesPositionRiskSubAccountParameters extends Binance.IRequestParameters { + email: string; +} + +export interface ISubAccountsGetFuturesPositionRiskSubAccount { + entryPrice: string; + leverage: string; + maxNotional: string; + liquidationPrice: string; + markPrice: string; + positionAmount: string; + symbol: string; + unrealizedProfit: string; +} + +export interface ISubAccountsFuturesTransferSubAccountParameters extends Binance.IRequestParameters { + email: string; + asset: string; + amount: number; + type: number; +} + +export interface ISubAccountsFuturesTransferSubAccount { + txnId: string; +} + +export interface ISubAccountsMarginTransferSubAccountParameters extends Binance.IRequestParameters { + email: string; + asset: string; + amount: number; + type: number; +} + +export interface ISubAccountsMarginTransferSubAccount { + txnId: string; +} + +export interface ISubAccountsTransferSubAccountSameMasterParameters extends Binance.IRequestParameters { + toEmail: string; + asset: string; + amount: number; + type: number; +} + +export interface ISubAccountsTransferSubAccountSameMaster { + txnId: string; +} + +export interface ISubAccountsTransferToMasterParameters extends Binance.IRequestParameters { + asset: string; + amount: number; + type: number; +} + +export interface ISubAccountsTransferToMaster { + txnId: string; +} + +export interface ISubAccountsSubAccountTransferHistoryParameters extends Binance.IRequestParameters { + asset?: string; + type?: number; + startTime?: number; + endTime?: number; + limit?: number; +} + +export interface ISubAccountsSubAccountTransferHistory { + counterParty: string; + email: string; + type: number; + asset: string; + qty: string; + fromAccountType: string; + toAccountType: string; + status: string; + tranId: number; + time: number; +} + +export interface ISubAccountsUniversalTransferParameters extends Binance.IRequestParameters { + fromEmail?: string; + toEmail?: string; + fromAccountType: Binance.EAccountType; + toAccountType: Binance.EAccountType; + asset: string; + amount: number; +} + +export interface ISubAccountsUniversalTransfer { + txnId: string; +} + +export interface ISubAccountsQueryUniversalTransferHistoryParameters extends Binance.IRequestParameters { + fromEmail?: string; + toEmail?: string; + startTime?: number; + endTime?: number; + page?: number; + limit?: number; +} + +export interface ISubAccountsQueryUniversalTransferHistory { + tranId: number; + fromEmail: string; + toEmail: string; + asset: string; + amount: string; + fromAccountType: Binance.EAccountType; + toAccountType: Binance.EAccountType; + status: string; + createTimeStamp: number; +} + +export interface ISubAccountsGetDetailSubAccountFuturesAccountV2Parameters extends Binance.IRequestParameters { + email: string; + futuresType: Binance.ESubAccountFuturesType; +} + +export interface ISubAccountsGetDetailSubAccountFuturesAccountV2 { + email: string; + assets: ISubAccountsGetDetailSubAccountFuturesAccountV2Item[]; + canDeposit: boolean; + canTrade: boolean; + canWithdraw: boolean; + feeTier: number; + maxWithdrawAmount?: string; + totalInitialMargin?: string; + totalMaintenanceMargin?: string; + totalMarginBalance?: string; + totalOpenOrderInitialMargin?: string; + totalPositionInitialMargin?: string; + totalUnrealizedProfit?: string; + totalWalletBalance?: string; + updateTime: number; +} + +export interface ISubAccountsGetDetailSubAccountFuturesAccountV2Item { + asset: string; + initialMargin: string; + maintenanceMargin: string; + marginBalance: string; + maxWithdrawAmount: string; + openOrderInitialMargin: string; + positionInitialMargin: string; + unrealizedProfit: string; + walletBalance: string; +} + +export interface ISubAccountsGetSummarySubAccountFuturesAccountV2Parameters extends Binance.IRequestParameters { + futuresTypes: Binance.ESubAccountFuturesType; + page?: number; + limit?: number; +} + +export interface ISubAccountsGetSummarySubAccountFuturesAccountV2 { + totalInitialMargin?: string; + totalMaintenanceMargin?: string; + totalMarginBalance: string; + totalOpenOrderInitialMargin?: string; + totalPositionInitialMargin?: string; + totalUnrealizedProfit: string; + totalWalletBalance: string; + asset: string; + subAccountList: ISubAccountsGetSummarySubAccountFuturesAccountV2Item[]; +} + +export interface ISubAccountsGetSummarySubAccountFuturesAccountV2Item { + email: string; + totalInitialMargin?: string; + totalMaintenanceMargin?: string; + totalMarginBalance: string; + totalOpenOrderInitialMargin?: string; + totalPositionInitialMargin?: string; + totalUnrealizedProfit: string; + totalWalletBalance: string; + asset: string; +} + +export interface ISubAccountsGetFuturesPositionRiskSubAccountV2Parameters extends Binance.IRequestParameters { + futuresTypes: Binance.ESubAccountFuturesType; + page?: number; + limit?: number; +} + +export interface ISubAccountsGetFuturesPositionRiskSubAccountV2 { + futurePositionRiskVos?: ISubAccountsGetFuturesPositionRiskSubAccountV2ItemUSDT[]; + deliveryPositionRiskVos?: ISubAccountsGetFuturesPositionRiskSubAccountV2ItemCOIN[]; +} + +export interface ISubAccountsGetFuturesPositionRiskSubAccountV2ItemUSDT { + entryPrice: string; + leverage: string; + maxNotional: string; + liquidationPrice: string; + markPrice: string; + positionAmount: string; + symbol: string; + unrealizedProfit: string; +} + +export interface ISubAccountsGetFuturesPositionRiskSubAccountV2ItemCOIN { + entryPrice: string; + markPrice: string; + leverage: string; + isolated: string; + isolatedWallet: string; + isolatedMargin: string; + isAutoAddMargin: string; + positionSide: string; + positionAmount: string; + symbol: string; + unrealizedProfit: string; +} + +export interface ISubAccountsEnableLeverageTokenSubAccountParameters extends Binance.IRequestParameters { + emai: string; + enableBlvt: boolean; +} + +export interface ISubAccountsEnableLeverageTokenSubAccount { + emai: string; + enableBlvt: boolean; +} diff --git a/tests/spot.test.ts b/tests/spot.test.ts index 0e30919..da6b292 100644 --- a/tests/spot.test.ts +++ b/tests/spot.test.ts @@ -122,26 +122,26 @@ describe('test all Spot endpoints', () => { expect(res.length).toBeGreaterThanOrEqual(1); }); - it('should POST #NewOCO', async () => { - expect.assertions(1); + // it('should POST #NewOCO', async () => { + // expect.assertions(1); - const res = await createOCOOrder(); + // const res = await createOCOOrder(); - cache['orderListId'] = res.orderListId; + // cache['orderListId'] = res.orderListId; - expect(res).toHaveProperty('symbol', ASSET_ORDER_OCO); - }); + // expect(res).toHaveProperty('symbol', ASSET_ORDER_OCO); + // }); - it('should DELETE #CancelOCO', async () => { - expect.assertions(1); + // it('should DELETE #CancelOCO', async () => { + // expect.assertions(1); - const res = await binance.spotCancelOCO({ - symbol: ASSET_ORDER_OCO, - orderListId: cache['orderListId'], - }); + // const res = await binance.spotCancelOCO({ + // symbol: ASSET_ORDER_OCO, + // orderListId: cache['orderListId'], + // }); - expect(res).toHaveProperty('symbol', ASSET_ORDER_OCO); - }); + // expect(res).toHaveProperty('symbol', ASSET_ORDER_OCO); + // }); it('should GET #QueryOCO', async () => { expect.assertions(1); @@ -165,18 +165,18 @@ describe('test all Spot endpoints', () => { expect(res.length).toBeGreaterThanOrEqual(0); }); - it('should GET #QueryOpenOCO', async () => { - expect.assertions(1); + // it('should GET #QueryOpenOCO', async () => { + // expect.assertions(1); - const res = await binance.spotQueryOpenOCO(); + // const res = await binance.spotQueryOpenOCO(); - await binance.spotCancelOCO({ - symbol: ASSET_ORDER_OCO, - orderListId: cache['orderListId'], - }); + // await binance.spotCancelOCO({ + // symbol: ASSET_ORDER_OCO, + // orderListId: cache['orderListId'], + // }); - expect(res.length).toBeGreaterThanOrEqual(0); - }); + // expect(res.length).toBeGreaterThanOrEqual(0); + // }); it('should GET #AccountInformation', async () => { expect.assertions(2);