@binance/dual-investment 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.
@@ -0,0 +1,983 @@
1
+ import { RestApiResponse, ConfigurationRestAPI } from '@binance/common';
2
+ export { BadRequestError, ConnectorClientError, DUAL_INVESTMENT_REST_API_PROD_URL, DUAL_INVESTMENT_REST_API_TESTNET_URL, ForbiddenError, NetworkError, NotFoundError, RateLimitBanError, RequiredError, ServerError, TooManyRequestsError, UnauthorizedError } from '@binance/common';
3
+
4
+ /**
5
+ * Binance Public Dual Investment REST API
6
+ *
7
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
8
+ *
9
+ * The version of the OpenAPI document: 1.0.0
10
+ *
11
+ *
12
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
13
+ * https://openapi-generator.tech
14
+ * Do not edit the class manually.
15
+ */
16
+ /**
17
+ *
18
+ * @export
19
+ * @interface BadRequest
20
+ */
21
+ interface BadRequest {
22
+ /**
23
+ *
24
+ * @type {number}
25
+ * @memberof BadRequest
26
+ */
27
+ code: number;
28
+ /**
29
+ *
30
+ * @type {string}
31
+ * @memberof BadRequest
32
+ */
33
+ message: string;
34
+ }
35
+
36
+ /**
37
+ * Binance Public Dual Investment REST API
38
+ *
39
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
40
+ *
41
+ * The version of the OpenAPI document: 1.0.0
42
+ *
43
+ *
44
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
45
+ * https://openapi-generator.tech
46
+ * Do not edit the class manually.
47
+ */
48
+ /**
49
+ *
50
+ * @export
51
+ * @interface ChangeAutoCompoundStatusResponse
52
+ */
53
+ interface ChangeAutoCompoundStatusResponse {
54
+ /**
55
+ *
56
+ * @type {string}
57
+ * @memberof ChangeAutoCompoundStatusResponse
58
+ */
59
+ positionId?: string;
60
+ /**
61
+ *
62
+ * @type {string}
63
+ * @memberof ChangeAutoCompoundStatusResponse
64
+ */
65
+ autoCompoundPlan?: string;
66
+ }
67
+
68
+ /**
69
+ * Binance Public Dual Investment REST API
70
+ *
71
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
72
+ *
73
+ * The version of the OpenAPI document: 1.0.0
74
+ *
75
+ *
76
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
77
+ * https://openapi-generator.tech
78
+ * Do not edit the class manually.
79
+ */
80
+ /**
81
+ *
82
+ * @export
83
+ * @interface CheckDualInvestmentAccountsResponse
84
+ */
85
+ interface CheckDualInvestmentAccountsResponse {
86
+ /**
87
+ *
88
+ * @type {string}
89
+ * @memberof CheckDualInvestmentAccountsResponse
90
+ */
91
+ totalAmountInBTC?: string;
92
+ /**
93
+ *
94
+ * @type {string}
95
+ * @memberof CheckDualInvestmentAccountsResponse
96
+ */
97
+ totalAmountInUSDT?: string;
98
+ }
99
+
100
+ /**
101
+ * Binance Public Dual Investment REST API
102
+ *
103
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
104
+ *
105
+ * The version of the OpenAPI document: 1.0.0
106
+ *
107
+ *
108
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
109
+ * https://openapi-generator.tech
110
+ * Do not edit the class manually.
111
+ */
112
+ /**
113
+ *
114
+ * @export
115
+ * @interface GetDualInvestmentPositionsResponseListInner
116
+ */
117
+ interface GetDualInvestmentPositionsResponseListInner {
118
+ /**
119
+ *
120
+ * @type {string}
121
+ * @memberof GetDualInvestmentPositionsResponseListInner
122
+ */
123
+ id?: string;
124
+ /**
125
+ *
126
+ * @type {string}
127
+ * @memberof GetDualInvestmentPositionsResponseListInner
128
+ */
129
+ investCoin?: string;
130
+ /**
131
+ *
132
+ * @type {string}
133
+ * @memberof GetDualInvestmentPositionsResponseListInner
134
+ */
135
+ exercisedCoin?: string;
136
+ /**
137
+ *
138
+ * @type {string}
139
+ * @memberof GetDualInvestmentPositionsResponseListInner
140
+ */
141
+ subscriptionAmount?: string;
142
+ /**
143
+ *
144
+ * @type {string}
145
+ * @memberof GetDualInvestmentPositionsResponseListInner
146
+ */
147
+ strikePrice?: string;
148
+ /**
149
+ *
150
+ * @type {number}
151
+ * @memberof GetDualInvestmentPositionsResponseListInner
152
+ */
153
+ duration?: number;
154
+ /**
155
+ *
156
+ * @type {number}
157
+ * @memberof GetDualInvestmentPositionsResponseListInner
158
+ */
159
+ settleDate?: number;
160
+ /**
161
+ *
162
+ * @type {string}
163
+ * @memberof GetDualInvestmentPositionsResponseListInner
164
+ */
165
+ purchaseStatus?: string;
166
+ /**
167
+ *
168
+ * @type {string}
169
+ * @memberof GetDualInvestmentPositionsResponseListInner
170
+ */
171
+ apr?: string;
172
+ /**
173
+ *
174
+ * @type {number}
175
+ * @memberof GetDualInvestmentPositionsResponseListInner
176
+ */
177
+ orderId?: number;
178
+ /**
179
+ *
180
+ * @type {number}
181
+ * @memberof GetDualInvestmentPositionsResponseListInner
182
+ */
183
+ purchaseEndTime?: number;
184
+ /**
185
+ *
186
+ * @type {string}
187
+ * @memberof GetDualInvestmentPositionsResponseListInner
188
+ */
189
+ optionType?: string;
190
+ /**
191
+ *
192
+ * @type {string}
193
+ * @memberof GetDualInvestmentPositionsResponseListInner
194
+ */
195
+ autoCompoundPlan?: string;
196
+ }
197
+
198
+ /**
199
+ * Binance Public Dual Investment REST API
200
+ *
201
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
202
+ *
203
+ * The version of the OpenAPI document: 1.0.0
204
+ *
205
+ *
206
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
207
+ * https://openapi-generator.tech
208
+ * Do not edit the class manually.
209
+ */
210
+
211
+ /**
212
+ *
213
+ * @export
214
+ * @interface GetDualInvestmentPositionsResponse
215
+ */
216
+ interface GetDualInvestmentPositionsResponse {
217
+ /**
218
+ *
219
+ * @type {number}
220
+ * @memberof GetDualInvestmentPositionsResponse
221
+ */
222
+ total?: number;
223
+ /**
224
+ *
225
+ * @type {Array<GetDualInvestmentPositionsResponseListInner>}
226
+ * @memberof GetDualInvestmentPositionsResponse
227
+ */
228
+ list?: Array<GetDualInvestmentPositionsResponseListInner>;
229
+ }
230
+
231
+ /**
232
+ * Binance Public Dual Investment REST API
233
+ *
234
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
235
+ *
236
+ * The version of the OpenAPI document: 1.0.0
237
+ *
238
+ *
239
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
240
+ * https://openapi-generator.tech
241
+ * Do not edit the class manually.
242
+ */
243
+ /**
244
+ *
245
+ * @export
246
+ * @interface GetDualInvestmentProductListResponseListInner
247
+ */
248
+ interface GetDualInvestmentProductListResponseListInner {
249
+ /**
250
+ *
251
+ * @type {string}
252
+ * @memberof GetDualInvestmentProductListResponseListInner
253
+ */
254
+ id?: string;
255
+ /**
256
+ *
257
+ * @type {string}
258
+ * @memberof GetDualInvestmentProductListResponseListInner
259
+ */
260
+ investCoin?: string;
261
+ /**
262
+ *
263
+ * @type {string}
264
+ * @memberof GetDualInvestmentProductListResponseListInner
265
+ */
266
+ exercisedCoin?: string;
267
+ /**
268
+ *
269
+ * @type {string}
270
+ * @memberof GetDualInvestmentProductListResponseListInner
271
+ */
272
+ strikePrice?: string;
273
+ /**
274
+ *
275
+ * @type {number}
276
+ * @memberof GetDualInvestmentProductListResponseListInner
277
+ */
278
+ duration?: number;
279
+ /**
280
+ *
281
+ * @type {number}
282
+ * @memberof GetDualInvestmentProductListResponseListInner
283
+ */
284
+ settleDate?: number;
285
+ /**
286
+ *
287
+ * @type {number}
288
+ * @memberof GetDualInvestmentProductListResponseListInner
289
+ */
290
+ purchaseDecimal?: number;
291
+ /**
292
+ *
293
+ * @type {number}
294
+ * @memberof GetDualInvestmentProductListResponseListInner
295
+ */
296
+ purchaseEndTime?: number;
297
+ /**
298
+ *
299
+ * @type {boolean}
300
+ * @memberof GetDualInvestmentProductListResponseListInner
301
+ */
302
+ canPurchase?: boolean;
303
+ /**
304
+ *
305
+ * @type {string}
306
+ * @memberof GetDualInvestmentProductListResponseListInner
307
+ */
308
+ apr?: string;
309
+ /**
310
+ *
311
+ * @type {number}
312
+ * @memberof GetDualInvestmentProductListResponseListInner
313
+ */
314
+ orderId?: number;
315
+ /**
316
+ *
317
+ * @type {string}
318
+ * @memberof GetDualInvestmentProductListResponseListInner
319
+ */
320
+ minAmount?: string;
321
+ /**
322
+ *
323
+ * @type {string}
324
+ * @memberof GetDualInvestmentProductListResponseListInner
325
+ */
326
+ maxAmount?: string;
327
+ /**
328
+ *
329
+ * @type {number}
330
+ * @memberof GetDualInvestmentProductListResponseListInner
331
+ */
332
+ createTimestamp?: number;
333
+ /**
334
+ *
335
+ * @type {string}
336
+ * @memberof GetDualInvestmentProductListResponseListInner
337
+ */
338
+ optionType?: string;
339
+ /**
340
+ *
341
+ * @type {boolean}
342
+ * @memberof GetDualInvestmentProductListResponseListInner
343
+ */
344
+ isAutoCompoundEnable?: boolean;
345
+ /**
346
+ *
347
+ * @type {Array<string>}
348
+ * @memberof GetDualInvestmentProductListResponseListInner
349
+ */
350
+ autoCompoundPlanList?: Array<string>;
351
+ }
352
+
353
+ /**
354
+ * Binance Public Dual Investment REST API
355
+ *
356
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
357
+ *
358
+ * The version of the OpenAPI document: 1.0.0
359
+ *
360
+ *
361
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
362
+ * https://openapi-generator.tech
363
+ * Do not edit the class manually.
364
+ */
365
+
366
+ /**
367
+ *
368
+ * @export
369
+ * @interface GetDualInvestmentProductListResponse
370
+ */
371
+ interface GetDualInvestmentProductListResponse {
372
+ /**
373
+ *
374
+ * @type {number}
375
+ * @memberof GetDualInvestmentProductListResponse
376
+ */
377
+ total?: number;
378
+ /**
379
+ *
380
+ * @type {Array<GetDualInvestmentProductListResponseListInner>}
381
+ * @memberof GetDualInvestmentProductListResponse
382
+ */
383
+ list?: Array<GetDualInvestmentProductListResponseListInner>;
384
+ }
385
+
386
+ /**
387
+ * Binance Public Dual Investment REST API
388
+ *
389
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
390
+ *
391
+ * The version of the OpenAPI document: 1.0.0
392
+ *
393
+ *
394
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
395
+ * https://openapi-generator.tech
396
+ * Do not edit the class manually.
397
+ */
398
+ /**
399
+ *
400
+ * @export
401
+ * @interface SubscribeDualInvestmentProductsResponse
402
+ */
403
+ interface SubscribeDualInvestmentProductsResponse {
404
+ /**
405
+ *
406
+ * @type {number}
407
+ * @memberof SubscribeDualInvestmentProductsResponse
408
+ */
409
+ positionId?: number;
410
+ /**
411
+ *
412
+ * @type {string}
413
+ * @memberof SubscribeDualInvestmentProductsResponse
414
+ */
415
+ investCoin?: string;
416
+ /**
417
+ *
418
+ * @type {string}
419
+ * @memberof SubscribeDualInvestmentProductsResponse
420
+ */
421
+ exercisedCoin?: string;
422
+ /**
423
+ *
424
+ * @type {string}
425
+ * @memberof SubscribeDualInvestmentProductsResponse
426
+ */
427
+ subscriptionAmount?: string;
428
+ /**
429
+ *
430
+ * @type {number}
431
+ * @memberof SubscribeDualInvestmentProductsResponse
432
+ */
433
+ duration?: number;
434
+ /**
435
+ *
436
+ * @type {string}
437
+ * @memberof SubscribeDualInvestmentProductsResponse
438
+ */
439
+ autoCompoundPlan?: string;
440
+ /**
441
+ *
442
+ * @type {string}
443
+ * @memberof SubscribeDualInvestmentProductsResponse
444
+ */
445
+ strikePrice?: string;
446
+ /**
447
+ *
448
+ * @type {number}
449
+ * @memberof SubscribeDualInvestmentProductsResponse
450
+ */
451
+ settleDate?: number;
452
+ /**
453
+ *
454
+ * @type {string}
455
+ * @memberof SubscribeDualInvestmentProductsResponse
456
+ */
457
+ purchaseStatus?: string;
458
+ /**
459
+ *
460
+ * @type {string}
461
+ * @memberof SubscribeDualInvestmentProductsResponse
462
+ */
463
+ apr?: string;
464
+ /**
465
+ *
466
+ * @type {number}
467
+ * @memberof SubscribeDualInvestmentProductsResponse
468
+ */
469
+ orderId?: number;
470
+ /**
471
+ *
472
+ * @type {number}
473
+ * @memberof SubscribeDualInvestmentProductsResponse
474
+ */
475
+ purchaseTime?: number;
476
+ /**
477
+ *
478
+ * @type {string}
479
+ * @memberof SubscribeDualInvestmentProductsResponse
480
+ */
481
+ optionType?: string;
482
+ }
483
+
484
+ /**
485
+ * Binance Public Dual Investment REST API
486
+ *
487
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
488
+ *
489
+ * The version of the OpenAPI document: 1.0.0
490
+ *
491
+ *
492
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
493
+ * https://openapi-generator.tech
494
+ * Do not edit the class manually.
495
+ */
496
+
497
+ /**
498
+ * MarketDataApi - interface
499
+ * @interface MarketDataApi
500
+ */
501
+ interface MarketDataApiInterface {
502
+ /**
503
+ * Get Dual Investment product list
504
+ *
505
+ * Weight: 1(IP)
506
+ *
507
+ * @summary Get Dual Investment product list
508
+ * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.
509
+ *
510
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
511
+ * @memberof MarketDataApiInterface
512
+ */
513
+ getDualInvestmentProductList(requestParameters: GetDualInvestmentProductListRequest): Promise<RestApiResponse<GetDualInvestmentProductListResponse>>;
514
+ }
515
+ /**
516
+ * Request parameters for getDualInvestmentProductList operation in MarketDataApi.
517
+ * @interface GetDualInvestmentProductListRequest
518
+ */
519
+ interface GetDualInvestmentProductListRequest {
520
+ /**
521
+ * Input CALL or PUT
522
+ * @type {string}
523
+ * @memberof MarketDataApiGetDualInvestmentProductList
524
+ */
525
+ readonly optionType: string;
526
+ /**
527
+ * Target exercised asset, e.g.: if you subscribe to a high sell product (call option), you should input: `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if you subscribe to a low buy product (put option), you should input: `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT
528
+ * @type {string}
529
+ * @memberof MarketDataApiGetDualInvestmentProductList
530
+ */
531
+ readonly exercisedCoin: string;
532
+ /**
533
+ * Asset used for subscribing, e.g.: if you subscribe to a high sell product (call option), you should input: `optionType`:CALL,`exercisedCoin`:USDT,`investCoin`:BNB; if you subscribe to a low buy product (put option), you should input: `optionType`:PUT,`exercisedCoin`:BNB,`investCoin`:USDT
534
+ * @type {string}
535
+ * @memberof MarketDataApiGetDualInvestmentProductList
536
+ */
537
+ readonly investCoin: string;
538
+ /**
539
+ * Default: 10, Maximum: 100
540
+ * @type {number}
541
+ * @memberof MarketDataApiGetDualInvestmentProductList
542
+ */
543
+ readonly pageSize?: number;
544
+ /**
545
+ * Default: 1
546
+ * @type {number}
547
+ * @memberof MarketDataApiGetDualInvestmentProductList
548
+ */
549
+ readonly pageIndex?: number;
550
+ /**
551
+ * The value cannot be greater than 60000
552
+ * @type {number}
553
+ * @memberof MarketDataApiGetDualInvestmentProductList
554
+ */
555
+ readonly recvWindow?: number;
556
+ }
557
+ /**
558
+ * MarketDataApi - object-oriented interface
559
+ * @class MarketDataApi
560
+ */
561
+ declare class MarketDataApi implements MarketDataApiInterface {
562
+ private readonly configuration;
563
+ private localVarAxiosParamCreator;
564
+ constructor(configuration: ConfigurationRestAPI);
565
+ /**
566
+ * Get Dual Investment product list
567
+ *
568
+ * Weight: 1(IP)
569
+ *
570
+ * @summary Get Dual Investment product list
571
+ * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.
572
+ * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}
573
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
574
+ * @memberof MarketDataApi
575
+ * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}
576
+ */
577
+ getDualInvestmentProductList(requestParameters: GetDualInvestmentProductListRequest): Promise<RestApiResponse<GetDualInvestmentProductListResponse>>;
578
+ }
579
+
580
+ /**
581
+ * Binance Public Dual Investment REST API
582
+ *
583
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
584
+ *
585
+ * The version of the OpenAPI document: 1.0.0
586
+ *
587
+ *
588
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
589
+ * https://openapi-generator.tech
590
+ * Do not edit the class manually.
591
+ */
592
+
593
+ /**
594
+ * TradeApi - interface
595
+ * @interface TradeApi
596
+ */
597
+ interface TradeApiInterface {
598
+ /**
599
+ * Change Auto-Compound status
600
+ *
601
+ * Weight: 1(IP)
602
+ *
603
+ * @summary Change Auto-Compound status(USER_DATA)
604
+ * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.
605
+ *
606
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
607
+ * @memberof TradeApiInterface
608
+ */
609
+ changeAutoCompoundStatus(requestParameters: ChangeAutoCompoundStatusRequest): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>;
610
+ /**
611
+ * Check Dual Investment accounts
612
+ *
613
+ * Weight: 1(IP)
614
+ *
615
+ * @summary Check Dual Investment accounts(USER_DATA)
616
+ * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.
617
+ *
618
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
619
+ * @memberof TradeApiInterface
620
+ */
621
+ checkDualInvestmentAccounts(requestParameters?: CheckDualInvestmentAccountsRequest): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>;
622
+ /**
623
+ * Get Dual Investment positions (batch)
624
+ *
625
+ * Weight: 1(IP)
626
+ *
627
+ * @summary Get Dual Investment positions(USER_DATA)
628
+ * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.
629
+ *
630
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
631
+ * @memberof TradeApiInterface
632
+ */
633
+ getDualInvestmentPositions(requestParameters?: GetDualInvestmentPositionsRequest): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>;
634
+ /**
635
+ * Subscribe Dual Investment products
636
+ *
637
+ * Products are not available. // this means APR changes to lower value, or orders are not unavailable.
638
+ * Failed. This means System or network errors.
639
+ *
640
+ * Weight: 1(IP)
641
+ *
642
+ * @summary Subscribe Dual Investment products(USER_DATA)
643
+ * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.
644
+ *
645
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
646
+ * @memberof TradeApiInterface
647
+ */
648
+ subscribeDualInvestmentProducts(requestParameters: SubscribeDualInvestmentProductsRequest): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>;
649
+ }
650
+ /**
651
+ * Request parameters for changeAutoCompoundStatus operation in TradeApi.
652
+ * @interface ChangeAutoCompoundStatusRequest
653
+ */
654
+ interface ChangeAutoCompoundStatusRequest {
655
+ /**
656
+ * Get positionId from `/sapi/v1/dci/product/positions`
657
+ * @type {string}
658
+ * @memberof TradeApiChangeAutoCompoundStatus
659
+ */
660
+ readonly positionId: string;
661
+ /**
662
+ *
663
+ * @type {string}
664
+ * @memberof TradeApiChangeAutoCompoundStatus
665
+ */
666
+ readonly autoCompoundPlan?: string;
667
+ /**
668
+ * The value cannot be greater than 60000
669
+ * @type {number}
670
+ * @memberof TradeApiChangeAutoCompoundStatus
671
+ */
672
+ readonly recvWindow?: number;
673
+ }
674
+ /**
675
+ * Request parameters for checkDualInvestmentAccounts operation in TradeApi.
676
+ * @interface CheckDualInvestmentAccountsRequest
677
+ */
678
+ interface CheckDualInvestmentAccountsRequest {
679
+ /**
680
+ * The value cannot be greater than 60000
681
+ * @type {number}
682
+ * @memberof TradeApiCheckDualInvestmentAccounts
683
+ */
684
+ readonly recvWindow?: number;
685
+ }
686
+ /**
687
+ * Request parameters for getDualInvestmentPositions operation in TradeApi.
688
+ * @interface GetDualInvestmentPositionsRequest
689
+ */
690
+ interface GetDualInvestmentPositionsRequest {
691
+ /**
692
+ * `PENDING`:Products are purchasing, will give results later;`PURCHASE_SUCCESS`:purchase successfully;`SETTLED`: Products are finish settling;`PURCHASE_FAIL`:fail to purchase;`REFUNDING`:refund ongoing;`REFUND_SUCCESS`:refund to spot account successfully; `SETTLING`:Products are settling. If don't fill this field, will response all the position status.
693
+ * @type {string}
694
+ * @memberof TradeApiGetDualInvestmentPositions
695
+ */
696
+ readonly status?: string;
697
+ /**
698
+ * Default: 10, Maximum: 100
699
+ * @type {number}
700
+ * @memberof TradeApiGetDualInvestmentPositions
701
+ */
702
+ readonly pageSize?: number;
703
+ /**
704
+ * Default: 1
705
+ * @type {number}
706
+ * @memberof TradeApiGetDualInvestmentPositions
707
+ */
708
+ readonly pageIndex?: number;
709
+ /**
710
+ * The value cannot be greater than 60000
711
+ * @type {number}
712
+ * @memberof TradeApiGetDualInvestmentPositions
713
+ */
714
+ readonly recvWindow?: number;
715
+ }
716
+ /**
717
+ * Request parameters for subscribeDualInvestmentProducts operation in TradeApi.
718
+ * @interface SubscribeDualInvestmentProductsRequest
719
+ */
720
+ interface SubscribeDualInvestmentProductsRequest {
721
+ /**
722
+ * get id from `/sapi/v1/dci/product/list`
723
+ * @type {string}
724
+ * @memberof TradeApiSubscribeDualInvestmentProducts
725
+ */
726
+ readonly id: string;
727
+ /**
728
+ * get orderId from `/sapi/v1/dci/product/list`
729
+ * @type {string}
730
+ * @memberof TradeApiSubscribeDualInvestmentProducts
731
+ */
732
+ readonly orderId: string;
733
+ /**
734
+ * the amount for subscribing
735
+ * @type {number}
736
+ * @memberof TradeApiSubscribeDualInvestmentProducts
737
+ */
738
+ readonly depositAmount: number;
739
+ /**
740
+ * `NONE`: switch off the plan, `STANDARD`:standard plan,`ADVANCED`:advanced plan
741
+ * @type {string}
742
+ * @memberof TradeApiSubscribeDualInvestmentProducts
743
+ */
744
+ readonly autoCompoundPlan: string;
745
+ /**
746
+ * The value cannot be greater than 60000
747
+ * @type {number}
748
+ * @memberof TradeApiSubscribeDualInvestmentProducts
749
+ */
750
+ readonly recvWindow?: number;
751
+ }
752
+ /**
753
+ * TradeApi - object-oriented interface
754
+ * @class TradeApi
755
+ */
756
+ declare class TradeApi implements TradeApiInterface {
757
+ private readonly configuration;
758
+ private localVarAxiosParamCreator;
759
+ constructor(configuration: ConfigurationRestAPI);
760
+ /**
761
+ * Change Auto-Compound status
762
+ *
763
+ * Weight: 1(IP)
764
+ *
765
+ * @summary Change Auto-Compound status(USER_DATA)
766
+ * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.
767
+ * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}
768
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
769
+ * @memberof TradeApi
770
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}
771
+ */
772
+ changeAutoCompoundStatus(requestParameters: ChangeAutoCompoundStatusRequest): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>;
773
+ /**
774
+ * Check Dual Investment accounts
775
+ *
776
+ * Weight: 1(IP)
777
+ *
778
+ * @summary Check Dual Investment accounts(USER_DATA)
779
+ * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.
780
+ * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}
781
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
782
+ * @memberof TradeApi
783
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}
784
+ */
785
+ checkDualInvestmentAccounts(requestParameters?: CheckDualInvestmentAccountsRequest): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>;
786
+ /**
787
+ * Get Dual Investment positions (batch)
788
+ *
789
+ * Weight: 1(IP)
790
+ *
791
+ * @summary Get Dual Investment positions(USER_DATA)
792
+ * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.
793
+ * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}
794
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
795
+ * @memberof TradeApi
796
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}
797
+ */
798
+ getDualInvestmentPositions(requestParameters?: GetDualInvestmentPositionsRequest): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>;
799
+ /**
800
+ * Subscribe Dual Investment products
801
+ *
802
+ * Products are not available. // this means APR changes to lower value, or orders are not unavailable.
803
+ * Failed. This means System or network errors.
804
+ *
805
+ * Weight: 1(IP)
806
+ *
807
+ * @summary Subscribe Dual Investment products(USER_DATA)
808
+ * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.
809
+ * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}
810
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
811
+ * @memberof TradeApi
812
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}
813
+ */
814
+ subscribeDualInvestmentProducts(requestParameters: SubscribeDualInvestmentProductsRequest): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>;
815
+ }
816
+
817
+ /**
818
+ * Binance Public Dual Investment REST API
819
+ *
820
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
821
+ *
822
+ * The version of the OpenAPI document: 1.0.0
823
+ *
824
+ *
825
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
826
+ * https://openapi-generator.tech
827
+ * Do not edit the class manually.
828
+ */
829
+
830
+ declare class RestAPI {
831
+ private configuration;
832
+ private marketDataApi;
833
+ private tradeApi;
834
+ constructor(configuration: ConfigurationRestAPI);
835
+ /**
836
+ * Generic function to send a request.
837
+ * @param endpoint - The API endpoint to call.
838
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
839
+ * @param params - Query parameters for the request.
840
+ *
841
+ * @returns A promise resolving to the response data object.
842
+ */
843
+ sendRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', params?: Record<string, unknown>): Promise<RestApiResponse<T>>;
844
+ /**
845
+ * Generic function to send a signed request.
846
+ * @param endpoint - The API endpoint to call.
847
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
848
+ * @param params - Query parameters for the request.
849
+ *
850
+ * @returns A promise resolving to the response data object.
851
+ */
852
+ sendSignedRequest<T>(endpoint: string, method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH', params?: Record<string, unknown>): Promise<RestApiResponse<T>>;
853
+ /**
854
+ * Get Dual Investment product list
855
+ *
856
+ * Weight: 1(IP)
857
+ *
858
+ * @summary Get Dual Investment product list
859
+ * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.
860
+ * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}
861
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
862
+ * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}
863
+ */
864
+ getDualInvestmentProductList(requestParameters: GetDualInvestmentProductListRequest): Promise<RestApiResponse<GetDualInvestmentProductListResponse>>;
865
+ /**
866
+ * Change Auto-Compound status
867
+ *
868
+ * Weight: 1(IP)
869
+ *
870
+ * @summary Change Auto-Compound status(USER_DATA)
871
+ * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.
872
+ * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}
873
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
874
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}
875
+ */
876
+ changeAutoCompoundStatus(requestParameters: ChangeAutoCompoundStatusRequest): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>;
877
+ /**
878
+ * Check Dual Investment accounts
879
+ *
880
+ * Weight: 1(IP)
881
+ *
882
+ * @summary Check Dual Investment accounts(USER_DATA)
883
+ * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.
884
+ * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}
885
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
886
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}
887
+ */
888
+ checkDualInvestmentAccounts(requestParameters?: CheckDualInvestmentAccountsRequest): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>;
889
+ /**
890
+ * Get Dual Investment positions (batch)
891
+ *
892
+ * Weight: 1(IP)
893
+ *
894
+ * @summary Get Dual Investment positions(USER_DATA)
895
+ * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.
896
+ * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}
897
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
898
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}
899
+ */
900
+ getDualInvestmentPositions(requestParameters?: GetDualInvestmentPositionsRequest): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>;
901
+ /**
902
+ * Subscribe Dual Investment products
903
+ *
904
+ * Products are not available. // this means APR changes to lower value, or orders are not unavailable.
905
+ * Failed. This means System or network errors.
906
+ *
907
+ * Weight: 1(IP)
908
+ *
909
+ * @summary Subscribe Dual Investment products(USER_DATA)
910
+ * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.
911
+ * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}
912
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
913
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}
914
+ */
915
+ subscribeDualInvestmentProducts(requestParameters: SubscribeDualInvestmentProductsRequest): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>;
916
+ }
917
+
918
+ /**
919
+ * Binance Public Dual Investment REST API
920
+ *
921
+ * OpenAPI Specification for the Binance Public Dual Investment REST API
922
+ *
923
+ * The version of the OpenAPI document: 1.0.0
924
+ *
925
+ *
926
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
927
+ * https://openapi-generator.tech
928
+ * Do not edit the class manually.
929
+ */
930
+
931
+ type index_BadRequest = BadRequest;
932
+ type index_ChangeAutoCompoundStatusRequest = ChangeAutoCompoundStatusRequest;
933
+ type index_ChangeAutoCompoundStatusResponse = ChangeAutoCompoundStatusResponse;
934
+ type index_CheckDualInvestmentAccountsRequest = CheckDualInvestmentAccountsRequest;
935
+ type index_CheckDualInvestmentAccountsResponse = CheckDualInvestmentAccountsResponse;
936
+ type index_GetDualInvestmentPositionsRequest = GetDualInvestmentPositionsRequest;
937
+ type index_GetDualInvestmentPositionsResponse = GetDualInvestmentPositionsResponse;
938
+ type index_GetDualInvestmentPositionsResponseListInner = GetDualInvestmentPositionsResponseListInner;
939
+ type index_GetDualInvestmentProductListRequest = GetDualInvestmentProductListRequest;
940
+ type index_GetDualInvestmentProductListResponse = GetDualInvestmentProductListResponse;
941
+ type index_GetDualInvestmentProductListResponseListInner = GetDualInvestmentProductListResponseListInner;
942
+ type index_MarketDataApi = MarketDataApi;
943
+ declare const index_MarketDataApi: typeof MarketDataApi;
944
+ type index_MarketDataApiInterface = MarketDataApiInterface;
945
+ type index_RestAPI = RestAPI;
946
+ declare const index_RestAPI: typeof RestAPI;
947
+ type index_SubscribeDualInvestmentProductsRequest = SubscribeDualInvestmentProductsRequest;
948
+ type index_SubscribeDualInvestmentProductsResponse = SubscribeDualInvestmentProductsResponse;
949
+ type index_TradeApi = TradeApi;
950
+ declare const index_TradeApi: typeof TradeApi;
951
+ type index_TradeApiInterface = TradeApiInterface;
952
+ declare namespace index {
953
+ export {
954
+ index_BadRequest as BadRequest,
955
+ index_ChangeAutoCompoundStatusRequest as ChangeAutoCompoundStatusRequest,
956
+ index_ChangeAutoCompoundStatusResponse as ChangeAutoCompoundStatusResponse,
957
+ index_CheckDualInvestmentAccountsRequest as CheckDualInvestmentAccountsRequest,
958
+ index_CheckDualInvestmentAccountsResponse as CheckDualInvestmentAccountsResponse,
959
+ index_GetDualInvestmentPositionsRequest as GetDualInvestmentPositionsRequest,
960
+ index_GetDualInvestmentPositionsResponse as GetDualInvestmentPositionsResponse,
961
+ index_GetDualInvestmentPositionsResponseListInner as GetDualInvestmentPositionsResponseListInner,
962
+ index_GetDualInvestmentProductListRequest as GetDualInvestmentProductListRequest,
963
+ index_GetDualInvestmentProductListResponse as GetDualInvestmentProductListResponse,
964
+ index_GetDualInvestmentProductListResponseListInner as GetDualInvestmentProductListResponseListInner,
965
+ index_MarketDataApi as MarketDataApi,
966
+ index_MarketDataApiInterface as MarketDataApiInterface,
967
+ index_RestAPI as RestAPI,
968
+ index_SubscribeDualInvestmentProductsRequest as SubscribeDualInvestmentProductsRequest,
969
+ index_SubscribeDualInvestmentProductsResponse as SubscribeDualInvestmentProductsResponse,
970
+ index_TradeApi as TradeApi,
971
+ index_TradeApiInterface as TradeApiInterface,
972
+ };
973
+ }
974
+
975
+ interface ConfigurationDualInvestment {
976
+ configurationRestAPI?: ConfigurationRestAPI;
977
+ }
978
+ declare class DualInvestment {
979
+ restAPI: RestAPI;
980
+ constructor(config: ConfigurationDualInvestment);
981
+ }
982
+
983
+ export { ConfigurationDualInvestment, DualInvestment, index as DualInvestmentRestAPI };