@binance/dual-investment 4.1.14 → 4.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -14,7 +14,7 @@ let __binance_common = require("@binance/common");
14
14
 
15
15
  //#region package.json
16
16
  var name = "@binance/dual-investment";
17
- var version = "4.1.14";
17
+ var version = "4.1.16";
18
18
 
19
19
  //#endregion
20
20
  //#region src/rest-api/modules/market-data-api.ts
@@ -40,6 +40,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
40
40
  (0, __binance_common.assertParamExists)("getDualInvestmentProductList", "investCoin", investCoin);
41
41
  const localVarQueryParameter = {};
42
42
  const localVarBodyParameter = {};
43
+ const localVarHeaderParameter = {};
43
44
  if (optionType !== void 0 && optionType !== null) localVarQueryParameter["optionType"] = optionType;
44
45
  if (exercisedCoin !== void 0 && exercisedCoin !== null) localVarQueryParameter["exercisedCoin"] = exercisedCoin;
45
46
  if (investCoin !== void 0 && investCoin !== null) localVarQueryParameter["investCoin"] = investCoin;
@@ -53,6 +54,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
53
54
  method: "GET",
54
55
  queryParams: localVarQueryParameter,
55
56
  bodyParams: localVarBodyParameter,
57
+ headerParams: localVarHeaderParameter,
56
58
  timeUnit: _timeUnit
57
59
  };
58
60
  } };
@@ -80,7 +82,7 @@ var MarketDataApi = class {
80
82
  */
81
83
  async getDualInvestmentProductList(requestParameters) {
82
84
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(requestParameters?.optionType, requestParameters?.exercisedCoin, requestParameters?.investCoin, requestParameters?.pageSize, requestParameters?.pageIndex, requestParameters?.recvWindow);
83
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
85
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
84
86
  }
85
87
  };
86
88
 
@@ -107,6 +109,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
107
109
  (0, __binance_common.assertParamExists)("changeAutoCompoundStatus", "positionId", positionId);
108
110
  const localVarQueryParameter = {};
109
111
  const localVarBodyParameter = {};
112
+ const localVarHeaderParameter = {};
110
113
  if (positionId !== void 0 && positionId !== null) localVarQueryParameter["positionId"] = positionId;
111
114
  if (autoCompoundPlan !== void 0 && autoCompoundPlan !== null) localVarQueryParameter["AutoCompoundPlan"] = autoCompoundPlan;
112
115
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
@@ -117,12 +120,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
117
120
  method: "POST",
118
121
  queryParams: localVarQueryParameter,
119
122
  bodyParams: localVarBodyParameter,
123
+ headerParams: localVarHeaderParameter,
120
124
  timeUnit: _timeUnit
121
125
  };
122
126
  },
123
127
  checkDualInvestmentAccounts: async (recvWindow) => {
124
128
  const localVarQueryParameter = {};
125
129
  const localVarBodyParameter = {};
130
+ const localVarHeaderParameter = {};
126
131
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
127
132
  let _timeUnit;
128
133
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -131,12 +136,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
131
136
  method: "GET",
132
137
  queryParams: localVarQueryParameter,
133
138
  bodyParams: localVarBodyParameter,
139
+ headerParams: localVarHeaderParameter,
134
140
  timeUnit: _timeUnit
135
141
  };
136
142
  },
137
143
  getDualInvestmentPositions: async (status, pageSize, pageIndex, recvWindow) => {
138
144
  const localVarQueryParameter = {};
139
145
  const localVarBodyParameter = {};
146
+ const localVarHeaderParameter = {};
140
147
  if (status !== void 0 && status !== null) localVarQueryParameter["status"] = status;
141
148
  if (pageSize !== void 0 && pageSize !== null) localVarQueryParameter["pageSize"] = pageSize;
142
149
  if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
@@ -148,6 +155,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
148
155
  method: "GET",
149
156
  queryParams: localVarQueryParameter,
150
157
  bodyParams: localVarBodyParameter,
158
+ headerParams: localVarHeaderParameter,
151
159
  timeUnit: _timeUnit
152
160
  };
153
161
  },
@@ -158,6 +166,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
158
166
  (0, __binance_common.assertParamExists)("subscribeDualInvestmentProducts", "autoCompoundPlan", autoCompoundPlan);
159
167
  const localVarQueryParameter = {};
160
168
  const localVarBodyParameter = {};
169
+ const localVarHeaderParameter = {};
161
170
  if (id !== void 0 && id !== null) localVarQueryParameter["id"] = id;
162
171
  if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
163
172
  if (depositAmount !== void 0 && depositAmount !== null) localVarQueryParameter["depositAmount"] = depositAmount;
@@ -170,6 +179,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
170
179
  method: "POST",
171
180
  queryParams: localVarQueryParameter,
172
181
  bodyParams: localVarBodyParameter,
182
+ headerParams: localVarHeaderParameter,
173
183
  timeUnit: _timeUnit
174
184
  };
175
185
  }
@@ -198,7 +208,7 @@ var TradeApi = class {
198
208
  */
199
209
  async changeAutoCompoundStatus(requestParameters) {
200
210
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(requestParameters?.positionId, requestParameters?.autoCompoundPlan, requestParameters?.recvWindow);
201
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
211
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
202
212
  }
203
213
  /**
204
214
  * Check Dual Investment accounts
@@ -214,7 +224,7 @@ var TradeApi = class {
214
224
  */
215
225
  async checkDualInvestmentAccounts(requestParameters = {}) {
216
226
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(requestParameters?.recvWindow);
217
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
227
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
218
228
  }
219
229
  /**
220
230
  * Get Dual Investment positions (batch)
@@ -230,7 +240,7 @@ var TradeApi = class {
230
240
  */
231
241
  async getDualInvestmentPositions(requestParameters = {}) {
232
242
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(requestParameters?.status, requestParameters?.pageSize, requestParameters?.pageIndex, requestParameters?.recvWindow);
233
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
243
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
234
244
  }
235
245
  /**
236
246
  * Subscribe Dual Investment products
@@ -249,7 +259,7 @@ var TradeApi = class {
249
259
  */
250
260
  async subscribeDualInvestmentProducts(requestParameters) {
251
261
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(requestParameters?.id, requestParameters?.orderId, requestParameters?.depositAmount, requestParameters?.autoCompoundPlan, requestParameters?.recvWindow);
252
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
262
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
253
263
  }
254
264
  };
255
265
 
@@ -283,7 +293,7 @@ var RestAPI = class {
283
293
  * @returns A promise resolving to the response data object.
284
294
  */
285
295
  sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
286
- return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
296
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0);
287
297
  }
288
298
  /**
289
299
  * Generic function to send a signed request.
@@ -295,7 +305,7 @@ var RestAPI = class {
295
305
  * @returns A promise resolving to the response data object.
296
306
  */
297
307
  sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
298
- return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
308
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0, { isSigned: true });
299
309
  }
300
310
  /**
301
311
  * Get Dual Investment product list
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","DUAL_INVESTMENT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/dual-investment.ts"],"sourcesContent":["{\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.1.14\",\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 && tsdown\",\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 \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.3.13\",\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\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 | bigint} [pageSize] Default: 10, Maximum: 100\n * @param {number | bigint} [pageIndex] Default: 1\n * @param {number | bigint} [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 | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\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 | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Default: 1\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number | bigint;\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\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 | bigint} [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 | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['AutoCompoundPlan'] = autoCompoundPlan;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\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 | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: 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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\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 | bigint} [pageSize] Default: 10, Maximum: 100\n * @param {number | bigint} [pageIndex] Default: 1\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: string,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\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 | bigint} [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 | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\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 | bigint}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Default: 1\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number | bigint;\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined\n );\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n 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/advanced_earn/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/advanced_earn/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/advanced_earn/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/advanced_earn/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/advanced_earn/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","/**\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","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"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACuBf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO,EAgBH,8BAA8B,O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kB;;;;;;;;;;;;;;AE7K/E,IAAa,iBAAb,MAA4B;CAGxB,YAAY,QAAqC;EAC7C,MAAM,iDAA2B,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAIC,sCACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
1
+ {"version":3,"file":"index.js","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","ConfigurationRestAPI","DUAL_INVESTMENT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/dual-investment.ts"],"sourcesContent":["{\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.1.16\",\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 && tsdown\",\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 \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.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\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 | bigint} [pageSize] Default: 10, Maximum: 100\n * @param {number | bigint} [pageIndex] Default: 1\n * @param {number | bigint} [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 | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\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 | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Default: 1\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number | bigint;\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\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 | bigint} [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 | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['AutoCompoundPlan'] = autoCompoundPlan;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\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 | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: 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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\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 | bigint} [pageSize] Default: 10, Maximum: 100\n * @param {number | bigint} [pageIndex] Default: 1\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: string,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\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 | bigint} [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 | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\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 | bigint}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Default: 1\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number | bigint;\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n 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/advanced_earn/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/advanced_earn/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/advanced_earn/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/advanced_earn/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/advanced_earn/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","/**\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","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"],"mappings":";;;;;;;;;;;;;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACuBf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO,EAgBH,8BAA8B,OAC1B,YACA,eACA,YACA,UACA,WACA,eACuB;AAEvB,0CAAkB,gCAAgC,cAAc,WAAW;AAE3E,0CAAkB,gCAAgC,iBAAiB,cAAc;AAEjF,0CAAkB,gCAAgC,cAAc,WAAW;EAE3E,MAAMA,yBAAkD,EAAE;EAC1D,MAAMC,wBAAiD,EAAE;EACzD,MAAMC,0BAAmD,EAAE;AAE3D,MAAI,eAAe,UAAa,eAAe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,gCAAgC,kBAAkB;;;;;;;;;;;;;;AE/K/E,IAAa,iBAAb,MAA4B;CAGxB,YAAY,QAAqC;EAC7C,MAAM,iDAA2B,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAIC,sCACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
package/dist/index.mjs CHANGED
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConnectorClientError, DUAL_INVES
3
3
 
4
4
  //#region package.json
5
5
  var name = "@binance/dual-investment";
6
- var version = "4.1.14";
6
+ var version = "4.1.16";
7
7
 
8
8
  //#endregion
9
9
  //#region src/rest-api/modules/market-data-api.ts
@@ -29,6 +29,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
29
29
  assertParamExists("getDualInvestmentProductList", "investCoin", investCoin);
30
30
  const localVarQueryParameter = {};
31
31
  const localVarBodyParameter = {};
32
+ const localVarHeaderParameter = {};
32
33
  if (optionType !== void 0 && optionType !== null) localVarQueryParameter["optionType"] = optionType;
33
34
  if (exercisedCoin !== void 0 && exercisedCoin !== null) localVarQueryParameter["exercisedCoin"] = exercisedCoin;
34
35
  if (investCoin !== void 0 && investCoin !== null) localVarQueryParameter["investCoin"] = investCoin;
@@ -42,6 +43,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
42
43
  method: "GET",
43
44
  queryParams: localVarQueryParameter,
44
45
  bodyParams: localVarBodyParameter,
46
+ headerParams: localVarHeaderParameter,
45
47
  timeUnit: _timeUnit
46
48
  };
47
49
  } };
@@ -69,7 +71,7 @@ var MarketDataApi = class {
69
71
  */
70
72
  async getDualInvestmentProductList(requestParameters) {
71
73
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(requestParameters?.optionType, requestParameters?.exercisedCoin, requestParameters?.investCoin, requestParameters?.pageSize, requestParameters?.pageIndex, requestParameters?.recvWindow);
72
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
74
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
73
75
  }
74
76
  };
75
77
 
@@ -96,6 +98,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
96
98
  assertParamExists("changeAutoCompoundStatus", "positionId", positionId);
97
99
  const localVarQueryParameter = {};
98
100
  const localVarBodyParameter = {};
101
+ const localVarHeaderParameter = {};
99
102
  if (positionId !== void 0 && positionId !== null) localVarQueryParameter["positionId"] = positionId;
100
103
  if (autoCompoundPlan !== void 0 && autoCompoundPlan !== null) localVarQueryParameter["AutoCompoundPlan"] = autoCompoundPlan;
101
104
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
@@ -106,12 +109,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
106
109
  method: "POST",
107
110
  queryParams: localVarQueryParameter,
108
111
  bodyParams: localVarBodyParameter,
112
+ headerParams: localVarHeaderParameter,
109
113
  timeUnit: _timeUnit
110
114
  };
111
115
  },
112
116
  checkDualInvestmentAccounts: async (recvWindow) => {
113
117
  const localVarQueryParameter = {};
114
118
  const localVarBodyParameter = {};
119
+ const localVarHeaderParameter = {};
115
120
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
116
121
  let _timeUnit;
117
122
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -120,12 +125,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
120
125
  method: "GET",
121
126
  queryParams: localVarQueryParameter,
122
127
  bodyParams: localVarBodyParameter,
128
+ headerParams: localVarHeaderParameter,
123
129
  timeUnit: _timeUnit
124
130
  };
125
131
  },
126
132
  getDualInvestmentPositions: async (status, pageSize, pageIndex, recvWindow) => {
127
133
  const localVarQueryParameter = {};
128
134
  const localVarBodyParameter = {};
135
+ const localVarHeaderParameter = {};
129
136
  if (status !== void 0 && status !== null) localVarQueryParameter["status"] = status;
130
137
  if (pageSize !== void 0 && pageSize !== null) localVarQueryParameter["pageSize"] = pageSize;
131
138
  if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
@@ -137,6 +144,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
137
144
  method: "GET",
138
145
  queryParams: localVarQueryParameter,
139
146
  bodyParams: localVarBodyParameter,
147
+ headerParams: localVarHeaderParameter,
140
148
  timeUnit: _timeUnit
141
149
  };
142
150
  },
@@ -147,6 +155,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
147
155
  assertParamExists("subscribeDualInvestmentProducts", "autoCompoundPlan", autoCompoundPlan);
148
156
  const localVarQueryParameter = {};
149
157
  const localVarBodyParameter = {};
158
+ const localVarHeaderParameter = {};
150
159
  if (id !== void 0 && id !== null) localVarQueryParameter["id"] = id;
151
160
  if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
152
161
  if (depositAmount !== void 0 && depositAmount !== null) localVarQueryParameter["depositAmount"] = depositAmount;
@@ -159,6 +168,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
159
168
  method: "POST",
160
169
  queryParams: localVarQueryParameter,
161
170
  bodyParams: localVarBodyParameter,
171
+ headerParams: localVarHeaderParameter,
162
172
  timeUnit: _timeUnit
163
173
  };
164
174
  }
@@ -187,7 +197,7 @@ var TradeApi = class {
187
197
  */
188
198
  async changeAutoCompoundStatus(requestParameters) {
189
199
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(requestParameters?.positionId, requestParameters?.autoCompoundPlan, requestParameters?.recvWindow);
190
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
200
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
191
201
  }
192
202
  /**
193
203
  * Check Dual Investment accounts
@@ -203,7 +213,7 @@ var TradeApi = class {
203
213
  */
204
214
  async checkDualInvestmentAccounts(requestParameters = {}) {
205
215
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(requestParameters?.recvWindow);
206
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
216
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
207
217
  }
208
218
  /**
209
219
  * Get Dual Investment positions (batch)
@@ -219,7 +229,7 @@ var TradeApi = class {
219
229
  */
220
230
  async getDualInvestmentPositions(requestParameters = {}) {
221
231
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(requestParameters?.status, requestParameters?.pageSize, requestParameters?.pageIndex, requestParameters?.recvWindow);
222
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
232
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
223
233
  }
224
234
  /**
225
235
  * Subscribe Dual Investment products
@@ -238,7 +248,7 @@ var TradeApi = class {
238
248
  */
239
249
  async subscribeDualInvestmentProducts(requestParameters) {
240
250
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(requestParameters?.id, requestParameters?.orderId, requestParameters?.depositAmount, requestParameters?.autoCompoundPlan, requestParameters?.recvWindow);
241
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
251
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
242
252
  }
243
253
  };
244
254
 
@@ -272,7 +282,7 @@ var RestAPI = class {
272
282
  * @returns A promise resolving to the response data object.
273
283
  */
274
284
  sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
275
- return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
285
+ return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0);
276
286
  }
277
287
  /**
278
288
  * Generic function to send a signed request.
@@ -284,7 +294,7 @@ var RestAPI = class {
284
294
  * @returns A promise resolving to the response data object.
285
295
  */
286
296
  sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
287
- return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
297
+ return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0, { isSigned: true });
288
298
  }
289
299
  /**
290
300
  * Get Dual Investment product list
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","DUAL_INVESTMENT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/dual-investment.ts"],"sourcesContent":["{\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.1.14\",\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 && tsdown\",\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 \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.3.13\",\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\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 | bigint} [pageSize] Default: 10, Maximum: 100\n * @param {number | bigint} [pageIndex] Default: 1\n * @param {number | bigint} [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 | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\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 | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Default: 1\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number | bigint;\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\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 | bigint} [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 | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['AutoCompoundPlan'] = autoCompoundPlan;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\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 | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: 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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\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 | bigint} [pageSize] Default: 10, Maximum: 100\n * @param {number | bigint} [pageIndex] Default: 1\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: string,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\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 | bigint} [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 | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\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 | bigint}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Default: 1\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number | bigint;\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined\n );\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n 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/advanced_earn/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/advanced_earn/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/advanced_earn/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/advanced_earn/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/advanced_earn/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","/**\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","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"],"mappings":";;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACuBf,MA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,kBAAkB;;;;;;;;;;;;;;;;;CAkBtE,gCACI,mBACiE;AACjE,SAAO,KAAK,SAAS,gCAAgC,kBAAkB;;;;;;;;;;;;;;AE7K/E,IAAa,iBAAb,MAA4B;CAGxB,YAAY,QAAqC;EAC7C,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
1
+ {"version":3,"file":"index.mjs","names":["localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","localVarQueryParameter: Record<string, unknown>","localVarBodyParameter: Record<string, unknown>","localVarHeaderParameter: Record<string, unknown>","_timeUnit: TimeUnit | undefined","DUAL_INVESTMENT_REST_API_PROD_URL"],"sources":["../package.json","../src/rest-api/modules/market-data-api.ts","../src/rest-api/modules/trade-api.ts","../src/rest-api/rest-api.ts","../src/rest-api/index.ts","../src/dual-investment.ts"],"sourcesContent":["{\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.1.16\",\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 && tsdown\",\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 \"tsdown\": \"^0.16.5\",\n \"typescript\": \"^5.7.2\",\n \"typescript-eslint\": \"^8.24.0\"\n },\n \"dependencies\": {\n \"@binance/common\": \"2.4.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\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 | bigint} [pageSize] Default: 10, Maximum: 100\n * @param {number | bigint} [pageIndex] Default: 1\n * @param {number | bigint} [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 | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (optionType !== undefined && optionType !== null) {\n localVarQueryParameter['optionType'] = optionType;\n }\n if (exercisedCoin !== undefined && exercisedCoin !== null) {\n localVarQueryParameter['exercisedCoin'] = exercisedCoin;\n }\n if (investCoin !== undefined && investCoin !== null) {\n localVarQueryParameter['investCoin'] = investCoin;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\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 | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Default: 1\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof MarketDataApiGetDualInvestmentProductList\n */\n readonly recvWindow?: number | bigint;\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\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 | bigint} [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 | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (positionId !== undefined && positionId !== null) {\n localVarQueryParameter['positionId'] = positionId;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['AutoCompoundPlan'] = autoCompoundPlan;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\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 | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n checkDualInvestmentAccounts: async (recvWindow?: number | bigint): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: 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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\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 | bigint} [pageSize] Default: 10, Maximum: 100\n * @param {number | bigint} [pageIndex] Default: 1\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getDualInvestmentPositions: async (\n status?: string,\n pageSize?: number | bigint,\n pageIndex?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (status !== undefined && status !== null) {\n localVarQueryParameter['status'] = status;\n }\n if (pageSize !== undefined && pageSize !== null) {\n localVarQueryParameter['pageSize'] = pageSize;\n }\n if (pageIndex !== undefined && pageIndex !== null) {\n localVarQueryParameter['pageIndex'] = pageIndex;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\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 | bigint} [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 | bigint\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 const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (id !== undefined && id !== null) {\n localVarQueryParameter['id'] = id;\n }\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (depositAmount !== undefined && depositAmount !== null) {\n localVarQueryParameter['depositAmount'] = depositAmount;\n }\n if (autoCompoundPlan !== undefined && autoCompoundPlan !== null) {\n localVarQueryParameter['autoCompoundPlan'] = autoCompoundPlan;\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 queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\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 | bigint}\n * @memberof TradeApiChangeAutoCompoundStatus\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiCheckDualInvestmentAccounts\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageSize?: number | bigint;\n\n /**\n * Default: 1\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly pageIndex?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiGetDualInvestmentPositions\n */\n readonly recvWindow?: number | bigint;\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 | bigint}\n * @memberof TradeApiSubscribeDualInvestmentProducts\n */\n readonly recvWindow?: number | bigint;\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\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/advanced_earn/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.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n undefined\n );\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 queryParams - Query parameters for the request.\n * @param bodyParams - Body 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 queryParams: Record<string, unknown> = {},\n bodyParams: Record<string, unknown> = {}\n ): Promise<RestApiResponse<T>> {\n return sendRequest<T>(\n this.configuration,\n endpoint,\n method,\n queryParams,\n bodyParams,\n undefined,\n 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/advanced_earn/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/advanced_earn/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/advanced_earn/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/advanced_earn/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/advanced_earn/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","/**\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","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"],"mappings":";;;;WACY;cAEG;;;;;;;;;;;;;;;;;;;ACuBf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO,EAgBH,8BAA8B,OAC1B,YACA,eACA,YACA,UACA,WACA,eACuB;AAEvB,oBAAkB,gCAAgC,cAAc,WAAW;AAE3E,oBAAkB,gCAAgC,iBAAiB,cAAc;AAEjF,oBAAkB,gCAAgC,cAAc,WAAW;EAE3E,MAAMA,yBAAkD,EAAE;EAC1D,MAAMC,wBAAiD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SAAO,KAAK,SAAS,2BAA2B,kBAAkB;;;;;;;;;;;;;;;;;CAkBtE,gCACI,mBACiE;AACjE,SAAO,KAAK,SAAS,gCAAgC,kBAAkB;;;;;;;;;;;;;;AE/K/E,IAAa,iBAAb,MAA4B;CAGxB,YAAY,QAAqC;EAC7C,MAAM,YAAY,eAAe,MAAM,QAAQ;AAE/C,MAAI,QAAQ,sBAAsB;GAC9B,MAAM,gBAAgB,IAAI,qBACtB,OAAO,qBACV;AAGD,iBAAc,WAAW,cAAc,YAAYC;AACnD,iBAAc,cAAc,cAAc,eAAe,EAAE;AAC3D,iBAAc,YAAY,UAAU;IAChC,GAAI,cAAc,YAAY,WAAW,EAAE;IAC3C,cAAc;IACjB;AACD,QAAK,UAAU,IAAI,QAAQ,cAAc"}
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": "4.1.14",
4
+ "version": "4.1.16",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "types": "./dist/index.d.ts",
@@ -56,7 +56,7 @@
56
56
  "typescript-eslint": "^8.24.0"
57
57
  },
58
58
  "dependencies": {
59
- "@binance/common": "2.3.13",
59
+ "@binance/common": "2.4.0",
60
60
  "axios": "^1.7.4"
61
61
  }
62
62
  }