@binance/wallet 1.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 ADDED
@@ -0,0 +1,3642 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name2 in all)
8
+ __defProp(target, name2, { get: all[name2], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+
20
+ // src/index.ts
21
+ var src_exports = {};
22
+ __export(src_exports, {
23
+ BadRequestError: () => import_common8.BadRequestError,
24
+ ConnectorClientError: () => import_common8.ConnectorClientError,
25
+ ForbiddenError: () => import_common8.ForbiddenError,
26
+ NetworkError: () => import_common8.NetworkError,
27
+ NotFoundError: () => import_common8.NotFoundError,
28
+ RateLimitBanError: () => import_common8.RateLimitBanError,
29
+ RequiredError: () => import_common8.RequiredError,
30
+ ServerError: () => import_common8.ServerError,
31
+ TooManyRequestsError: () => import_common8.TooManyRequestsError,
32
+ UnauthorizedError: () => import_common8.UnauthorizedError,
33
+ WALLET_REST_API_PROD_URL: () => import_common8.WALLET_REST_API_PROD_URL,
34
+ WALLET_REST_API_TESTNET_URL: () => import_common8.WALLET_REST_API_TESTNET_URL,
35
+ Wallet: () => Wallet,
36
+ WalletRestAPI: () => rest_api_exports
37
+ });
38
+ module.exports = __toCommonJS(src_exports);
39
+
40
+ // src/wallet.ts
41
+ var import_os = require("os");
42
+ var import_common7 = require("@binance/common");
43
+
44
+ // package.json
45
+ var name = "@binance/wallet";
46
+ var version = "1.0.0";
47
+
48
+ // src/rest-api/index.ts
49
+ var rest_api_exports = {};
50
+ __export(rest_api_exports, {
51
+ AccountApi: () => AccountApi,
52
+ AssetApi: () => AssetApi,
53
+ CapitalApi: () => CapitalApi,
54
+ OthersApi: () => OthersApi,
55
+ RestAPI: () => RestAPI,
56
+ TravelRuleApi: () => TravelRuleApi
57
+ });
58
+
59
+ // src/rest-api/modules/account-api.ts
60
+ var import_common = require("@binance/common");
61
+ var AccountApiAxiosParamCreator = function(configuration) {
62
+ return {
63
+ /**
64
+ * Fetch account api trading status detail.
65
+ *
66
+ * Weight: 1
67
+ *
68
+ * @summary Account API Trading Status (USER_DATA)
69
+ * @param {number} [recvWindow]
70
+ *
71
+ * @throws {RequiredError}
72
+ */
73
+ accountApiTradingStatus: async (recvWindow) => {
74
+ const localVarQueryParameter = {};
75
+ if (recvWindow !== void 0 && recvWindow !== null) {
76
+ localVarQueryParameter["recvWindow"] = recvWindow;
77
+ }
78
+ let _timeUnit;
79
+ if ("timeUnit" in configuration)
80
+ _timeUnit = configuration.timeUnit;
81
+ return {
82
+ endpoint: "/sapi/v1/account/apiTradingStatus",
83
+ method: "GET",
84
+ params: localVarQueryParameter,
85
+ timeUnit: _timeUnit
86
+ };
87
+ },
88
+ /**
89
+ * Fetch account info detail.
90
+ *
91
+ * Weight: 1
92
+ *
93
+ * @summary Account info (USER_DATA)
94
+ * @param {number} [recvWindow]
95
+ *
96
+ * @throws {RequiredError}
97
+ */
98
+ accountInfo: async (recvWindow) => {
99
+ const localVarQueryParameter = {};
100
+ if (recvWindow !== void 0 && recvWindow !== null) {
101
+ localVarQueryParameter["recvWindow"] = recvWindow;
102
+ }
103
+ let _timeUnit;
104
+ if ("timeUnit" in configuration)
105
+ _timeUnit = configuration.timeUnit;
106
+ return {
107
+ endpoint: "/sapi/v1/account/info",
108
+ method: "GET",
109
+ params: localVarQueryParameter,
110
+ timeUnit: _timeUnit
111
+ };
112
+ },
113
+ /**
114
+ * Fetch account status detail.
115
+ *
116
+ * Weight: 1
117
+ *
118
+ * @summary Account Status (USER_DATA)
119
+ * @param {number} [recvWindow]
120
+ *
121
+ * @throws {RequiredError}
122
+ */
123
+ accountStatus: async (recvWindow) => {
124
+ const localVarQueryParameter = {};
125
+ if (recvWindow !== void 0 && recvWindow !== null) {
126
+ localVarQueryParameter["recvWindow"] = recvWindow;
127
+ }
128
+ let _timeUnit;
129
+ if ("timeUnit" in configuration)
130
+ _timeUnit = configuration.timeUnit;
131
+ return {
132
+ endpoint: "/sapi/v1/account/status",
133
+ method: "GET",
134
+ params: localVarQueryParameter,
135
+ timeUnit: _timeUnit
136
+ };
137
+ },
138
+ /**
139
+ * Daily account snapshot
140
+ *
141
+ * The query time period must be less then 30 days
142
+ * Support query within the last one month only
143
+ * If startTimeand endTime not sent, return records of the last 7 days by default
144
+ *
145
+ * Weight: 2400
146
+ *
147
+ * @summary Daily Account Snapshot (USER_DATA)
148
+ * @param {string} type
149
+ * @param {number} [startTime]
150
+ * @param {number} [endTime]
151
+ * @param {number} [limit] min 7, max 30, default 7
152
+ * @param {number} [recvWindow]
153
+ *
154
+ * @throws {RequiredError}
155
+ */
156
+ dailyAccountSnapshot: async (type, startTime, endTime, limit, recvWindow) => {
157
+ (0, import_common.assertParamExists)("dailyAccountSnapshot", "type", type);
158
+ const localVarQueryParameter = {};
159
+ if (type !== void 0 && type !== null) {
160
+ localVarQueryParameter["type"] = type;
161
+ }
162
+ if (startTime !== void 0 && startTime !== null) {
163
+ localVarQueryParameter["startTime"] = startTime;
164
+ }
165
+ if (endTime !== void 0 && endTime !== null) {
166
+ localVarQueryParameter["endTime"] = endTime;
167
+ }
168
+ if (limit !== void 0 && limit !== null) {
169
+ localVarQueryParameter["limit"] = limit;
170
+ }
171
+ if (recvWindow !== void 0 && recvWindow !== null) {
172
+ localVarQueryParameter["recvWindow"] = recvWindow;
173
+ }
174
+ let _timeUnit;
175
+ if ("timeUnit" in configuration)
176
+ _timeUnit = configuration.timeUnit;
177
+ return {
178
+ endpoint: "/sapi/v1/accountSnapshot",
179
+ method: "GET",
180
+ params: localVarQueryParameter,
181
+ timeUnit: _timeUnit
182
+ };
183
+ },
184
+ /**
185
+ *
186
+ * Weight: 1
187
+ *
188
+ * @summary Disable Fast Withdraw Switch (USER_DATA)
189
+ * @param {number} [recvWindow]
190
+ *
191
+ * @throws {RequiredError}
192
+ */
193
+ disableFastWithdrawSwitch: async (recvWindow) => {
194
+ const localVarQueryParameter = {};
195
+ if (recvWindow !== void 0 && recvWindow !== null) {
196
+ localVarQueryParameter["recvWindow"] = recvWindow;
197
+ }
198
+ let _timeUnit;
199
+ if ("timeUnit" in configuration)
200
+ _timeUnit = configuration.timeUnit;
201
+ return {
202
+ endpoint: "/sapi/v1/account/disableFastWithdrawSwitch",
203
+ method: "POST",
204
+ params: localVarQueryParameter,
205
+ timeUnit: _timeUnit
206
+ };
207
+ },
208
+ /**
209
+ * Enable Fast Withdraw Switch (USER_DATA)
210
+ *
211
+ * This request will enable fastwithdraw switch under your account. <br></br>
212
+ * When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee.
213
+ *
214
+ * Weight: 1
215
+ *
216
+ * @summary Enable Fast Withdraw Switch (USER_DATA)
217
+ * @param {number} [recvWindow]
218
+ *
219
+ * @throws {RequiredError}
220
+ */
221
+ enableFastWithdrawSwitch: async (recvWindow) => {
222
+ const localVarQueryParameter = {};
223
+ if (recvWindow !== void 0 && recvWindow !== null) {
224
+ localVarQueryParameter["recvWindow"] = recvWindow;
225
+ }
226
+ let _timeUnit;
227
+ if ("timeUnit" in configuration)
228
+ _timeUnit = configuration.timeUnit;
229
+ return {
230
+ endpoint: "/sapi/v1/account/enableFastWithdrawSwitch",
231
+ method: "POST",
232
+ params: localVarQueryParameter,
233
+ timeUnit: _timeUnit
234
+ };
235
+ },
236
+ /**
237
+ * Get API Key Permission
238
+ *
239
+ * Weight: 1
240
+ *
241
+ * @summary Get API Key Permission (USER_DATA)
242
+ * @param {number} [recvWindow]
243
+ *
244
+ * @throws {RequiredError}
245
+ */
246
+ getApiKeyPermission: async (recvWindow) => {
247
+ const localVarQueryParameter = {};
248
+ if (recvWindow !== void 0 && recvWindow !== null) {
249
+ localVarQueryParameter["recvWindow"] = recvWindow;
250
+ }
251
+ let _timeUnit;
252
+ if ("timeUnit" in configuration)
253
+ _timeUnit = configuration.timeUnit;
254
+ return {
255
+ endpoint: "/sapi/v1/account/apiRestrictions",
256
+ method: "GET",
257
+ params: localVarQueryParameter,
258
+ timeUnit: _timeUnit
259
+ };
260
+ }
261
+ };
262
+ };
263
+ var AccountApi = class {
264
+ constructor(configuration) {
265
+ this.configuration = configuration;
266
+ this.localVarAxiosParamCreator = AccountApiAxiosParamCreator(configuration);
267
+ }
268
+ /**
269
+ * Fetch account api trading status detail.
270
+ *
271
+ * Weight: 1
272
+ *
273
+ * @summary Account API Trading Status (USER_DATA)
274
+ * @param {AccountApiTradingStatusRequest} requestParameters Request parameters.
275
+ * @returns {Promise<RestApiResponse<AccountApiTradingStatusResponse>>}
276
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
277
+ * @memberof AccountApi
278
+ * @see {@link https://developers.binance.com/docs/wallet/account/Account-API-Trading-Status Binance API Documentation}
279
+ */
280
+ async accountApiTradingStatus(requestParameters = {}) {
281
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountApiTradingStatus(
282
+ requestParameters?.recvWindow
283
+ );
284
+ return (0, import_common.sendRequest)(
285
+ this.configuration,
286
+ localVarAxiosArgs.endpoint,
287
+ localVarAxiosArgs.method,
288
+ localVarAxiosArgs.params,
289
+ localVarAxiosArgs?.timeUnit,
290
+ { isSigned: true }
291
+ );
292
+ }
293
+ /**
294
+ * Fetch account info detail.
295
+ *
296
+ * Weight: 1
297
+ *
298
+ * @summary Account info (USER_DATA)
299
+ * @param {AccountInfoRequest} requestParameters Request parameters.
300
+ * @returns {Promise<RestApiResponse<AccountInfoResponse>>}
301
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
302
+ * @memberof AccountApi
303
+ * @see {@link https://developers.binance.com/docs/wallet/account/Account-info Binance API Documentation}
304
+ */
305
+ async accountInfo(requestParameters = {}) {
306
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountInfo(
307
+ requestParameters?.recvWindow
308
+ );
309
+ return (0, import_common.sendRequest)(
310
+ this.configuration,
311
+ localVarAxiosArgs.endpoint,
312
+ localVarAxiosArgs.method,
313
+ localVarAxiosArgs.params,
314
+ localVarAxiosArgs?.timeUnit,
315
+ { isSigned: true }
316
+ );
317
+ }
318
+ /**
319
+ * Fetch account status detail.
320
+ *
321
+ * Weight: 1
322
+ *
323
+ * @summary Account Status (USER_DATA)
324
+ * @param {AccountStatusRequest} requestParameters Request parameters.
325
+ * @returns {Promise<RestApiResponse<AccountStatusResponse>>}
326
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
327
+ * @memberof AccountApi
328
+ * @see {@link https://developers.binance.com/docs/wallet/account/Account-Status Binance API Documentation}
329
+ */
330
+ async accountStatus(requestParameters = {}) {
331
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.accountStatus(
332
+ requestParameters?.recvWindow
333
+ );
334
+ return (0, import_common.sendRequest)(
335
+ this.configuration,
336
+ localVarAxiosArgs.endpoint,
337
+ localVarAxiosArgs.method,
338
+ localVarAxiosArgs.params,
339
+ localVarAxiosArgs?.timeUnit,
340
+ { isSigned: true }
341
+ );
342
+ }
343
+ /**
344
+ * Daily account snapshot
345
+ *
346
+ * The query time period must be less then 30 days
347
+ * Support query within the last one month only
348
+ * If startTimeand endTime not sent, return records of the last 7 days by default
349
+ *
350
+ * Weight: 2400
351
+ *
352
+ * @summary Daily Account Snapshot (USER_DATA)
353
+ * @param {DailyAccountSnapshotRequest} requestParameters Request parameters.
354
+ * @returns {Promise<RestApiResponse<DailyAccountSnapshotResponse>>}
355
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
356
+ * @memberof AccountApi
357
+ * @see {@link https://developers.binance.com/docs/wallet/account/daily-account-snapshoot Binance API Documentation}
358
+ */
359
+ async dailyAccountSnapshot(requestParameters) {
360
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.dailyAccountSnapshot(
361
+ requestParameters?.type,
362
+ requestParameters?.startTime,
363
+ requestParameters?.endTime,
364
+ requestParameters?.limit,
365
+ requestParameters?.recvWindow
366
+ );
367
+ return (0, import_common.sendRequest)(
368
+ this.configuration,
369
+ localVarAxiosArgs.endpoint,
370
+ localVarAxiosArgs.method,
371
+ localVarAxiosArgs.params,
372
+ localVarAxiosArgs?.timeUnit,
373
+ { isSigned: true }
374
+ );
375
+ }
376
+ /**
377
+ *
378
+ * Weight: 1
379
+ *
380
+ * @summary Disable Fast Withdraw Switch (USER_DATA)
381
+ * @param {DisableFastWithdrawSwitchRequest} requestParameters Request parameters.
382
+ * @returns {Promise<RestApiResponse<void>>}
383
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
384
+ * @memberof AccountApi
385
+ * @see {@link https://developers.binance.com/docs/wallet/account/Disable-Fast-Withdraw-Switch Binance API Documentation}
386
+ */
387
+ async disableFastWithdrawSwitch(requestParameters = {}) {
388
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.disableFastWithdrawSwitch(
389
+ requestParameters?.recvWindow
390
+ );
391
+ return (0, import_common.sendRequest)(
392
+ this.configuration,
393
+ localVarAxiosArgs.endpoint,
394
+ localVarAxiosArgs.method,
395
+ localVarAxiosArgs.params,
396
+ localVarAxiosArgs?.timeUnit,
397
+ { isSigned: true }
398
+ );
399
+ }
400
+ /**
401
+ * Enable Fast Withdraw Switch (USER_DATA)
402
+ *
403
+ * This request will enable fastwithdraw switch under your account. <br></br>
404
+ * When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee.
405
+ *
406
+ * Weight: 1
407
+ *
408
+ * @summary Enable Fast Withdraw Switch (USER_DATA)
409
+ * @param {EnableFastWithdrawSwitchRequest} requestParameters Request parameters.
410
+ * @returns {Promise<RestApiResponse<void>>}
411
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
412
+ * @memberof AccountApi
413
+ * @see {@link https://developers.binance.com/docs/wallet/account/Enable-Fast-Withdraw-Switch Binance API Documentation}
414
+ */
415
+ async enableFastWithdrawSwitch(requestParameters = {}) {
416
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.enableFastWithdrawSwitch(
417
+ requestParameters?.recvWindow
418
+ );
419
+ return (0, import_common.sendRequest)(
420
+ this.configuration,
421
+ localVarAxiosArgs.endpoint,
422
+ localVarAxiosArgs.method,
423
+ localVarAxiosArgs.params,
424
+ localVarAxiosArgs?.timeUnit,
425
+ { isSigned: true }
426
+ );
427
+ }
428
+ /**
429
+ * Get API Key Permission
430
+ *
431
+ * Weight: 1
432
+ *
433
+ * @summary Get API Key Permission (USER_DATA)
434
+ * @param {GetApiKeyPermissionRequest} requestParameters Request parameters.
435
+ * @returns {Promise<RestApiResponse<GetApiKeyPermissionResponse>>}
436
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
437
+ * @memberof AccountApi
438
+ * @see {@link https://developers.binance.com/docs/wallet/account/api-key-permission Binance API Documentation}
439
+ */
440
+ async getApiKeyPermission(requestParameters = {}) {
441
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getApiKeyPermission(
442
+ requestParameters?.recvWindow
443
+ );
444
+ return (0, import_common.sendRequest)(
445
+ this.configuration,
446
+ localVarAxiosArgs.endpoint,
447
+ localVarAxiosArgs.method,
448
+ localVarAxiosArgs.params,
449
+ localVarAxiosArgs?.timeUnit,
450
+ { isSigned: true }
451
+ );
452
+ }
453
+ };
454
+
455
+ // src/rest-api/modules/asset-api.ts
456
+ var import_common2 = require("@binance/common");
457
+ var AssetApiAxiosParamCreator = function(configuration) {
458
+ return {
459
+ /**
460
+ * Fetch details of assets supported on Binance.
461
+ *
462
+ *
463
+ * Please get network and other deposit or withdraw details from ``GET /sapi/v1/capital/config/getall``.
464
+ *
465
+ * Weight: 1
466
+ *
467
+ * @summary Asset Detail (USER_DATA)
468
+ * @param {number} [recvWindow]
469
+ *
470
+ * @throws {RequiredError}
471
+ */
472
+ assetDetail: async (recvWindow) => {
473
+ const localVarQueryParameter = {};
474
+ if (recvWindow !== void 0 && recvWindow !== null) {
475
+ localVarQueryParameter["recvWindow"] = recvWindow;
476
+ }
477
+ let _timeUnit;
478
+ if ("timeUnit" in configuration)
479
+ _timeUnit = configuration.timeUnit;
480
+ return {
481
+ endpoint: "/sapi/v1/asset/assetDetail",
482
+ method: "GET",
483
+ params: localVarQueryParameter,
484
+ timeUnit: _timeUnit
485
+ };
486
+ },
487
+ /**
488
+ * Query asset dividend record.
489
+ *
490
+ *
491
+ * There cannot be more than 180 days between parameter `startTime` and `endTime`.
492
+ *
493
+ * Weight: 10
494
+ *
495
+ * @summary Asset Dividend Record (USER_DATA)
496
+ * @param {string} [asset] If asset is blank, then query all positive assets user have.
497
+ * @param {number} [startTime]
498
+ * @param {number} [endTime]
499
+ * @param {number} [limit] min 7, max 30, default 7
500
+ * @param {number} [recvWindow]
501
+ *
502
+ * @throws {RequiredError}
503
+ */
504
+ assetDividendRecord: async (asset, startTime, endTime, limit, recvWindow) => {
505
+ const localVarQueryParameter = {};
506
+ if (asset !== void 0 && asset !== null) {
507
+ localVarQueryParameter["asset"] = asset;
508
+ }
509
+ if (startTime !== void 0 && startTime !== null) {
510
+ localVarQueryParameter["startTime"] = startTime;
511
+ }
512
+ if (endTime !== void 0 && endTime !== null) {
513
+ localVarQueryParameter["endTime"] = endTime;
514
+ }
515
+ if (limit !== void 0 && limit !== null) {
516
+ localVarQueryParameter["limit"] = limit;
517
+ }
518
+ if (recvWindow !== void 0 && recvWindow !== null) {
519
+ localVarQueryParameter["recvWindow"] = recvWindow;
520
+ }
521
+ let _timeUnit;
522
+ if ("timeUnit" in configuration)
523
+ _timeUnit = configuration.timeUnit;
524
+ return {
525
+ endpoint: "/sapi/v1/asset/assetDividend",
526
+ method: "GET",
527
+ params: localVarQueryParameter,
528
+ timeUnit: _timeUnit
529
+ };
530
+ },
531
+ /**
532
+ * Convert dust assets to BNB.
533
+ *
534
+ * You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.
535
+ *
536
+ * Weight: 10
537
+ *
538
+ * @summary Dust Transfer (USER_DATA)
539
+ * @param {string} asset
540
+ * @param {string} [accountType] `SPOT` or `MARGIN`,default `SPOT`
541
+ * @param {number} [recvWindow]
542
+ *
543
+ * @throws {RequiredError}
544
+ */
545
+ dustTransfer: async (asset, accountType, recvWindow) => {
546
+ (0, import_common2.assertParamExists)("dustTransfer", "asset", asset);
547
+ const localVarQueryParameter = {};
548
+ if (asset !== void 0 && asset !== null) {
549
+ localVarQueryParameter["asset"] = asset;
550
+ }
551
+ if (accountType !== void 0 && accountType !== null) {
552
+ localVarQueryParameter["accountType"] = accountType;
553
+ }
554
+ if (recvWindow !== void 0 && recvWindow !== null) {
555
+ localVarQueryParameter["recvWindow"] = recvWindow;
556
+ }
557
+ let _timeUnit;
558
+ if ("timeUnit" in configuration)
559
+ _timeUnit = configuration.timeUnit;
560
+ return {
561
+ endpoint: "/sapi/v1/asset/dust",
562
+ method: "POST",
563
+ params: localVarQueryParameter,
564
+ timeUnit: _timeUnit
565
+ };
566
+ },
567
+ /**
568
+ * Dustlog
569
+ *
570
+ * Only return last 100 records
571
+ * Only return records after 2020/12/01
572
+ *
573
+ * Weight: 1
574
+ *
575
+ * @summary DustLog(USER_DATA)
576
+ * @param {number} [startTime]
577
+ * @param {number} [endTime]
578
+ * @param {number} [recvWindow]
579
+ *
580
+ * @throws {RequiredError}
581
+ */
582
+ dustlog: async (startTime, endTime, recvWindow) => {
583
+ const localVarQueryParameter = {};
584
+ if (startTime !== void 0 && startTime !== null) {
585
+ localVarQueryParameter["startTime"] = startTime;
586
+ }
587
+ if (endTime !== void 0 && endTime !== null) {
588
+ localVarQueryParameter["endTime"] = endTime;
589
+ }
590
+ if (recvWindow !== void 0 && recvWindow !== null) {
591
+ localVarQueryParameter["recvWindow"] = recvWindow;
592
+ }
593
+ let _timeUnit;
594
+ if ("timeUnit" in configuration)
595
+ _timeUnit = configuration.timeUnit;
596
+ return {
597
+ endpoint: "/sapi/v1/asset/dribblet",
598
+ method: "GET",
599
+ params: localVarQueryParameter,
600
+ timeUnit: _timeUnit
601
+ };
602
+ },
603
+ /**
604
+ * Query Funding Wallet
605
+ *
606
+ *
607
+ * Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token
608
+ *
609
+ * Weight: 1
610
+ *
611
+ * @summary Funding Wallet (USER_DATA)
612
+ * @param {string} [asset] If asset is blank, then query all positive assets user have.
613
+ * @param {string} [needBtcValuation] true or false
614
+ * @param {number} [recvWindow]
615
+ *
616
+ * @throws {RequiredError}
617
+ */
618
+ fundingWallet: async (asset, needBtcValuation, recvWindow) => {
619
+ const localVarQueryParameter = {};
620
+ if (asset !== void 0 && asset !== null) {
621
+ localVarQueryParameter["asset"] = asset;
622
+ }
623
+ if (needBtcValuation !== void 0 && needBtcValuation !== null) {
624
+ localVarQueryParameter["needBtcValuation"] = needBtcValuation;
625
+ }
626
+ if (recvWindow !== void 0 && recvWindow !== null) {
627
+ localVarQueryParameter["recvWindow"] = recvWindow;
628
+ }
629
+ let _timeUnit;
630
+ if ("timeUnit" in configuration)
631
+ _timeUnit = configuration.timeUnit;
632
+ return {
633
+ endpoint: "/sapi/v1/asset/get-funding-asset",
634
+ method: "POST",
635
+ params: localVarQueryParameter,
636
+ timeUnit: _timeUnit
637
+ };
638
+ },
639
+ /**
640
+ * Get Assets That Can Be Converted Into BNB
641
+ *
642
+ * Weight: 1
643
+ *
644
+ * @summary Get Assets That Can Be Converted Into BNB (USER_DATA)
645
+ * @param {string} [accountType] `SPOT` or `MARGIN`,default `SPOT`
646
+ * @param {number} [recvWindow]
647
+ *
648
+ * @throws {RequiredError}
649
+ */
650
+ getAssetsThatCanBeConvertedIntoBnb: async (accountType, recvWindow) => {
651
+ const localVarQueryParameter = {};
652
+ if (accountType !== void 0 && accountType !== null) {
653
+ localVarQueryParameter["accountType"] = accountType;
654
+ }
655
+ if (recvWindow !== void 0 && recvWindow !== null) {
656
+ localVarQueryParameter["recvWindow"] = recvWindow;
657
+ }
658
+ let _timeUnit;
659
+ if ("timeUnit" in configuration)
660
+ _timeUnit = configuration.timeUnit;
661
+ return {
662
+ endpoint: "/sapi/v1/asset/dust-btc",
663
+ method: "POST",
664
+ params: localVarQueryParameter,
665
+ timeUnit: _timeUnit
666
+ };
667
+ },
668
+ /**
669
+ * The query of Cloud-Mining payment and refund history
670
+ *
671
+ * Just return the SUCCESS records of payment and refund.
672
+ * For response, type = 248 means payment, type = 249 means refund, status =S means SUCCESS.
673
+ *
674
+ * Weight: 600
675
+ *
676
+ * @summary Get Cloud-Mining payment and refund history (USER_DATA)
677
+ * @param {number} startTime
678
+ * @param {number} endTime
679
+ * @param {number} [tranId] The transaction id
680
+ * @param {string} [clientTranId] The unique flag
681
+ * @param {string} [asset] If asset is blank, then query all positive assets user have.
682
+ * @param {number} [current] current page, default 1, the min value is 1
683
+ * @param {number} [size] page size, default 10, the max value is 100
684
+ *
685
+ * @throws {RequiredError}
686
+ */
687
+ getCloudMiningPaymentAndRefundHistory: async (startTime, endTime, tranId, clientTranId, asset, current, size) => {
688
+ (0, import_common2.assertParamExists)("getCloudMiningPaymentAndRefundHistory", "startTime", startTime);
689
+ (0, import_common2.assertParamExists)("getCloudMiningPaymentAndRefundHistory", "endTime", endTime);
690
+ const localVarQueryParameter = {};
691
+ if (tranId !== void 0 && tranId !== null) {
692
+ localVarQueryParameter["tranId"] = tranId;
693
+ }
694
+ if (clientTranId !== void 0 && clientTranId !== null) {
695
+ localVarQueryParameter["clientTranId"] = clientTranId;
696
+ }
697
+ if (asset !== void 0 && asset !== null) {
698
+ localVarQueryParameter["asset"] = asset;
699
+ }
700
+ if (startTime !== void 0 && startTime !== null) {
701
+ localVarQueryParameter["startTime"] = startTime;
702
+ }
703
+ if (endTime !== void 0 && endTime !== null) {
704
+ localVarQueryParameter["endTime"] = endTime;
705
+ }
706
+ if (current !== void 0 && current !== null) {
707
+ localVarQueryParameter["current"] = current;
708
+ }
709
+ if (size !== void 0 && size !== null) {
710
+ localVarQueryParameter["size"] = size;
711
+ }
712
+ let _timeUnit;
713
+ if ("timeUnit" in configuration)
714
+ _timeUnit = configuration.timeUnit;
715
+ return {
716
+ endpoint: "/sapi/v1/asset/ledger-transfer/cloud-mining/queryByPage",
717
+ method: "GET",
718
+ params: localVarQueryParameter,
719
+ timeUnit: _timeUnit
720
+ };
721
+ },
722
+ /**
723
+ * Get the list of symbols that are scheduled to be opened for trading in the market.
724
+ *
725
+ * Weight: 100
726
+ *
727
+ * @summary Get Open Symbol List (MARKET_DATA)
728
+ *
729
+ * @throws {RequiredError}
730
+ */
731
+ getOpenSymbolList: async () => {
732
+ const localVarQueryParameter = {};
733
+ let _timeUnit;
734
+ if ("timeUnit" in configuration)
735
+ _timeUnit = configuration.timeUnit;
736
+ return {
737
+ endpoint: "/sapi/v1/spot/open-symbol-list",
738
+ method: "GET",
739
+ params: localVarQueryParameter,
740
+ timeUnit: _timeUnit
741
+ };
742
+ },
743
+ /**
744
+ * Query User Delegation History
745
+ *
746
+ * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint
747
+ *
748
+ * Weight: 60
749
+ *
750
+ * @summary Query User Delegation History(For Master Account)(USER_DATA)
751
+ * @param {string} email
752
+ * @param {number} startTime
753
+ * @param {number} endTime
754
+ * @param {string} [type] Delegate/Undelegate
755
+ * @param {string} [asset] If asset is blank, then query all positive assets user have.
756
+ * @param {number} [current] current page, default 1, the min value is 1
757
+ * @param {number} [size] page size, default 10, the max value is 100
758
+ * @param {number} [recvWindow]
759
+ *
760
+ * @throws {RequiredError}
761
+ */
762
+ queryUserDelegationHistory: async (email, startTime, endTime, type, asset, current, size, recvWindow) => {
763
+ (0, import_common2.assertParamExists)("queryUserDelegationHistory", "email", email);
764
+ (0, import_common2.assertParamExists)("queryUserDelegationHistory", "startTime", startTime);
765
+ (0, import_common2.assertParamExists)("queryUserDelegationHistory", "endTime", endTime);
766
+ const localVarQueryParameter = {};
767
+ if (email !== void 0 && email !== null) {
768
+ localVarQueryParameter["email"] = email;
769
+ }
770
+ if (startTime !== void 0 && startTime !== null) {
771
+ localVarQueryParameter["startTime"] = startTime;
772
+ }
773
+ if (endTime !== void 0 && endTime !== null) {
774
+ localVarQueryParameter["endTime"] = endTime;
775
+ }
776
+ if (type !== void 0 && type !== null) {
777
+ localVarQueryParameter["type"] = type;
778
+ }
779
+ if (asset !== void 0 && asset !== null) {
780
+ localVarQueryParameter["asset"] = asset;
781
+ }
782
+ if (current !== void 0 && current !== null) {
783
+ localVarQueryParameter["current"] = current;
784
+ }
785
+ if (size !== void 0 && size !== null) {
786
+ localVarQueryParameter["size"] = size;
787
+ }
788
+ if (recvWindow !== void 0 && recvWindow !== null) {
789
+ localVarQueryParameter["recvWindow"] = recvWindow;
790
+ }
791
+ let _timeUnit;
792
+ if ("timeUnit" in configuration)
793
+ _timeUnit = configuration.timeUnit;
794
+ return {
795
+ endpoint: "/sapi/v1/asset/custody/transfer-history",
796
+ method: "GET",
797
+ params: localVarQueryParameter,
798
+ timeUnit: _timeUnit
799
+ };
800
+ },
801
+ /**
802
+ * Query User Universal Transfer History
803
+ *
804
+ *
805
+ * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
806
+ * `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
807
+ * Support query within the last 6 months only
808
+ * If `startTime`and `endTime` not sent, return records of the last 7 days by default
809
+ *
810
+ * Weight: 1
811
+ *
812
+ * @summary Query User Universal Transfer History(USER_DATA)
813
+ * @param {string} type
814
+ * @param {number} [startTime]
815
+ * @param {number} [endTime]
816
+ * @param {number} [current] current page, default 1, the min value is 1
817
+ * @param {number} [size] page size, default 10, the max value is 100
818
+ * @param {string} [fromSymbol]
819
+ * @param {string} [toSymbol]
820
+ * @param {number} [recvWindow]
821
+ *
822
+ * @throws {RequiredError}
823
+ */
824
+ queryUserUniversalTransferHistory: async (type, startTime, endTime, current, size, fromSymbol, toSymbol, recvWindow) => {
825
+ (0, import_common2.assertParamExists)("queryUserUniversalTransferHistory", "type", type);
826
+ const localVarQueryParameter = {};
827
+ if (type !== void 0 && type !== null) {
828
+ localVarQueryParameter["type"] = type;
829
+ }
830
+ if (startTime !== void 0 && startTime !== null) {
831
+ localVarQueryParameter["startTime"] = startTime;
832
+ }
833
+ if (endTime !== void 0 && endTime !== null) {
834
+ localVarQueryParameter["endTime"] = endTime;
835
+ }
836
+ if (current !== void 0 && current !== null) {
837
+ localVarQueryParameter["current"] = current;
838
+ }
839
+ if (size !== void 0 && size !== null) {
840
+ localVarQueryParameter["size"] = size;
841
+ }
842
+ if (fromSymbol !== void 0 && fromSymbol !== null) {
843
+ localVarQueryParameter["fromSymbol"] = fromSymbol;
844
+ }
845
+ if (toSymbol !== void 0 && toSymbol !== null) {
846
+ localVarQueryParameter["toSymbol"] = toSymbol;
847
+ }
848
+ if (recvWindow !== void 0 && recvWindow !== null) {
849
+ localVarQueryParameter["recvWindow"] = recvWindow;
850
+ }
851
+ let _timeUnit;
852
+ if ("timeUnit" in configuration)
853
+ _timeUnit = configuration.timeUnit;
854
+ return {
855
+ endpoint: "/sapi/v1/asset/transfer",
856
+ method: "GET",
857
+ params: localVarQueryParameter,
858
+ timeUnit: _timeUnit
859
+ };
860
+ },
861
+ /**
862
+ * Query User Wallet Balance
863
+ *
864
+ *
865
+ * You need to open Permits Universal Transfer permission for the API Key which requests this endpoint.
866
+ *
867
+ * Weight: 60
868
+ *
869
+ * @summary Query User Wallet Balance (USER_DATA)
870
+ * @param {string} [quoteAsset] `USDT`, `ETH`, `USDC`, `BNB`, etc. default `BTC`
871
+ * @param {number} [recvWindow]
872
+ *
873
+ * @throws {RequiredError}
874
+ */
875
+ queryUserWalletBalance: async (quoteAsset, recvWindow) => {
876
+ const localVarQueryParameter = {};
877
+ if (quoteAsset !== void 0 && quoteAsset !== null) {
878
+ localVarQueryParameter["quoteAsset"] = quoteAsset;
879
+ }
880
+ if (recvWindow !== void 0 && recvWindow !== null) {
881
+ localVarQueryParameter["recvWindow"] = recvWindow;
882
+ }
883
+ let _timeUnit;
884
+ if ("timeUnit" in configuration)
885
+ _timeUnit = configuration.timeUnit;
886
+ return {
887
+ endpoint: "/sapi/v1/asset/wallet/balance",
888
+ method: "GET",
889
+ params: localVarQueryParameter,
890
+ timeUnit: _timeUnit
891
+ };
892
+ },
893
+ /**
894
+ * Toggle BNB Burn On Spot Trade And Margin Interest
895
+ *
896
+ * "spotBNBBurn" and "interestBNBBurn" should be sent at least one.
897
+ *
898
+ * Weight: 1(IP)
899
+ *
900
+ * @summary Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA)
901
+ * @param {string} [spotBNBBurn] "true" or "false"; Determines whether to use BNB to pay for trading fees on SPOT
902
+ * @param {string} [interestBNBBurn] "true" or "false"; Determines whether to use BNB to pay for margin loan's interest
903
+ * @param {number} [recvWindow]
904
+ *
905
+ * @throws {RequiredError}
906
+ */
907
+ toggleBnbBurnOnSpotTradeAndMarginInterest: async (spotBNBBurn, interestBNBBurn, recvWindow) => {
908
+ const localVarQueryParameter = {};
909
+ if (spotBNBBurn !== void 0 && spotBNBBurn !== null) {
910
+ localVarQueryParameter["spotBNBBurn"] = spotBNBBurn;
911
+ }
912
+ if (interestBNBBurn !== void 0 && interestBNBBurn !== null) {
913
+ localVarQueryParameter["interestBNBBurn"] = interestBNBBurn;
914
+ }
915
+ if (recvWindow !== void 0 && recvWindow !== null) {
916
+ localVarQueryParameter["recvWindow"] = recvWindow;
917
+ }
918
+ let _timeUnit;
919
+ if ("timeUnit" in configuration)
920
+ _timeUnit = configuration.timeUnit;
921
+ return {
922
+ endpoint: "/sapi/v1/bnbBurn",
923
+ method: "POST",
924
+ params: localVarQueryParameter,
925
+ timeUnit: _timeUnit
926
+ };
927
+ },
928
+ /**
929
+ * Fetch trade fee
930
+ *
931
+ * Weight: 1
932
+ *
933
+ * @summary Trade Fee (USER_DATA)
934
+ * @param {string} [symbol]
935
+ * @param {number} [recvWindow]
936
+ *
937
+ * @throws {RequiredError}
938
+ */
939
+ tradeFee: async (symbol, recvWindow) => {
940
+ const localVarQueryParameter = {};
941
+ if (symbol !== void 0 && symbol !== null) {
942
+ localVarQueryParameter["symbol"] = symbol;
943
+ }
944
+ if (recvWindow !== void 0 && recvWindow !== null) {
945
+ localVarQueryParameter["recvWindow"] = recvWindow;
946
+ }
947
+ let _timeUnit;
948
+ if ("timeUnit" in configuration)
949
+ _timeUnit = configuration.timeUnit;
950
+ return {
951
+ endpoint: "/sapi/v1/asset/tradeFee",
952
+ method: "GET",
953
+ params: localVarQueryParameter,
954
+ timeUnit: _timeUnit
955
+ };
956
+ },
957
+ /**
958
+ * Get user assets, just for positive data.
959
+ *
960
+ * If asset is set, then return this asset, otherwise return all assets positive.
961
+ * If needBtcValuation is set, then return btcValudation.
962
+ *
963
+ * Weight: 5
964
+ *
965
+ * @summary User Asset (USER_DATA)
966
+ * @param {string} [asset] If asset is blank, then query all positive assets user have.
967
+ * @param {boolean} [needBtcValuation] Whether need btc valuation or not.
968
+ * @param {number} [recvWindow]
969
+ *
970
+ * @throws {RequiredError}
971
+ */
972
+ userAsset: async (asset, needBtcValuation, recvWindow) => {
973
+ const localVarQueryParameter = {};
974
+ if (asset !== void 0 && asset !== null) {
975
+ localVarQueryParameter["asset"] = asset;
976
+ }
977
+ if (needBtcValuation !== void 0 && needBtcValuation !== null) {
978
+ localVarQueryParameter["needBtcValuation"] = needBtcValuation;
979
+ }
980
+ if (recvWindow !== void 0 && recvWindow !== null) {
981
+ localVarQueryParameter["recvWindow"] = recvWindow;
982
+ }
983
+ let _timeUnit;
984
+ if ("timeUnit" in configuration)
985
+ _timeUnit = configuration.timeUnit;
986
+ return {
987
+ endpoint: "/sapi/v3/asset/getUserAsset",
988
+ method: "POST",
989
+ params: localVarQueryParameter,
990
+ timeUnit: _timeUnit
991
+ };
992
+ },
993
+ /**
994
+ * user universal transfer
995
+ *
996
+ * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
997
+ * `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
998
+ * ENUM of transfer types:
999
+ * MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account
1000
+ * MAIN_CMFUTURE Spot account transfer to COIN-M Futures account
1001
+ * MAIN_MARGIN Spot account transfer to Margin(cross)account
1002
+ * UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account
1003
+ * UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account
1004
+ * CMFUTURE_MAIN COIN-M Futures account transfer to Spot account
1005
+ * CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account
1006
+ * MARGIN_MAIN Margin(cross)account transfer to Spot account
1007
+ * MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures
1008
+ * MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures
1009
+ * ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account
1010
+ * MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account
1011
+ * ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account
1012
+ * MAIN_FUNDING Spot account transfer to Funding account
1013
+ * FUNDING_MAIN Funding account transfer to Spot account
1014
+ * FUNDING_UMFUTURE Funding account transfer to UMFUTURE account
1015
+ * UMFUTURE_FUNDING UMFUTURE account transfer to Funding account
1016
+ * MARGIN_FUNDING MARGIN account transfer to Funding account
1017
+ * FUNDING_MARGIN Funding account transfer to Margin account
1018
+ * FUNDING_CMFUTURE Funding account transfer to CMFUTURE account
1019
+ * CMFUTURE_FUNDING CMFUTURE account transfer to Funding account
1020
+ * MAIN_OPTION Spot account transfer to Options account
1021
+ * OPTION_MAIN Options account transfer to Spot account
1022
+ * UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account
1023
+ * OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account
1024
+ * MARGIN_OPTION Margin(cross)account transfer to Options account
1025
+ * OPTION_MARGIN Options account transfer to Margin(cross)account
1026
+ * FUNDING_OPTION Funding account transfer to Options account
1027
+ * OPTION_FUNDING Options account transfer to Funding account
1028
+ * MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account
1029
+ * PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account
1030
+ *
1031
+ * Weight: 900
1032
+ *
1033
+ * @summary User Universal Transfer (USER_DATA)
1034
+ * @param {string} type
1035
+ * @param {string} asset
1036
+ * @param {number} amount
1037
+ * @param {string} [fromSymbol]
1038
+ * @param {string} [toSymbol]
1039
+ * @param {number} [recvWindow]
1040
+ *
1041
+ * @throws {RequiredError}
1042
+ */
1043
+ userUniversalTransfer: async (type, asset, amount, fromSymbol, toSymbol, recvWindow) => {
1044
+ (0, import_common2.assertParamExists)("userUniversalTransfer", "type", type);
1045
+ (0, import_common2.assertParamExists)("userUniversalTransfer", "asset", asset);
1046
+ (0, import_common2.assertParamExists)("userUniversalTransfer", "amount", amount);
1047
+ const localVarQueryParameter = {};
1048
+ if (type !== void 0 && type !== null) {
1049
+ localVarQueryParameter["type"] = type;
1050
+ }
1051
+ if (asset !== void 0 && asset !== null) {
1052
+ localVarQueryParameter["asset"] = asset;
1053
+ }
1054
+ if (amount !== void 0 && amount !== null) {
1055
+ localVarQueryParameter["amount"] = amount;
1056
+ }
1057
+ if (fromSymbol !== void 0 && fromSymbol !== null) {
1058
+ localVarQueryParameter["fromSymbol"] = fromSymbol;
1059
+ }
1060
+ if (toSymbol !== void 0 && toSymbol !== null) {
1061
+ localVarQueryParameter["toSymbol"] = toSymbol;
1062
+ }
1063
+ if (recvWindow !== void 0 && recvWindow !== null) {
1064
+ localVarQueryParameter["recvWindow"] = recvWindow;
1065
+ }
1066
+ let _timeUnit;
1067
+ if ("timeUnit" in configuration)
1068
+ _timeUnit = configuration.timeUnit;
1069
+ return {
1070
+ endpoint: "/sapi/v1/asset/transfer",
1071
+ method: "POST",
1072
+ params: localVarQueryParameter,
1073
+ timeUnit: _timeUnit
1074
+ };
1075
+ }
1076
+ };
1077
+ };
1078
+ var AssetApi = class {
1079
+ constructor(configuration) {
1080
+ this.configuration = configuration;
1081
+ this.localVarAxiosParamCreator = AssetApiAxiosParamCreator(configuration);
1082
+ }
1083
+ /**
1084
+ * Fetch details of assets supported on Binance.
1085
+ *
1086
+ *
1087
+ * Please get network and other deposit or withdraw details from ``GET /sapi/v1/capital/config/getall``.
1088
+ *
1089
+ * Weight: 1
1090
+ *
1091
+ * @summary Asset Detail (USER_DATA)
1092
+ * @param {AssetDetailRequest} requestParameters Request parameters.
1093
+ * @returns {Promise<RestApiResponse<AssetDetailResponse>>}
1094
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1095
+ * @memberof AssetApi
1096
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Asset-Detail Binance API Documentation}
1097
+ */
1098
+ async assetDetail(requestParameters = {}) {
1099
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.assetDetail(
1100
+ requestParameters?.recvWindow
1101
+ );
1102
+ return (0, import_common2.sendRequest)(
1103
+ this.configuration,
1104
+ localVarAxiosArgs.endpoint,
1105
+ localVarAxiosArgs.method,
1106
+ localVarAxiosArgs.params,
1107
+ localVarAxiosArgs?.timeUnit,
1108
+ { isSigned: true }
1109
+ );
1110
+ }
1111
+ /**
1112
+ * Query asset dividend record.
1113
+ *
1114
+ *
1115
+ * There cannot be more than 180 days between parameter `startTime` and `endTime`.
1116
+ *
1117
+ * Weight: 10
1118
+ *
1119
+ * @summary Asset Dividend Record (USER_DATA)
1120
+ * @param {AssetDividendRecordRequest} requestParameters Request parameters.
1121
+ * @returns {Promise<RestApiResponse<AssetDividendRecordResponse>>}
1122
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1123
+ * @memberof AssetApi
1124
+ * @see {@link https://developers.binance.com/docs/wallet/asset/assets-divided-record Binance API Documentation}
1125
+ */
1126
+ async assetDividendRecord(requestParameters = {}) {
1127
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.assetDividendRecord(
1128
+ requestParameters?.asset,
1129
+ requestParameters?.startTime,
1130
+ requestParameters?.endTime,
1131
+ requestParameters?.limit,
1132
+ requestParameters?.recvWindow
1133
+ );
1134
+ return (0, import_common2.sendRequest)(
1135
+ this.configuration,
1136
+ localVarAxiosArgs.endpoint,
1137
+ localVarAxiosArgs.method,
1138
+ localVarAxiosArgs.params,
1139
+ localVarAxiosArgs?.timeUnit,
1140
+ { isSigned: true }
1141
+ );
1142
+ }
1143
+ /**
1144
+ * Convert dust assets to BNB.
1145
+ *
1146
+ * You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.
1147
+ *
1148
+ * Weight: 10
1149
+ *
1150
+ * @summary Dust Transfer (USER_DATA)
1151
+ * @param {DustTransferRequest} requestParameters Request parameters.
1152
+ * @returns {Promise<RestApiResponse<DustTransferResponse>>}
1153
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1154
+ * @memberof AssetApi
1155
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Dust-Transfer Binance API Documentation}
1156
+ */
1157
+ async dustTransfer(requestParameters) {
1158
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.dustTransfer(
1159
+ requestParameters?.asset,
1160
+ requestParameters?.accountType,
1161
+ requestParameters?.recvWindow
1162
+ );
1163
+ return (0, import_common2.sendRequest)(
1164
+ this.configuration,
1165
+ localVarAxiosArgs.endpoint,
1166
+ localVarAxiosArgs.method,
1167
+ localVarAxiosArgs.params,
1168
+ localVarAxiosArgs?.timeUnit,
1169
+ { isSigned: true }
1170
+ );
1171
+ }
1172
+ /**
1173
+ * Dustlog
1174
+ *
1175
+ * Only return last 100 records
1176
+ * Only return records after 2020/12/01
1177
+ *
1178
+ * Weight: 1
1179
+ *
1180
+ * @summary DustLog(USER_DATA)
1181
+ * @param {DustlogRequest} requestParameters Request parameters.
1182
+ * @returns {Promise<RestApiResponse<DustlogResponse>>}
1183
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1184
+ * @memberof AssetApi
1185
+ * @see {@link https://developers.binance.com/docs/wallet/asset/dust-log Binance API Documentation}
1186
+ */
1187
+ async dustlog(requestParameters = {}) {
1188
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.dustlog(
1189
+ requestParameters?.startTime,
1190
+ requestParameters?.endTime,
1191
+ requestParameters?.recvWindow
1192
+ );
1193
+ return (0, import_common2.sendRequest)(
1194
+ this.configuration,
1195
+ localVarAxiosArgs.endpoint,
1196
+ localVarAxiosArgs.method,
1197
+ localVarAxiosArgs.params,
1198
+ localVarAxiosArgs?.timeUnit,
1199
+ { isSigned: true }
1200
+ );
1201
+ }
1202
+ /**
1203
+ * Query Funding Wallet
1204
+ *
1205
+ *
1206
+ * Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token
1207
+ *
1208
+ * Weight: 1
1209
+ *
1210
+ * @summary Funding Wallet (USER_DATA)
1211
+ * @param {FundingWalletRequest} requestParameters Request parameters.
1212
+ * @returns {Promise<RestApiResponse<FundingWalletResponse>>}
1213
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1214
+ * @memberof AssetApi
1215
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Funding-Wallet Binance API Documentation}
1216
+ */
1217
+ async fundingWallet(requestParameters = {}) {
1218
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.fundingWallet(
1219
+ requestParameters?.asset,
1220
+ requestParameters?.needBtcValuation,
1221
+ requestParameters?.recvWindow
1222
+ );
1223
+ return (0, import_common2.sendRequest)(
1224
+ this.configuration,
1225
+ localVarAxiosArgs.endpoint,
1226
+ localVarAxiosArgs.method,
1227
+ localVarAxiosArgs.params,
1228
+ localVarAxiosArgs?.timeUnit,
1229
+ { isSigned: true }
1230
+ );
1231
+ }
1232
+ /**
1233
+ * Get Assets That Can Be Converted Into BNB
1234
+ *
1235
+ * Weight: 1
1236
+ *
1237
+ * @summary Get Assets That Can Be Converted Into BNB (USER_DATA)
1238
+ * @param {GetAssetsThatCanBeConvertedIntoBnbRequest} requestParameters Request parameters.
1239
+ * @returns {Promise<RestApiResponse<GetAssetsThatCanBeConvertedIntoBnbResponse>>}
1240
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1241
+ * @memberof AssetApi
1242
+ * @see {@link https://developers.binance.com/docs/wallet/asset/assets-can-convert-bnb Binance API Documentation}
1243
+ */
1244
+ async getAssetsThatCanBeConvertedIntoBnb(requestParameters = {}) {
1245
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getAssetsThatCanBeConvertedIntoBnb(
1246
+ requestParameters?.accountType,
1247
+ requestParameters?.recvWindow
1248
+ );
1249
+ return (0, import_common2.sendRequest)(
1250
+ this.configuration,
1251
+ localVarAxiosArgs.endpoint,
1252
+ localVarAxiosArgs.method,
1253
+ localVarAxiosArgs.params,
1254
+ localVarAxiosArgs?.timeUnit,
1255
+ { isSigned: true }
1256
+ );
1257
+ }
1258
+ /**
1259
+ * The query of Cloud-Mining payment and refund history
1260
+ *
1261
+ * Just return the SUCCESS records of payment and refund.
1262
+ * For response, type = 248 means payment, type = 249 means refund, status =S means SUCCESS.
1263
+ *
1264
+ * Weight: 600
1265
+ *
1266
+ * @summary Get Cloud-Mining payment and refund history (USER_DATA)
1267
+ * @param {GetCloudMiningPaymentAndRefundHistoryRequest} requestParameters Request parameters.
1268
+ * @returns {Promise<RestApiResponse<GetCloudMiningPaymentAndRefundHistoryResponse>>}
1269
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1270
+ * @memberof AssetApi
1271
+ * @see {@link https://developers.binance.com/docs/wallet/asset/cloud-mining-payment-and-refund-history Binance API Documentation}
1272
+ */
1273
+ async getCloudMiningPaymentAndRefundHistory(requestParameters) {
1274
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCloudMiningPaymentAndRefundHistory(
1275
+ requestParameters?.startTime,
1276
+ requestParameters?.endTime,
1277
+ requestParameters?.tranId,
1278
+ requestParameters?.clientTranId,
1279
+ requestParameters?.asset,
1280
+ requestParameters?.current,
1281
+ requestParameters?.size
1282
+ );
1283
+ return (0, import_common2.sendRequest)(
1284
+ this.configuration,
1285
+ localVarAxiosArgs.endpoint,
1286
+ localVarAxiosArgs.method,
1287
+ localVarAxiosArgs.params,
1288
+ localVarAxiosArgs?.timeUnit,
1289
+ { isSigned: true }
1290
+ );
1291
+ }
1292
+ /**
1293
+ * Get the list of symbols that are scheduled to be opened for trading in the market.
1294
+ *
1295
+ * Weight: 100
1296
+ *
1297
+ * @summary Get Open Symbol List (MARKET_DATA)
1298
+ * @returns {Promise<RestApiResponse<GetOpenSymbolListResponse>>}
1299
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1300
+ * @memberof AssetApi
1301
+ * @see {@link https://developers.binance.com/docs/wallet/asset/open-symbol-list Binance API Documentation}
1302
+ */
1303
+ async getOpenSymbolList() {
1304
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getOpenSymbolList();
1305
+ return (0, import_common2.sendRequest)(
1306
+ this.configuration,
1307
+ localVarAxiosArgs.endpoint,
1308
+ localVarAxiosArgs.method,
1309
+ localVarAxiosArgs.params,
1310
+ localVarAxiosArgs?.timeUnit,
1311
+ { isSigned: false }
1312
+ );
1313
+ }
1314
+ /**
1315
+ * Query User Delegation History
1316
+ *
1317
+ * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint
1318
+ *
1319
+ * Weight: 60
1320
+ *
1321
+ * @summary Query User Delegation History(For Master Account)(USER_DATA)
1322
+ * @param {QueryUserDelegationHistoryRequest} requestParameters Request parameters.
1323
+ * @returns {Promise<RestApiResponse<QueryUserDelegationHistoryResponse>>}
1324
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1325
+ * @memberof AssetApi
1326
+ * @see {@link https://developers.binance.com/docs/wallet/asset/query-user-delegation Binance API Documentation}
1327
+ */
1328
+ async queryUserDelegationHistory(requestParameters) {
1329
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryUserDelegationHistory(
1330
+ requestParameters?.email,
1331
+ requestParameters?.startTime,
1332
+ requestParameters?.endTime,
1333
+ requestParameters?.type,
1334
+ requestParameters?.asset,
1335
+ requestParameters?.current,
1336
+ requestParameters?.size,
1337
+ requestParameters?.recvWindow
1338
+ );
1339
+ return (0, import_common2.sendRequest)(
1340
+ this.configuration,
1341
+ localVarAxiosArgs.endpoint,
1342
+ localVarAxiosArgs.method,
1343
+ localVarAxiosArgs.params,
1344
+ localVarAxiosArgs?.timeUnit,
1345
+ { isSigned: true }
1346
+ );
1347
+ }
1348
+ /**
1349
+ * Query User Universal Transfer History
1350
+ *
1351
+ *
1352
+ * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
1353
+ * `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
1354
+ * Support query within the last 6 months only
1355
+ * If `startTime`and `endTime` not sent, return records of the last 7 days by default
1356
+ *
1357
+ * Weight: 1
1358
+ *
1359
+ * @summary Query User Universal Transfer History(USER_DATA)
1360
+ * @param {QueryUserUniversalTransferHistoryRequest} requestParameters Request parameters.
1361
+ * @returns {Promise<RestApiResponse<QueryUserUniversalTransferHistoryResponse>>}
1362
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1363
+ * @memberof AssetApi
1364
+ * @see {@link https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer Binance API Documentation}
1365
+ */
1366
+ async queryUserUniversalTransferHistory(requestParameters) {
1367
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryUserUniversalTransferHistory(
1368
+ requestParameters?.type,
1369
+ requestParameters?.startTime,
1370
+ requestParameters?.endTime,
1371
+ requestParameters?.current,
1372
+ requestParameters?.size,
1373
+ requestParameters?.fromSymbol,
1374
+ requestParameters?.toSymbol,
1375
+ requestParameters?.recvWindow
1376
+ );
1377
+ return (0, import_common2.sendRequest)(
1378
+ this.configuration,
1379
+ localVarAxiosArgs.endpoint,
1380
+ localVarAxiosArgs.method,
1381
+ localVarAxiosArgs.params,
1382
+ localVarAxiosArgs?.timeUnit,
1383
+ { isSigned: true }
1384
+ );
1385
+ }
1386
+ /**
1387
+ * Query User Wallet Balance
1388
+ *
1389
+ *
1390
+ * You need to open Permits Universal Transfer permission for the API Key which requests this endpoint.
1391
+ *
1392
+ * Weight: 60
1393
+ *
1394
+ * @summary Query User Wallet Balance (USER_DATA)
1395
+ * @param {QueryUserWalletBalanceRequest} requestParameters Request parameters.
1396
+ * @returns {Promise<RestApiResponse<QueryUserWalletBalanceResponse>>}
1397
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1398
+ * @memberof AssetApi
1399
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Query-User-Wallet-Balance Binance API Documentation}
1400
+ */
1401
+ async queryUserWalletBalance(requestParameters = {}) {
1402
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryUserWalletBalance(
1403
+ requestParameters?.quoteAsset,
1404
+ requestParameters?.recvWindow
1405
+ );
1406
+ return (0, import_common2.sendRequest)(
1407
+ this.configuration,
1408
+ localVarAxiosArgs.endpoint,
1409
+ localVarAxiosArgs.method,
1410
+ localVarAxiosArgs.params,
1411
+ localVarAxiosArgs?.timeUnit,
1412
+ { isSigned: true }
1413
+ );
1414
+ }
1415
+ /**
1416
+ * Toggle BNB Burn On Spot Trade And Margin Interest
1417
+ *
1418
+ * "spotBNBBurn" and "interestBNBBurn" should be sent at least one.
1419
+ *
1420
+ * Weight: 1(IP)
1421
+ *
1422
+ * @summary Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA)
1423
+ * @param {ToggleBnbBurnOnSpotTradeAndMarginInterestRequest} requestParameters Request parameters.
1424
+ * @returns {Promise<RestApiResponse<ToggleBnbBurnOnSpotTradeAndMarginInterestResponse>>}
1425
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1426
+ * @memberof AssetApi
1427
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Toggle-BNB-Burn-On-Spot-Trade-And-Margin-Interest Binance API Documentation}
1428
+ */
1429
+ async toggleBnbBurnOnSpotTradeAndMarginInterest(requestParameters = {}) {
1430
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.toggleBnbBurnOnSpotTradeAndMarginInterest(
1431
+ requestParameters?.spotBNBBurn,
1432
+ requestParameters?.interestBNBBurn,
1433
+ requestParameters?.recvWindow
1434
+ );
1435
+ return (0, import_common2.sendRequest)(
1436
+ this.configuration,
1437
+ localVarAxiosArgs.endpoint,
1438
+ localVarAxiosArgs.method,
1439
+ localVarAxiosArgs.params,
1440
+ localVarAxiosArgs?.timeUnit,
1441
+ { isSigned: true }
1442
+ );
1443
+ }
1444
+ /**
1445
+ * Fetch trade fee
1446
+ *
1447
+ * Weight: 1
1448
+ *
1449
+ * @summary Trade Fee (USER_DATA)
1450
+ * @param {TradeFeeRequest} requestParameters Request parameters.
1451
+ * @returns {Promise<RestApiResponse<TradeFeeResponse>>}
1452
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1453
+ * @memberof AssetApi
1454
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Trade-Fee Binance API Documentation}
1455
+ */
1456
+ async tradeFee(requestParameters = {}) {
1457
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.tradeFee(
1458
+ requestParameters?.symbol,
1459
+ requestParameters?.recvWindow
1460
+ );
1461
+ return (0, import_common2.sendRequest)(
1462
+ this.configuration,
1463
+ localVarAxiosArgs.endpoint,
1464
+ localVarAxiosArgs.method,
1465
+ localVarAxiosArgs.params,
1466
+ localVarAxiosArgs?.timeUnit,
1467
+ { isSigned: true }
1468
+ );
1469
+ }
1470
+ /**
1471
+ * Get user assets, just for positive data.
1472
+ *
1473
+ * If asset is set, then return this asset, otherwise return all assets positive.
1474
+ * If needBtcValuation is set, then return btcValudation.
1475
+ *
1476
+ * Weight: 5
1477
+ *
1478
+ * @summary User Asset (USER_DATA)
1479
+ * @param {UserAssetRequest} requestParameters Request parameters.
1480
+ * @returns {Promise<RestApiResponse<UserAssetResponse>>}
1481
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1482
+ * @memberof AssetApi
1483
+ * @see {@link https://developers.binance.com/docs/wallet/asset/user-assets Binance API Documentation}
1484
+ */
1485
+ async userAsset(requestParameters = {}) {
1486
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.userAsset(
1487
+ requestParameters?.asset,
1488
+ requestParameters?.needBtcValuation,
1489
+ requestParameters?.recvWindow
1490
+ );
1491
+ return (0, import_common2.sendRequest)(
1492
+ this.configuration,
1493
+ localVarAxiosArgs.endpoint,
1494
+ localVarAxiosArgs.method,
1495
+ localVarAxiosArgs.params,
1496
+ localVarAxiosArgs?.timeUnit,
1497
+ { isSigned: true }
1498
+ );
1499
+ }
1500
+ /**
1501
+ * user universal transfer
1502
+ *
1503
+ * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
1504
+ * `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
1505
+ * ENUM of transfer types:
1506
+ * MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account
1507
+ * MAIN_CMFUTURE Spot account transfer to COIN-M Futures account
1508
+ * MAIN_MARGIN Spot account transfer to Margin(cross)account
1509
+ * UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account
1510
+ * UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account
1511
+ * CMFUTURE_MAIN COIN-M Futures account transfer to Spot account
1512
+ * CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account
1513
+ * MARGIN_MAIN Margin(cross)account transfer to Spot account
1514
+ * MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures
1515
+ * MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures
1516
+ * ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account
1517
+ * MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account
1518
+ * ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account
1519
+ * MAIN_FUNDING Spot account transfer to Funding account
1520
+ * FUNDING_MAIN Funding account transfer to Spot account
1521
+ * FUNDING_UMFUTURE Funding account transfer to UMFUTURE account
1522
+ * UMFUTURE_FUNDING UMFUTURE account transfer to Funding account
1523
+ * MARGIN_FUNDING MARGIN account transfer to Funding account
1524
+ * FUNDING_MARGIN Funding account transfer to Margin account
1525
+ * FUNDING_CMFUTURE Funding account transfer to CMFUTURE account
1526
+ * CMFUTURE_FUNDING CMFUTURE account transfer to Funding account
1527
+ * MAIN_OPTION Spot account transfer to Options account
1528
+ * OPTION_MAIN Options account transfer to Spot account
1529
+ * UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account
1530
+ * OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account
1531
+ * MARGIN_OPTION Margin(cross)account transfer to Options account
1532
+ * OPTION_MARGIN Options account transfer to Margin(cross)account
1533
+ * FUNDING_OPTION Funding account transfer to Options account
1534
+ * OPTION_FUNDING Options account transfer to Funding account
1535
+ * MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account
1536
+ * PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account
1537
+ *
1538
+ * Weight: 900
1539
+ *
1540
+ * @summary User Universal Transfer (USER_DATA)
1541
+ * @param {UserUniversalTransferRequest} requestParameters Request parameters.
1542
+ * @returns {Promise<RestApiResponse<UserUniversalTransferResponse>>}
1543
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1544
+ * @memberof AssetApi
1545
+ * @see {@link https://developers.binance.com/docs/wallet/asset/User-Universal-Transfer Binance API Documentation}
1546
+ */
1547
+ async userUniversalTransfer(requestParameters) {
1548
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.userUniversalTransfer(
1549
+ requestParameters?.type,
1550
+ requestParameters?.asset,
1551
+ requestParameters?.amount,
1552
+ requestParameters?.fromSymbol,
1553
+ requestParameters?.toSymbol,
1554
+ requestParameters?.recvWindow
1555
+ );
1556
+ return (0, import_common2.sendRequest)(
1557
+ this.configuration,
1558
+ localVarAxiosArgs.endpoint,
1559
+ localVarAxiosArgs.method,
1560
+ localVarAxiosArgs.params,
1561
+ localVarAxiosArgs?.timeUnit,
1562
+ { isSigned: true }
1563
+ );
1564
+ }
1565
+ };
1566
+
1567
+ // src/rest-api/modules/capital-api.ts
1568
+ var import_common3 = require("@binance/common");
1569
+ var CapitalApiAxiosParamCreator = function(configuration) {
1570
+ return {
1571
+ /**
1572
+ * Get information of coins (available for deposit and withdraw) for user.
1573
+ *
1574
+ * Weight: 10
1575
+ *
1576
+ * @summary All Coins\' Information (USER_DATA)
1577
+ * @param {number} [recvWindow]
1578
+ *
1579
+ * @throws {RequiredError}
1580
+ */
1581
+ allCoinsInformation: async (recvWindow) => {
1582
+ const localVarQueryParameter = {};
1583
+ if (recvWindow !== void 0 && recvWindow !== null) {
1584
+ localVarQueryParameter["recvWindow"] = recvWindow;
1585
+ }
1586
+ let _timeUnit;
1587
+ if ("timeUnit" in configuration)
1588
+ _timeUnit = configuration.timeUnit;
1589
+ return {
1590
+ endpoint: "/sapi/v1/capital/config/getall",
1591
+ method: "GET",
1592
+ params: localVarQueryParameter,
1593
+ timeUnit: _timeUnit
1594
+ };
1595
+ },
1596
+ /**
1597
+ * Fetch deposit address with network.
1598
+ *
1599
+ * If `network` is not send, return with default network of the coin.
1600
+ * You can get `network` and `isDefault` in `networkList` in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
1601
+ * `amount` needs to be sent if using LIGHTNING network
1602
+ *
1603
+ * Weight: 10
1604
+ *
1605
+ * @summary Deposit Address(supporting network) (USER_DATA)
1606
+ * @param {string} coin
1607
+ * @param {string} [network]
1608
+ * @param {number} [amount]
1609
+ * @param {number} [recvWindow]
1610
+ *
1611
+ * @throws {RequiredError}
1612
+ */
1613
+ depositAddress: async (coin, network, amount, recvWindow) => {
1614
+ (0, import_common3.assertParamExists)("depositAddress", "coin", coin);
1615
+ const localVarQueryParameter = {};
1616
+ if (coin !== void 0 && coin !== null) {
1617
+ localVarQueryParameter["coin"] = coin;
1618
+ }
1619
+ if (network !== void 0 && network !== null) {
1620
+ localVarQueryParameter["network"] = network;
1621
+ }
1622
+ if (amount !== void 0 && amount !== null) {
1623
+ localVarQueryParameter["amount"] = amount;
1624
+ }
1625
+ if (recvWindow !== void 0 && recvWindow !== null) {
1626
+ localVarQueryParameter["recvWindow"] = recvWindow;
1627
+ }
1628
+ let _timeUnit;
1629
+ if ("timeUnit" in configuration)
1630
+ _timeUnit = configuration.timeUnit;
1631
+ return {
1632
+ endpoint: "/sapi/v1/capital/deposit/address",
1633
+ method: "GET",
1634
+ params: localVarQueryParameter,
1635
+ timeUnit: _timeUnit
1636
+ };
1637
+ },
1638
+ /**
1639
+ * Fetch deposit history.
1640
+ *
1641
+ *
1642
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days.
1643
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must be less than 90 days.
1644
+ *
1645
+ * Weight: 1
1646
+ *
1647
+ * @summary Deposit History (supporting network) (USER_DATA)
1648
+ * @param {boolean} [includeSource] Default: `false`, return `sourceAddress`field when set to `true`
1649
+ * @param {string} [coin]
1650
+ * @param {number} [status] 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed)
1651
+ * @param {number} [startTime]
1652
+ * @param {number} [endTime]
1653
+ * @param {number} [offset] Default: 0
1654
+ * @param {number} [limit] min 7, max 30, default 7
1655
+ * @param {number} [recvWindow]
1656
+ * @param {string} [txId]
1657
+ *
1658
+ * @throws {RequiredError}
1659
+ */
1660
+ depositHistory: async (includeSource, coin, status, startTime, endTime, offset, limit, recvWindow, txId) => {
1661
+ const localVarQueryParameter = {};
1662
+ if (includeSource !== void 0 && includeSource !== null) {
1663
+ localVarQueryParameter["includeSource"] = includeSource;
1664
+ }
1665
+ if (coin !== void 0 && coin !== null) {
1666
+ localVarQueryParameter["coin"] = coin;
1667
+ }
1668
+ if (status !== void 0 && status !== null) {
1669
+ localVarQueryParameter["status"] = status;
1670
+ }
1671
+ if (startTime !== void 0 && startTime !== null) {
1672
+ localVarQueryParameter["startTime"] = startTime;
1673
+ }
1674
+ if (endTime !== void 0 && endTime !== null) {
1675
+ localVarQueryParameter["endTime"] = endTime;
1676
+ }
1677
+ if (offset !== void 0 && offset !== null) {
1678
+ localVarQueryParameter["offset"] = offset;
1679
+ }
1680
+ if (limit !== void 0 && limit !== null) {
1681
+ localVarQueryParameter["limit"] = limit;
1682
+ }
1683
+ if (recvWindow !== void 0 && recvWindow !== null) {
1684
+ localVarQueryParameter["recvWindow"] = recvWindow;
1685
+ }
1686
+ if (txId !== void 0 && txId !== null) {
1687
+ localVarQueryParameter["txId"] = txId;
1688
+ }
1689
+ let _timeUnit;
1690
+ if ("timeUnit" in configuration)
1691
+ _timeUnit = configuration.timeUnit;
1692
+ return {
1693
+ endpoint: "/sapi/v1/capital/deposit/hisrec",
1694
+ method: "GET",
1695
+ params: localVarQueryParameter,
1696
+ timeUnit: _timeUnit
1697
+ };
1698
+ },
1699
+ /**
1700
+ * Fetch deposit address list with network.
1701
+ *
1702
+ *
1703
+ * If network is not send, return with default network of the coin.
1704
+ * You can get network and isDefault in networkList in the response of `Get /sapi/v1/capital/config/getall`.
1705
+ *
1706
+ * Weight: 10
1707
+ *
1708
+ * @summary Fetch deposit address list with network(USER_DATA)
1709
+ * @param {string} coin
1710
+ * @param {string} [network]
1711
+ *
1712
+ * @throws {RequiredError}
1713
+ */
1714
+ fetchDepositAddressListWithNetwork: async (coin, network) => {
1715
+ (0, import_common3.assertParamExists)("fetchDepositAddressListWithNetwork", "coin", coin);
1716
+ const localVarQueryParameter = {};
1717
+ if (coin !== void 0 && coin !== null) {
1718
+ localVarQueryParameter["coin"] = coin;
1719
+ }
1720
+ if (network !== void 0 && network !== null) {
1721
+ localVarQueryParameter["network"] = network;
1722
+ }
1723
+ let _timeUnit;
1724
+ if ("timeUnit" in configuration)
1725
+ _timeUnit = configuration.timeUnit;
1726
+ return {
1727
+ endpoint: "/sapi/v1/capital/deposit/address/list",
1728
+ method: "GET",
1729
+ params: localVarQueryParameter,
1730
+ timeUnit: _timeUnit
1731
+ };
1732
+ },
1733
+ /**
1734
+ * Fetch withdraw address list
1735
+ *
1736
+ * Weight: 10
1737
+ *
1738
+ * @summary Fetch withdraw address list (USER_DATA)
1739
+ *
1740
+ * @throws {RequiredError}
1741
+ */
1742
+ fetchWithdrawAddressList: async () => {
1743
+ const localVarQueryParameter = {};
1744
+ let _timeUnit;
1745
+ if ("timeUnit" in configuration)
1746
+ _timeUnit = configuration.timeUnit;
1747
+ return {
1748
+ endpoint: "/sapi/v1/capital/withdraw/address/list",
1749
+ method: "GET",
1750
+ params: localVarQueryParameter,
1751
+ timeUnit: _timeUnit
1752
+ };
1753
+ },
1754
+ /**
1755
+ * Apply deposit credit for expired address (One click arrival)
1756
+ *
1757
+ * Params need to be in the POST body
1758
+ *
1759
+ * Weight: 1
1760
+ *
1761
+ * @summary One click arrival deposit apply (for expired address deposit) (USER_DATA)
1762
+ * @param {number} [depositId] Deposit record Id, priority use
1763
+ * @param {string} [txId]
1764
+ * @param {number} [subAccountId] Sub-accountId of Cloud user
1765
+ * @param {number} [subUserId] Sub-userId of parent user
1766
+ *
1767
+ * @throws {RequiredError}
1768
+ */
1769
+ oneClickArrivalDepositApply: async (depositId, txId, subAccountId, subUserId) => {
1770
+ const localVarQueryParameter = {};
1771
+ if (depositId !== void 0 && depositId !== null) {
1772
+ localVarQueryParameter["depositId"] = depositId;
1773
+ }
1774
+ if (txId !== void 0 && txId !== null) {
1775
+ localVarQueryParameter["txId"] = txId;
1776
+ }
1777
+ if (subAccountId !== void 0 && subAccountId !== null) {
1778
+ localVarQueryParameter["subAccountId"] = subAccountId;
1779
+ }
1780
+ if (subUserId !== void 0 && subUserId !== null) {
1781
+ localVarQueryParameter["subUserId"] = subUserId;
1782
+ }
1783
+ let _timeUnit;
1784
+ if ("timeUnit" in configuration)
1785
+ _timeUnit = configuration.timeUnit;
1786
+ return {
1787
+ endpoint: "/sapi/v1/capital/deposit/credit-apply",
1788
+ method: "POST",
1789
+ params: localVarQueryParameter,
1790
+ timeUnit: _timeUnit
1791
+ };
1792
+ },
1793
+ /**
1794
+ * Submit a withdraw request.
1795
+ *
1796
+ *
1797
+ * If `network` not send, return with default network of the coin.
1798
+ * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
1799
+ *
1800
+ * Weight: 900
1801
+ *
1802
+ * @summary Withdraw(USER_DATA)
1803
+ * @param {string} coin
1804
+ * @param {string} address
1805
+ * @param {number} amount
1806
+ * @param {string} [withdrawOrderId]
1807
+ * @param {string} [network]
1808
+ * @param {string} [addressTag] Secondary address identifier for coins like XRP,XMR etc.
1809
+ * @param {boolean} [transactionFeeFlag] When making internal transfer, `true` for returning the fee to the destination account; `false` for returning the fee back to the departure account. Default `false`.
1810
+ * @param {string} [name] Description of the address. Address book cap is 200, space in name should be encoded into `%20`
1811
+ * @param {number} [walletType] The wallet type for withdraw,0-spot wallet ,1-funding wallet. Default walletType is the current "selected wallet" under wallet->Fiat and Spot/Funding->Deposit
1812
+ * @param {number} [recvWindow]
1813
+ *
1814
+ * @throws {RequiredError}
1815
+ */
1816
+ withdraw: async (coin, address, amount, withdrawOrderId, network, addressTag, transactionFeeFlag, name2, walletType, recvWindow) => {
1817
+ (0, import_common3.assertParamExists)("withdraw", "coin", coin);
1818
+ (0, import_common3.assertParamExists)("withdraw", "address", address);
1819
+ (0, import_common3.assertParamExists)("withdraw", "amount", amount);
1820
+ const localVarQueryParameter = {};
1821
+ if (coin !== void 0 && coin !== null) {
1822
+ localVarQueryParameter["coin"] = coin;
1823
+ }
1824
+ if (withdrawOrderId !== void 0 && withdrawOrderId !== null) {
1825
+ localVarQueryParameter["withdrawOrderId"] = withdrawOrderId;
1826
+ }
1827
+ if (network !== void 0 && network !== null) {
1828
+ localVarQueryParameter["network"] = network;
1829
+ }
1830
+ if (address !== void 0 && address !== null) {
1831
+ localVarQueryParameter["address"] = address;
1832
+ }
1833
+ if (addressTag !== void 0 && addressTag !== null) {
1834
+ localVarQueryParameter["addressTag"] = addressTag;
1835
+ }
1836
+ if (amount !== void 0 && amount !== null) {
1837
+ localVarQueryParameter["amount"] = amount;
1838
+ }
1839
+ if (transactionFeeFlag !== void 0 && transactionFeeFlag !== null) {
1840
+ localVarQueryParameter["transactionFeeFlag"] = transactionFeeFlag;
1841
+ }
1842
+ if (name2 !== void 0 && name2 !== null) {
1843
+ localVarQueryParameter["name"] = name2;
1844
+ }
1845
+ if (walletType !== void 0 && walletType !== null) {
1846
+ localVarQueryParameter["walletType"] = walletType;
1847
+ }
1848
+ if (recvWindow !== void 0 && recvWindow !== null) {
1849
+ localVarQueryParameter["recvWindow"] = recvWindow;
1850
+ }
1851
+ let _timeUnit;
1852
+ if ("timeUnit" in configuration)
1853
+ _timeUnit = configuration.timeUnit;
1854
+ return {
1855
+ endpoint: "/sapi/v1/capital/withdraw/apply",
1856
+ method: "POST",
1857
+ params: localVarQueryParameter,
1858
+ timeUnit: _timeUnit
1859
+ };
1860
+ },
1861
+ /**
1862
+ * Fetch withdraw history.
1863
+ *
1864
+ * `network` may not be in the response for old withdraw.
1865
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days.
1866
+ * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less than 90 days.
1867
+ * If `withdrawOrderId` is sent, time between `startTime` and `endTime` must be less than 7 days.
1868
+ * If `withdrawOrderId` is sent, `startTime` and `endTime` are not sent, will return last 7 days records by default.
1869
+ * Maximum support `idList` number is 45.
1870
+ *
1871
+ * Weight: 18000
1872
+ * Request limit: 10 requests per second
1873
+ *
1874
+ * @summary Withdraw History (supporting network) (USER_DATA)
1875
+ * @param {string} [coin]
1876
+ * @param {string} [withdrawOrderId]
1877
+ * @param {number} [status] 0(0:Email Sent, 2:Awaiting Approval 3:Rejected 4:Processing 6:Completed)
1878
+ * @param {number} [offset] Default: 0
1879
+ * @param {number} [limit] min 7, max 30, default 7
1880
+ * @param {string} [idList] id list returned in the response of POST `/sapi/v1/capital/withdraw/apply`, separated by `,`
1881
+ * @param {number} [startTime]
1882
+ * @param {number} [endTime]
1883
+ * @param {number} [recvWindow]
1884
+ *
1885
+ * @throws {RequiredError}
1886
+ */
1887
+ withdrawHistory: async (coin, withdrawOrderId, status, offset, limit, idList, startTime, endTime, recvWindow) => {
1888
+ const localVarQueryParameter = {};
1889
+ if (coin !== void 0 && coin !== null) {
1890
+ localVarQueryParameter["coin"] = coin;
1891
+ }
1892
+ if (withdrawOrderId !== void 0 && withdrawOrderId !== null) {
1893
+ localVarQueryParameter["withdrawOrderId"] = withdrawOrderId;
1894
+ }
1895
+ if (status !== void 0 && status !== null) {
1896
+ localVarQueryParameter["status"] = status;
1897
+ }
1898
+ if (offset !== void 0 && offset !== null) {
1899
+ localVarQueryParameter["offset"] = offset;
1900
+ }
1901
+ if (limit !== void 0 && limit !== null) {
1902
+ localVarQueryParameter["limit"] = limit;
1903
+ }
1904
+ if (idList !== void 0 && idList !== null) {
1905
+ localVarQueryParameter["idList"] = idList;
1906
+ }
1907
+ if (startTime !== void 0 && startTime !== null) {
1908
+ localVarQueryParameter["startTime"] = startTime;
1909
+ }
1910
+ if (endTime !== void 0 && endTime !== null) {
1911
+ localVarQueryParameter["endTime"] = endTime;
1912
+ }
1913
+ if (recvWindow !== void 0 && recvWindow !== null) {
1914
+ localVarQueryParameter["recvWindow"] = recvWindow;
1915
+ }
1916
+ let _timeUnit;
1917
+ if ("timeUnit" in configuration)
1918
+ _timeUnit = configuration.timeUnit;
1919
+ return {
1920
+ endpoint: "/sapi/v1/capital/withdraw/history",
1921
+ method: "GET",
1922
+ params: localVarQueryParameter,
1923
+ timeUnit: _timeUnit
1924
+ };
1925
+ }
1926
+ };
1927
+ };
1928
+ var CapitalApi = class {
1929
+ constructor(configuration) {
1930
+ this.configuration = configuration;
1931
+ this.localVarAxiosParamCreator = CapitalApiAxiosParamCreator(configuration);
1932
+ }
1933
+ /**
1934
+ * Get information of coins (available for deposit and withdraw) for user.
1935
+ *
1936
+ * Weight: 10
1937
+ *
1938
+ * @summary All Coins\' Information (USER_DATA)
1939
+ * @param {AllCoinsInformationRequest} requestParameters Request parameters.
1940
+ * @returns {Promise<RestApiResponse<AllCoinsInformationResponse>>}
1941
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1942
+ * @memberof CapitalApi
1943
+ * @see {@link https://developers.binance.com/docs/wallet/capital/all-coins-info Binance API Documentation}
1944
+ */
1945
+ async allCoinsInformation(requestParameters = {}) {
1946
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.allCoinsInformation(
1947
+ requestParameters?.recvWindow
1948
+ );
1949
+ return (0, import_common3.sendRequest)(
1950
+ this.configuration,
1951
+ localVarAxiosArgs.endpoint,
1952
+ localVarAxiosArgs.method,
1953
+ localVarAxiosArgs.params,
1954
+ localVarAxiosArgs?.timeUnit,
1955
+ { isSigned: true }
1956
+ );
1957
+ }
1958
+ /**
1959
+ * Fetch deposit address with network.
1960
+ *
1961
+ * If `network` is not send, return with default network of the coin.
1962
+ * You can get `network` and `isDefault` in `networkList` in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
1963
+ * `amount` needs to be sent if using LIGHTNING network
1964
+ *
1965
+ * Weight: 10
1966
+ *
1967
+ * @summary Deposit Address(supporting network) (USER_DATA)
1968
+ * @param {DepositAddressRequest} requestParameters Request parameters.
1969
+ * @returns {Promise<RestApiResponse<DepositAddressResponse>>}
1970
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
1971
+ * @memberof CapitalApi
1972
+ * @see {@link https://developers.binance.com/docs/wallet/capital/deposite-address Binance API Documentation}
1973
+ */
1974
+ async depositAddress(requestParameters) {
1975
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.depositAddress(
1976
+ requestParameters?.coin,
1977
+ requestParameters?.network,
1978
+ requestParameters?.amount,
1979
+ requestParameters?.recvWindow
1980
+ );
1981
+ return (0, import_common3.sendRequest)(
1982
+ this.configuration,
1983
+ localVarAxiosArgs.endpoint,
1984
+ localVarAxiosArgs.method,
1985
+ localVarAxiosArgs.params,
1986
+ localVarAxiosArgs?.timeUnit,
1987
+ { isSigned: true }
1988
+ );
1989
+ }
1990
+ /**
1991
+ * Fetch deposit history.
1992
+ *
1993
+ *
1994
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days.
1995
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must be less than 90 days.
1996
+ *
1997
+ * Weight: 1
1998
+ *
1999
+ * @summary Deposit History (supporting network) (USER_DATA)
2000
+ * @param {DepositHistoryRequest} requestParameters Request parameters.
2001
+ * @returns {Promise<RestApiResponse<DepositHistoryResponse>>}
2002
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2003
+ * @memberof CapitalApi
2004
+ * @see {@link https://developers.binance.com/docs/wallet/capital/deposite-history Binance API Documentation}
2005
+ */
2006
+ async depositHistory(requestParameters = {}) {
2007
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.depositHistory(
2008
+ requestParameters?.includeSource,
2009
+ requestParameters?.coin,
2010
+ requestParameters?.status,
2011
+ requestParameters?.startTime,
2012
+ requestParameters?.endTime,
2013
+ requestParameters?.offset,
2014
+ requestParameters?.limit,
2015
+ requestParameters?.recvWindow,
2016
+ requestParameters?.txId
2017
+ );
2018
+ return (0, import_common3.sendRequest)(
2019
+ this.configuration,
2020
+ localVarAxiosArgs.endpoint,
2021
+ localVarAxiosArgs.method,
2022
+ localVarAxiosArgs.params,
2023
+ localVarAxiosArgs?.timeUnit,
2024
+ { isSigned: true }
2025
+ );
2026
+ }
2027
+ /**
2028
+ * Fetch deposit address list with network.
2029
+ *
2030
+ *
2031
+ * If network is not send, return with default network of the coin.
2032
+ * You can get network and isDefault in networkList in the response of `Get /sapi/v1/capital/config/getall`.
2033
+ *
2034
+ * Weight: 10
2035
+ *
2036
+ * @summary Fetch deposit address list with network(USER_DATA)
2037
+ * @param {FetchDepositAddressListWithNetworkRequest} requestParameters Request parameters.
2038
+ * @returns {Promise<RestApiResponse<FetchDepositAddressListWithNetworkResponse>>}
2039
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2040
+ * @memberof CapitalApi
2041
+ * @see {@link https://developers.binance.com/docs/wallet/capital/Fetch-deposit-address-list-with-network Binance API Documentation}
2042
+ */
2043
+ async fetchDepositAddressListWithNetwork(requestParameters) {
2044
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchDepositAddressListWithNetwork(
2045
+ requestParameters?.coin,
2046
+ requestParameters?.network
2047
+ );
2048
+ return (0, import_common3.sendRequest)(
2049
+ this.configuration,
2050
+ localVarAxiosArgs.endpoint,
2051
+ localVarAxiosArgs.method,
2052
+ localVarAxiosArgs.params,
2053
+ localVarAxiosArgs?.timeUnit,
2054
+ { isSigned: true }
2055
+ );
2056
+ }
2057
+ /**
2058
+ * Fetch withdraw address list
2059
+ *
2060
+ * Weight: 10
2061
+ *
2062
+ * @summary Fetch withdraw address list (USER_DATA)
2063
+ * @returns {Promise<RestApiResponse<FetchWithdrawAddressListResponse>>}
2064
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2065
+ * @memberof CapitalApi
2066
+ * @see {@link https://developers.binance.com/docs/wallet/capital/fetch-withdraw-address Binance API Documentation}
2067
+ */
2068
+ async fetchWithdrawAddressList() {
2069
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.fetchWithdrawAddressList();
2070
+ return (0, import_common3.sendRequest)(
2071
+ this.configuration,
2072
+ localVarAxiosArgs.endpoint,
2073
+ localVarAxiosArgs.method,
2074
+ localVarAxiosArgs.params,
2075
+ localVarAxiosArgs?.timeUnit,
2076
+ { isSigned: true }
2077
+ );
2078
+ }
2079
+ /**
2080
+ * Apply deposit credit for expired address (One click arrival)
2081
+ *
2082
+ * Params need to be in the POST body
2083
+ *
2084
+ * Weight: 1
2085
+ *
2086
+ * @summary One click arrival deposit apply (for expired address deposit) (USER_DATA)
2087
+ * @param {OneClickArrivalDepositApplyRequest} requestParameters Request parameters.
2088
+ * @returns {Promise<RestApiResponse<OneClickArrivalDepositApplyResponse>>}
2089
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2090
+ * @memberof CapitalApi
2091
+ * @see {@link https://developers.binance.com/docs/wallet/capital/one-click-arrival-deposite-apply Binance API Documentation}
2092
+ */
2093
+ async oneClickArrivalDepositApply(requestParameters = {}) {
2094
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.oneClickArrivalDepositApply(
2095
+ requestParameters?.depositId,
2096
+ requestParameters?.txId,
2097
+ requestParameters?.subAccountId,
2098
+ requestParameters?.subUserId
2099
+ );
2100
+ return (0, import_common3.sendRequest)(
2101
+ this.configuration,
2102
+ localVarAxiosArgs.endpoint,
2103
+ localVarAxiosArgs.method,
2104
+ localVarAxiosArgs.params,
2105
+ localVarAxiosArgs?.timeUnit,
2106
+ { isSigned: true }
2107
+ );
2108
+ }
2109
+ /**
2110
+ * Submit a withdraw request.
2111
+ *
2112
+ *
2113
+ * If `network` not send, return with default network of the coin.
2114
+ * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
2115
+ *
2116
+ * Weight: 900
2117
+ *
2118
+ * @summary Withdraw(USER_DATA)
2119
+ * @param {WithdrawRequest} requestParameters Request parameters.
2120
+ * @returns {Promise<RestApiResponse<WithdrawResponse>>}
2121
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2122
+ * @memberof CapitalApi
2123
+ * @see {@link https://developers.binance.com/docs/wallet/capital/Withdraw Binance API Documentation}
2124
+ */
2125
+ async withdraw(requestParameters) {
2126
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.withdraw(
2127
+ requestParameters?.coin,
2128
+ requestParameters?.address,
2129
+ requestParameters?.amount,
2130
+ requestParameters?.withdrawOrderId,
2131
+ requestParameters?.network,
2132
+ requestParameters?.addressTag,
2133
+ requestParameters?.transactionFeeFlag,
2134
+ requestParameters?.name,
2135
+ requestParameters?.walletType,
2136
+ requestParameters?.recvWindow
2137
+ );
2138
+ return (0, import_common3.sendRequest)(
2139
+ this.configuration,
2140
+ localVarAxiosArgs.endpoint,
2141
+ localVarAxiosArgs.method,
2142
+ localVarAxiosArgs.params,
2143
+ localVarAxiosArgs?.timeUnit,
2144
+ { isSigned: true }
2145
+ );
2146
+ }
2147
+ /**
2148
+ * Fetch withdraw history.
2149
+ *
2150
+ * `network` may not be in the response for old withdraw.
2151
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days.
2152
+ * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less than 90 days.
2153
+ * If `withdrawOrderId` is sent, time between `startTime` and `endTime` must be less than 7 days.
2154
+ * If `withdrawOrderId` is sent, `startTime` and `endTime` are not sent, will return last 7 days records by default.
2155
+ * Maximum support `idList` number is 45.
2156
+ *
2157
+ * Weight: 18000
2158
+ * Request limit: 10 requests per second
2159
+ *
2160
+ * @summary Withdraw History (supporting network) (USER_DATA)
2161
+ * @param {WithdrawHistoryRequest} requestParameters Request parameters.
2162
+ * @returns {Promise<RestApiResponse<WithdrawHistoryResponse>>}
2163
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2164
+ * @memberof CapitalApi
2165
+ * @see {@link https://developers.binance.com/docs/wallet/capital/Withdraw-History Binance API Documentation}
2166
+ */
2167
+ async withdrawHistory(requestParameters = {}) {
2168
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.withdrawHistory(
2169
+ requestParameters?.coin,
2170
+ requestParameters?.withdrawOrderId,
2171
+ requestParameters?.status,
2172
+ requestParameters?.offset,
2173
+ requestParameters?.limit,
2174
+ requestParameters?.idList,
2175
+ requestParameters?.startTime,
2176
+ requestParameters?.endTime,
2177
+ requestParameters?.recvWindow
2178
+ );
2179
+ return (0, import_common3.sendRequest)(
2180
+ this.configuration,
2181
+ localVarAxiosArgs.endpoint,
2182
+ localVarAxiosArgs.method,
2183
+ localVarAxiosArgs.params,
2184
+ localVarAxiosArgs?.timeUnit,
2185
+ { isSigned: true }
2186
+ );
2187
+ }
2188
+ };
2189
+
2190
+ // src/rest-api/modules/others-api.ts
2191
+ var import_common4 = require("@binance/common");
2192
+ var OthersApiAxiosParamCreator = function(configuration) {
2193
+ return {
2194
+ /**
2195
+ * Get symbols delist schedule for spot
2196
+ *
2197
+ * Weight: 100
2198
+ *
2199
+ * @summary Get symbols delist schedule for spot (MARKET_DATA)
2200
+ * @param {number} [recvWindow]
2201
+ *
2202
+ * @throws {RequiredError}
2203
+ */
2204
+ getSymbolsDelistScheduleForSpot: async (recvWindow) => {
2205
+ const localVarQueryParameter = {};
2206
+ if (recvWindow !== void 0 && recvWindow !== null) {
2207
+ localVarQueryParameter["recvWindow"] = recvWindow;
2208
+ }
2209
+ let _timeUnit;
2210
+ if ("timeUnit" in configuration)
2211
+ _timeUnit = configuration.timeUnit;
2212
+ return {
2213
+ endpoint: "/sapi/v1/spot/delist-schedule",
2214
+ method: "GET",
2215
+ params: localVarQueryParameter,
2216
+ timeUnit: _timeUnit
2217
+ };
2218
+ },
2219
+ /**
2220
+ * Fetch system status.
2221
+ *
2222
+ * Weight: 1
2223
+ *
2224
+ * @summary System Status (System)
2225
+ *
2226
+ * @throws {RequiredError}
2227
+ */
2228
+ systemStatus: async () => {
2229
+ const localVarQueryParameter = {};
2230
+ let _timeUnit;
2231
+ if ("timeUnit" in configuration)
2232
+ _timeUnit = configuration.timeUnit;
2233
+ return {
2234
+ endpoint: "/sapi/v1/system/status",
2235
+ method: "GET",
2236
+ params: localVarQueryParameter,
2237
+ timeUnit: _timeUnit
2238
+ };
2239
+ }
2240
+ };
2241
+ };
2242
+ var OthersApi = class {
2243
+ constructor(configuration) {
2244
+ this.configuration = configuration;
2245
+ this.localVarAxiosParamCreator = OthersApiAxiosParamCreator(configuration);
2246
+ }
2247
+ /**
2248
+ * Get symbols delist schedule for spot
2249
+ *
2250
+ * Weight: 100
2251
+ *
2252
+ * @summary Get symbols delist schedule for spot (MARKET_DATA)
2253
+ * @param {GetSymbolsDelistScheduleForSpotRequest} requestParameters Request parameters.
2254
+ * @returns {Promise<RestApiResponse<GetSymbolsDelistScheduleForSpotResponse>>}
2255
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2256
+ * @memberof OthersApi
2257
+ * @see {@link https://developers.binance.com/docs/wallet/others/delist-schedule Binance API Documentation}
2258
+ */
2259
+ async getSymbolsDelistScheduleForSpot(requestParameters = {}) {
2260
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getSymbolsDelistScheduleForSpot(
2261
+ requestParameters?.recvWindow
2262
+ );
2263
+ return (0, import_common4.sendRequest)(
2264
+ this.configuration,
2265
+ localVarAxiosArgs.endpoint,
2266
+ localVarAxiosArgs.method,
2267
+ localVarAxiosArgs.params,
2268
+ localVarAxiosArgs?.timeUnit,
2269
+ { isSigned: false }
2270
+ );
2271
+ }
2272
+ /**
2273
+ * Fetch system status.
2274
+ *
2275
+ * Weight: 1
2276
+ *
2277
+ * @summary System Status (System)
2278
+ * @returns {Promise<RestApiResponse<SystemStatusResponse>>}
2279
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2280
+ * @memberof OthersApi
2281
+ * @see {@link https://developers.binance.com/docs/wallet/others/System-Status Binance API Documentation}
2282
+ */
2283
+ async systemStatus() {
2284
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.systemStatus();
2285
+ return (0, import_common4.sendRequest)(
2286
+ this.configuration,
2287
+ localVarAxiosArgs.endpoint,
2288
+ localVarAxiosArgs.method,
2289
+ localVarAxiosArgs.params,
2290
+ localVarAxiosArgs?.timeUnit,
2291
+ { isSigned: false }
2292
+ );
2293
+ }
2294
+ };
2295
+
2296
+ // src/rest-api/modules/travel-rule-api.ts
2297
+ var import_common5 = require("@binance/common");
2298
+ var TravelRuleApiAxiosParamCreator = function(configuration) {
2299
+ return {
2300
+ /**
2301
+ * Fetch deposit history for local entities that required travel rule.
2302
+ *
2303
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2304
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
2305
+ *
2306
+ * Weight: 1
2307
+ *
2308
+ * @summary Deposit History (for local entities that required travel rule) (supporting network) (USER_DATA)
2309
+ * @param {string} [trId] Comma(,) separated list of travel rule record Ids.
2310
+ * @param {string} [txId]
2311
+ * @param {string} [tranId] Comma(,) separated list of wallet tran Ids.
2312
+ * @param {string} [network]
2313
+ * @param {string} [coin]
2314
+ * @param {number} [travelRuleStatus] 0:Completed,1:Pending,2:Failed
2315
+ * @param {boolean} [pendingQuestionnaire] true: Only return records that pending deposit questionnaire. false/not provided: return all records.
2316
+ * @param {number} [startTime]
2317
+ * @param {number} [endTime]
2318
+ * @param {number} [offset] Default: 0
2319
+ * @param {number} [limit] min 7, max 30, default 7
2320
+ *
2321
+ * @throws {RequiredError}
2322
+ */
2323
+ depositHistoryTravelRule: async (trId, txId, tranId, network, coin, travelRuleStatus, pendingQuestionnaire, startTime, endTime, offset, limit) => {
2324
+ const localVarQueryParameter = {};
2325
+ if (trId !== void 0 && trId !== null) {
2326
+ localVarQueryParameter["trId"] = trId;
2327
+ }
2328
+ if (txId !== void 0 && txId !== null) {
2329
+ localVarQueryParameter["txId"] = txId;
2330
+ }
2331
+ if (tranId !== void 0 && tranId !== null) {
2332
+ localVarQueryParameter["tranId"] = tranId;
2333
+ }
2334
+ if (network !== void 0 && network !== null) {
2335
+ localVarQueryParameter["network"] = network;
2336
+ }
2337
+ if (coin !== void 0 && coin !== null) {
2338
+ localVarQueryParameter["coin"] = coin;
2339
+ }
2340
+ if (travelRuleStatus !== void 0 && travelRuleStatus !== null) {
2341
+ localVarQueryParameter["travelRuleStatus"] = travelRuleStatus;
2342
+ }
2343
+ if (pendingQuestionnaire !== void 0 && pendingQuestionnaire !== null) {
2344
+ localVarQueryParameter["pendingQuestionnaire"] = pendingQuestionnaire;
2345
+ }
2346
+ if (startTime !== void 0 && startTime !== null) {
2347
+ localVarQueryParameter["startTime"] = startTime;
2348
+ }
2349
+ if (endTime !== void 0 && endTime !== null) {
2350
+ localVarQueryParameter["endTime"] = endTime;
2351
+ }
2352
+ if (offset !== void 0 && offset !== null) {
2353
+ localVarQueryParameter["offset"] = offset;
2354
+ }
2355
+ if (limit !== void 0 && limit !== null) {
2356
+ localVarQueryParameter["limit"] = limit;
2357
+ }
2358
+ let _timeUnit;
2359
+ if ("timeUnit" in configuration)
2360
+ _timeUnit = configuration.timeUnit;
2361
+ return {
2362
+ endpoint: "/sapi/v1/localentity/deposit/history",
2363
+ method: "GET",
2364
+ params: localVarQueryParameter,
2365
+ timeUnit: _timeUnit
2366
+ };
2367
+ },
2368
+ /**
2369
+ * Fetch the onboarded VASP list for local entities that required travel rule.
2370
+ *
2371
+ * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2372
+ *
2373
+ * Weight: 18000
2374
+ * Request limit: 10 requests per second
2375
+ * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2376
+ * limit is 180000/second. Response from the endpoint contains header
2377
+ * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2378
+ *
2379
+ * @summary Onboarded VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
2380
+ *
2381
+ * @throws {RequiredError}
2382
+ */
2383
+ onboardedVaspList: async () => {
2384
+ const localVarQueryParameter = {};
2385
+ let _timeUnit;
2386
+ if ("timeUnit" in configuration)
2387
+ _timeUnit = configuration.timeUnit;
2388
+ return {
2389
+ endpoint: "/sapi/v1/localentity/vasp",
2390
+ method: "GET",
2391
+ params: localVarQueryParameter,
2392
+ timeUnit: _timeUnit
2393
+ };
2394
+ },
2395
+ /**
2396
+ * Submit questionnaire for local entities that require travel rule.
2397
+ * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
2398
+ * yet onboarded with GTR.
2399
+ *
2400
+ * Questionnaire is different for each local entity, please refer
2401
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
2402
+ *
2403
+ * Weight: 600
2404
+ *
2405
+ * @summary Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA)
2406
+ * @param {number} tranId Wallet tran Id
2407
+ * @param {string} questionnaire JSON format questionnaire answers.
2408
+ *
2409
+ * @throws {RequiredError}
2410
+ */
2411
+ submitDepositQuestionnaire: async (tranId, questionnaire) => {
2412
+ (0, import_common5.assertParamExists)("submitDepositQuestionnaire", "tranId", tranId);
2413
+ (0, import_common5.assertParamExists)("submitDepositQuestionnaire", "questionnaire", questionnaire);
2414
+ const localVarQueryParameter = {};
2415
+ if (tranId !== void 0 && tranId !== null) {
2416
+ localVarQueryParameter["tranId"] = tranId;
2417
+ }
2418
+ if (questionnaire !== void 0 && questionnaire !== null) {
2419
+ localVarQueryParameter["questionnaire"] = questionnaire;
2420
+ }
2421
+ let _timeUnit;
2422
+ if ("timeUnit" in configuration)
2423
+ _timeUnit = configuration.timeUnit;
2424
+ return {
2425
+ endpoint: "/sapi/v1/localentity/deposit/provide-info",
2426
+ method: "PUT",
2427
+ params: localVarQueryParameter,
2428
+ timeUnit: _timeUnit
2429
+ };
2430
+ },
2431
+ /**
2432
+ * Fetch withdraw history for local entities that required travel rule.
2433
+ *
2434
+ * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2435
+ * `network` may not be in the response for old withdraw.
2436
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2437
+ * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
2438
+ *
2439
+ * Weight: 18000
2440
+ * Request limit: 10 requests per second
2441
+ * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2442
+ * limit is 180000/second. Response from the endpoint contains header
2443
+ * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2444
+ *
2445
+ * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
2446
+ * @param {string} [trId] Comma(,) separated list of travel rule record Ids.
2447
+ * @param {string} [txId]
2448
+ * @param {string} [withdrawOrderId]
2449
+ * @param {string} [network]
2450
+ * @param {string} [coin]
2451
+ * @param {number} [travelRuleStatus] 0:Completed,1:Pending,2:Failed
2452
+ * @param {number} [offset] Default: 0
2453
+ * @param {number} [limit] min 7, max 30, default 7
2454
+ * @param {number} [startTime]
2455
+ * @param {number} [endTime]
2456
+ * @param {number} [recvWindow]
2457
+ *
2458
+ * @throws {RequiredError}
2459
+ */
2460
+ withdrawHistoryV1: async (trId, txId, withdrawOrderId, network, coin, travelRuleStatus, offset, limit, startTime, endTime, recvWindow) => {
2461
+ const localVarQueryParameter = {};
2462
+ if (trId !== void 0 && trId !== null) {
2463
+ localVarQueryParameter["trId"] = trId;
2464
+ }
2465
+ if (txId !== void 0 && txId !== null) {
2466
+ localVarQueryParameter["txId"] = txId;
2467
+ }
2468
+ if (withdrawOrderId !== void 0 && withdrawOrderId !== null) {
2469
+ localVarQueryParameter["withdrawOrderId"] = withdrawOrderId;
2470
+ }
2471
+ if (network !== void 0 && network !== null) {
2472
+ localVarQueryParameter["network"] = network;
2473
+ }
2474
+ if (coin !== void 0 && coin !== null) {
2475
+ localVarQueryParameter["coin"] = coin;
2476
+ }
2477
+ if (travelRuleStatus !== void 0 && travelRuleStatus !== null) {
2478
+ localVarQueryParameter["travelRuleStatus"] = travelRuleStatus;
2479
+ }
2480
+ if (offset !== void 0 && offset !== null) {
2481
+ localVarQueryParameter["offset"] = offset;
2482
+ }
2483
+ if (limit !== void 0 && limit !== null) {
2484
+ localVarQueryParameter["limit"] = limit;
2485
+ }
2486
+ if (startTime !== void 0 && startTime !== null) {
2487
+ localVarQueryParameter["startTime"] = startTime;
2488
+ }
2489
+ if (endTime !== void 0 && endTime !== null) {
2490
+ localVarQueryParameter["endTime"] = endTime;
2491
+ }
2492
+ if (recvWindow !== void 0 && recvWindow !== null) {
2493
+ localVarQueryParameter["recvWindow"] = recvWindow;
2494
+ }
2495
+ let _timeUnit;
2496
+ if ("timeUnit" in configuration)
2497
+ _timeUnit = configuration.timeUnit;
2498
+ return {
2499
+ endpoint: "/sapi/v1/localentity/withdraw/history",
2500
+ method: "GET",
2501
+ params: localVarQueryParameter,
2502
+ timeUnit: _timeUnit
2503
+ };
2504
+ },
2505
+ /**
2506
+ * Fetch withdraw history for local entities that required travel rule.
2507
+ *
2508
+ * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2509
+ * `network` may not be in the response for old withdraw.
2510
+ * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
2511
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2512
+ * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
2513
+ * If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days.
2514
+ * If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default.
2515
+ * Maximum support trId,txId number is 45.
2516
+ * WithdrawOrderId only support 1.
2517
+ * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
2518
+ *
2519
+ * Weight: 18000
2520
+ * Request limit: 10 requests per second
2521
+ * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2522
+ * limit is 180000/second. Response from the endpoint contains header
2523
+ * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2524
+ *
2525
+ * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
2526
+ * @param {string} [trId] Comma(,) separated list of travel rule record Ids.
2527
+ * @param {string} [txId]
2528
+ * @param {string} [withdrawOrderId]
2529
+ * @param {string} [network]
2530
+ * @param {string} [coin]
2531
+ * @param {number} [travelRuleStatus] 0:Completed,1:Pending,2:Failed
2532
+ * @param {number} [offset] Default: 0
2533
+ * @param {number} [limit] min 7, max 30, default 7
2534
+ * @param {number} [startTime]
2535
+ * @param {number} [endTime]
2536
+ * @param {number} [recvWindow]
2537
+ *
2538
+ * @throws {RequiredError}
2539
+ */
2540
+ withdrawHistoryV2: async (trId, txId, withdrawOrderId, network, coin, travelRuleStatus, offset, limit, startTime, endTime, recvWindow) => {
2541
+ const localVarQueryParameter = {};
2542
+ if (trId !== void 0 && trId !== null) {
2543
+ localVarQueryParameter["trId"] = trId;
2544
+ }
2545
+ if (txId !== void 0 && txId !== null) {
2546
+ localVarQueryParameter["txId"] = txId;
2547
+ }
2548
+ if (withdrawOrderId !== void 0 && withdrawOrderId !== null) {
2549
+ localVarQueryParameter["withdrawOrderId"] = withdrawOrderId;
2550
+ }
2551
+ if (network !== void 0 && network !== null) {
2552
+ localVarQueryParameter["network"] = network;
2553
+ }
2554
+ if (coin !== void 0 && coin !== null) {
2555
+ localVarQueryParameter["coin"] = coin;
2556
+ }
2557
+ if (travelRuleStatus !== void 0 && travelRuleStatus !== null) {
2558
+ localVarQueryParameter["travelRuleStatus"] = travelRuleStatus;
2559
+ }
2560
+ if (offset !== void 0 && offset !== null) {
2561
+ localVarQueryParameter["offset"] = offset;
2562
+ }
2563
+ if (limit !== void 0 && limit !== null) {
2564
+ localVarQueryParameter["limit"] = limit;
2565
+ }
2566
+ if (startTime !== void 0 && startTime !== null) {
2567
+ localVarQueryParameter["startTime"] = startTime;
2568
+ }
2569
+ if (endTime !== void 0 && endTime !== null) {
2570
+ localVarQueryParameter["endTime"] = endTime;
2571
+ }
2572
+ if (recvWindow !== void 0 && recvWindow !== null) {
2573
+ localVarQueryParameter["recvWindow"] = recvWindow;
2574
+ }
2575
+ let _timeUnit;
2576
+ if ("timeUnit" in configuration)
2577
+ _timeUnit = configuration.timeUnit;
2578
+ return {
2579
+ endpoint: "/sapi/v2/localentity/withdraw/history",
2580
+ method: "GET",
2581
+ params: localVarQueryParameter,
2582
+ timeUnit: _timeUnit
2583
+ };
2584
+ },
2585
+ /**
2586
+ * Submit a withdrawal request for local entities that required travel rule.
2587
+ *
2588
+ * If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected.
2589
+ * You can get `network` and `isDefault` in `networkList` of a coin in the response
2590
+ * Questionnaire is different for each local entity, please refer to
2591
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
2592
+ *
2593
+ * Weight: 600
2594
+ *
2595
+ * @summary Withdraw (for local entities that require travel rule) (USER_DATA)
2596
+ * @param {string} coin
2597
+ * @param {string} address
2598
+ * @param {number} amount
2599
+ * @param {string} questionnaire JSON format questionnaire answers.
2600
+ * @param {string} [withdrawOrderId]
2601
+ * @param {string} [network]
2602
+ * @param {string} [addressTag] Secondary address identifier for coins like XRP,XMR etc.
2603
+ * @param {boolean} [transactionFeeFlag] When making internal transfer, `true` for returning the fee to the destination account; `false` for returning the fee back to the departure account. Default `false`.
2604
+ * @param {string} [name] Description of the address. Address book cap is 200, space in name should be encoded into `%20`
2605
+ * @param {number} [walletType] The wallet type for withdraw,0-spot wallet ,1-funding wallet. Default walletType is the current "selected wallet" under wallet->Fiat and Spot/Funding->Deposit
2606
+ * @param {number} [recvWindow]
2607
+ *
2608
+ * @throws {RequiredError}
2609
+ */
2610
+ withdrawTravelRule: async (coin, address, amount, questionnaire, withdrawOrderId, network, addressTag, transactionFeeFlag, name2, walletType, recvWindow) => {
2611
+ (0, import_common5.assertParamExists)("withdrawTravelRule", "coin", coin);
2612
+ (0, import_common5.assertParamExists)("withdrawTravelRule", "address", address);
2613
+ (0, import_common5.assertParamExists)("withdrawTravelRule", "amount", amount);
2614
+ (0, import_common5.assertParamExists)("withdrawTravelRule", "questionnaire", questionnaire);
2615
+ const localVarQueryParameter = {};
2616
+ if (coin !== void 0 && coin !== null) {
2617
+ localVarQueryParameter["coin"] = coin;
2618
+ }
2619
+ if (withdrawOrderId !== void 0 && withdrawOrderId !== null) {
2620
+ localVarQueryParameter["withdrawOrderId"] = withdrawOrderId;
2621
+ }
2622
+ if (network !== void 0 && network !== null) {
2623
+ localVarQueryParameter["network"] = network;
2624
+ }
2625
+ if (address !== void 0 && address !== null) {
2626
+ localVarQueryParameter["address"] = address;
2627
+ }
2628
+ if (addressTag !== void 0 && addressTag !== null) {
2629
+ localVarQueryParameter["addressTag"] = addressTag;
2630
+ }
2631
+ if (amount !== void 0 && amount !== null) {
2632
+ localVarQueryParameter["amount"] = amount;
2633
+ }
2634
+ if (transactionFeeFlag !== void 0 && transactionFeeFlag !== null) {
2635
+ localVarQueryParameter["transactionFeeFlag"] = transactionFeeFlag;
2636
+ }
2637
+ if (name2 !== void 0 && name2 !== null) {
2638
+ localVarQueryParameter["name"] = name2;
2639
+ }
2640
+ if (walletType !== void 0 && walletType !== null) {
2641
+ localVarQueryParameter["walletType"] = walletType;
2642
+ }
2643
+ if (recvWindow !== void 0 && recvWindow !== null) {
2644
+ localVarQueryParameter["recvWindow"] = recvWindow;
2645
+ }
2646
+ if (questionnaire !== void 0 && questionnaire !== null) {
2647
+ localVarQueryParameter["questionnaire"] = questionnaire;
2648
+ }
2649
+ let _timeUnit;
2650
+ if ("timeUnit" in configuration)
2651
+ _timeUnit = configuration.timeUnit;
2652
+ return {
2653
+ endpoint: "/sapi/v1/localentity/withdraw/apply",
2654
+ method: "POST",
2655
+ params: localVarQueryParameter,
2656
+ timeUnit: _timeUnit
2657
+ };
2658
+ }
2659
+ };
2660
+ };
2661
+ var TravelRuleApi = class {
2662
+ constructor(configuration) {
2663
+ this.configuration = configuration;
2664
+ this.localVarAxiosParamCreator = TravelRuleApiAxiosParamCreator(configuration);
2665
+ }
2666
+ /**
2667
+ * Fetch deposit history for local entities that required travel rule.
2668
+ *
2669
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2670
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
2671
+ *
2672
+ * Weight: 1
2673
+ *
2674
+ * @summary Deposit History (for local entities that required travel rule) (supporting network) (USER_DATA)
2675
+ * @param {DepositHistoryTravelRuleRequest} requestParameters Request parameters.
2676
+ * @returns {Promise<RestApiResponse<DepositHistoryTravelRuleResponse>>}
2677
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2678
+ * @memberof TravelRuleApi
2679
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Deposit-History Binance API Documentation}
2680
+ */
2681
+ async depositHistoryTravelRule(requestParameters = {}) {
2682
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.depositHistoryTravelRule(
2683
+ requestParameters?.trId,
2684
+ requestParameters?.txId,
2685
+ requestParameters?.tranId,
2686
+ requestParameters?.network,
2687
+ requestParameters?.coin,
2688
+ requestParameters?.travelRuleStatus,
2689
+ requestParameters?.pendingQuestionnaire,
2690
+ requestParameters?.startTime,
2691
+ requestParameters?.endTime,
2692
+ requestParameters?.offset,
2693
+ requestParameters?.limit
2694
+ );
2695
+ return (0, import_common5.sendRequest)(
2696
+ this.configuration,
2697
+ localVarAxiosArgs.endpoint,
2698
+ localVarAxiosArgs.method,
2699
+ localVarAxiosArgs.params,
2700
+ localVarAxiosArgs?.timeUnit,
2701
+ { isSigned: true }
2702
+ );
2703
+ }
2704
+ /**
2705
+ * Fetch the onboarded VASP list for local entities that required travel rule.
2706
+ *
2707
+ * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2708
+ *
2709
+ * Weight: 18000
2710
+ * Request limit: 10 requests per second
2711
+ * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2712
+ * limit is 180000/second. Response from the endpoint contains header
2713
+ * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2714
+ *
2715
+ * @summary Onboarded VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
2716
+ * @returns {Promise<RestApiResponse<OnboardedVaspListResponse>>}
2717
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2718
+ * @memberof TravelRuleApi
2719
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Onboarded-VASP-list Binance API Documentation}
2720
+ */
2721
+ async onboardedVaspList() {
2722
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.onboardedVaspList();
2723
+ return (0, import_common5.sendRequest)(
2724
+ this.configuration,
2725
+ localVarAxiosArgs.endpoint,
2726
+ localVarAxiosArgs.method,
2727
+ localVarAxiosArgs.params,
2728
+ localVarAxiosArgs?.timeUnit,
2729
+ { isSigned: true }
2730
+ );
2731
+ }
2732
+ /**
2733
+ * Submit questionnaire for local entities that require travel rule.
2734
+ * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
2735
+ * yet onboarded with GTR.
2736
+ *
2737
+ * Questionnaire is different for each local entity, please refer
2738
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
2739
+ *
2740
+ * Weight: 600
2741
+ *
2742
+ * @summary Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA)
2743
+ * @param {SubmitDepositQuestionnaireRequest} requestParameters Request parameters.
2744
+ * @returns {Promise<RestApiResponse<SubmitDepositQuestionnaireResponse>>}
2745
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2746
+ * @memberof TravelRuleApi
2747
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info Binance API Documentation}
2748
+ */
2749
+ async submitDepositQuestionnaire(requestParameters) {
2750
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.submitDepositQuestionnaire(
2751
+ requestParameters?.tranId,
2752
+ requestParameters?.questionnaire
2753
+ );
2754
+ return (0, import_common5.sendRequest)(
2755
+ this.configuration,
2756
+ localVarAxiosArgs.endpoint,
2757
+ localVarAxiosArgs.method,
2758
+ localVarAxiosArgs.params,
2759
+ localVarAxiosArgs?.timeUnit,
2760
+ { isSigned: true }
2761
+ );
2762
+ }
2763
+ /**
2764
+ * Fetch withdraw history for local entities that required travel rule.
2765
+ *
2766
+ * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2767
+ * `network` may not be in the response for old withdraw.
2768
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2769
+ * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
2770
+ *
2771
+ * Weight: 18000
2772
+ * Request limit: 10 requests per second
2773
+ * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2774
+ * limit is 180000/second. Response from the endpoint contains header
2775
+ * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2776
+ *
2777
+ * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
2778
+ * @param {WithdrawHistoryV1Request} requestParameters Request parameters.
2779
+ * @returns {Promise<RestApiResponse<WithdrawHistoryV1Response>>}
2780
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2781
+ * @memberof TravelRuleApi
2782
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History Binance API Documentation}
2783
+ */
2784
+ async withdrawHistoryV1(requestParameters = {}) {
2785
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.withdrawHistoryV1(
2786
+ requestParameters?.trId,
2787
+ requestParameters?.txId,
2788
+ requestParameters?.withdrawOrderId,
2789
+ requestParameters?.network,
2790
+ requestParameters?.coin,
2791
+ requestParameters?.travelRuleStatus,
2792
+ requestParameters?.offset,
2793
+ requestParameters?.limit,
2794
+ requestParameters?.startTime,
2795
+ requestParameters?.endTime,
2796
+ requestParameters?.recvWindow
2797
+ );
2798
+ return (0, import_common5.sendRequest)(
2799
+ this.configuration,
2800
+ localVarAxiosArgs.endpoint,
2801
+ localVarAxiosArgs.method,
2802
+ localVarAxiosArgs.params,
2803
+ localVarAxiosArgs?.timeUnit,
2804
+ { isSigned: true }
2805
+ );
2806
+ }
2807
+ /**
2808
+ * Fetch withdraw history for local entities that required travel rule.
2809
+ *
2810
+ * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2811
+ * `network` may not be in the response for old withdraw.
2812
+ * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
2813
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
2814
+ * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
2815
+ * If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days.
2816
+ * If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default.
2817
+ * Maximum support trId,txId number is 45.
2818
+ * WithdrawOrderId only support 1.
2819
+ * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
2820
+ *
2821
+ * Weight: 18000
2822
+ * Request limit: 10 requests per second
2823
+ * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
2824
+ * limit is 180000/second. Response from the endpoint contains header
2825
+ * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
2826
+ *
2827
+ * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
2828
+ * @param {WithdrawHistoryV2Request} requestParameters Request parameters.
2829
+ * @returns {Promise<RestApiResponse<WithdrawHistoryV2Response>>}
2830
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2831
+ * @memberof TravelRuleApi
2832
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History Binance API Documentation}
2833
+ */
2834
+ async withdrawHistoryV2(requestParameters = {}) {
2835
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.withdrawHistoryV2(
2836
+ requestParameters?.trId,
2837
+ requestParameters?.txId,
2838
+ requestParameters?.withdrawOrderId,
2839
+ requestParameters?.network,
2840
+ requestParameters?.coin,
2841
+ requestParameters?.travelRuleStatus,
2842
+ requestParameters?.offset,
2843
+ requestParameters?.limit,
2844
+ requestParameters?.startTime,
2845
+ requestParameters?.endTime,
2846
+ requestParameters?.recvWindow
2847
+ );
2848
+ return (0, import_common5.sendRequest)(
2849
+ this.configuration,
2850
+ localVarAxiosArgs.endpoint,
2851
+ localVarAxiosArgs.method,
2852
+ localVarAxiosArgs.params,
2853
+ localVarAxiosArgs?.timeUnit,
2854
+ { isSigned: true }
2855
+ );
2856
+ }
2857
+ /**
2858
+ * Submit a withdrawal request for local entities that required travel rule.
2859
+ *
2860
+ * If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected.
2861
+ * You can get `network` and `isDefault` in `networkList` of a coin in the response
2862
+ * Questionnaire is different for each local entity, please refer to
2863
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
2864
+ *
2865
+ * Weight: 600
2866
+ *
2867
+ * @summary Withdraw (for local entities that require travel rule) (USER_DATA)
2868
+ * @param {WithdrawTravelRuleRequest} requestParameters Request parameters.
2869
+ * @returns {Promise<RestApiResponse<WithdrawTravelRuleResponse>>}
2870
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2871
+ * @memberof TravelRuleApi
2872
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Withdraw Binance API Documentation}
2873
+ */
2874
+ async withdrawTravelRule(requestParameters) {
2875
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.withdrawTravelRule(
2876
+ requestParameters?.coin,
2877
+ requestParameters?.address,
2878
+ requestParameters?.amount,
2879
+ requestParameters?.questionnaire,
2880
+ requestParameters?.withdrawOrderId,
2881
+ requestParameters?.network,
2882
+ requestParameters?.addressTag,
2883
+ requestParameters?.transactionFeeFlag,
2884
+ requestParameters?.name,
2885
+ requestParameters?.walletType,
2886
+ requestParameters?.recvWindow
2887
+ );
2888
+ return (0, import_common5.sendRequest)(
2889
+ this.configuration,
2890
+ localVarAxiosArgs.endpoint,
2891
+ localVarAxiosArgs.method,
2892
+ localVarAxiosArgs.params,
2893
+ localVarAxiosArgs?.timeUnit,
2894
+ { isSigned: true }
2895
+ );
2896
+ }
2897
+ };
2898
+
2899
+ // src/rest-api/rest-api.ts
2900
+ var import_common6 = require("@binance/common");
2901
+ var RestAPI = class {
2902
+ constructor(configuration) {
2903
+ this.configuration = configuration;
2904
+ this.accountApi = new AccountApi(configuration);
2905
+ this.assetApi = new AssetApi(configuration);
2906
+ this.capitalApi = new CapitalApi(configuration);
2907
+ this.othersApi = new OthersApi(configuration);
2908
+ this.travelRuleApi = new TravelRuleApi(configuration);
2909
+ }
2910
+ /**
2911
+ * Generic function to send a request.
2912
+ * @param endpoint - The API endpoint to call.
2913
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
2914
+ * @param params - Query parameters for the request.
2915
+ *
2916
+ * @returns A promise resolving to the response data object.
2917
+ */
2918
+ sendRequest(endpoint, method, params = {}) {
2919
+ return (0, import_common6.sendRequest)(this.configuration, endpoint, method, params, void 0);
2920
+ }
2921
+ /**
2922
+ * Generic function to send a signed request.
2923
+ * @param endpoint - The API endpoint to call.
2924
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
2925
+ * @param params - Query parameters for the request.
2926
+ *
2927
+ * @returns A promise resolving to the response data object.
2928
+ */
2929
+ sendSignedRequest(endpoint, method, params = {}) {
2930
+ return (0, import_common6.sendRequest)(this.configuration, endpoint, method, params, void 0, {
2931
+ isSigned: true
2932
+ });
2933
+ }
2934
+ /**
2935
+ * Fetch account api trading status detail.
2936
+ *
2937
+ * Weight: 1
2938
+ *
2939
+ * @summary Account API Trading Status (USER_DATA)
2940
+ * @param {AccountApiTradingStatusRequest} requestParameters Request parameters.
2941
+ * @returns {Promise<RestApiResponse<AccountApiTradingStatusResponse>>}
2942
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2943
+ * @see {@link https://developers.binance.com/docs/wallet/account/Account-API-Trading-Status Binance API Documentation}
2944
+ */
2945
+ accountApiTradingStatus(requestParameters = {}) {
2946
+ return this.accountApi.accountApiTradingStatus(requestParameters);
2947
+ }
2948
+ /**
2949
+ * Fetch account info detail.
2950
+ *
2951
+ * Weight: 1
2952
+ *
2953
+ * @summary Account info (USER_DATA)
2954
+ * @param {AccountInfoRequest} requestParameters Request parameters.
2955
+ * @returns {Promise<RestApiResponse<AccountInfoResponse>>}
2956
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2957
+ * @see {@link https://developers.binance.com/docs/wallet/account/Account-info Binance API Documentation}
2958
+ */
2959
+ accountInfo(requestParameters = {}) {
2960
+ return this.accountApi.accountInfo(requestParameters);
2961
+ }
2962
+ /**
2963
+ * Fetch account status detail.
2964
+ *
2965
+ * Weight: 1
2966
+ *
2967
+ * @summary Account Status (USER_DATA)
2968
+ * @param {AccountStatusRequest} requestParameters Request parameters.
2969
+ * @returns {Promise<RestApiResponse<AccountStatusResponse>>}
2970
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2971
+ * @see {@link https://developers.binance.com/docs/wallet/account/Account-Status Binance API Documentation}
2972
+ */
2973
+ accountStatus(requestParameters = {}) {
2974
+ return this.accountApi.accountStatus(requestParameters);
2975
+ }
2976
+ /**
2977
+ * Daily account snapshot
2978
+ *
2979
+ * The query time period must be less then 30 days
2980
+ * Support query within the last one month only
2981
+ * If startTimeand endTime not sent, return records of the last 7 days by default
2982
+ *
2983
+ * Weight: 2400
2984
+ *
2985
+ * @summary Daily Account Snapshot (USER_DATA)
2986
+ * @param {DailyAccountSnapshotRequest} requestParameters Request parameters.
2987
+ * @returns {Promise<RestApiResponse<DailyAccountSnapshotResponse>>}
2988
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
2989
+ * @see {@link https://developers.binance.com/docs/wallet/account/daily-account-snapshoot Binance API Documentation}
2990
+ */
2991
+ dailyAccountSnapshot(requestParameters) {
2992
+ return this.accountApi.dailyAccountSnapshot(requestParameters);
2993
+ }
2994
+ /**
2995
+ *
2996
+ * Weight: 1
2997
+ *
2998
+ * @summary Disable Fast Withdraw Switch (USER_DATA)
2999
+ * @param {DisableFastWithdrawSwitchRequest} requestParameters Request parameters.
3000
+ * @returns {Promise<RestApiResponse<void>>}
3001
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3002
+ * @see {@link https://developers.binance.com/docs/wallet/account/Disable-Fast-Withdraw-Switch Binance API Documentation}
3003
+ */
3004
+ disableFastWithdrawSwitch(requestParameters = {}) {
3005
+ return this.accountApi.disableFastWithdrawSwitch(requestParameters);
3006
+ }
3007
+ /**
3008
+ * Enable Fast Withdraw Switch (USER_DATA)
3009
+ *
3010
+ * This request will enable fastwithdraw switch under your account. <br></br>
3011
+ * When Fast Withdraw Switch is on, transferring funds to a Binance account will be done instantly. There is no on-chain transaction, no transaction ID and no withdrawal fee.
3012
+ *
3013
+ * Weight: 1
3014
+ *
3015
+ * @summary Enable Fast Withdraw Switch (USER_DATA)
3016
+ * @param {EnableFastWithdrawSwitchRequest} requestParameters Request parameters.
3017
+ * @returns {Promise<RestApiResponse<void>>}
3018
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3019
+ * @see {@link https://developers.binance.com/docs/wallet/account/Enable-Fast-Withdraw-Switch Binance API Documentation}
3020
+ */
3021
+ enableFastWithdrawSwitch(requestParameters = {}) {
3022
+ return this.accountApi.enableFastWithdrawSwitch(requestParameters);
3023
+ }
3024
+ /**
3025
+ * Get API Key Permission
3026
+ *
3027
+ * Weight: 1
3028
+ *
3029
+ * @summary Get API Key Permission (USER_DATA)
3030
+ * @param {GetApiKeyPermissionRequest} requestParameters Request parameters.
3031
+ * @returns {Promise<RestApiResponse<GetApiKeyPermissionResponse>>}
3032
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3033
+ * @see {@link https://developers.binance.com/docs/wallet/account/api-key-permission Binance API Documentation}
3034
+ */
3035
+ getApiKeyPermission(requestParameters = {}) {
3036
+ return this.accountApi.getApiKeyPermission(requestParameters);
3037
+ }
3038
+ /**
3039
+ * Fetch details of assets supported on Binance.
3040
+ *
3041
+ *
3042
+ * Please get network and other deposit or withdraw details from ``GET /sapi/v1/capital/config/getall``.
3043
+ *
3044
+ * Weight: 1
3045
+ *
3046
+ * @summary Asset Detail (USER_DATA)
3047
+ * @param {AssetDetailRequest} requestParameters Request parameters.
3048
+ * @returns {Promise<RestApiResponse<AssetDetailResponse>>}
3049
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3050
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Asset-Detail Binance API Documentation}
3051
+ */
3052
+ assetDetail(requestParameters = {}) {
3053
+ return this.assetApi.assetDetail(requestParameters);
3054
+ }
3055
+ /**
3056
+ * Query asset dividend record.
3057
+ *
3058
+ *
3059
+ * There cannot be more than 180 days between parameter `startTime` and `endTime`.
3060
+ *
3061
+ * Weight: 10
3062
+ *
3063
+ * @summary Asset Dividend Record (USER_DATA)
3064
+ * @param {AssetDividendRecordRequest} requestParameters Request parameters.
3065
+ * @returns {Promise<RestApiResponse<AssetDividendRecordResponse>>}
3066
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3067
+ * @see {@link https://developers.binance.com/docs/wallet/asset/assets-divided-record Binance API Documentation}
3068
+ */
3069
+ assetDividendRecord(requestParameters = {}) {
3070
+ return this.assetApi.assetDividendRecord(requestParameters);
3071
+ }
3072
+ /**
3073
+ * Convert dust assets to BNB.
3074
+ *
3075
+ * You need to open`Enable Spot & Margin Trading` permission for the API Key which requests this endpoint.
3076
+ *
3077
+ * Weight: 10
3078
+ *
3079
+ * @summary Dust Transfer (USER_DATA)
3080
+ * @param {DustTransferRequest} requestParameters Request parameters.
3081
+ * @returns {Promise<RestApiResponse<DustTransferResponse>>}
3082
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3083
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Dust-Transfer Binance API Documentation}
3084
+ */
3085
+ dustTransfer(requestParameters) {
3086
+ return this.assetApi.dustTransfer(requestParameters);
3087
+ }
3088
+ /**
3089
+ * Dustlog
3090
+ *
3091
+ * Only return last 100 records
3092
+ * Only return records after 2020/12/01
3093
+ *
3094
+ * Weight: 1
3095
+ *
3096
+ * @summary DustLog(USER_DATA)
3097
+ * @param {DustlogRequest} requestParameters Request parameters.
3098
+ * @returns {Promise<RestApiResponse<DustlogResponse>>}
3099
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3100
+ * @see {@link https://developers.binance.com/docs/wallet/asset/dust-log Binance API Documentation}
3101
+ */
3102
+ dustlog(requestParameters = {}) {
3103
+ return this.assetApi.dustlog(requestParameters);
3104
+ }
3105
+ /**
3106
+ * Query Funding Wallet
3107
+ *
3108
+ *
3109
+ * Currently supports querying the following business assets:Binance Pay, Binance Card, Binance Gift Card, Stock Token
3110
+ *
3111
+ * Weight: 1
3112
+ *
3113
+ * @summary Funding Wallet (USER_DATA)
3114
+ * @param {FundingWalletRequest} requestParameters Request parameters.
3115
+ * @returns {Promise<RestApiResponse<FundingWalletResponse>>}
3116
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3117
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Funding-Wallet Binance API Documentation}
3118
+ */
3119
+ fundingWallet(requestParameters = {}) {
3120
+ return this.assetApi.fundingWallet(requestParameters);
3121
+ }
3122
+ /**
3123
+ * Get Assets That Can Be Converted Into BNB
3124
+ *
3125
+ * Weight: 1
3126
+ *
3127
+ * @summary Get Assets That Can Be Converted Into BNB (USER_DATA)
3128
+ * @param {GetAssetsThatCanBeConvertedIntoBnbRequest} requestParameters Request parameters.
3129
+ * @returns {Promise<RestApiResponse<GetAssetsThatCanBeConvertedIntoBnbResponse>>}
3130
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3131
+ * @see {@link https://developers.binance.com/docs/wallet/asset/assets-can-convert-bnb Binance API Documentation}
3132
+ */
3133
+ getAssetsThatCanBeConvertedIntoBnb(requestParameters = {}) {
3134
+ return this.assetApi.getAssetsThatCanBeConvertedIntoBnb(requestParameters);
3135
+ }
3136
+ /**
3137
+ * The query of Cloud-Mining payment and refund history
3138
+ *
3139
+ * Just return the SUCCESS records of payment and refund.
3140
+ * For response, type = 248 means payment, type = 249 means refund, status =S means SUCCESS.
3141
+ *
3142
+ * Weight: 600
3143
+ *
3144
+ * @summary Get Cloud-Mining payment and refund history (USER_DATA)
3145
+ * @param {GetCloudMiningPaymentAndRefundHistoryRequest} requestParameters Request parameters.
3146
+ * @returns {Promise<RestApiResponse<GetCloudMiningPaymentAndRefundHistoryResponse>>}
3147
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3148
+ * @see {@link https://developers.binance.com/docs/wallet/asset/cloud-mining-payment-and-refund-history Binance API Documentation}
3149
+ */
3150
+ getCloudMiningPaymentAndRefundHistory(requestParameters) {
3151
+ return this.assetApi.getCloudMiningPaymentAndRefundHistory(requestParameters);
3152
+ }
3153
+ /**
3154
+ * Get the list of symbols that are scheduled to be opened for trading in the market.
3155
+ *
3156
+ * Weight: 100
3157
+ *
3158
+ * @summary Get Open Symbol List (MARKET_DATA)
3159
+ * @returns {Promise<RestApiResponse<GetOpenSymbolListResponse>>}
3160
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3161
+ * @see {@link https://developers.binance.com/docs/wallet/asset/open-symbol-list Binance API Documentation}
3162
+ */
3163
+ getOpenSymbolList() {
3164
+ return this.assetApi.getOpenSymbolList();
3165
+ }
3166
+ /**
3167
+ * Query User Delegation History
3168
+ *
3169
+ * You need to open Enable Spot & Margin Trading permission for the API Key which requests this endpoint
3170
+ *
3171
+ * Weight: 60
3172
+ *
3173
+ * @summary Query User Delegation History(For Master Account)(USER_DATA)
3174
+ * @param {QueryUserDelegationHistoryRequest} requestParameters Request parameters.
3175
+ * @returns {Promise<RestApiResponse<QueryUserDelegationHistoryResponse>>}
3176
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3177
+ * @see {@link https://developers.binance.com/docs/wallet/asset/query-user-delegation Binance API Documentation}
3178
+ */
3179
+ queryUserDelegationHistory(requestParameters) {
3180
+ return this.assetApi.queryUserDelegationHistory(requestParameters);
3181
+ }
3182
+ /**
3183
+ * Query User Universal Transfer History
3184
+ *
3185
+ *
3186
+ * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
3187
+ * `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
3188
+ * Support query within the last 6 months only
3189
+ * If `startTime`and `endTime` not sent, return records of the last 7 days by default
3190
+ *
3191
+ * Weight: 1
3192
+ *
3193
+ * @summary Query User Universal Transfer History(USER_DATA)
3194
+ * @param {QueryUserUniversalTransferHistoryRequest} requestParameters Request parameters.
3195
+ * @returns {Promise<RestApiResponse<QueryUserUniversalTransferHistoryResponse>>}
3196
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3197
+ * @see {@link https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer Binance API Documentation}
3198
+ */
3199
+ queryUserUniversalTransferHistory(requestParameters) {
3200
+ return this.assetApi.queryUserUniversalTransferHistory(requestParameters);
3201
+ }
3202
+ /**
3203
+ * Query User Wallet Balance
3204
+ *
3205
+ *
3206
+ * You need to open Permits Universal Transfer permission for the API Key which requests this endpoint.
3207
+ *
3208
+ * Weight: 60
3209
+ *
3210
+ * @summary Query User Wallet Balance (USER_DATA)
3211
+ * @param {QueryUserWalletBalanceRequest} requestParameters Request parameters.
3212
+ * @returns {Promise<RestApiResponse<QueryUserWalletBalanceResponse>>}
3213
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3214
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Query-User-Wallet-Balance Binance API Documentation}
3215
+ */
3216
+ queryUserWalletBalance(requestParameters = {}) {
3217
+ return this.assetApi.queryUserWalletBalance(requestParameters);
3218
+ }
3219
+ /**
3220
+ * Toggle BNB Burn On Spot Trade And Margin Interest
3221
+ *
3222
+ * "spotBNBBurn" and "interestBNBBurn" should be sent at least one.
3223
+ *
3224
+ * Weight: 1(IP)
3225
+ *
3226
+ * @summary Toggle BNB Burn On Spot Trade And Margin Interest (USER_DATA)
3227
+ * @param {ToggleBnbBurnOnSpotTradeAndMarginInterestRequest} requestParameters Request parameters.
3228
+ * @returns {Promise<RestApiResponse<ToggleBnbBurnOnSpotTradeAndMarginInterestResponse>>}
3229
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3230
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Toggle-BNB-Burn-On-Spot-Trade-And-Margin-Interest Binance API Documentation}
3231
+ */
3232
+ toggleBnbBurnOnSpotTradeAndMarginInterest(requestParameters = {}) {
3233
+ return this.assetApi.toggleBnbBurnOnSpotTradeAndMarginInterest(requestParameters);
3234
+ }
3235
+ /**
3236
+ * Fetch trade fee
3237
+ *
3238
+ * Weight: 1
3239
+ *
3240
+ * @summary Trade Fee (USER_DATA)
3241
+ * @param {TradeFeeRequest} requestParameters Request parameters.
3242
+ * @returns {Promise<RestApiResponse<TradeFeeResponse>>}
3243
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3244
+ * @see {@link https://developers.binance.com/docs/wallet/asset/Trade-Fee Binance API Documentation}
3245
+ */
3246
+ tradeFee(requestParameters = {}) {
3247
+ return this.assetApi.tradeFee(requestParameters);
3248
+ }
3249
+ /**
3250
+ * Get user assets, just for positive data.
3251
+ *
3252
+ * If asset is set, then return this asset, otherwise return all assets positive.
3253
+ * If needBtcValuation is set, then return btcValudation.
3254
+ *
3255
+ * Weight: 5
3256
+ *
3257
+ * @summary User Asset (USER_DATA)
3258
+ * @param {UserAssetRequest} requestParameters Request parameters.
3259
+ * @returns {Promise<RestApiResponse<UserAssetResponse>>}
3260
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3261
+ * @see {@link https://developers.binance.com/docs/wallet/asset/user-assets Binance API Documentation}
3262
+ */
3263
+ userAsset(requestParameters = {}) {
3264
+ return this.assetApi.userAsset(requestParameters);
3265
+ }
3266
+ /**
3267
+ * user universal transfer
3268
+ *
3269
+ * `fromSymbol` must be sent when type are ISOLATEDMARGIN_MARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
3270
+ * `toSymbol` must be sent when type are MARGIN_ISOLATEDMARGIN and ISOLATEDMARGIN_ISOLATEDMARGIN
3271
+ * ENUM of transfer types:
3272
+ * MAIN_UMFUTURE Spot account transfer to USDⓈ-M Futures account
3273
+ * MAIN_CMFUTURE Spot account transfer to COIN-M Futures account
3274
+ * MAIN_MARGIN Spot account transfer to Margin(cross)account
3275
+ * UMFUTURE_MAIN USDⓈ-M Futures account transfer to Spot account
3276
+ * UMFUTURE_MARGIN USDⓈ-M Futures account transfer to Margin(cross)account
3277
+ * CMFUTURE_MAIN COIN-M Futures account transfer to Spot account
3278
+ * CMFUTURE_MARGIN COIN-M Futures account transfer to Margin(cross) account
3279
+ * MARGIN_MAIN Margin(cross)account transfer to Spot account
3280
+ * MARGIN_UMFUTURE Margin(cross)account transfer to USDⓈ-M Futures
3281
+ * MARGIN_CMFUTURE Margin(cross)account transfer to COIN-M Futures
3282
+ * ISOLATEDMARGIN_MARGIN Isolated margin account transfer to Margin(cross) account
3283
+ * MARGIN_ISOLATEDMARGIN Margin(cross) account transfer to Isolated margin account
3284
+ * ISOLATEDMARGIN_ISOLATEDMARGIN Isolated margin account transfer to Isolated margin account
3285
+ * MAIN_FUNDING Spot account transfer to Funding account
3286
+ * FUNDING_MAIN Funding account transfer to Spot account
3287
+ * FUNDING_UMFUTURE Funding account transfer to UMFUTURE account
3288
+ * UMFUTURE_FUNDING UMFUTURE account transfer to Funding account
3289
+ * MARGIN_FUNDING MARGIN account transfer to Funding account
3290
+ * FUNDING_MARGIN Funding account transfer to Margin account
3291
+ * FUNDING_CMFUTURE Funding account transfer to CMFUTURE account
3292
+ * CMFUTURE_FUNDING CMFUTURE account transfer to Funding account
3293
+ * MAIN_OPTION Spot account transfer to Options account
3294
+ * OPTION_MAIN Options account transfer to Spot account
3295
+ * UMFUTURE_OPTION USDⓈ-M Futures account transfer to Options account
3296
+ * OPTION_UMFUTURE Options account transfer to USDⓈ-M Futures account
3297
+ * MARGIN_OPTION Margin(cross)account transfer to Options account
3298
+ * OPTION_MARGIN Options account transfer to Margin(cross)account
3299
+ * FUNDING_OPTION Funding account transfer to Options account
3300
+ * OPTION_FUNDING Options account transfer to Funding account
3301
+ * MAIN_PORTFOLIO_MARGIN Spot account transfer to Portfolio Margin account
3302
+ * PORTFOLIO_MARGIN_MAIN Portfolio Margin account transfer to Spot account
3303
+ *
3304
+ * Weight: 900
3305
+ *
3306
+ * @summary User Universal Transfer (USER_DATA)
3307
+ * @param {UserUniversalTransferRequest} requestParameters Request parameters.
3308
+ * @returns {Promise<RestApiResponse<UserUniversalTransferResponse>>}
3309
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3310
+ * @see {@link https://developers.binance.com/docs/wallet/asset/User-Universal-Transfer Binance API Documentation}
3311
+ */
3312
+ userUniversalTransfer(requestParameters) {
3313
+ return this.assetApi.userUniversalTransfer(requestParameters);
3314
+ }
3315
+ /**
3316
+ * Get information of coins (available for deposit and withdraw) for user.
3317
+ *
3318
+ * Weight: 10
3319
+ *
3320
+ * @summary All Coins\' Information (USER_DATA)
3321
+ * @param {AllCoinsInformationRequest} requestParameters Request parameters.
3322
+ * @returns {Promise<RestApiResponse<AllCoinsInformationResponse>>}
3323
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3324
+ * @see {@link https://developers.binance.com/docs/wallet/capital/all-coins-info Binance API Documentation}
3325
+ */
3326
+ allCoinsInformation(requestParameters = {}) {
3327
+ return this.capitalApi.allCoinsInformation(requestParameters);
3328
+ }
3329
+ /**
3330
+ * Fetch deposit address with network.
3331
+ *
3332
+ * If `network` is not send, return with default network of the coin.
3333
+ * You can get `network` and `isDefault` in `networkList` in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
3334
+ * `amount` needs to be sent if using LIGHTNING network
3335
+ *
3336
+ * Weight: 10
3337
+ *
3338
+ * @summary Deposit Address(supporting network) (USER_DATA)
3339
+ * @param {DepositAddressRequest} requestParameters Request parameters.
3340
+ * @returns {Promise<RestApiResponse<DepositAddressResponse>>}
3341
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3342
+ * @see {@link https://developers.binance.com/docs/wallet/capital/deposite-address Binance API Documentation}
3343
+ */
3344
+ depositAddress(requestParameters) {
3345
+ return this.capitalApi.depositAddress(requestParameters);
3346
+ }
3347
+ /**
3348
+ * Fetch deposit history.
3349
+ *
3350
+ *
3351
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days.
3352
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must be less than 90 days.
3353
+ *
3354
+ * Weight: 1
3355
+ *
3356
+ * @summary Deposit History (supporting network) (USER_DATA)
3357
+ * @param {DepositHistoryRequest} requestParameters Request parameters.
3358
+ * @returns {Promise<RestApiResponse<DepositHistoryResponse>>}
3359
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3360
+ * @see {@link https://developers.binance.com/docs/wallet/capital/deposite-history Binance API Documentation}
3361
+ */
3362
+ depositHistory(requestParameters = {}) {
3363
+ return this.capitalApi.depositHistory(requestParameters);
3364
+ }
3365
+ /**
3366
+ * Fetch deposit address list with network.
3367
+ *
3368
+ *
3369
+ * If network is not send, return with default network of the coin.
3370
+ * You can get network and isDefault in networkList in the response of `Get /sapi/v1/capital/config/getall`.
3371
+ *
3372
+ * Weight: 10
3373
+ *
3374
+ * @summary Fetch deposit address list with network(USER_DATA)
3375
+ * @param {FetchDepositAddressListWithNetworkRequest} requestParameters Request parameters.
3376
+ * @returns {Promise<RestApiResponse<FetchDepositAddressListWithNetworkResponse>>}
3377
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3378
+ * @see {@link https://developers.binance.com/docs/wallet/capital/Fetch-deposit-address-list-with-network Binance API Documentation}
3379
+ */
3380
+ fetchDepositAddressListWithNetwork(requestParameters) {
3381
+ return this.capitalApi.fetchDepositAddressListWithNetwork(requestParameters);
3382
+ }
3383
+ /**
3384
+ * Fetch withdraw address list
3385
+ *
3386
+ * Weight: 10
3387
+ *
3388
+ * @summary Fetch withdraw address list (USER_DATA)
3389
+ * @returns {Promise<RestApiResponse<FetchWithdrawAddressListResponse>>}
3390
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3391
+ * @see {@link https://developers.binance.com/docs/wallet/capital/fetch-withdraw-address Binance API Documentation}
3392
+ */
3393
+ fetchWithdrawAddressList() {
3394
+ return this.capitalApi.fetchWithdrawAddressList();
3395
+ }
3396
+ /**
3397
+ * Apply deposit credit for expired address (One click arrival)
3398
+ *
3399
+ * Params need to be in the POST body
3400
+ *
3401
+ * Weight: 1
3402
+ *
3403
+ * @summary One click arrival deposit apply (for expired address deposit) (USER_DATA)
3404
+ * @param {OneClickArrivalDepositApplyRequest} requestParameters Request parameters.
3405
+ * @returns {Promise<RestApiResponse<OneClickArrivalDepositApplyResponse>>}
3406
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3407
+ * @see {@link https://developers.binance.com/docs/wallet/capital/one-click-arrival-deposite-apply Binance API Documentation}
3408
+ */
3409
+ oneClickArrivalDepositApply(requestParameters = {}) {
3410
+ return this.capitalApi.oneClickArrivalDepositApply(requestParameters);
3411
+ }
3412
+ /**
3413
+ * Submit a withdraw request.
3414
+ *
3415
+ *
3416
+ * If `network` not send, return with default network of the coin.
3417
+ * You can get `network` and `isDefault` in `networkList` of a coin in the response of `Get /sapi/v1/capital/config/getall (HMAC SHA256)`.
3418
+ *
3419
+ * Weight: 900
3420
+ *
3421
+ * @summary Withdraw(USER_DATA)
3422
+ * @param {WithdrawRequest} requestParameters Request parameters.
3423
+ * @returns {Promise<RestApiResponse<WithdrawResponse>>}
3424
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3425
+ * @see {@link https://developers.binance.com/docs/wallet/capital/Withdraw Binance API Documentation}
3426
+ */
3427
+ withdraw(requestParameters) {
3428
+ return this.capitalApi.withdraw(requestParameters);
3429
+ }
3430
+ /**
3431
+ * Fetch withdraw history.
3432
+ *
3433
+ * `network` may not be in the response for old withdraw.
3434
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within 0-90 days.
3435
+ * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less than 90 days.
3436
+ * If `withdrawOrderId` is sent, time between `startTime` and `endTime` must be less than 7 days.
3437
+ * If `withdrawOrderId` is sent, `startTime` and `endTime` are not sent, will return last 7 days records by default.
3438
+ * Maximum support `idList` number is 45.
3439
+ *
3440
+ * Weight: 18000
3441
+ * Request limit: 10 requests per second
3442
+ *
3443
+ * @summary Withdraw History (supporting network) (USER_DATA)
3444
+ * @param {WithdrawHistoryRequest} requestParameters Request parameters.
3445
+ * @returns {Promise<RestApiResponse<WithdrawHistoryResponse>>}
3446
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3447
+ * @see {@link https://developers.binance.com/docs/wallet/capital/Withdraw-History Binance API Documentation}
3448
+ */
3449
+ withdrawHistory(requestParameters = {}) {
3450
+ return this.capitalApi.withdrawHistory(requestParameters);
3451
+ }
3452
+ /**
3453
+ * Get symbols delist schedule for spot
3454
+ *
3455
+ * Weight: 100
3456
+ *
3457
+ * @summary Get symbols delist schedule for spot (MARKET_DATA)
3458
+ * @param {GetSymbolsDelistScheduleForSpotRequest} requestParameters Request parameters.
3459
+ * @returns {Promise<RestApiResponse<GetSymbolsDelistScheduleForSpotResponse>>}
3460
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3461
+ * @see {@link https://developers.binance.com/docs/wallet/others/delist-schedule Binance API Documentation}
3462
+ */
3463
+ getSymbolsDelistScheduleForSpot(requestParameters = {}) {
3464
+ return this.othersApi.getSymbolsDelistScheduleForSpot(requestParameters);
3465
+ }
3466
+ /**
3467
+ * Fetch system status.
3468
+ *
3469
+ * Weight: 1
3470
+ *
3471
+ * @summary System Status (System)
3472
+ * @returns {Promise<RestApiResponse<SystemStatusResponse>>}
3473
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3474
+ * @see {@link https://developers.binance.com/docs/wallet/others/System-Status Binance API Documentation}
3475
+ */
3476
+ systemStatus() {
3477
+ return this.othersApi.systemStatus();
3478
+ }
3479
+ /**
3480
+ * Fetch deposit history for local entities that required travel rule.
3481
+ *
3482
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3483
+ * If both ``startTime`` and ``endTime`` are sent, time between ``startTime`` and ``endTime`` must
3484
+ *
3485
+ * Weight: 1
3486
+ *
3487
+ * @summary Deposit History (for local entities that required travel rule) (supporting network) (USER_DATA)
3488
+ * @param {DepositHistoryTravelRuleRequest} requestParameters Request parameters.
3489
+ * @returns {Promise<RestApiResponse<DepositHistoryTravelRuleResponse>>}
3490
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3491
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Deposit-History Binance API Documentation}
3492
+ */
3493
+ depositHistoryTravelRule(requestParameters = {}) {
3494
+ return this.travelRuleApi.depositHistoryTravelRule(requestParameters);
3495
+ }
3496
+ /**
3497
+ * Fetch the onboarded VASP list for local entities that required travel rule.
3498
+ *
3499
+ * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3500
+ *
3501
+ * Weight: 18000
3502
+ * Request limit: 10 requests per second
3503
+ * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3504
+ * limit is 180000/second. Response from the endpoint contains header
3505
+ * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3506
+ *
3507
+ * @summary Onboarded VASP list (for local entities that require travel rule) (supporting network) (USER_DATA)
3508
+ * @returns {Promise<RestApiResponse<OnboardedVaspListResponse>>}
3509
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3510
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Onboarded-VASP-list Binance API Documentation}
3511
+ */
3512
+ onboardedVaspList() {
3513
+ return this.travelRuleApi.onboardedVaspList();
3514
+ }
3515
+ /**
3516
+ * Submit questionnaire for local entities that require travel rule.
3517
+ * The questionnaire is only applies to transactions from unhosted wallets or VASPs that are not
3518
+ * yet onboarded with GTR.
3519
+ *
3520
+ * Questionnaire is different for each local entity, please refer
3521
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
3522
+ *
3523
+ * Weight: 600
3524
+ *
3525
+ * @summary Submit Deposit Questionnaire (For local entities that require travel rule) (supporting network) (USER_DATA)
3526
+ * @param {SubmitDepositQuestionnaireRequest} requestParameters Request parameters.
3527
+ * @returns {Promise<RestApiResponse<SubmitDepositQuestionnaireResponse>>}
3528
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3529
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/deposit-provide-info Binance API Documentation}
3530
+ */
3531
+ submitDepositQuestionnaire(requestParameters) {
3532
+ return this.travelRuleApi.submitDepositQuestionnaire(requestParameters);
3533
+ }
3534
+ /**
3535
+ * Fetch withdraw history for local entities that required travel rule.
3536
+ *
3537
+ * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3538
+ * `network` may not be in the response for old withdraw.
3539
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3540
+ * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
3541
+ *
3542
+ * Weight: 18000
3543
+ * Request limit: 10 requests per second
3544
+ * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3545
+ * limit is 180000/second. Response from the endpoint contains header
3546
+ * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3547
+ *
3548
+ * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
3549
+ * @param {WithdrawHistoryV1Request} requestParameters Request parameters.
3550
+ * @returns {Promise<RestApiResponse<WithdrawHistoryV1Response>>}
3551
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3552
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History Binance API Documentation}
3553
+ */
3554
+ withdrawHistoryV1(requestParameters = {}) {
3555
+ return this.travelRuleApi.withdrawHistoryV1(requestParameters);
3556
+ }
3557
+ /**
3558
+ * Fetch withdraw history for local entities that required travel rule.
3559
+ *
3560
+ * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3561
+ * `network` may not be in the response for old withdraw.
3562
+ * Withdrawal made through /sapi/v1/capital/withdraw/apply may not be in the response.
3563
+ * Please notice the default `startTime` and `endTime` to make sure that time interval is within
3564
+ * If both `startTime` and `endTime`are sent, time between `startTime`and `endTime`must be less
3565
+ * If withdrawOrderId is sent, time between startTime and endTime must be less than 7 days.
3566
+ * If withdrawOrderId is sent, startTime and endTime are not sent, will return last 7 days records by default.
3567
+ * Maximum support trId,txId number is 45.
3568
+ * WithdrawOrderId only support 1.
3569
+ * If responsible does not include withdrawalStatus, please input trId or txId retrieve the data.
3570
+ *
3571
+ * Weight: 18000
3572
+ * Request limit: 10 requests per second
3573
+ * > * This endpoint specifically uses per second IP rate limit, user's total second level IP rate
3574
+ * limit is 180000/second. Response from the endpoint contains header
3575
+ * key X-SAPI-USED-IP-WEIGHT-1S, which defines weight used by the current IP.
3576
+ *
3577
+ * @summary Withdraw History (for local entities that require travel rule) (supporting network) (USER_DATA)
3578
+ * @param {WithdrawHistoryV2Request} requestParameters Request parameters.
3579
+ * @returns {Promise<RestApiResponse<WithdrawHistoryV2Response>>}
3580
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3581
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Withdraw-History Binance API Documentation}
3582
+ */
3583
+ withdrawHistoryV2(requestParameters = {}) {
3584
+ return this.travelRuleApi.withdrawHistoryV2(requestParameters);
3585
+ }
3586
+ /**
3587
+ * Submit a withdrawal request for local entities that required travel rule.
3588
+ *
3589
+ * If `network` not send, return with default network of the coin, but if the address could not match default network, the withdraw will be rejected.
3590
+ * You can get `network` and `isDefault` in `networkList` of a coin in the response
3591
+ * Questionnaire is different for each local entity, please refer to
3592
+ * If getting error like `Questionnaire format not valid.` or `Questionnaire must not be blank`,
3593
+ *
3594
+ * Weight: 600
3595
+ *
3596
+ * @summary Withdraw (for local entities that require travel rule) (USER_DATA)
3597
+ * @param {WithdrawTravelRuleRequest} requestParameters Request parameters.
3598
+ * @returns {Promise<RestApiResponse<WithdrawTravelRuleResponse>>}
3599
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
3600
+ * @see {@link https://developers.binance.com/docs/wallet/travel-rule/Withdraw Binance API Documentation}
3601
+ */
3602
+ withdrawTravelRule(requestParameters) {
3603
+ return this.travelRuleApi.withdrawTravelRule(requestParameters);
3604
+ }
3605
+ };
3606
+
3607
+ // src/wallet.ts
3608
+ var Wallet = class {
3609
+ constructor(config) {
3610
+ if (config?.configurationRestAPI) {
3611
+ const configRestAPI = new import_common7.ConfigurationRestAPI(config.configurationRestAPI);
3612
+ configRestAPI.basePath = configRestAPI.basePath || import_common7.WALLET_REST_API_PROD_URL;
3613
+ configRestAPI.baseOptions = configRestAPI.baseOptions || {};
3614
+ configRestAPI.baseOptions.headers = {
3615
+ ...configRestAPI.baseOptions.headers || {},
3616
+ "User-Agent": `${name}/${version} (Node.js/${process.version}; ${(0, import_os.platform)()}; ${(0, import_os.arch)()})`
3617
+ };
3618
+ this.restAPI = new RestAPI(configRestAPI);
3619
+ }
3620
+ }
3621
+ };
3622
+
3623
+ // src/index.ts
3624
+ var import_common8 = require("@binance/common");
3625
+ // Annotate the CommonJS export names for ESM import in node:
3626
+ 0 && (module.exports = {
3627
+ BadRequestError,
3628
+ ConnectorClientError,
3629
+ ForbiddenError,
3630
+ NetworkError,
3631
+ NotFoundError,
3632
+ RateLimitBanError,
3633
+ RequiredError,
3634
+ ServerError,
3635
+ TooManyRequestsError,
3636
+ UnauthorizedError,
3637
+ WALLET_REST_API_PROD_URL,
3638
+ WALLET_REST_API_TESTNET_URL,
3639
+ Wallet,
3640
+ WalletRestAPI
3641
+ });
3642
+ //# sourceMappingURL=index.js.map