@binance/wallet 22.0.1 → 22.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +396 -7
- package/dist/index.d.ts +396 -7
- package/dist/index.js +201 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +201 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, ForbiddenE
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@binance/wallet";
|
|
6
|
-
var version = "22.0
|
|
6
|
+
var version = "22.2.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/rest-api/modules/account-api.ts
|
|
@@ -507,6 +507,22 @@ const AssetApiAxiosParamCreator = function(configuration) {
|
|
|
507
507
|
timeUnit: _timeUnit
|
|
508
508
|
};
|
|
509
509
|
},
|
|
510
|
+
getSpotAssetTags: async (tag) => {
|
|
511
|
+
const localVarQueryParameter = {};
|
|
512
|
+
const localVarBodyParameter = {};
|
|
513
|
+
const localVarHeaderParameter = {};
|
|
514
|
+
if (tag !== void 0 && tag !== null) localVarQueryParameter["tag"] = tag;
|
|
515
|
+
let _timeUnit;
|
|
516
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
517
|
+
return {
|
|
518
|
+
endpoint: "/sapi/v1/spot/asset/tags",
|
|
519
|
+
method: "GET",
|
|
520
|
+
queryParams: localVarQueryParameter,
|
|
521
|
+
bodyParams: localVarBodyParameter,
|
|
522
|
+
headerParams: localVarHeaderParameter,
|
|
523
|
+
timeUnit: _timeUnit
|
|
524
|
+
};
|
|
525
|
+
},
|
|
510
526
|
queryUserDelegationHistory: async (email, startTime, endTime, type, asset, current, size, recvWindow) => {
|
|
511
527
|
assertParamExists("queryUserDelegationHistory", "email", email);
|
|
512
528
|
assertParamExists("queryUserDelegationHistory", "startTime", startTime);
|
|
@@ -557,11 +573,12 @@ const AssetApiAxiosParamCreator = function(configuration) {
|
|
|
557
573
|
timeUnit: _timeUnit
|
|
558
574
|
};
|
|
559
575
|
},
|
|
560
|
-
queryUserWalletBalance: async (quoteAsset, recvWindow) => {
|
|
576
|
+
queryUserWalletBalance: async (quoteAsset, needBalanceDetail, recvWindow) => {
|
|
561
577
|
const localVarQueryParameter = {};
|
|
562
578
|
const localVarBodyParameter = {};
|
|
563
579
|
const localVarHeaderParameter = {};
|
|
564
580
|
if (quoteAsset !== void 0 && quoteAsset !== null) localVarQueryParameter["quoteAsset"] = quoteAsset;
|
|
581
|
+
if (needBalanceDetail !== void 0 && needBalanceDetail !== null) localVarQueryParameter["needBalanceDetail"] = needBalanceDetail;
|
|
565
582
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
566
583
|
let _timeUnit;
|
|
567
584
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
@@ -863,6 +880,24 @@ var AssetApi = class {
|
|
|
863
880
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
864
881
|
}
|
|
865
882
|
/**
|
|
883
|
+
* Get the tags configured for spot-tradable assets.
|
|
884
|
+
*
|
|
885
|
+
* Weight(IP): 100
|
|
886
|
+
*
|
|
887
|
+
* Security Type: MARKET_DATA
|
|
888
|
+
*
|
|
889
|
+
* @summary Get Spot Asset Tags (MARKET_DATA)
|
|
890
|
+
* @param {GetSpotAssetTagsRequest} requestParameters Request parameters.
|
|
891
|
+
* @returns {Promise<RestApiResponse<GetSpotAssetTagsResponse>>}
|
|
892
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
893
|
+
* @memberof AssetApi
|
|
894
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#get-spot-asset-tags Binance API Documentation}
|
|
895
|
+
*/
|
|
896
|
+
async getSpotAssetTags(requestParameters = {}) {
|
|
897
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSpotAssetTags(requestParameters?.tag);
|
|
898
|
+
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
|
|
899
|
+
}
|
|
900
|
+
/**
|
|
866
901
|
* Query User Delegation History
|
|
867
902
|
*
|
|
868
903
|
* Weight(IP): 60
|
|
@@ -919,7 +954,7 @@ var AssetApi = class {
|
|
|
919
954
|
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#query-user-wallet-balance Binance API Documentation}
|
|
920
955
|
*/
|
|
921
956
|
async queryUserWalletBalance(requestParameters = {}) {
|
|
922
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryUserWalletBalance(requestParameters?.quoteAsset, requestParameters?.recvWindow);
|
|
957
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryUserWalletBalance(requestParameters?.quoteAsset, requestParameters?.needBalanceDetail, requestParameters?.recvWindow);
|
|
923
958
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
924
959
|
}
|
|
925
960
|
/**
|
|
@@ -986,7 +1021,7 @@ var AssetApi = class {
|
|
|
986
1021
|
/**
|
|
987
1022
|
* User universal transfer
|
|
988
1023
|
*
|
|
989
|
-
* Weight(UID):
|
|
1024
|
+
* Weight(UID): 300
|
|
990
1025
|
*
|
|
991
1026
|
* Security Type: USER_DATA
|
|
992
1027
|
*
|
|
@@ -1970,6 +2005,42 @@ var TravelRuleApi = class {
|
|
|
1970
2005
|
* - Questionnaire is different for each local entity, please refer to the `Withdraw Questionnaire Contents` page.
|
|
1971
2006
|
* - If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, please try to verify the format of the questionnaire and use URL-encoded format.
|
|
1972
2007
|
*
|
|
2008
|
+
**StandardPii**
|
|
2009
|
+
*
|
|
2010
|
+
**For Natural Person**
|
|
2011
|
+
*
|
|
2012
|
+
* - `piiType` (INTEGER, Mandatory): Fix to 0: Natural Person
|
|
2013
|
+
* - `latinNames` (List<PiiName>, Mandatory): In case a person have complicated names or multiple names, this parameter is a list
|
|
2014
|
+
* - `localNames` (List<PiiName>, Optional): In case a person have complicated names or multiple names, this parameter is a list
|
|
2015
|
+
* - `nationality` (STRING, Optional)
|
|
2016
|
+
* - `residenceCountry` (STRING, Mandatory)
|
|
2017
|
+
* - `nationalIdentifier` (STRING, Optional)
|
|
2018
|
+
* - `nationalIdentifierType` (STRING, Optional)
|
|
2019
|
+
* - `nationalIdentifierIssueCountry` (STRING, Optional)
|
|
2020
|
+
* - `dateOfBirth` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended. Providing DOB could greatly reduce false positive rate during risk checking process.
|
|
2021
|
+
* - `placeOfBirth` (STRING, Optional)
|
|
2022
|
+
* - `address` (STRING, Optional)
|
|
2023
|
+
*
|
|
2024
|
+
**For Legal Person**
|
|
2025
|
+
*
|
|
2026
|
+
* - `piiType` (INTEGER, Mandatory): Fix to 1: Legal Person
|
|
2027
|
+
* - `latinName` (STRING, Mandatory): It's company name for Legal Person
|
|
2028
|
+
* - `localName` (STRING, Optional)
|
|
2029
|
+
* - `registrationCountry` (STRING, Mandatory)
|
|
2030
|
+
* - `nationalIdentifier` (STRING, Optional)
|
|
2031
|
+
* - `nationalIdentifierType` (STRING, Optional)
|
|
2032
|
+
* - `nationalIdentifierIssueCountry` (STRING, Optional)
|
|
2033
|
+
* - `registrationDate` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended.
|
|
2034
|
+
* - `address` (STRING, Optional)
|
|
2035
|
+
* - `walletAddress` (STRING, Optional)
|
|
2036
|
+
* - `walletTag` (STRING, Optional)
|
|
2037
|
+
*
|
|
2038
|
+
**PiiName**
|
|
2039
|
+
*
|
|
2040
|
+
* - `firstName` (STRING, Mandatory): Mandatory for Natural person
|
|
2041
|
+
* - `middleName` (STRING, Optional)
|
|
2042
|
+
* - `lastName` (STRING, Optional)
|
|
2043
|
+
*
|
|
1973
2044
|
* @summary Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA)
|
|
1974
2045
|
* @param {BrokerWithdrawRequest} requestParameters Request parameters.
|
|
1975
2046
|
* @returns {Promise<RestApiResponse<BrokerWithdrawResponse>>}
|
|
@@ -2114,6 +2185,42 @@ var TravelRuleApi = class {
|
|
|
2114
2185
|
* - Questionnaire is different for each local entity, please refer to `Deposit Questionnaire Content` page.
|
|
2115
2186
|
* - If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, please try to verify the format of the questionnaire and use URL-encoded format.
|
|
2116
2187
|
*
|
|
2188
|
+
**StandardPii**
|
|
2189
|
+
*
|
|
2190
|
+
**For Natural Person**
|
|
2191
|
+
*
|
|
2192
|
+
* - `piiType` (INTEGER, Mandatory): Fix to 0: Natural Person
|
|
2193
|
+
* - `latinNames` (List<PiiName>, Mandatory): In case a person have complicated names or multiple names, this parameter is a list
|
|
2194
|
+
* - `localNames` (List<PiiName>, Optional): In case a person have complicated names or multiple names, this parameter is a list
|
|
2195
|
+
* - `nationality` (STRING, Optional)
|
|
2196
|
+
* - `residenceCountry` (STRING, Mandatory)
|
|
2197
|
+
* - `nationalIdentifier` (STRING, Optional)
|
|
2198
|
+
* - `nationalIdentifierType` (STRING, Optional)
|
|
2199
|
+
* - `nationalIdentifierIssueCountry` (STRING, Optional)
|
|
2200
|
+
* - `dateOfBirth` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended. Providing DOB could greatly reduce false positive rate during risk checking process.
|
|
2201
|
+
* - `placeOfBirth` (STRING, Optional)
|
|
2202
|
+
* - `address` (STRING, Optional)
|
|
2203
|
+
*
|
|
2204
|
+
**For Legal Person**
|
|
2205
|
+
*
|
|
2206
|
+
* - `piiType` (INTEGER, Mandatory): Fix to 1: Legal Person
|
|
2207
|
+
* - `latinName` (STRING, Mandatory): It's company name for Legal Person
|
|
2208
|
+
* - `localName` (STRING, Optional)
|
|
2209
|
+
* - `registrationCountry` (STRING, Mandatory)
|
|
2210
|
+
* - `nationalIdentifier` (STRING, Optional)
|
|
2211
|
+
* - `nationalIdentifierType` (STRING, Optional)
|
|
2212
|
+
* - `nationalIdentifierIssueCountry` (STRING, Optional)
|
|
2213
|
+
* - `registrationDate` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended.
|
|
2214
|
+
* - `address` (STRING, Optional)
|
|
2215
|
+
* - `walletAddress` (STRING, Optional)
|
|
2216
|
+
* - `walletTag` (STRING, Optional)
|
|
2217
|
+
*
|
|
2218
|
+
**PiiName**
|
|
2219
|
+
*
|
|
2220
|
+
* - `firstName` (STRING, Mandatory): Mandatory for Natural person
|
|
2221
|
+
* - `middleName` (STRING, Optional)
|
|
2222
|
+
* - `lastName` (STRING, Optional)
|
|
2223
|
+
*
|
|
2117
2224
|
* @summary Submit Deposit Questionnaire Broker (For local entities that require travel rule) (supporting network) (USER_DATA)
|
|
2118
2225
|
* @param {SubmitDepositQuestionnaireRequest} requestParameters Request parameters.
|
|
2119
2226
|
* @returns {Promise<RestApiResponse<SubmitDepositQuestionnaireResponse>>}
|
|
@@ -2638,6 +2745,23 @@ var RestAPI = class {
|
|
|
2638
2745
|
return this.assetApi.getOpenSymbolList();
|
|
2639
2746
|
}
|
|
2640
2747
|
/**
|
|
2748
|
+
* Get the tags configured for spot-tradable assets.
|
|
2749
|
+
*
|
|
2750
|
+
* Weight(IP): 100
|
|
2751
|
+
*
|
|
2752
|
+
* Security Type: MARKET_DATA
|
|
2753
|
+
*
|
|
2754
|
+
* @summary Get Spot Asset Tags (MARKET_DATA)
|
|
2755
|
+
* @param {GetSpotAssetTagsRequest} requestParameters Request parameters.
|
|
2756
|
+
*
|
|
2757
|
+
* @returns {Promise<RestApiResponse<GetSpotAssetTagsResponse>>}
|
|
2758
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
2759
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#get-spot-asset-tags Binance API Documentation}
|
|
2760
|
+
*/
|
|
2761
|
+
getSpotAssetTags(requestParameters = {}) {
|
|
2762
|
+
return this.assetApi.getSpotAssetTags(requestParameters);
|
|
2763
|
+
}
|
|
2764
|
+
/**
|
|
2641
2765
|
* Query User Delegation History
|
|
2642
2766
|
*
|
|
2643
2767
|
* Weight(IP): 60
|
|
@@ -2755,7 +2879,7 @@ var RestAPI = class {
|
|
|
2755
2879
|
/**
|
|
2756
2880
|
* User universal transfer
|
|
2757
2881
|
*
|
|
2758
|
-
* Weight(UID):
|
|
2882
|
+
* Weight(UID): 300
|
|
2759
2883
|
*
|
|
2760
2884
|
* Security Type: USER_DATA
|
|
2761
2885
|
*
|
|
@@ -3026,6 +3150,42 @@ var RestAPI = class {
|
|
|
3026
3150
|
* - Questionnaire is different for each local entity, please refer to the `Withdraw Questionnaire Contents` page.
|
|
3027
3151
|
* - If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, please try to verify the format of the questionnaire and use URL-encoded format.
|
|
3028
3152
|
*
|
|
3153
|
+
**StandardPii**
|
|
3154
|
+
*
|
|
3155
|
+
**For Natural Person**
|
|
3156
|
+
*
|
|
3157
|
+
* - `piiType` (INTEGER, Mandatory): Fix to 0: Natural Person
|
|
3158
|
+
* - `latinNames` (List<PiiName>, Mandatory): In case a person have complicated names or multiple names, this parameter is a list
|
|
3159
|
+
* - `localNames` (List<PiiName>, Optional): In case a person have complicated names or multiple names, this parameter is a list
|
|
3160
|
+
* - `nationality` (STRING, Optional)
|
|
3161
|
+
* - `residenceCountry` (STRING, Mandatory)
|
|
3162
|
+
* - `nationalIdentifier` (STRING, Optional)
|
|
3163
|
+
* - `nationalIdentifierType` (STRING, Optional)
|
|
3164
|
+
* - `nationalIdentifierIssueCountry` (STRING, Optional)
|
|
3165
|
+
* - `dateOfBirth` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended. Providing DOB could greatly reduce false positive rate during risk checking process.
|
|
3166
|
+
* - `placeOfBirth` (STRING, Optional)
|
|
3167
|
+
* - `address` (STRING, Optional)
|
|
3168
|
+
*
|
|
3169
|
+
**For Legal Person**
|
|
3170
|
+
*
|
|
3171
|
+
* - `piiType` (INTEGER, Mandatory): Fix to 1: Legal Person
|
|
3172
|
+
* - `latinName` (STRING, Mandatory): It's company name for Legal Person
|
|
3173
|
+
* - `localName` (STRING, Optional)
|
|
3174
|
+
* - `registrationCountry` (STRING, Mandatory)
|
|
3175
|
+
* - `nationalIdentifier` (STRING, Optional)
|
|
3176
|
+
* - `nationalIdentifierType` (STRING, Optional)
|
|
3177
|
+
* - `nationalIdentifierIssueCountry` (STRING, Optional)
|
|
3178
|
+
* - `registrationDate` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended.
|
|
3179
|
+
* - `address` (STRING, Optional)
|
|
3180
|
+
* - `walletAddress` (STRING, Optional)
|
|
3181
|
+
* - `walletTag` (STRING, Optional)
|
|
3182
|
+
*
|
|
3183
|
+
**PiiName**
|
|
3184
|
+
*
|
|
3185
|
+
* - `firstName` (STRING, Mandatory): Mandatory for Natural person
|
|
3186
|
+
* - `middleName` (STRING, Optional)
|
|
3187
|
+
* - `lastName` (STRING, Optional)
|
|
3188
|
+
*
|
|
3029
3189
|
* @summary Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA)
|
|
3030
3190
|
* @param {BrokerWithdrawRequest} requestParameters Request parameters.
|
|
3031
3191
|
*
|
|
@@ -3163,6 +3323,42 @@ var RestAPI = class {
|
|
|
3163
3323
|
* - Questionnaire is different for each local entity, please refer to `Deposit Questionnaire Content` page.
|
|
3164
3324
|
* - If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`, please try to verify the format of the questionnaire and use URL-encoded format.
|
|
3165
3325
|
*
|
|
3326
|
+
**StandardPii**
|
|
3327
|
+
*
|
|
3328
|
+
**For Natural Person**
|
|
3329
|
+
*
|
|
3330
|
+
* - `piiType` (INTEGER, Mandatory): Fix to 0: Natural Person
|
|
3331
|
+
* - `latinNames` (List<PiiName>, Mandatory): In case a person have complicated names or multiple names, this parameter is a list
|
|
3332
|
+
* - `localNames` (List<PiiName>, Optional): In case a person have complicated names or multiple names, this parameter is a list
|
|
3333
|
+
* - `nationality` (STRING, Optional)
|
|
3334
|
+
* - `residenceCountry` (STRING, Mandatory)
|
|
3335
|
+
* - `nationalIdentifier` (STRING, Optional)
|
|
3336
|
+
* - `nationalIdentifierType` (STRING, Optional)
|
|
3337
|
+
* - `nationalIdentifierIssueCountry` (STRING, Optional)
|
|
3338
|
+
* - `dateOfBirth` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended. Providing DOB could greatly reduce false positive rate during risk checking process.
|
|
3339
|
+
* - `placeOfBirth` (STRING, Optional)
|
|
3340
|
+
* - `address` (STRING, Optional)
|
|
3341
|
+
*
|
|
3342
|
+
**For Legal Person**
|
|
3343
|
+
*
|
|
3344
|
+
* - `piiType` (INTEGER, Mandatory): Fix to 1: Legal Person
|
|
3345
|
+
* - `latinName` (STRING, Mandatory): It's company name for Legal Person
|
|
3346
|
+
* - `localName` (STRING, Optional)
|
|
3347
|
+
* - `registrationCountry` (STRING, Mandatory)
|
|
3348
|
+
* - `nationalIdentifier` (STRING, Optional)
|
|
3349
|
+
* - `nationalIdentifierType` (STRING, Optional)
|
|
3350
|
+
* - `nationalIdentifierIssueCountry` (STRING, Optional)
|
|
3351
|
+
* - `registrationDate` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended.
|
|
3352
|
+
* - `address` (STRING, Optional)
|
|
3353
|
+
* - `walletAddress` (STRING, Optional)
|
|
3354
|
+
* - `walletTag` (STRING, Optional)
|
|
3355
|
+
*
|
|
3356
|
+
**PiiName**
|
|
3357
|
+
*
|
|
3358
|
+
* - `firstName` (STRING, Mandatory): Mandatory for Natural person
|
|
3359
|
+
* - `middleName` (STRING, Optional)
|
|
3360
|
+
* - `lastName` (STRING, Optional)
|
|
3361
|
+
*
|
|
3166
3362
|
* @summary Submit Deposit Questionnaire Broker (For local entities that require travel rule) (supporting network) (USER_DATA)
|
|
3167
3363
|
* @param {SubmitDepositQuestionnaireRequest} requestParameters Request parameters.
|
|
3168
3364
|
*
|