@binance/wallet 8.0.0 → 10.0.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
@@ -41,7 +41,7 @@ var import_common7 = require("@binance/common");
41
41
 
42
42
  // package.json
43
43
  var name = "@binance/wallet";
44
- var version = "8.0.0";
44
+ var version = "10.0.0";
45
45
 
46
46
  // src/rest-api/index.ts
47
47
  var rest_api_exports = {};
@@ -842,9 +842,6 @@ var AssetApiAxiosParamCreator = function(configuration) {
842
842
  /**
843
843
  * Query User Wallet Balance
844
844
  *
845
- *
846
- * You need to open Permits Universal Transfer permission for the API Key which requests this endpoint.
847
- *
848
845
  * Weight: 60
849
846
  *
850
847
  * @summary Query User Wallet Balance (USER_DATA)
@@ -1362,9 +1359,6 @@ var AssetApi = class {
1362
1359
  /**
1363
1360
  * Query User Wallet Balance
1364
1361
  *
1365
- *
1366
- * You need to open Permits Universal Transfer permission for the API Key which requests this endpoint.
1367
- *
1368
1362
  * Weight: 60
1369
1363
  *
1370
1364
  * @summary Query User Wallet Balance (USER_DATA)
@@ -1786,6 +1780,7 @@ var CapitalApiAxiosParamCreator = function(configuration) {
1786
1780
  *
1787
1781
  * If `network` not send, return with default network of the coin.
1788
1782
  * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
1783
+ * To check if travel rule is required, by using `GET /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than `NIL` you will need update SAPI to `POST /sapi/v1/localentity/withdraw/apply` else you can continue `POST /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI.
1789
1784
  *
1790
1785
  * Weight: 900
1791
1786
  *
@@ -2122,6 +2117,7 @@ var CapitalApi = class {
2122
2117
  *
2123
2118
  * If `network` not send, return with default network of the coin.
2124
2119
  * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
2120
+ * To check if travel rule is required, by using `GET /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than `NIL` you will need update SAPI to `POST /sapi/v1/localentity/withdraw/apply` else you can continue `POST /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI.
2125
2121
  *
2126
2122
  * Weight: 900
2127
2123
  *
@@ -2388,13 +2384,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2388
2384
  /**
2389
2385
  * This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key.
2390
2386
  *
2391
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2392
- *
2393
- * Weight: 18000
2394
- * Request limit: 10 requests per second
2395
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2396
- * limit is 180000/second. Response from the endpoint contains header
2397
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2387
+ * Weight: 1
2398
2388
  *
2399
2389
  * @summary Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA)
2400
2390
  * @param {number} [recvWindow]
@@ -2483,9 +2473,68 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2483
2473
  };
2484
2474
  },
2485
2475
  /**
2486
- * Fetch address verification list
2476
+ * Fetch deposit history for local entities that with required travel rule information.
2487
2477
  *
2488
- * Weight: 10
2478
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2479
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
2480
+ *
2481
+ * Weight: 1
2482
+ *
2483
+ * @summary Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA)
2484
+ * @param {string} [depositId] Comma(,) separated list of wallet tran Ids.
2485
+ * @param {string} [txId]
2486
+ * @param {string} [network]
2487
+ * @param {string} [coin]
2488
+ * @param {boolean} [retrieveQuestionnaire] true: return `questionnaire` within response.
2489
+ * @param {number} [startTime]
2490
+ * @param {number} [endTime]
2491
+ * @param {number} [offset] Default: 0
2492
+ * @param {number} [limit] min 7, max 30, default 7
2493
+ *
2494
+ * @throws {RequiredError}
2495
+ */
2496
+ depositHistoryV2: async (depositId, txId, network, coin, retrieveQuestionnaire, startTime, endTime, offset, limit) => {
2497
+ const localVarQueryParameter = {};
2498
+ if (depositId !== void 0 && depositId !== null) {
2499
+ localVarQueryParameter["depositId"] = depositId;
2500
+ }
2501
+ if (txId !== void 0 && txId !== null) {
2502
+ localVarQueryParameter["txId"] = txId;
2503
+ }
2504
+ if (network !== void 0 && network !== null) {
2505
+ localVarQueryParameter["network"] = network;
2506
+ }
2507
+ if (coin !== void 0 && coin !== null) {
2508
+ localVarQueryParameter["coin"] = coin;
2509
+ }
2510
+ if (retrieveQuestionnaire !== void 0 && retrieveQuestionnaire !== null) {
2511
+ localVarQueryParameter["retrieveQuestionnaire"] = retrieveQuestionnaire;
2512
+ }
2513
+ if (startTime !== void 0 && startTime !== null) {
2514
+ localVarQueryParameter["startTime"] = startTime;
2515
+ }
2516
+ if (endTime !== void 0 && endTime !== null) {
2517
+ localVarQueryParameter["endTime"] = endTime;
2518
+ }
2519
+ if (offset !== void 0 && offset !== null) {
2520
+ localVarQueryParameter["offset"] = offset;
2521
+ }
2522
+ if (limit !== void 0 && limit !== null) {
2523
+ localVarQueryParameter["limit"] = limit;
2524
+ }
2525
+ let _timeUnit;
2526
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
2527
+ return {
2528
+ endpoint: "/sapi/v2/localentity/deposit/history",
2529
+ method: "GET",
2530
+ params: localVarQueryParameter,
2531
+ timeUnit: _timeUnit
2532
+ };
2533
+ },
2534
+ /**
2535
+ * Fetch address verification list for user to check on status and other details for the addresses stored in Address Book.
2536
+ *
2537
+ * Weight: 1
2489
2538
  *
2490
2539
  * @summary Fetch address verification list (USER_DATA)
2491
2540
  * @param {number} [recvWindow]
@@ -2618,13 +2667,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2618
2667
  /**
2619
2668
  * Fetch the VASP list for local entities.
2620
2669
  *
2621
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2622
- *
2623
- * Weight: 18000
2624
- * Request limit: 10 requests per second
2625
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2626
- * limit is 180000/second. Response from the endpoint contains header
2627
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2670
+ * Weight: 1
2628
2671
  *
2629
2672
  * @summary VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
2630
2673
  * @param {number} [recvWindow]
@@ -2648,16 +2691,11 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2648
2691
  /**
2649
2692
  * Fetch withdraw history for local entities that required travel rule.
2650
2693
  *
2651
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2652
2694
  * `network` may not be in the response for old withdraw.
2653
2695
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2654
2696
  * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
2655
2697
  *
2656
- * Weight: 18000
2657
- * Request limit: 10 requests per second
2658
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2659
- * limit is 180000/second. Response from the endpoint contains header
2660
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2698
+ * Weight: 1
2661
2699
  *
2662
2700
  * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
2663
2701
  * @param {string} [trId] Comma(,) separated list of travel rule record Ids.
@@ -2721,7 +2759,6 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2721
2759
  /**
2722
2760
  * Fetch withdraw history for local entities that required travel rule.
2723
2761
  *
2724
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2725
2762
  * `network` may not be in the response for old withdraw.
2726
2763
  * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
2727
2764
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
@@ -2732,11 +2769,7 @@ var TravelRuleApiAxiosParamCreator = function(configuration) {
2732
2769
  * WithdrawOrderId only support 1.
2733
2770
  * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
2734
2771
  *
2735
- * Weight: 18000
2736
- * Request limit: 10 requests per second
2737
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2738
- * limit is 180000/second. Response from the endpoint contains header
2739
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2772
+ * Weight: 1
2740
2773
  *
2741
2774
  * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
2742
2775
  * @param {string} [trId] Comma(,) separated list of travel rule record Ids.
@@ -2921,13 +2954,7 @@ var TravelRuleApi = class {
2921
2954
  /**
2922
2955
  * This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key.
2923
2956
  *
2924
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2925
- *
2926
- * Weight: 18000
2927
- * Request limit: 10 requests per second
2928
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2929
- * limit is 180000/second. Response from the endpoint contains header
2930
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2957
+ * Weight: 1
2931
2958
  *
2932
2959
  * @summary Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA)
2933
2960
  * @param {CheckQuestionnaireRequirementsRequest} requestParameters Request parameters.
@@ -2988,9 +3015,45 @@ var TravelRuleApi = class {
2988
3015
  );
2989
3016
  }
2990
3017
  /**
2991
- * Fetch address verification list
3018
+ * Fetch deposit history for local entities that with required travel rule information.
2992
3019
  *
2993
- * Weight: 10
3020
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3021
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
3022
+ *
3023
+ * Weight: 1
3024
+ *
3025
+ * @summary Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA)
3026
+ * @param {DepositHistoryV2Request} requestParameters Request parameters.
3027
+ * @returns {Promise<RestApiResponse<DepositHistoryV2Response>>}
3028
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3029
+ * @memberof TravelRuleApi
3030
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Deposit-History-V2 Binance API Documentation}
3031
+ */
3032
+ async depositHistoryV2(requestParameters = {}) {
3033
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.depositHistoryV2(
3034
+ requestParameters?.depositId,
3035
+ requestParameters?.txId,
3036
+ requestParameters?.network,
3037
+ requestParameters?.coin,
3038
+ requestParameters?.retrieveQuestionnaire,
3039
+ requestParameters?.startTime,
3040
+ requestParameters?.endTime,
3041
+ requestParameters?.offset,
3042
+ requestParameters?.limit
3043
+ );
3044
+ return (0, import_common5.sendRequest)(
3045
+ this.configuration,
3046
+ localVarAxiosArgs.endpoint,
3047
+ localVarAxiosArgs.method,
3048
+ localVarAxiosArgs.params,
3049
+ localVarAxiosArgs?.timeUnit,
3050
+ { isSigned: true }
3051
+ );
3052
+ }
3053
+ /**
3054
+ * Fetch address verification list for user to check on status and other details for the addresses stored in Address Book.
3055
+ *
3056
+ * Weight: 1
2994
3057
  *
2995
3058
  * @summary Fetch address verification list (USER_DATA)
2996
3059
  * @param {FetchAddressVerificationListRequest} requestParameters Request parameters.
@@ -3085,13 +3148,7 @@ var TravelRuleApi = class {
3085
3148
  /**
3086
3149
  * Fetch the VASP list for local entities.
3087
3150
  *
3088
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3089
- *
3090
- * Weight: 18000
3091
- * Request limit: 10 requests per second
3092
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3093
- * limit is 180000/second. Response from the endpoint contains header
3094
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3151
+ * Weight: 1
3095
3152
  *
3096
3153
  * @summary VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
3097
3154
  * @param {VaspListRequest} requestParameters Request parameters.
@@ -3116,16 +3173,11 @@ var TravelRuleApi = class {
3116
3173
  /**
3117
3174
  * Fetch withdraw history for local entities that required travel rule.
3118
3175
  *
3119
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3120
3176
  * `network` may not be in the response for old withdraw.
3121
3177
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3122
3178
  * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
3123
3179
  *
3124
- * Weight: 18000
3125
- * Request limit: 10 requests per second
3126
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3127
- * limit is 180000/second. Response from the endpoint contains header
3128
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3180
+ * Weight: 1
3129
3181
  *
3130
3182
  * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
3131
3183
  * @param {WithdrawHistoryV1Request} requestParameters Request parameters.
@@ -3160,7 +3212,6 @@ var TravelRuleApi = class {
3160
3212
  /**
3161
3213
  * Fetch withdraw history for local entities that required travel rule.
3162
3214
  *
3163
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3164
3215
  * `network` may not be in the response for old withdraw.
3165
3216
  * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
3166
3217
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
@@ -3171,11 +3222,7 @@ var TravelRuleApi = class {
3171
3222
  * WithdrawOrderId only support 1.
3172
3223
  * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
3173
3224
  *
3174
- * Weight: 18000
3175
- * Request limit: 10 requests per second
3176
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3177
- * limit is 180000/second. Response from the endpoint contains header
3178
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3225
+ * Weight: 1
3179
3226
  *
3180
3227
  * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
3181
3228
  * @param {WithdrawHistoryV2Request} requestParameters Request parameters.
@@ -3555,9 +3602,6 @@ var RestAPI = class {
3555
3602
  /**
3556
3603
  * Query User Wallet Balance
3557
3604
  *
3558
- *
3559
- * You need to open Permits Universal Transfer permission for the API Key which requests this endpoint.
3560
- *
3561
3605
  * Weight: 60
3562
3606
  *
3563
3607
  * @summary Query User Wallet Balance (USER_DATA)
@@ -3781,6 +3825,7 @@ var RestAPI = class {
3781
3825
  *
3782
3826
  * If `network` not send, return with default network of the coin.
3783
3827
  * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
3828
+ * To check if travel rule is required, by using `GET /sapi/v1/localentity/questionnaire-requirements` and if it returns anything other than `NIL` you will need update SAPI to `POST /sapi/v1/localentity/withdraw/apply` else you can continue `POST /sapi/v1/capital/withdraw/apply`. Please note that if you are required to comply to travel rule please refer to the Travel Rule SAPI.
3784
3829
  *
3785
3830
  * Weight: 900
3786
3831
  *
@@ -3864,13 +3909,7 @@ var RestAPI = class {
3864
3909
  /**
3865
3910
  * This API will return user-specific Travel Rule questionnaire requirement information in reference to the current API key.
3866
3911
  *
3867
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3868
- *
3869
- * Weight: 18000
3870
- * Request limit: 10 requests per second
3871
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3872
- * limit is 180000/second. Response from the endpoint contains header
3873
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3912
+ * Weight: 1
3874
3913
  *
3875
3914
  * @summary Check Questionnaire Requirements (for local entities that require travel rule) (supporting network) (USER_DATA)
3876
3915
  * @param {CheckQuestionnaireRequirementsRequest} requestParameters Request parameters.
@@ -3899,9 +3938,26 @@ var RestAPI = class {
3899
3938
  return this.travelRuleApi.depositHistoryTravelRule(requestParameters);
3900
3939
  }
3901
3940
  /**
3902
- * Fetch address verification list
3941
+ * Fetch deposit history for local entities that with required travel rule information.
3903
3942
  *
3904
- * Weight: 10
3943
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3944
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
3945
+ *
3946
+ * Weight: 1
3947
+ *
3948
+ * @summary Deposit History V2 (for local entities that required travel rule) (supporting network) (USER_DATA)
3949
+ * @param {DepositHistoryV2Request} requestParameters Request parameters.
3950
+ * @returns {Promise<RestApiResponse<DepositHistoryV2Response>>}
3951
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3952
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Deposit-History-V2 Binance API Documentation}
3953
+ */
3954
+ depositHistoryV2(requestParameters = {}) {
3955
+ return this.travelRuleApi.depositHistoryV2(requestParameters);
3956
+ }
3957
+ /**
3958
+ * Fetch address verification list for user to check on status and other details for the addresses stored in Address Book.
3959
+ *
3960
+ * Weight: 1
3905
3961
  *
3906
3962
  * @summary Fetch address verification list (USER_DATA)
3907
3963
  * @param {FetchAddressVerificationListRequest} requestParameters Request parameters.
@@ -3953,13 +4009,7 @@ var RestAPI = class {
3953
4009
  /**
3954
4010
  * Fetch the VASP list for local entities.
3955
4011
  *
3956
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3957
- *
3958
- * Weight: 18000
3959
- * Request limit: 10 requests per second
3960
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3961
- * limit is 180000/second. Response from the endpoint contains header
3962
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
4012
+ * Weight: 1
3963
4013
  *
3964
4014
  * @summary VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
3965
4015
  * @param {VaspListRequest} requestParameters Request parameters.
@@ -3973,16 +4023,11 @@ var RestAPI = class {
3973
4023
  /**
3974
4024
  * Fetch withdraw history for local entities that required travel rule.
3975
4025
  *
3976
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3977
4026
  * `network` may not be in the response for old withdraw.
3978
4027
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3979
4028
  * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
3980
4029
  *
3981
- * Weight: 18000
3982
- * Request limit: 10 requests per second
3983
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3984
- * limit is 180000/second. Response from the endpoint contains header
3985
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
4030
+ * Weight: 1
3986
4031
  *
3987
4032
  * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
3988
4033
  * @param {WithdrawHistoryV1Request} requestParameters Request parameters.
@@ -3996,7 +4041,6 @@ var RestAPI = class {
3996
4041
  /**
3997
4042
  * Fetch withdraw history for local entities that required travel rule.
3998
4043
  *
3999
- * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
4000
4044
  * `network` may not be in the response for old withdraw.
4001
4045
  * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
4002
4046
  * Please notice the default `startTime` and `endTime` to make sure that time interval is within
@@ -4007,11 +4051,7 @@ var RestAPI = class {
4007
4051
  * WithdrawOrderId only support 1.
4008
4052
  * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
4009
4053
  *
4010
- * Weight: 18000
4011
- * Request limit: 10 requests per second
4012
- * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
4013
- * limit is 180000/second. Response from the endpoint contains header
4014
- * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
4054
+ * Weight: 1
4015
4055
  *
4016
4056
  * @summary Withdraw History V2 (for local entities that require travel rule) (supporting network) (USER_DATA)
4017
4057
  * @param {WithdrawHistoryV2Request} requestParameters Request parameters.