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