@binance/dual-investment 3.0.8 → 4.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.d.mts CHANGED
@@ -115,16 +115,16 @@ interface GetDualInvestmentPositionsResponseListInner {
115
115
  strikePrice?: string;
116
116
  /**
117
117
  *
118
- * @type {number}
118
+ * @type {number | bigint}
119
119
  * @memberof GetDualInvestmentPositionsResponseListInner
120
120
  */
121
- duration?: number;
121
+ duration?: number | bigint;
122
122
  /**
123
123
  *
124
- * @type {number}
124
+ * @type {number | bigint}
125
125
  * @memberof GetDualInvestmentPositionsResponseListInner
126
126
  */
127
- settleDate?: number;
127
+ settleDate?: number | bigint;
128
128
  /**
129
129
  *
130
130
  * @type {string}
@@ -139,16 +139,16 @@ interface GetDualInvestmentPositionsResponseListInner {
139
139
  apr?: string;
140
140
  /**
141
141
  *
142
- * @type {number}
142
+ * @type {number | bigint}
143
143
  * @memberof GetDualInvestmentPositionsResponseListInner
144
144
  */
145
- orderId?: number;
145
+ orderId?: number | bigint;
146
146
  /**
147
147
  *
148
- * @type {number}
148
+ * @type {number | bigint}
149
149
  * @memberof GetDualInvestmentPositionsResponseListInner
150
150
  */
151
- purchaseEndTime?: number;
151
+ purchaseEndTime?: number | bigint;
152
152
  /**
153
153
  *
154
154
  * @type {string}
@@ -184,10 +184,10 @@ interface GetDualInvestmentPositionsResponseListInner {
184
184
  interface GetDualInvestmentPositionsResponse {
185
185
  /**
186
186
  *
187
- * @type {number}
187
+ * @type {number | bigint}
188
188
  * @memberof GetDualInvestmentPositionsResponse
189
189
  */
190
- total?: number;
190
+ total?: number | bigint;
191
191
  /**
192
192
  *
193
193
  * @type {Array<GetDualInvestmentPositionsResponseListInner>}
@@ -240,28 +240,28 @@ interface GetDualInvestmentProductListResponseListInner {
240
240
  strikePrice?: string;
241
241
  /**
242
242
  *
243
- * @type {number}
243
+ * @type {number | bigint}
244
244
  * @memberof GetDualInvestmentProductListResponseListInner
245
245
  */
246
- duration?: number;
246
+ duration?: number | bigint;
247
247
  /**
248
248
  *
249
- * @type {number}
249
+ * @type {number | bigint}
250
250
  * @memberof GetDualInvestmentProductListResponseListInner
251
251
  */
252
- settleDate?: number;
252
+ settleDate?: number | bigint;
253
253
  /**
254
254
  *
255
- * @type {number}
255
+ * @type {number | bigint}
256
256
  * @memberof GetDualInvestmentProductListResponseListInner
257
257
  */
258
- purchaseDecimal?: number;
258
+ purchaseDecimal?: number | bigint;
259
259
  /**
260
260
  *
261
- * @type {number}
261
+ * @type {number | bigint}
262
262
  * @memberof GetDualInvestmentProductListResponseListInner
263
263
  */
264
- purchaseEndTime?: number;
264
+ purchaseEndTime?: number | bigint;
265
265
  /**
266
266
  *
267
267
  * @type {boolean}
@@ -276,10 +276,10 @@ interface GetDualInvestmentProductListResponseListInner {
276
276
  apr?: string;
277
277
  /**
278
278
  *
279
- * @type {number}
279
+ * @type {number | bigint}
280
280
  * @memberof GetDualInvestmentProductListResponseListInner
281
281
  */
282
- orderId?: number;
282
+ orderId?: number | bigint;
283
283
  /**
284
284
  *
285
285
  * @type {string}
@@ -294,10 +294,10 @@ interface GetDualInvestmentProductListResponseListInner {
294
294
  maxAmount?: string;
295
295
  /**
296
296
  *
297
- * @type {number}
297
+ * @type {number | bigint}
298
298
  * @memberof GetDualInvestmentProductListResponseListInner
299
299
  */
300
- createTimestamp?: number;
300
+ createTimestamp?: number | bigint;
301
301
  /**
302
302
  *
303
303
  * @type {string}
@@ -339,10 +339,10 @@ interface GetDualInvestmentProductListResponseListInner {
339
339
  interface GetDualInvestmentProductListResponse {
340
340
  /**
341
341
  *
342
- * @type {number}
342
+ * @type {number | bigint}
343
343
  * @memberof GetDualInvestmentProductListResponse
344
344
  */
345
- total?: number;
345
+ total?: number | bigint;
346
346
  /**
347
347
  *
348
348
  * @type {Array<GetDualInvestmentProductListResponseListInner>}
@@ -371,10 +371,10 @@ interface GetDualInvestmentProductListResponse {
371
371
  interface SubscribeDualInvestmentProductsResponse {
372
372
  /**
373
373
  *
374
- * @type {number}
374
+ * @type {number | bigint}
375
375
  * @memberof SubscribeDualInvestmentProductsResponse
376
376
  */
377
- positionId?: number;
377
+ positionId?: number | bigint;
378
378
  /**
379
379
  *
380
380
  * @type {string}
@@ -395,10 +395,10 @@ interface SubscribeDualInvestmentProductsResponse {
395
395
  subscriptionAmount?: string;
396
396
  /**
397
397
  *
398
- * @type {number}
398
+ * @type {number | bigint}
399
399
  * @memberof SubscribeDualInvestmentProductsResponse
400
400
  */
401
- duration?: number;
401
+ duration?: number | bigint;
402
402
  /**
403
403
  *
404
404
  * @type {string}
@@ -413,10 +413,10 @@ interface SubscribeDualInvestmentProductsResponse {
413
413
  strikePrice?: string;
414
414
  /**
415
415
  *
416
- * @type {number}
416
+ * @type {number | bigint}
417
417
  * @memberof SubscribeDualInvestmentProductsResponse
418
418
  */
419
- settleDate?: number;
419
+ settleDate?: number | bigint;
420
420
  /**
421
421
  *
422
422
  * @type {string}
@@ -431,16 +431,16 @@ interface SubscribeDualInvestmentProductsResponse {
431
431
  apr?: string;
432
432
  /**
433
433
  *
434
- * @type {number}
434
+ * @type {number | bigint}
435
435
  * @memberof SubscribeDualInvestmentProductsResponse
436
436
  */
437
- orderId?: number;
437
+ orderId?: number | bigint;
438
438
  /**
439
439
  *
440
- * @type {number}
440
+ * @type {number | bigint}
441
441
  * @memberof SubscribeDualInvestmentProductsResponse
442
442
  */
443
- purchaseTime?: number;
443
+ purchaseTime?: number | bigint;
444
444
  /**
445
445
  *
446
446
  * @type {string}
@@ -825,6 +825,7 @@ declare class RestAPI {
825
825
  *
826
826
  * @summary Get Dual Investment product list
827
827
  * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.
828
+ *
828
829
  * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}
829
830
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
830
831
  * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}
@@ -837,6 +838,7 @@ declare class RestAPI {
837
838
  *
838
839
  * @summary Change Auto-Compound status(USER_DATA)
839
840
  * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.
841
+ *
840
842
  * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}
841
843
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
842
844
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}
@@ -849,6 +851,7 @@ declare class RestAPI {
849
851
  *
850
852
  * @summary Check Dual Investment accounts(USER_DATA)
851
853
  * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.
854
+ *
852
855
  * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}
853
856
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
854
857
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}
@@ -861,6 +864,7 @@ declare class RestAPI {
861
864
  *
862
865
  * @summary Get Dual Investment positions(USER_DATA)
863
866
  * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.
867
+ *
864
868
  * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}
865
869
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
866
870
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}
@@ -876,6 +880,7 @@ declare class RestAPI {
876
880
  *
877
881
  * @summary Subscribe Dual Investment products(USER_DATA)
878
882
  * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.
883
+ *
879
884
  * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}
880
885
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
881
886
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}
package/dist/index.d.ts CHANGED
@@ -115,16 +115,16 @@ interface GetDualInvestmentPositionsResponseListInner {
115
115
  strikePrice?: string;
116
116
  /**
117
117
  *
118
- * @type {number}
118
+ * @type {number | bigint}
119
119
  * @memberof GetDualInvestmentPositionsResponseListInner
120
120
  */
121
- duration?: number;
121
+ duration?: number | bigint;
122
122
  /**
123
123
  *
124
- * @type {number}
124
+ * @type {number | bigint}
125
125
  * @memberof GetDualInvestmentPositionsResponseListInner
126
126
  */
127
- settleDate?: number;
127
+ settleDate?: number | bigint;
128
128
  /**
129
129
  *
130
130
  * @type {string}
@@ -139,16 +139,16 @@ interface GetDualInvestmentPositionsResponseListInner {
139
139
  apr?: string;
140
140
  /**
141
141
  *
142
- * @type {number}
142
+ * @type {number | bigint}
143
143
  * @memberof GetDualInvestmentPositionsResponseListInner
144
144
  */
145
- orderId?: number;
145
+ orderId?: number | bigint;
146
146
  /**
147
147
  *
148
- * @type {number}
148
+ * @type {number | bigint}
149
149
  * @memberof GetDualInvestmentPositionsResponseListInner
150
150
  */
151
- purchaseEndTime?: number;
151
+ purchaseEndTime?: number | bigint;
152
152
  /**
153
153
  *
154
154
  * @type {string}
@@ -184,10 +184,10 @@ interface GetDualInvestmentPositionsResponseListInner {
184
184
  interface GetDualInvestmentPositionsResponse {
185
185
  /**
186
186
  *
187
- * @type {number}
187
+ * @type {number | bigint}
188
188
  * @memberof GetDualInvestmentPositionsResponse
189
189
  */
190
- total?: number;
190
+ total?: number | bigint;
191
191
  /**
192
192
  *
193
193
  * @type {Array<GetDualInvestmentPositionsResponseListInner>}
@@ -240,28 +240,28 @@ interface GetDualInvestmentProductListResponseListInner {
240
240
  strikePrice?: string;
241
241
  /**
242
242
  *
243
- * @type {number}
243
+ * @type {number | bigint}
244
244
  * @memberof GetDualInvestmentProductListResponseListInner
245
245
  */
246
- duration?: number;
246
+ duration?: number | bigint;
247
247
  /**
248
248
  *
249
- * @type {number}
249
+ * @type {number | bigint}
250
250
  * @memberof GetDualInvestmentProductListResponseListInner
251
251
  */
252
- settleDate?: number;
252
+ settleDate?: number | bigint;
253
253
  /**
254
254
  *
255
- * @type {number}
255
+ * @type {number | bigint}
256
256
  * @memberof GetDualInvestmentProductListResponseListInner
257
257
  */
258
- purchaseDecimal?: number;
258
+ purchaseDecimal?: number | bigint;
259
259
  /**
260
260
  *
261
- * @type {number}
261
+ * @type {number | bigint}
262
262
  * @memberof GetDualInvestmentProductListResponseListInner
263
263
  */
264
- purchaseEndTime?: number;
264
+ purchaseEndTime?: number | bigint;
265
265
  /**
266
266
  *
267
267
  * @type {boolean}
@@ -276,10 +276,10 @@ interface GetDualInvestmentProductListResponseListInner {
276
276
  apr?: string;
277
277
  /**
278
278
  *
279
- * @type {number}
279
+ * @type {number | bigint}
280
280
  * @memberof GetDualInvestmentProductListResponseListInner
281
281
  */
282
- orderId?: number;
282
+ orderId?: number | bigint;
283
283
  /**
284
284
  *
285
285
  * @type {string}
@@ -294,10 +294,10 @@ interface GetDualInvestmentProductListResponseListInner {
294
294
  maxAmount?: string;
295
295
  /**
296
296
  *
297
- * @type {number}
297
+ * @type {number | bigint}
298
298
  * @memberof GetDualInvestmentProductListResponseListInner
299
299
  */
300
- createTimestamp?: number;
300
+ createTimestamp?: number | bigint;
301
301
  /**
302
302
  *
303
303
  * @type {string}
@@ -339,10 +339,10 @@ interface GetDualInvestmentProductListResponseListInner {
339
339
  interface GetDualInvestmentProductListResponse {
340
340
  /**
341
341
  *
342
- * @type {number}
342
+ * @type {number | bigint}
343
343
  * @memberof GetDualInvestmentProductListResponse
344
344
  */
345
- total?: number;
345
+ total?: number | bigint;
346
346
  /**
347
347
  *
348
348
  * @type {Array<GetDualInvestmentProductListResponseListInner>}
@@ -371,10 +371,10 @@ interface GetDualInvestmentProductListResponse {
371
371
  interface SubscribeDualInvestmentProductsResponse {
372
372
  /**
373
373
  *
374
- * @type {number}
374
+ * @type {number | bigint}
375
375
  * @memberof SubscribeDualInvestmentProductsResponse
376
376
  */
377
- positionId?: number;
377
+ positionId?: number | bigint;
378
378
  /**
379
379
  *
380
380
  * @type {string}
@@ -395,10 +395,10 @@ interface SubscribeDualInvestmentProductsResponse {
395
395
  subscriptionAmount?: string;
396
396
  /**
397
397
  *
398
- * @type {number}
398
+ * @type {number | bigint}
399
399
  * @memberof SubscribeDualInvestmentProductsResponse
400
400
  */
401
- duration?: number;
401
+ duration?: number | bigint;
402
402
  /**
403
403
  *
404
404
  * @type {string}
@@ -413,10 +413,10 @@ interface SubscribeDualInvestmentProductsResponse {
413
413
  strikePrice?: string;
414
414
  /**
415
415
  *
416
- * @type {number}
416
+ * @type {number | bigint}
417
417
  * @memberof SubscribeDualInvestmentProductsResponse
418
418
  */
419
- settleDate?: number;
419
+ settleDate?: number | bigint;
420
420
  /**
421
421
  *
422
422
  * @type {string}
@@ -431,16 +431,16 @@ interface SubscribeDualInvestmentProductsResponse {
431
431
  apr?: string;
432
432
  /**
433
433
  *
434
- * @type {number}
434
+ * @type {number | bigint}
435
435
  * @memberof SubscribeDualInvestmentProductsResponse
436
436
  */
437
- orderId?: number;
437
+ orderId?: number | bigint;
438
438
  /**
439
439
  *
440
- * @type {number}
440
+ * @type {number | bigint}
441
441
  * @memberof SubscribeDualInvestmentProductsResponse
442
442
  */
443
- purchaseTime?: number;
443
+ purchaseTime?: number | bigint;
444
444
  /**
445
445
  *
446
446
  * @type {string}
@@ -825,6 +825,7 @@ declare class RestAPI {
825
825
  *
826
826
  * @summary Get Dual Investment product list
827
827
  * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.
828
+ *
828
829
  * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}
829
830
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
830
831
  * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}
@@ -837,6 +838,7 @@ declare class RestAPI {
837
838
  *
838
839
  * @summary Change Auto-Compound status(USER_DATA)
839
840
  * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.
841
+ *
840
842
  * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}
841
843
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
842
844
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}
@@ -849,6 +851,7 @@ declare class RestAPI {
849
851
  *
850
852
  * @summary Check Dual Investment accounts(USER_DATA)
851
853
  * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.
854
+ *
852
855
  * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}
853
856
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
854
857
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}
@@ -861,6 +864,7 @@ declare class RestAPI {
861
864
  *
862
865
  * @summary Get Dual Investment positions(USER_DATA)
863
866
  * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.
867
+ *
864
868
  * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}
865
869
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
866
870
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}
@@ -876,6 +880,7 @@ declare class RestAPI {
876
880
  *
877
881
  * @summary Subscribe Dual Investment products(USER_DATA)
878
882
  * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.
883
+ *
879
884
  * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}
880
885
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
881
886
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}
package/dist/index.js CHANGED
@@ -41,7 +41,7 @@ var import_common4 = require("@binance/common");
41
41
 
42
42
  // package.json
43
43
  var name = "@binance/dual-investment";
44
- var version = "3.0.8";
44
+ var version = "4.0.0";
45
45
 
46
46
  // src/rest-api/index.ts
47
47
  var rest_api_exports = {};
@@ -449,6 +449,7 @@ var RestAPI = class {
449
449
  *
450
450
  * @summary Get Dual Investment product list
451
451
  * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.
452
+ *
452
453
  * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}
453
454
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
454
455
  * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}
@@ -463,6 +464,7 @@ var RestAPI = class {
463
464
  *
464
465
  * @summary Change Auto-Compound status(USER_DATA)
465
466
  * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.
467
+ *
466
468
  * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}
467
469
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
468
470
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}
@@ -477,6 +479,7 @@ var RestAPI = class {
477
479
  *
478
480
  * @summary Check Dual Investment accounts(USER_DATA)
479
481
  * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.
482
+ *
480
483
  * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}
481
484
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
482
485
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}
@@ -491,6 +494,7 @@ var RestAPI = class {
491
494
  *
492
495
  * @summary Get Dual Investment positions(USER_DATA)
493
496
  * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.
497
+ *
494
498
  * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}
495
499
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
496
500
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}
@@ -508,6 +512,7 @@ var RestAPI = class {
508
512
  *
509
513
  * @summary Subscribe Dual Investment products(USER_DATA)
510
514
  * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.
515
+ *
511
516
  * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}
512
517
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
513
518
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts","../src/dual-investment.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts"],"sourcesContent":["export { DualInvestment, ConfigurationDualInvestment } from './dual-investment';\nexport * as DualInvestmentRestAPI from './rest-api';\n\nexport {\n DUAL_INVESTMENT_REST_API_PROD_URL,\n ConnectorClientError,\n RequiredError,\n UnauthorizedError,\n ForbiddenError,\n TooManyRequestsError,\n RateLimitBanError,\n ServerError,\n NetworkError,\n NotFoundError,\n BadRequestError,\n} from '@binance/common';\n","import {\n buildUserAgent,\n ConfigurationRestAPI,\n DUAL_INVESTMENT_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationDualInvestment {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class DualInvestment {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationDualInvestment) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || DUAL_INVESTMENT_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n","{\n \"name\": \"@binance/dual-investment\",\n \"description\": \"Official Binance Dual Investment Connector - A lightweight library that provides a convenient interface to Binance's Dual Investment REST API.\",\n \"version\": \"3.0.8\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsup\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Dual Investment\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsup\": \"^8.4.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"1.2.5\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetDualInvestmentProductListResponse } from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {string} optionType Input CALL or PUT\n * @param {string} exercisedCoin 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\n * @param {string} investCoin 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\n * @param {number} [pageSize] Default: 10, Maximum: 100\n * @param {number} [pageIndex] Default: 1\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentProductList: async (\n optionType: string,\n exercisedCoin: string,\n investCoin: string,\n pageSize?: number,\n pageIndex?: number,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'optionType' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'optionType', optionType);\n // verify required parameter 'exercisedCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'exercisedCoin', exercisedCoin);\n // verify required parameter 'investCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'investCoin', investCoin);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/list',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>>;\n}\n\n/**\n * Request parameters for getDualInvestmentProductList operation in MarketDataApi.\n * @interface GetDualInvestmentProductListRequest\n */\nexport interface GetDualInvestmentProductListRequest {\n /**\n * Input CALL or PUT\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly optionType: string;\n\n /**\n * 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\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly exercisedCoin: string;\n\n /**\n * 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\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly investCoin: string;\n\n /**\n * Default: 10, Maximum: 100\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number;\n\n /**\n * Default: 1\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}\n */\n public async getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(\n requestParameters?.optionType,\n requestParameters?.exercisedCoin,\n requestParameters?.investCoin,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentProductListResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {string} positionId Get positionId from `/sapi/v1/dci/product/positions`\n * @param {string} [autoCompoundPlan]\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n changeAutoCompoundStatus: async (\n positionId: string,\n autoCompoundPlan?: string,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'positionId' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'positionId', positionId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['AutoCompoundPlan'] = autoCompoundPlan;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/auto_compound/edit-status',\n method: 'POST',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/accounts',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {string} [status] `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.\n * @param {number} [pageSize] Default: 10, Maximum: 100\n * @param {number} [pageIndex] Default: 1\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: string,\n pageSize?: number,\n pageIndex?: number,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/positions',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {string} id get id from `/sapi/v1/dci/product/list`\n * @param {string} orderId get orderId from `/sapi/v1/dci/product/list`\n * @param {number} depositAmount the amount for subscribing\n * @param {string} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`:standard plan,`ADVANCED`:advanced plan\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n subscribeDualInvestmentProducts: async (\n id: string,\n orderId: string,\n depositAmount: number,\n autoCompoundPlan: string,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'id' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'id', id);\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'orderId', orderId);\n // verify required parameter 'depositAmount' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'depositAmount', depositAmount);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists(\n 'subscribeDualInvestmentProducts',\n 'autoCompoundPlan',\n autoCompoundPlan\n );\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/subscribe',\n method: 'POST',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TradeApi - interface\n * @interface TradeApi\n */\nexport interface TradeApiInterface {\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>;\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n checkDualInvestmentAccounts(\n requestParameters?: CheckDualInvestmentAccountsRequest\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>;\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getDualInvestmentPositions(\n requestParameters?: GetDualInvestmentPositionsRequest\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>;\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>;\n}\n\n/**\n * Request parameters for changeAutoCompoundStatus operation in TradeApi.\n * @interface ChangeAutoCompoundStatusRequest\n */\nexport interface ChangeAutoCompoundStatusRequest {\n /**\n * Get positionId from `/sapi/v1/dci/product/positions`\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly positionId: string;\n\n /**\n *\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly autoCompoundPlan?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for checkDualInvestmentAccounts operation in TradeApi.\n * @interface CheckDualInvestmentAccountsRequest\n */\nexport interface CheckDualInvestmentAccountsRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for getDualInvestmentPositions operation in TradeApi.\n * @interface GetDualInvestmentPositionsRequest\n */\nexport interface GetDualInvestmentPositionsRequest {\n /**\n * `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.\n * @type {string}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly status?: string;\n\n /**\n * Default: 10, Maximum: 100\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number;\n\n /**\n * Default: 1\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for subscribeDualInvestmentProducts operation in TradeApi.\n * @interface SubscribeDualInvestmentProductsRequest\n */\nexport interface SubscribeDualInvestmentProductsRequest {\n /**\n * get id from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly id: string;\n\n /**\n * get orderId from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly orderId: string;\n\n /**\n * the amount for subscribing\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly depositAmount: number;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`:standard plan,`ADVANCED`:advanced plan\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly autoCompoundPlan: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number;\n}\n\n/**\n * TradeApi - object-oriented interface\n * @class TradeApi\n */\nexport class TradeApi implements TradeApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}\n */\n public async changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(\n requestParameters?.positionId,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<ChangeAutoCompoundStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}\n */\n public async checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(\n requestParameters?.recvWindow\n );\n return sendRequest<CheckDualInvestmentAccountsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}\n */\n public async getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(\n requestParameters?.status,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentPositionsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}\n */\n public async subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(\n requestParameters?.id,\n requestParameters?.orderId,\n requestParameters?.depositAmount,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<SubscribeDualInvestmentProductsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { MarketDataApi } from './modules/market-data-api';\nimport { TradeApi } from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListRequest } from './modules/market-data-api';\nimport type {\n ChangeAutoCompoundStatusRequest,\n CheckDualInvestmentAccountsRequest,\n GetDualInvestmentPositionsRequest,\n SubscribeDualInvestmentProductsRequest,\n} from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListResponse } from './types';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n private tradeApi: TradeApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n this.tradeApi = new TradeApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined);\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined, {\n isSigned: true,\n });\n }\n\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n return this.marketDataApi.getDualInvestmentProductList(requestParameters);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n return this.tradeApi.changeAutoCompoundStatus(requestParameters);\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}\n */\n checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n return this.tradeApi.checkDualInvestmentAccounts(requestParameters);\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}\n */\n getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n return this.tradeApi.getDualInvestmentPositions(requestParameters);\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n return this.tradeApi.subscribeDualInvestmentProducts(requestParameters);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,iBAIO;;;ACHH,WAAQ;AAER,cAAW;;;ACHf;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACaA,oBAOO;AAMP,IAAM,iCAAiC,SAAU,eAAqC;AAClF,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBH,8BAA8B,OAC1B,YACA,eACA,YACA,UACA,WACA,eACuB;AAEvB,2CAAkB,gCAAgC,cAAc,UAAU;AAE1E,2CAAkB,gCAAgC,iBAAiB,aAAa;AAEhF,2CAAkB,gCAAgC,cAAc,UAAU;AAE1E,YAAM,yBAAkD,CAAC;AAEzD,UAAI,eAAe,UAAa,eAAe,MAAM;AACjD,+BAAuB,YAAY,IAAI;AAAA,MAC3C;AAEA,UAAI,kBAAkB,UAAa,kBAAkB,MAAM;AACvD,+BAAuB,eAAe,IAAI;AAAA,MAC9C;AAEA,UAAI,eAAe,UAAa,eAAe,MAAM;AACjD,+BAAuB,YAAY,IAAI;AAAA,MAC3C;AAEA,UAAI,aAAa,UAAa,aAAa,MAAM;AAC7C,+BAAuB,UAAU,IAAI;AAAA,MAC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AA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,2BACI,oBAAuD,CAAC,GACI;AAC5D,WAAO,KAAK,SAAS,2BAA2B,iBAAiB;AAAA,EACrE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBA,gCACI,mBACiE;AACjE,WAAO,KAAK,SAAS,gCAAgC,iBAAiB;AAAA,EAC1E;AACJ;;;ALzJO,IAAM,iBAAN,MAAqB;AAAA,EAGxB,YAAY,QAAqC;AAC7C,UAAM,gBAAY,+BAAe,MAAM,OAAO;AAE9C,QAAI,QAAQ,sBAAsB;AAC9B,YAAM,gBAAgB,IAAI;AAAA,QACtB,OAAO;AAAA,MACX;AAGA,oBAAc,WAAW,cAAc,YAAY;AACnD,oBAAc,cAAc,cAAc,eAAe,CAAC;AAC1D,oBAAc,YAAY,UAAU;AAAA,QAChC,GAAI,cAAc,YAAY,WAAW,CAAC;AAAA,QAC1C,cAAc;AAAA,MAClB;AACA,WAAK,UAAU,IAAI,QAAQ,aAAa;AAAA,IAC5C;AAAA,EACJ;AACJ;;;AD9BA,IAAAC,iBAYO;","names":["import_common","import_common","import_common","import_common"]}
1
+ {"version":3,"sources":["../src/index.ts","../src/dual-investment.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts"],"sourcesContent":["export { DualInvestment, ConfigurationDualInvestment } from './dual-investment';\nexport * as DualInvestmentRestAPI from './rest-api';\n\nexport {\n DUAL_INVESTMENT_REST_API_PROD_URL,\n ConnectorClientError,\n RequiredError,\n UnauthorizedError,\n ForbiddenError,\n TooManyRequestsError,\n RateLimitBanError,\n ServerError,\n NetworkError,\n NotFoundError,\n BadRequestError,\n} from '@binance/common';\n","import {\n buildUserAgent,\n ConfigurationRestAPI,\n DUAL_INVESTMENT_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationDualInvestment {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class DualInvestment {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationDualInvestment) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || DUAL_INVESTMENT_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n","{\n \"name\": \"@binance/dual-investment\",\n \"description\": \"Official Binance Dual Investment Connector - A lightweight library that provides a convenient interface to Binance's Dual Investment REST API.\",\n \"version\": \"4.0.0\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsup\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Dual Investment\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsup\": \"^8.4.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.0.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetDualInvestmentProductListResponse } from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {string} optionType Input CALL or PUT\n * @param {string} exercisedCoin 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\n * @param {string} investCoin 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\n * @param {number} [pageSize] Default: 10, Maximum: 100\n * @param {number} [pageIndex] Default: 1\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentProductList: async (\n optionType: string,\n exercisedCoin: string,\n investCoin: string,\n pageSize?: number,\n pageIndex?: number,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'optionType' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'optionType', optionType);\n // verify required parameter 'exercisedCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'exercisedCoin', exercisedCoin);\n // verify required parameter 'investCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'investCoin', investCoin);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/list',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>>;\n}\n\n/**\n * Request parameters for getDualInvestmentProductList operation in MarketDataApi.\n * @interface GetDualInvestmentProductListRequest\n */\nexport interface GetDualInvestmentProductListRequest {\n /**\n * Input CALL or PUT\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly optionType: string;\n\n /**\n * 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\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly exercisedCoin: string;\n\n /**\n * 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\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly investCoin: string;\n\n /**\n * Default: 10, Maximum: 100\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number;\n\n /**\n * Default: 1\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}\n */\n public async getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(\n requestParameters?.optionType,\n requestParameters?.exercisedCoin,\n requestParameters?.investCoin,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentProductListResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {string} positionId Get positionId from `/sapi/v1/dci/product/positions`\n * @param {string} [autoCompoundPlan]\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n changeAutoCompoundStatus: async (\n positionId: string,\n autoCompoundPlan?: string,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'positionId' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'positionId', positionId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['AutoCompoundPlan'] = autoCompoundPlan;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/auto_compound/edit-status',\n method: 'POST',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/accounts',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {string} [status] `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.\n * @param {number} [pageSize] Default: 10, Maximum: 100\n * @param {number} [pageIndex] Default: 1\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: string,\n pageSize?: number,\n pageIndex?: number,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/positions',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {string} id get id from `/sapi/v1/dci/product/list`\n * @param {string} orderId get orderId from `/sapi/v1/dci/product/list`\n * @param {number} depositAmount the amount for subscribing\n * @param {string} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`:standard plan,`ADVANCED`:advanced plan\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n subscribeDualInvestmentProducts: async (\n id: string,\n orderId: string,\n depositAmount: number,\n autoCompoundPlan: string,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'id' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'id', id);\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'orderId', orderId);\n // verify required parameter 'depositAmount' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'depositAmount', depositAmount);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists(\n 'subscribeDualInvestmentProducts',\n 'autoCompoundPlan',\n autoCompoundPlan\n );\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/subscribe',\n method: 'POST',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TradeApi - interface\n * @interface TradeApi\n */\nexport interface TradeApiInterface {\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>;\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n checkDualInvestmentAccounts(\n requestParameters?: CheckDualInvestmentAccountsRequest\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>;\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getDualInvestmentPositions(\n requestParameters?: GetDualInvestmentPositionsRequest\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>;\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>;\n}\n\n/**\n * Request parameters for changeAutoCompoundStatus operation in TradeApi.\n * @interface ChangeAutoCompoundStatusRequest\n */\nexport interface ChangeAutoCompoundStatusRequest {\n /**\n * Get positionId from `/sapi/v1/dci/product/positions`\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly positionId: string;\n\n /**\n *\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly autoCompoundPlan?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for checkDualInvestmentAccounts operation in TradeApi.\n * @interface CheckDualInvestmentAccountsRequest\n */\nexport interface CheckDualInvestmentAccountsRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for getDualInvestmentPositions operation in TradeApi.\n * @interface GetDualInvestmentPositionsRequest\n */\nexport interface GetDualInvestmentPositionsRequest {\n /**\n * `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.\n * @type {string}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly status?: string;\n\n /**\n * Default: 10, Maximum: 100\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number;\n\n /**\n * Default: 1\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for subscribeDualInvestmentProducts operation in TradeApi.\n * @interface SubscribeDualInvestmentProductsRequest\n */\nexport interface SubscribeDualInvestmentProductsRequest {\n /**\n * get id from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly id: string;\n\n /**\n * get orderId from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly orderId: string;\n\n /**\n * the amount for subscribing\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly depositAmount: number;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`:standard plan,`ADVANCED`:advanced plan\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly autoCompoundPlan: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number;\n}\n\n/**\n * TradeApi - object-oriented interface\n * @class TradeApi\n */\nexport class TradeApi implements TradeApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}\n */\n public async changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(\n requestParameters?.positionId,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<ChangeAutoCompoundStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}\n */\n public async checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(\n requestParameters?.recvWindow\n );\n return sendRequest<CheckDualInvestmentAccountsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}\n */\n public async getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(\n requestParameters?.status,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentPositionsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}\n */\n public async subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(\n requestParameters?.id,\n requestParameters?.orderId,\n requestParameters?.depositAmount,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<SubscribeDualInvestmentProductsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { MarketDataApi } from './modules/market-data-api';\nimport { TradeApi } from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListRequest } from './modules/market-data-api';\nimport type {\n ChangeAutoCompoundStatusRequest,\n CheckDualInvestmentAccountsRequest,\n GetDualInvestmentPositionsRequest,\n SubscribeDualInvestmentProductsRequest,\n} from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListResponse } from './types';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n private tradeApi: TradeApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n this.tradeApi = new TradeApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined);\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined, {\n isSigned: true,\n });\n }\n\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n return this.marketDataApi.getDualInvestmentProductList(requestParameters);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n return this.tradeApi.changeAutoCompoundStatus(requestParameters);\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}\n */\n checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n return this.tradeApi.checkDualInvestmentAccounts(requestParameters);\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}\n */\n getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n return this.tradeApi.getDualInvestmentPositions(requestParameters);\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<Subscribe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O,KAAK,SAAS,gCAAgC,iBAAiB;AAAA,EAC1E;AACJ;;;AL9JO,IAAM,iBAAN,MAAqB;AAAA,EAGxB,YAAY,QAAqC;AAC7C,UAAM,gBAAY,+BAAe,MAAM,OAAO;AAE9C,QAAI,QAAQ,sBAAsB;AAC9B,YAAM,gBAAgB,IAAI;AAAA,QACtB,OAAO;AAAA,MACX;AAGA,oBAAc,WAAW,cAAc,YAAY;AACnD,oBAAc,cAAc,cAAc,eAAe,CAAC;AAC1D,oBAAc,YAAY,UAAU;AAAA,QAChC,GAAI,cAAc,YAAY,WAAW,CAAC;AAAA,QAC1C,cAAc;AAAA,MAClB;AACA,WAAK,UAAU,IAAI,QAAQ,aAAa;AAAA,IAC5C;AAAA,EACJ;AACJ;;;AD9BA,IAAAC,iBAYO;","names":["import_common","import_common","import_common","import_common"]}
package/dist/index.mjs CHANGED
@@ -13,7 +13,7 @@ import {
13
13
 
14
14
  // package.json
15
15
  var name = "@binance/dual-investment";
16
- var version = "3.0.8";
16
+ var version = "4.0.0";
17
17
 
18
18
  // src/rest-api/index.ts
19
19
  var rest_api_exports = {};
@@ -427,6 +427,7 @@ var RestAPI = class {
427
427
  *
428
428
  * @summary Get Dual Investment product list
429
429
  * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.
430
+ *
430
431
  * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}
431
432
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
432
433
  * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}
@@ -441,6 +442,7 @@ var RestAPI = class {
441
442
  *
442
443
  * @summary Change Auto-Compound status(USER_DATA)
443
444
  * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.
445
+ *
444
446
  * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}
445
447
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
446
448
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}
@@ -455,6 +457,7 @@ var RestAPI = class {
455
457
  *
456
458
  * @summary Check Dual Investment accounts(USER_DATA)
457
459
  * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.
460
+ *
458
461
  * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}
459
462
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
460
463
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}
@@ -469,6 +472,7 @@ var RestAPI = class {
469
472
  *
470
473
  * @summary Get Dual Investment positions(USER_DATA)
471
474
  * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.
475
+ *
472
476
  * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}
473
477
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
474
478
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}
@@ -486,6 +490,7 @@ var RestAPI = class {
486
490
  *
487
491
  * @summary Subscribe Dual Investment products(USER_DATA)
488
492
  * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.
493
+ *
489
494
  * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}
490
495
  * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
491
496
  * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/dual-investment.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts","../src/index.ts"],"sourcesContent":["import {\n buildUserAgent,\n ConfigurationRestAPI,\n DUAL_INVESTMENT_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationDualInvestment {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class DualInvestment {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationDualInvestment) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || DUAL_INVESTMENT_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n","{\n \"name\": \"@binance/dual-investment\",\n \"description\": \"Official Binance Dual Investment Connector - A lightweight library that provides a convenient interface to Binance's Dual Investment REST API.\",\n \"version\": \"3.0.8\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsup\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Dual Investment\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsup\": \"^8.4.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"1.2.5\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetDualInvestmentProductListResponse } from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {string} optionType Input CALL or PUT\n * @param {string} exercisedCoin 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\n * @param {string} investCoin 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\n * @param {number} [pageSize] Default: 10, Maximum: 100\n * @param {number} [pageIndex] Default: 1\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentProductList: async (\n optionType: string,\n exercisedCoin: string,\n investCoin: string,\n pageSize?: number,\n pageIndex?: number,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'optionType' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'optionType', optionType);\n // verify required parameter 'exercisedCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'exercisedCoin', exercisedCoin);\n // verify required parameter 'investCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'investCoin', investCoin);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/list',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>>;\n}\n\n/**\n * Request parameters for getDualInvestmentProductList operation in MarketDataApi.\n * @interface GetDualInvestmentProductListRequest\n */\nexport interface GetDualInvestmentProductListRequest {\n /**\n * Input CALL or PUT\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly optionType: string;\n\n /**\n * 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\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly exercisedCoin: string;\n\n /**\n * 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\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly investCoin: string;\n\n /**\n * Default: 10, Maximum: 100\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number;\n\n /**\n * Default: 1\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}\n */\n public async getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(\n requestParameters?.optionType,\n requestParameters?.exercisedCoin,\n requestParameters?.investCoin,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentProductListResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {string} positionId Get positionId from `/sapi/v1/dci/product/positions`\n * @param {string} [autoCompoundPlan]\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n changeAutoCompoundStatus: async (\n positionId: string,\n autoCompoundPlan?: string,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'positionId' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'positionId', positionId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['AutoCompoundPlan'] = autoCompoundPlan;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/auto_compound/edit-status',\n method: 'POST',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/accounts',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {string} [status] `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.\n * @param {number} [pageSize] Default: 10, Maximum: 100\n * @param {number} [pageIndex] Default: 1\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: string,\n pageSize?: number,\n pageIndex?: number,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/positions',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {string} id get id from `/sapi/v1/dci/product/list`\n * @param {string} orderId get orderId from `/sapi/v1/dci/product/list`\n * @param {number} depositAmount the amount for subscribing\n * @param {string} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`:standard plan,`ADVANCED`:advanced plan\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n subscribeDualInvestmentProducts: async (\n id: string,\n orderId: string,\n depositAmount: number,\n autoCompoundPlan: string,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'id' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'id', id);\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'orderId', orderId);\n // verify required parameter 'depositAmount' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'depositAmount', depositAmount);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists(\n 'subscribeDualInvestmentProducts',\n 'autoCompoundPlan',\n autoCompoundPlan\n );\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/subscribe',\n method: 'POST',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TradeApi - interface\n * @interface TradeApi\n */\nexport interface TradeApiInterface {\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>;\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n checkDualInvestmentAccounts(\n requestParameters?: CheckDualInvestmentAccountsRequest\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>;\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getDualInvestmentPositions(\n requestParameters?: GetDualInvestmentPositionsRequest\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>;\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>;\n}\n\n/**\n * Request parameters for changeAutoCompoundStatus operation in TradeApi.\n * @interface ChangeAutoCompoundStatusRequest\n */\nexport interface ChangeAutoCompoundStatusRequest {\n /**\n * Get positionId from `/sapi/v1/dci/product/positions`\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly positionId: string;\n\n /**\n *\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly autoCompoundPlan?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for checkDualInvestmentAccounts operation in TradeApi.\n * @interface CheckDualInvestmentAccountsRequest\n */\nexport interface CheckDualInvestmentAccountsRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for getDualInvestmentPositions operation in TradeApi.\n * @interface GetDualInvestmentPositionsRequest\n */\nexport interface GetDualInvestmentPositionsRequest {\n /**\n * `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.\n * @type {string}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly status?: string;\n\n /**\n * Default: 10, Maximum: 100\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number;\n\n /**\n * Default: 1\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for subscribeDualInvestmentProducts operation in TradeApi.\n * @interface SubscribeDualInvestmentProductsRequest\n */\nexport interface SubscribeDualInvestmentProductsRequest {\n /**\n * get id from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly id: string;\n\n /**\n * get orderId from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly orderId: string;\n\n /**\n * the amount for subscribing\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly depositAmount: number;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`:standard plan,`ADVANCED`:advanced plan\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly autoCompoundPlan: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number;\n}\n\n/**\n * TradeApi - object-oriented interface\n * @class TradeApi\n */\nexport class TradeApi implements TradeApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}\n */\n public async changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(\n requestParameters?.positionId,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<ChangeAutoCompoundStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}\n */\n public async checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(\n requestParameters?.recvWindow\n );\n return sendRequest<CheckDualInvestmentAccountsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}\n */\n public async getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(\n requestParameters?.status,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentPositionsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}\n */\n public async subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(\n requestParameters?.id,\n requestParameters?.orderId,\n requestParameters?.depositAmount,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<SubscribeDualInvestmentProductsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { MarketDataApi } from './modules/market-data-api';\nimport { TradeApi } from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListRequest } from './modules/market-data-api';\nimport type {\n ChangeAutoCompoundStatusRequest,\n CheckDualInvestmentAccountsRequest,\n GetDualInvestmentPositionsRequest,\n SubscribeDualInvestmentProductsRequest,\n} from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListResponse } from './types';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n private tradeApi: TradeApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n this.tradeApi = new TradeApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined);\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined, {\n isSigned: true,\n });\n }\n\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n return this.marketDataApi.getDualInvestmentProductList(requestParameters);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n return this.tradeApi.changeAutoCompoundStatus(requestParameters);\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}\n */\n checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n return this.tradeApi.checkDualInvestmentAccounts(requestParameters);\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}\n */\n getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n return this.tradeApi.getDualInvestmentPositions(requestParameters);\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n return this.tradeApi.subscribeDualInvestmentProducts(requestParameters);\n }\n}\n","export { DualInvestment, ConfigurationDualInvestment } from './dual-investment';\nexport * as DualInvestmentRestAPI from './rest-api';\n\nexport {\n DUAL_INVESTMENT_REST_API_PROD_URL,\n ConnectorClientError,\n RequiredError,\n UnauthorizedError,\n ForbiddenError,\n TooManyRequestsError,\n RateLimitBanError,\n ServerError,\n NetworkError,\n NotFoundError,\n BadRequestError,\n} from '@binance/common';\n"],"mappings":";;;;;;;AAAA;AAAA,EACI;AAAA,EACA,wBAAAA;AAAA,EACA;AAAA,OACG;;;ACHH,WAAQ;AAER,cAAW;;;ACHf;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACaA;AAAA,EAII;AAAA,EACA;AAAA,OAEG;AAMP,IAAM,iCAAiC,SAAU,eAAqC;AAClF,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBH,8BAA8B,OAC1B,YACA,eACA,YACA,UACA,WACA,eACuB;AAEvB,wBAAkB,gCAAgC,cAAc,UAAU;AAE1E,wBAAkB,gCAAgC,iBAAiB,aAAa;AAEhF,wBAAkB,gCAAgC,cAAc,UAAU;AAE1E,YAAM,yBAAkD,CAAC;AAEzD,UAAI,eAAe,UAAa,eAAe,MAAM;AACjD,+BAAuB,YAAY,IAAI;AAAA,MAC3C;AAEA,UAAI,kBAAkB,UAAa,kBAAkB,MAAM;AACvD,+BAAuB,eAAe,IAAI;AAAA,MAC9C;AAEA,UAAI,eAAe,UAAa,eAAe,MAAM;AACjD,+BAAuB,YAAY,IAAI;AAAA,MAC3C;AAEA,UAAI,aAAa,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;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,4BACI,oBAAwD,CAAC,GACI;AAC7D,WAAO,KAAK,SAAS,4BAA4B,iBAAiB;AAAA,EACtE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAaA,2BACI,oBAAuD,CAAC,GACI;AAC5D,WAAO,KAAK,SAAS,2BAA2B,iBAAiB;AAAA,EACrE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAgBA,gCACI,mBACiE;AACjE,WAAO,KAAK,SAAS,gCAAgC,iBAAiB;AAAA,EAC1E;AACJ;;;ALzJO,IAAM,iBAAN,MAAqB;AAAA,EAGxB,YAAY,QAAqC;AAC7C,UAAM,YAAY,eAAe,MAAM,OAAO;AAE9C,QAAI,QAAQ,sBAAsB;AAC9B,YAAM,gBAAgB,IAAIC;AAAA,QACtB,OAAO;AAAA,MACX;AAGA,oBAAc,WAAW,cAAc,YAAY;AACnD,oBAAc,cAAc,cAAc,eAAe,CAAC;AAC1D,oBAAc,YAAY,UAAU;AAAA,QAChC,GAAI,cAAc,YAAY,WAAW,CAAC;AAAA,QAC1C,cAAc;AAAA,MAClB;AACA,WAAK,UAAU,IAAI,QAAQ,aAAa;AAAA,IAC5C;AAAA,EACJ;AACJ;;;AM9BA;AAAA,EACI,qCAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;","names":["ConfigurationRestAPI","assertParamExists","sendRequest","sendRequest","sendRequest","ConfigurationRestAPI","DUAL_INVESTMENT_REST_API_PROD_URL"]}
1
+ {"version":3,"sources":["../src/dual-investment.ts","../package.json","../src/rest-api/index.ts","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts","../src/index.ts"],"sourcesContent":["import {\n buildUserAgent,\n ConfigurationRestAPI,\n DUAL_INVESTMENT_REST_API_PROD_URL,\n} from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationDualInvestment {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class DualInvestment {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationDualInvestment) {\n const userAgent = buildUserAgent(name, version);\n\n if (config?.configurationRestAPI) {\n const configRestAPI = new ConfigurationRestAPI(\n config.configurationRestAPI\n ) as ConfigurationRestAPI & {\n baseOptions: Record<string, unknown>;\n };\n configRestAPI.basePath = configRestAPI.basePath || DUAL_INVESTMENT_REST_API_PROD_URL;\n configRestAPI.baseOptions = configRestAPI.baseOptions || {};\n configRestAPI.baseOptions.headers = {\n ...(configRestAPI.baseOptions.headers || {}),\n 'User-Agent': userAgent,\n };\n this.restAPI = new RestAPI(configRestAPI);\n }\n }\n}\n","{\n \"name\": \"@binance/dual-investment\",\n \"description\": \"Official Binance Dual Investment Connector - A lightweight library that provides a convenient interface to Binance's Dual Investment REST API.\",\n \"version\": \"4.0.0\",\n \"main\": \"./dist/index.js\",\n \"module\": \"./dist/index.mjs\",\n \"types\": \"./dist/index.d.ts\",\n \"exports\": {\n \".\": {\n \"require\": \"./dist/index.js\",\n \"import\": \"./dist/index.mjs\"\n }\n },\n \"scripts\": {\n \"prepublishOnly\": \"npm run build\",\n \"build\": \"npm run clean && tsup\",\n \"typecheck\": \"tsc --noEmit\",\n \"clean\": \"rm -rf dist\",\n \"test\": \"npx jest --maxWorkers=4 --bail\",\n \"test:watch\": \"npx jest --watch\",\n \"format\": \"npx prettier --ignore-path .prettierignore --write .\",\n \"lint\": \"npx eslint '**/*.ts' --fix\"\n },\n \"keywords\": [\n \"Binance\",\n \"API\",\n \"Dual Investment\",\n \"Connector\",\n \"REST\",\n \"Trading\"\n ],\n \"author\": \"Binance\",\n \"license\": \"MIT\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"https://github.com/binance/binance-connector-js.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/binance/binance-connector-js/issues\"\n },\n \"homepage\": \"https://github.com/binance/binance-connector-js#readme\",\n \"files\": [\n \"dist\"\n ],\n \"devDependencies\": {\n \"@types/jest\": \"^29.5.4\",\n \"@types/node\": \"^20.17.24\",\n \"eslint\": \"8.57.0\",\n \"jest\": \"^29.6.4\",\n \"json-with-bigint\": \"^3.4.4\",\n \"prettier\": \"^3.3.3\",\n \"ts-jest\": \"^29.1.1\",\n \"ts-node\": \"^10.9.1\",\n \"tsup\": \"^8.4.0\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.0.0\",\n \"axios\": \"^1.7.4\"\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nexport * from './types';\nexport * from './modules';\nexport * from './rest-api';\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type { GetDualInvestmentProductListResponse } from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {string} optionType Input CALL or PUT\n * @param {string} exercisedCoin 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\n * @param {string} investCoin 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\n * @param {number} [pageSize] Default: 10, Maximum: 100\n * @param {number} [pageIndex] Default: 1\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentProductList: async (\n optionType: string,\n exercisedCoin: string,\n investCoin: string,\n pageSize?: number,\n pageIndex?: number,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'optionType' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'optionType', optionType);\n // verify required parameter 'exercisedCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'exercisedCoin', exercisedCoin);\n // verify required parameter 'investCoin' is not null or undefined\n assertParamExists('getDualInvestmentProductList', 'investCoin', investCoin);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/list',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * MarketDataApi - interface\n * @interface MarketDataApi\n */\nexport interface MarketDataApiInterface {\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>>;\n}\n\n/**\n * Request parameters for getDualInvestmentProductList operation in MarketDataApi.\n * @interface GetDualInvestmentProductListRequest\n */\nexport interface GetDualInvestmentProductListRequest {\n /**\n * Input CALL or PUT\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly optionType: string;\n\n /**\n * 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\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly exercisedCoin: string;\n\n /**\n * 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\n * @type {string}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly investCoin: string;\n\n /**\n * Default: 10, Maximum: 100\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number;\n\n /**\n * Default: 1\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number;\n}\n\n/**\n * MarketDataApi - object-oriented interface\n * @class MarketDataApi\n */\nexport class MarketDataApi implements MarketDataApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);\n }\n\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}\n */\n public async getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(\n requestParameters?.optionType,\n requestParameters?.exercisedCoin,\n requestParameters?.investCoin,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentProductListResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport {\n ConfigurationRestAPI,\n TimeUnit,\n RestApiResponse,\n assertParamExists,\n sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {string} positionId Get positionId from `/sapi/v1/dci/product/positions`\n * @param {string} [autoCompoundPlan]\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n changeAutoCompoundStatus: async (\n positionId: string,\n autoCompoundPlan?: string,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'positionId' is not null or undefined\n assertParamExists('changeAutoCompoundStatus', 'positionId', positionId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['AutoCompoundPlan'] = autoCompoundPlan;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/auto_compound/edit-status',\n method: 'POST',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/accounts',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {string} [status] `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.\n * @param {number} [pageSize] Default: 10, Maximum: 100\n * @param {number} [pageIndex] Default: 1\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: string,\n pageSize?: number,\n pageIndex?: number,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/positions',\n method: 'GET',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {string} id get id from `/sapi/v1/dci/product/list`\n * @param {string} orderId get orderId from `/sapi/v1/dci/product/list`\n * @param {number} depositAmount the amount for subscribing\n * @param {string} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`:standard plan,`ADVANCED`:advanced plan\n * @param {number} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n subscribeDualInvestmentProducts: async (\n id: string,\n orderId: string,\n depositAmount: number,\n autoCompoundPlan: string,\n recvWindow?: number\n ): Promise<RequestArgs> => {\n // verify required parameter 'id' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'id', id);\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'orderId', orderId);\n // verify required parameter 'depositAmount' is not null or undefined\n assertParamExists('subscribeDualInvestmentProducts', 'depositAmount', depositAmount);\n // verify required parameter 'autoCompoundPlan' is not null or undefined\n assertParamExists(\n 'subscribeDualInvestmentProducts',\n 'autoCompoundPlan',\n autoCompoundPlan\n );\n\n const localVarQueryParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\n }\n\n if (recvWindow !== undefined && recvWindow !== null) {\n localVarQueryParameter['recvWindow'] = recvWindow;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/dci/product/subscribe',\n method: 'POST',\n params: localVarQueryParameter,\n timeUnit: _timeUnit,\n };\n },\n };\n};\n\n/**\n * TradeApi - interface\n * @interface TradeApi\n */\nexport interface TradeApiInterface {\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>;\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n checkDualInvestmentAccounts(\n requestParameters?: CheckDualInvestmentAccountsRequest\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>;\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getDualInvestmentPositions(\n requestParameters?: GetDualInvestmentPositionsRequest\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>;\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>;\n}\n\n/**\n * Request parameters for changeAutoCompoundStatus operation in TradeApi.\n * @interface ChangeAutoCompoundStatusRequest\n */\nexport interface ChangeAutoCompoundStatusRequest {\n /**\n * Get positionId from `/sapi/v1/dci/product/positions`\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly positionId: string;\n\n /**\n *\n * @type {string}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly autoCompoundPlan?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for checkDualInvestmentAccounts operation in TradeApi.\n * @interface CheckDualInvestmentAccountsRequest\n */\nexport interface CheckDualInvestmentAccountsRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for getDualInvestmentPositions operation in TradeApi.\n * @interface GetDualInvestmentPositionsRequest\n */\nexport interface GetDualInvestmentPositionsRequest {\n /**\n * `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.\n * @type {string}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly status?: string;\n\n /**\n * Default: 10, Maximum: 100\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number;\n\n /**\n * Default: 1\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number;\n}\n\n/**\n * Request parameters for subscribeDualInvestmentProducts operation in TradeApi.\n * @interface SubscribeDualInvestmentProductsRequest\n */\nexport interface SubscribeDualInvestmentProductsRequest {\n /**\n * get id from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly id: string;\n\n /**\n * get orderId from `/sapi/v1/dci/product/list`\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly orderId: string;\n\n /**\n * the amount for subscribing\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly depositAmount: number;\n\n /**\n * `NONE`: switch off the plan, `STANDARD`:standard plan,`ADVANCED`:advanced plan\n * @type {string}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly autoCompoundPlan: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number;\n}\n\n/**\n * TradeApi - object-oriented interface\n * @class TradeApi\n */\nexport class TradeApi implements TradeApiInterface {\n private readonly configuration: ConfigurationRestAPI;\n private localVarAxiosParamCreator;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}\n */\n public async changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(\n requestParameters?.positionId,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<ChangeAutoCompoundStatusResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}\n */\n public async checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(\n requestParameters?.recvWindow\n );\n return sendRequest<CheckDualInvestmentAccountsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}\n */\n public async getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(\n requestParameters?.status,\n requestParameters?.pageSize,\n requestParameters?.pageIndex,\n requestParameters?.recvWindow\n );\n return sendRequest<GetDualInvestmentPositionsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}\n */\n public async subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(\n requestParameters?.id,\n requestParameters?.orderId,\n requestParameters?.depositAmount,\n requestParameters?.autoCompoundPlan,\n requestParameters?.recvWindow\n );\n return sendRequest<SubscribeDualInvestmentProductsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.params,\n localVarAxiosArgs?.timeUnit,\n { isSigned: true }\n );\n }\n}\n","/**\n * Binance Dual Investment REST API\n *\n * OpenAPI Specification for the Binance Dual Investment REST API\n *\n * The version of the OpenAPI document: 1.0.0\n *\n *\n * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).\n * https://openapi-generator.tech\n * Do not edit the class manually.\n */\n\nimport { ConfigurationRestAPI, RestApiResponse, sendRequest } from '@binance/common';\nimport { MarketDataApi } from './modules/market-data-api';\nimport { TradeApi } from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListRequest } from './modules/market-data-api';\nimport type {\n ChangeAutoCompoundStatusRequest,\n CheckDualInvestmentAccountsRequest,\n GetDualInvestmentPositionsRequest,\n SubscribeDualInvestmentProductsRequest,\n} from './modules/trade-api';\n\nimport type { GetDualInvestmentProductListResponse } from './types';\nimport type {\n ChangeAutoCompoundStatusResponse,\n CheckDualInvestmentAccountsResponse,\n GetDualInvestmentPositionsResponse,\n SubscribeDualInvestmentProductsResponse,\n} from './types';\n\nexport class RestAPI {\n private configuration: ConfigurationRestAPI;\n private marketDataApi: MarketDataApi;\n private tradeApi: TradeApi;\n\n constructor(configuration: ConfigurationRestAPI) {\n this.configuration = configuration;\n this.marketDataApi = new MarketDataApi(configuration);\n this.tradeApi = new TradeApi(configuration);\n }\n\n /**\n * Generic function to send a request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined);\n }\n\n /**\n * Generic function to send a signed request.\n * @param endpoint - The API endpoint to call.\n * @param method - HTTP method to use (GET, POST, DELETE, etc.).\n * @param params - Query parameters for the request.\n *\n * @returns A promise resolving to the response data object.\n */\n sendSignedRequest<T>(\n endpoint: string,\n method: 'GET' | 'POST' | 'DELETE' | 'PUT' | 'PATCH',\n params: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(this.configuration, endpoint, method, params, undefined, {\n isSigned: true,\n });\n }\n\n /**\n * Get Dual Investment product list\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment product list\n * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}\n */\n getDualInvestmentProductList(\n requestParameters: GetDualInvestmentProductListRequest\n ): Promise<RestApiResponse<GetDualInvestmentProductListResponse>> {\n return this.marketDataApi.getDualInvestmentProductList(requestParameters);\n }\n\n /**\n * Change Auto-Compound status\n *\n * Weight: 1(IP)\n *\n * @summary Change Auto-Compound status(USER_DATA)\n * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}\n */\n changeAutoCompoundStatus(\n requestParameters: ChangeAutoCompoundStatusRequest\n ): Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>> {\n return this.tradeApi.changeAutoCompoundStatus(requestParameters);\n }\n\n /**\n * Check Dual Investment accounts\n *\n * Weight: 1(IP)\n *\n * @summary Check Dual Investment accounts(USER_DATA)\n * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}\n */\n checkDualInvestmentAccounts(\n requestParameters: CheckDualInvestmentAccountsRequest = {}\n ): Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>> {\n return this.tradeApi.checkDualInvestmentAccounts(requestParameters);\n }\n\n /**\n * Get Dual Investment positions (batch)\n *\n * Weight: 1(IP)\n *\n * @summary Get Dual Investment positions(USER_DATA)\n * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}\n */\n getDualInvestmentPositions(\n requestParameters: GetDualInvestmentPositionsRequest = {}\n ): Promise<RestApiResponse<GetDualInvestmentPositionsResponse>> {\n return this.tradeApi.getDualInvestmentPositions(requestParameters);\n }\n\n /**\n * Subscribe Dual Investment products\n *\n * Products are not available. // this means APR changes to lower value, or orders are not unavailable.\n * Failed. This means System or network errors.\n *\n * Weight: 1(IP)\n *\n * @summary Subscribe Dual Investment products(USER_DATA)\n * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}\n */\n subscribeDualInvestmentProducts(\n requestParameters: SubscribeDualInvestmentProductsRequest\n ): Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>> {\n return this.tradeApi.subscribeDualInvestmentProducts(requestParameters);\n }\n}\n","export { DualInvestment, ConfigurationDualInvestment } from './dual-investment';\nexport * as DualInvestmentRestAPI from './rest-api';\n\nexport {\n DUAL_INVESTMENT_REST_API_PROD_URL,\n ConnectorClientError,\n RequiredError,\n UnauthorizedError,\n ForbiddenError,\n TooManyRequestsError,\n RateLimitBanError,\n ServerError,\n NetworkError,\n NotFoundError,\n BadRequestError,\n} from '@binance/common';\n"],"mappings":";;;;;;;AAAA;AAAA,EACI;AAAA,EACA,wBAAAA;AAAA,EACA;AAAA,OACG;;;ACHH,WAAQ;AAER,cAAW;;;ACHf;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACaA;AAAA,EAII;AAAA,EACA;AAAA,OAEG;AAMP,IAAM,iCAAiC,SAAU,eAAqC;AAClF,SAAO;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAgBH,8BAA8B,OAC1B,YACA,eACA,YACA,UACA,WACA,eACuB;AAEvB,wBAAkB,gCAAgC,cAAc,UAAU;AAE1E,wBAAkB,gCAAgC,iBAAiB,aAAa;AAEhF,wBAAkB,gCAAgC,cAAc,UAAU;AAE1E,YAAM,yBAAkD,CAAC;AAEzD,UAAI,eAAe,UAAa,eAAe,MAAM;AACjD,+BAAuB,YAAY,IAAI;AAAA,MAC3C;AAEA,UAAI,kBAAkB,UAAa,kBAAkB,MAAM;AACvD,+BAAuB,eAAe,IAAI;AAAA,MAC9C;AAEA,UAAI,eAAe,UAAa,eAAe,MAAM;AACjD,+BAAuB,YAAY,IAAI;AAAA,MAC3C;AAEA,UAAI,aAAa,UAAa,aAAa,MAAM;AAC7C,+BAAuB,UAAU,IAAI;AAAA,MACzC;AAEA,UAAI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,CAAC,GACI;AAC7D,WAAO,KAAK,SAAS,4BAA4B,iBAAiB;AAAA,EACtE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcA,2BACI,oBAAuD,CAAC,GACI;AAC5D,WAAO,KAAK,SAAS,2BAA2B,iBAAiB;AAAA,EACrE;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAiBA,gCACI,mBACiE;AACjE,WAAO,KAAK,SAAS,gCAAgC,iBAAiB;AAAA,EAC1E;AACJ;;;AL9JO,IAAM,iBAAN,MAAqB;AAAA,EAGxB,YAAY,QAAqC;AAC7C,UAAM,YAAY,eAAe,MAAM,OAAO;AAE9C,QAAI,QAAQ,sBAAsB;AAC9B,YAAM,gBAAgB,IAAIC;AAAA,QACtB,OAAO;AAAA,MACX;AAGA,oBAAc,WAAW,cAAc,YAAY;AACnD,oBAAc,cAAc,cAAc,eAAe,CAAC;AAC1D,oBAAc,YAAY,UAAU;AAAA,QAChC,GAAI,cAAc,YAAY,WAAW,CAAC;AAAA,QAC1C,cAAc;AAAA,MAClB;AACA,WAAK,UAAU,IAAI,QAAQ,aAAa;AAAA,IAC5C;AAAA,EACJ;AACJ;;;AM9BA;AAAA,EACI,qCAAAC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACG;","names":["ConfigurationRestAPI","assertParamExists","sendRequest","sendRequest","sendRequest","ConfigurationRestAPI","DUAL_INVESTMENT_REST_API_PROD_URL"]}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@binance/dual-investment",
3
3
  "description": "Official Binance Dual Investment Connector - A lightweight library that provides a convenient interface to Binance's Dual Investment REST API.",
4
- "version": "3.0.8",
4
+ "version": "4.0.0",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -47,6 +47,7 @@
47
47
  "@types/node": "^20.17.24",
48
48
  "eslint": "8.57.0",
49
49
  "jest": "^29.6.4",
50
+ "json-with-bigint": "^3.4.4",
50
51
  "prettier": "^3.3.3",
51
52
  "ts-jest": "^29.1.1",
52
53
  "ts-node": "^10.9.1",
@@ -55,7 +56,7 @@
55
56
  "typescript-eslint": "^8.24.0"
56
57
  },
57
58
  "dependencies": {
58
- "@binance/common": "1.2.5",
59
+ "@binance/common": "2.0.0",
59
60
  "axios": "^1.7.4"
60
61
  }
61
62
  }