@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.js CHANGED
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
14
14
 
15
15
  //#region package.json
16
16
  var name = "@binance/wallet";
17
- var version = "22.0.1";
17
+ var version = "22.2.0";
18
18
 
19
19
  //#endregion
20
20
  //#region src/rest-api/modules/account-api.ts
@@ -518,6 +518,22 @@ const AssetApiAxiosParamCreator = function(configuration) {
518
518
  timeUnit: _timeUnit
519
519
  };
520
520
  },
521
+ getSpotAssetTags: async (tag) => {
522
+ const localVarQueryParameter = {};
523
+ const localVarBodyParameter = {};
524
+ const localVarHeaderParameter = {};
525
+ if (tag !== void 0 && tag !== null) localVarQueryParameter["tag"] = tag;
526
+ let _timeUnit;
527
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
528
+ return {
529
+ endpoint: "/sapi/v1/spot/asset/tags",
530
+ method: "GET",
531
+ queryParams: localVarQueryParameter,
532
+ bodyParams: localVarBodyParameter,
533
+ headerParams: localVarHeaderParameter,
534
+ timeUnit: _timeUnit
535
+ };
536
+ },
521
537
  queryUserDelegationHistory: async (email, startTime, endTime, type, asset, current, size, recvWindow) => {
522
538
  (0, __binance_common.assertParamExists)("queryUserDelegationHistory", "email", email);
523
539
  (0, __binance_common.assertParamExists)("queryUserDelegationHistory", "startTime", startTime);
@@ -568,11 +584,12 @@ const AssetApiAxiosParamCreator = function(configuration) {
568
584
  timeUnit: _timeUnit
569
585
  };
570
586
  },
571
- queryUserWalletBalance: async (quoteAsset, recvWindow) => {
587
+ queryUserWalletBalance: async (quoteAsset, needBalanceDetail, recvWindow) => {
572
588
  const localVarQueryParameter = {};
573
589
  const localVarBodyParameter = {};
574
590
  const localVarHeaderParameter = {};
575
591
  if (quoteAsset !== void 0 && quoteAsset !== null) localVarQueryParameter["quoteAsset"] = quoteAsset;
592
+ if (needBalanceDetail !== void 0 && needBalanceDetail !== null) localVarQueryParameter["needBalanceDetail"] = needBalanceDetail;
576
593
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
577
594
  let _timeUnit;
578
595
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -874,6 +891,24 @@ var AssetApi = class {
874
891
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
875
892
  }
876
893
  /**
894
+ * Get the tags configured for spot-tradable assets.
895
+ *
896
+ * Weight(IP): 100
897
+ *
898
+ * Security Type: MARKET_DATA
899
+ *
900
+ * @summary Get Spot Asset Tags (MARKET_DATA)
901
+ * @param {GetSpotAssetTagsRequest} requestParameters Request parameters.
902
+ * @returns {Promise<RestApiResponse<GetSpotAssetTagsResponse>>}
903
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
904
+ * @memberof AssetApi
905
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#get-spot-asset-tags Binance API Documentation}
906
+ */
907
+ async getSpotAssetTags(requestParameters = {}) {
908
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSpotAssetTags(requestParameters?.tag);
909
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
910
+ }
911
+ /**
877
912
  * Query User Delegation History
878
913
  *
879
914
  * Weight(IP): 60
@@ -930,7 +965,7 @@ var AssetApi = class {
930
965
  * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#query-user-wallet-balance Binance API Documentation}
931
966
  */
932
967
  async queryUserWalletBalance(requestParameters = {}) {
933
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryUserWalletBalance(requestParameters?.quoteAsset, requestParameters?.recvWindow);
968
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryUserWalletBalance(requestParameters?.quoteAsset, requestParameters?.needBalanceDetail, requestParameters?.recvWindow);
934
969
  return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
935
970
  }
936
971
  /**
@@ -997,7 +1032,7 @@ var AssetApi = class {
997
1032
  /**
998
1033
  * User universal transfer
999
1034
  *
1000
- * Weight(UID): 900
1035
+ * Weight(UID): 300
1001
1036
  *
1002
1037
  * Security Type: USER_DATA
1003
1038
  *
@@ -1981,6 +2016,42 @@ var TravelRuleApi = class {
1981
2016
  * - Questionnaire is different for each local entity, please refer to the `Withdraw Questionnaire Contents` page.
1982
2017
  * - 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.
1983
2018
  *
2019
+ **StandardPii**
2020
+ *
2021
+ **For Natural Person**
2022
+ *
2023
+ * - `piiType` (INTEGER, Mandatory): Fix to 0: Natural Person
2024
+ * - `latinNames` (List&lt;PiiName&gt;, Mandatory): In case a person have complicated names or multiple names, this parameter is a list
2025
+ * - `localNames` (List&lt;PiiName&gt;, Optional): In case a person have complicated names or multiple names, this parameter is a list
2026
+ * - `nationality` (STRING, Optional)
2027
+ * - `residenceCountry` (STRING, Mandatory)
2028
+ * - `nationalIdentifier` (STRING, Optional)
2029
+ * - `nationalIdentifierType` (STRING, Optional)
2030
+ * - `nationalIdentifierIssueCountry` (STRING, Optional)
2031
+ * - `dateOfBirth` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended. Providing DOB could greatly reduce false positive rate during risk checking process.
2032
+ * - `placeOfBirth` (STRING, Optional)
2033
+ * - `address` (STRING, Optional)
2034
+ *
2035
+ **For Legal Person**
2036
+ *
2037
+ * - `piiType` (INTEGER, Mandatory): Fix to 1: Legal Person
2038
+ * - `latinName` (STRING, Mandatory): It's company name for Legal Person
2039
+ * - `localName` (STRING, Optional)
2040
+ * - `registrationCountry` (STRING, Mandatory)
2041
+ * - `nationalIdentifier` (STRING, Optional)
2042
+ * - `nationalIdentifierType` (STRING, Optional)
2043
+ * - `nationalIdentifierIssueCountry` (STRING, Optional)
2044
+ * - `registrationDate` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended.
2045
+ * - `address` (STRING, Optional)
2046
+ * - `walletAddress` (STRING, Optional)
2047
+ * - `walletTag` (STRING, Optional)
2048
+ *
2049
+ **PiiName**
2050
+ *
2051
+ * - `firstName` (STRING, Mandatory): Mandatory for Natural person
2052
+ * - `middleName` (STRING, Optional)
2053
+ * - `lastName` (STRING, Optional)
2054
+ *
1984
2055
  * @summary Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA)
1985
2056
  * @param {BrokerWithdrawRequest} requestParameters Request parameters.
1986
2057
  * @returns {Promise<RestApiResponse<BrokerWithdrawResponse>>}
@@ -2125,6 +2196,42 @@ var TravelRuleApi = class {
2125
2196
  * - Questionnaire is different for each local entity, please refer to `Deposit Questionnaire Content` page.
2126
2197
  * - 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.
2127
2198
  *
2199
+ **StandardPii**
2200
+ *
2201
+ **For Natural Person**
2202
+ *
2203
+ * - `piiType` (INTEGER, Mandatory): Fix to 0: Natural Person
2204
+ * - `latinNames` (List&lt;PiiName&gt;, Mandatory): In case a person have complicated names or multiple names, this parameter is a list
2205
+ * - `localNames` (List&lt;PiiName&gt;, Optional): In case a person have complicated names or multiple names, this parameter is a list
2206
+ * - `nationality` (STRING, Optional)
2207
+ * - `residenceCountry` (STRING, Mandatory)
2208
+ * - `nationalIdentifier` (STRING, Optional)
2209
+ * - `nationalIdentifierType` (STRING, Optional)
2210
+ * - `nationalIdentifierIssueCountry` (STRING, Optional)
2211
+ * - `dateOfBirth` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended. Providing DOB could greatly reduce false positive rate during risk checking process.
2212
+ * - `placeOfBirth` (STRING, Optional)
2213
+ * - `address` (STRING, Optional)
2214
+ *
2215
+ **For Legal Person**
2216
+ *
2217
+ * - `piiType` (INTEGER, Mandatory): Fix to 1: Legal Person
2218
+ * - `latinName` (STRING, Mandatory): It's company name for Legal Person
2219
+ * - `localName` (STRING, Optional)
2220
+ * - `registrationCountry` (STRING, Mandatory)
2221
+ * - `nationalIdentifier` (STRING, Optional)
2222
+ * - `nationalIdentifierType` (STRING, Optional)
2223
+ * - `nationalIdentifierIssueCountry` (STRING, Optional)
2224
+ * - `registrationDate` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended.
2225
+ * - `address` (STRING, Optional)
2226
+ * - `walletAddress` (STRING, Optional)
2227
+ * - `walletTag` (STRING, Optional)
2228
+ *
2229
+ **PiiName**
2230
+ *
2231
+ * - `firstName` (STRING, Mandatory): Mandatory for Natural person
2232
+ * - `middleName` (STRING, Optional)
2233
+ * - `lastName` (STRING, Optional)
2234
+ *
2128
2235
  * @summary Submit Deposit Questionnaire Broker (For local entities that require travel rule) (supporting network) (USER_DATA)
2129
2236
  * @param {SubmitDepositQuestionnaireRequest} requestParameters Request parameters.
2130
2237
  * @returns {Promise<RestApiResponse<SubmitDepositQuestionnaireResponse>>}
@@ -2649,6 +2756,23 @@ var RestAPI = class {
2649
2756
  return this.assetApi.getOpenSymbolList();
2650
2757
  }
2651
2758
  /**
2759
+ * Get the tags configured for spot-tradable assets.
2760
+ *
2761
+ * Weight(IP): 100
2762
+ *
2763
+ * Security Type: MARKET_DATA
2764
+ *
2765
+ * @summary Get Spot Asset Tags (MARKET_DATA)
2766
+ * @param {GetSpotAssetTagsRequest} requestParameters Request parameters.
2767
+ *
2768
+ * @returns {Promise<RestApiResponse<GetSpotAssetTagsResponse>>}
2769
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2770
+ * @see {@link https://developers.binance.com/en/docs/catalog/core-trading-wallet/api/rest-api/asset#get-spot-asset-tags Binance API Documentation}
2771
+ */
2772
+ getSpotAssetTags(requestParameters = {}) {
2773
+ return this.assetApi.getSpotAssetTags(requestParameters);
2774
+ }
2775
+ /**
2652
2776
  * Query User Delegation History
2653
2777
  *
2654
2778
  * Weight(IP): 60
@@ -2766,7 +2890,7 @@ var RestAPI = class {
2766
2890
  /**
2767
2891
  * User universal transfer
2768
2892
  *
2769
- * Weight(UID): 900
2893
+ * Weight(UID): 300
2770
2894
  *
2771
2895
  * Security Type: USER_DATA
2772
2896
  *
@@ -3037,6 +3161,42 @@ var RestAPI = class {
3037
3161
  * - Questionnaire is different for each local entity, please refer to the `Withdraw Questionnaire Contents` page.
3038
3162
  * - 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.
3039
3163
  *
3164
+ **StandardPii**
3165
+ *
3166
+ **For Natural Person**
3167
+ *
3168
+ * - `piiType` (INTEGER, Mandatory): Fix to 0: Natural Person
3169
+ * - `latinNames` (List&lt;PiiName&gt;, Mandatory): In case a person have complicated names or multiple names, this parameter is a list
3170
+ * - `localNames` (List&lt;PiiName&gt;, Optional): In case a person have complicated names or multiple names, this parameter is a list
3171
+ * - `nationality` (STRING, Optional)
3172
+ * - `residenceCountry` (STRING, Mandatory)
3173
+ * - `nationalIdentifier` (STRING, Optional)
3174
+ * - `nationalIdentifierType` (STRING, Optional)
3175
+ * - `nationalIdentifierIssueCountry` (STRING, Optional)
3176
+ * - `dateOfBirth` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended. Providing DOB could greatly reduce false positive rate during risk checking process.
3177
+ * - `placeOfBirth` (STRING, Optional)
3178
+ * - `address` (STRING, Optional)
3179
+ *
3180
+ **For Legal Person**
3181
+ *
3182
+ * - `piiType` (INTEGER, Mandatory): Fix to 1: Legal Person
3183
+ * - `latinName` (STRING, Mandatory): It's company name for Legal Person
3184
+ * - `localName` (STRING, Optional)
3185
+ * - `registrationCountry` (STRING, Mandatory)
3186
+ * - `nationalIdentifier` (STRING, Optional)
3187
+ * - `nationalIdentifierType` (STRING, Optional)
3188
+ * - `nationalIdentifierIssueCountry` (STRING, Optional)
3189
+ * - `registrationDate` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended.
3190
+ * - `address` (STRING, Optional)
3191
+ * - `walletAddress` (STRING, Optional)
3192
+ * - `walletTag` (STRING, Optional)
3193
+ *
3194
+ **PiiName**
3195
+ *
3196
+ * - `firstName` (STRING, Mandatory): Mandatory for Natural person
3197
+ * - `middleName` (STRING, Optional)
3198
+ * - `lastName` (STRING, Optional)
3199
+ *
3040
3200
  * @summary Broker Withdraw (for brokers of local entities that require travel rule) (USER_DATA)
3041
3201
  * @param {BrokerWithdrawRequest} requestParameters Request parameters.
3042
3202
  *
@@ -3174,6 +3334,42 @@ var RestAPI = class {
3174
3334
  * - Questionnaire is different for each local entity, please refer to `Deposit Questionnaire Content` page.
3175
3335
  * - 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.
3176
3336
  *
3337
+ **StandardPii**
3338
+ *
3339
+ **For Natural Person**
3340
+ *
3341
+ * - `piiType` (INTEGER, Mandatory): Fix to 0: Natural Person
3342
+ * - `latinNames` (List&lt;PiiName&gt;, Mandatory): In case a person have complicated names or multiple names, this parameter is a list
3343
+ * - `localNames` (List&lt;PiiName&gt;, Optional): In case a person have complicated names or multiple names, this parameter is a list
3344
+ * - `nationality` (STRING, Optional)
3345
+ * - `residenceCountry` (STRING, Mandatory)
3346
+ * - `nationalIdentifier` (STRING, Optional)
3347
+ * - `nationalIdentifierType` (STRING, Optional)
3348
+ * - `nationalIdentifierIssueCountry` (STRING, Optional)
3349
+ * - `dateOfBirth` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended. Providing DOB could greatly reduce false positive rate during risk checking process.
3350
+ * - `placeOfBirth` (STRING, Optional)
3351
+ * - `address` (STRING, Optional)
3352
+ *
3353
+ **For Legal Person**
3354
+ *
3355
+ * - `piiType` (INTEGER, Mandatory): Fix to 1: Legal Person
3356
+ * - `latinName` (STRING, Mandatory): It's company name for Legal Person
3357
+ * - `localName` (STRING, Optional)
3358
+ * - `registrationCountry` (STRING, Mandatory)
3359
+ * - `nationalIdentifier` (STRING, Optional)
3360
+ * - `nationalIdentifierType` (STRING, Optional)
3361
+ * - `nationalIdentifierIssueCountry` (STRING, Optional)
3362
+ * - `registrationDate` (STRING, Optional): yyyy-mm-dd. Not required but strongly recommended.
3363
+ * - `address` (STRING, Optional)
3364
+ * - `walletAddress` (STRING, Optional)
3365
+ * - `walletTag` (STRING, Optional)
3366
+ *
3367
+ **PiiName**
3368
+ *
3369
+ * - `firstName` (STRING, Mandatory): Mandatory for Natural person
3370
+ * - `middleName` (STRING, Optional)
3371
+ * - `lastName` (STRING, Optional)
3372
+ *
3177
3373
  * @summary Submit Deposit Questionnaire Broker (For local entities that require travel rule) (supporting network) (USER_DATA)
3178
3374
  * @param {SubmitDepositQuestionnaireRequest} requestParameters Request parameters.
3179
3375
  *