@binance/dual-investment 4.0.0 → 4.0.2

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
@@ -1,562 +1,474 @@
1
- "use strict";
1
+ //#region rolldown:runtime
2
2
  var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name2 in all)
8
- __defProp(target, name2, { get: all[name2], enumerable: true });
3
+ var __export = (all) => {
4
+ let target = {};
5
+ for (var name$1 in all) __defProp(target, name$1, {
6
+ get: all[name$1],
7
+ enumerable: true
8
+ });
9
+ return target;
9
10
  };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
11
 
20
- // src/index.ts
21
- var index_exports = {};
22
- __export(index_exports, {
23
- BadRequestError: () => import_common5.BadRequestError,
24
- ConnectorClientError: () => import_common5.ConnectorClientError,
25
- DUAL_INVESTMENT_REST_API_PROD_URL: () => import_common5.DUAL_INVESTMENT_REST_API_PROD_URL,
26
- DualInvestment: () => DualInvestment,
27
- DualInvestmentRestAPI: () => rest_api_exports,
28
- ForbiddenError: () => import_common5.ForbiddenError,
29
- NetworkError: () => import_common5.NetworkError,
30
- NotFoundError: () => import_common5.NotFoundError,
31
- RateLimitBanError: () => import_common5.RateLimitBanError,
32
- RequiredError: () => import_common5.RequiredError,
33
- ServerError: () => import_common5.ServerError,
34
- TooManyRequestsError: () => import_common5.TooManyRequestsError,
35
- UnauthorizedError: () => import_common5.UnauthorizedError
36
- });
37
- module.exports = __toCommonJS(index_exports);
12
+ //#endregion
13
+ let __binance_common = require("@binance/common");
38
14
 
39
- // src/dual-investment.ts
40
- var import_common4 = require("@binance/common");
41
-
42
- // package.json
15
+ //#region package.json
43
16
  var name = "@binance/dual-investment";
44
- var version = "4.0.0";
45
-
46
- // src/rest-api/index.ts
47
- var rest_api_exports = {};
48
- __export(rest_api_exports, {
49
- MarketDataApi: () => MarketDataApi,
50
- RestAPI: () => RestAPI,
51
- TradeApi: () => TradeApi
52
- });
17
+ var version = "4.0.2";
53
18
 
54
- // src/rest-api/modules/market-data-api.ts
55
- var import_common = require("@binance/common");
56
- var MarketDataApiAxiosParamCreator = function(configuration) {
57
- return {
58
- /**
59
- * Get Dual Investment product list
60
- *
61
- * Weight: 1(IP)
62
- *
63
- * @summary Get Dual Investment product list
64
- * @param {string} optionType Input CALL or PUT
65
- * @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
66
- * @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
67
- * @param {number} [pageSize] Default: 10, Maximum: 100
68
- * @param {number} [pageIndex] Default: 1
69
- * @param {number} [recvWindow] The value cannot be greater than 60000
70
- *
71
- * @throws {RequiredError}
72
- */
73
- getDualInvestmentProductList: async (optionType, exercisedCoin, investCoin, pageSize, pageIndex, recvWindow) => {
74
- (0, import_common.assertParamExists)("getDualInvestmentProductList", "optionType", optionType);
75
- (0, import_common.assertParamExists)("getDualInvestmentProductList", "exercisedCoin", exercisedCoin);
76
- (0, import_common.assertParamExists)("getDualInvestmentProductList", "investCoin", investCoin);
77
- const localVarQueryParameter = {};
78
- if (optionType !== void 0 && optionType !== null) {
79
- localVarQueryParameter["optionType"] = optionType;
80
- }
81
- if (exercisedCoin !== void 0 && exercisedCoin !== null) {
82
- localVarQueryParameter["exercisedCoin"] = exercisedCoin;
83
- }
84
- if (investCoin !== void 0 && investCoin !== null) {
85
- localVarQueryParameter["investCoin"] = investCoin;
86
- }
87
- if (pageSize !== void 0 && pageSize !== null) {
88
- localVarQueryParameter["pageSize"] = pageSize;
89
- }
90
- if (pageIndex !== void 0 && pageIndex !== null) {
91
- localVarQueryParameter["pageIndex"] = pageIndex;
92
- }
93
- if (recvWindow !== void 0 && recvWindow !== null) {
94
- localVarQueryParameter["recvWindow"] = recvWindow;
95
- }
96
- let _timeUnit;
97
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
98
- return {
99
- endpoint: "/sapi/v1/dci/product/list",
100
- method: "GET",
101
- params: localVarQueryParameter,
102
- timeUnit: _timeUnit
103
- };
104
- }
105
- };
19
+ //#endregion
20
+ //#region src/rest-api/modules/market-data-api.ts
21
+ /**
22
+ * Binance Dual Investment REST API
23
+ *
24
+ * OpenAPI Specification for the Binance Dual Investment REST API
25
+ *
26
+ * The version of the OpenAPI document: 1.0.0
27
+ *
28
+ *
29
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
30
+ * https://openapi-generator.tech
31
+ * Do not edit the class manually.
32
+ */
33
+ /**
34
+ * MarketDataApi - axios parameter creator
35
+ */
36
+ const MarketDataApiAxiosParamCreator = function(configuration) {
37
+ return { getDualInvestmentProductList: async (optionType, exercisedCoin, investCoin, pageSize, pageIndex, recvWindow) => {
38
+ (0, __binance_common.assertParamExists)("getDualInvestmentProductList", "optionType", optionType);
39
+ (0, __binance_common.assertParamExists)("getDualInvestmentProductList", "exercisedCoin", exercisedCoin);
40
+ (0, __binance_common.assertParamExists)("getDualInvestmentProductList", "investCoin", investCoin);
41
+ const localVarQueryParameter = {};
42
+ if (optionType !== void 0 && optionType !== null) localVarQueryParameter["optionType"] = optionType;
43
+ if (exercisedCoin !== void 0 && exercisedCoin !== null) localVarQueryParameter["exercisedCoin"] = exercisedCoin;
44
+ if (investCoin !== void 0 && investCoin !== null) localVarQueryParameter["investCoin"] = investCoin;
45
+ if (pageSize !== void 0 && pageSize !== null) localVarQueryParameter["pageSize"] = pageSize;
46
+ if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
47
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
48
+ let _timeUnit;
49
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
50
+ return {
51
+ endpoint: "/sapi/v1/dci/product/list",
52
+ method: "GET",
53
+ params: localVarQueryParameter,
54
+ timeUnit: _timeUnit
55
+ };
56
+ } };
106
57
  };
58
+ /**
59
+ * MarketDataApi - object-oriented interface
60
+ * @class MarketDataApi
61
+ */
107
62
  var MarketDataApi = class {
108
- constructor(configuration) {
109
- this.configuration = configuration;
110
- this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);
111
- }
112
- /**
113
- * Get Dual Investment product list
114
- *
115
- * Weight: 1(IP)
116
- *
117
- * @summary Get Dual Investment product list
118
- * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.
119
- * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}
120
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
121
- * @memberof MarketDataApi
122
- * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}
123
- */
124
- async getDualInvestmentProductList(requestParameters) {
125
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(
126
- requestParameters?.optionType,
127
- requestParameters?.exercisedCoin,
128
- requestParameters?.investCoin,
129
- requestParameters?.pageSize,
130
- requestParameters?.pageIndex,
131
- requestParameters?.recvWindow
132
- );
133
- return (0, import_common.sendRequest)(
134
- this.configuration,
135
- localVarAxiosArgs.endpoint,
136
- localVarAxiosArgs.method,
137
- localVarAxiosArgs.params,
138
- localVarAxiosArgs?.timeUnit,
139
- { isSigned: true }
140
- );
141
- }
63
+ constructor(configuration) {
64
+ this.configuration = configuration;
65
+ this.localVarAxiosParamCreator = MarketDataApiAxiosParamCreator(configuration);
66
+ }
67
+ /**
68
+ * Get Dual Investment product list
69
+ *
70
+ * Weight: 1(IP)
71
+ *
72
+ * @summary Get Dual Investment product list
73
+ * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.
74
+ * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}
75
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
76
+ * @memberof MarketDataApi
77
+ * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}
78
+ */
79
+ async getDualInvestmentProductList(requestParameters) {
80
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentProductList(requestParameters?.optionType, requestParameters?.exercisedCoin, requestParameters?.investCoin, requestParameters?.pageSize, requestParameters?.pageIndex, requestParameters?.recvWindow);
81
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
82
+ }
142
83
  };
143
84
 
144
- // src/rest-api/modules/trade-api.ts
145
- var import_common2 = require("@binance/common");
146
- var TradeApiAxiosParamCreator = function(configuration) {
147
- return {
148
- /**
149
- * Change Auto-Compound status
150
- *
151
- * Weight: 1(IP)
152
- *
153
- * @summary Change Auto-Compound status(USER_DATA)
154
- * @param {string} positionId Get positionId from `/sapi/v1/dci/product/positions`
155
- * @param {string} [autoCompoundPlan]
156
- * @param {number} [recvWindow] The value cannot be greater than 60000
157
- *
158
- * @throws {RequiredError}
159
- */
160
- changeAutoCompoundStatus: async (positionId, autoCompoundPlan, recvWindow) => {
161
- (0, import_common2.assertParamExists)("changeAutoCompoundStatus", "positionId", positionId);
162
- const localVarQueryParameter = {};
163
- if (positionId !== void 0 && positionId !== null) {
164
- localVarQueryParameter["positionId"] = positionId;
165
- }
166
- if (autoCompoundPlan !== void 0 && autoCompoundPlan !== null) {
167
- localVarQueryParameter["AutoCompoundPlan"] = autoCompoundPlan;
168
- }
169
- if (recvWindow !== void 0 && recvWindow !== null) {
170
- localVarQueryParameter["recvWindow"] = recvWindow;
171
- }
172
- let _timeUnit;
173
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
174
- return {
175
- endpoint: "/sapi/v1/dci/product/auto_compound/edit-status",
176
- method: "POST",
177
- params: localVarQueryParameter,
178
- timeUnit: _timeUnit
179
- };
180
- },
181
- /**
182
- * Check Dual Investment accounts
183
- *
184
- * Weight: 1(IP)
185
- *
186
- * @summary Check Dual Investment accounts(USER_DATA)
187
- * @param {number} [recvWindow] The value cannot be greater than 60000
188
- *
189
- * @throws {RequiredError}
190
- */
191
- checkDualInvestmentAccounts: async (recvWindow) => {
192
- const localVarQueryParameter = {};
193
- if (recvWindow !== void 0 && recvWindow !== null) {
194
- localVarQueryParameter["recvWindow"] = recvWindow;
195
- }
196
- let _timeUnit;
197
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
198
- return {
199
- endpoint: "/sapi/v1/dci/product/accounts",
200
- method: "GET",
201
- params: localVarQueryParameter,
202
- timeUnit: _timeUnit
203
- };
204
- },
205
- /**
206
- * Get Dual Investment positions (batch)
207
- *
208
- * Weight: 1(IP)
209
- *
210
- * @summary Get Dual Investment positions(USER_DATA)
211
- * @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.
212
- * @param {number} [pageSize] Default: 10, Maximum: 100
213
- * @param {number} [pageIndex] Default: 1
214
- * @param {number} [recvWindow] The value cannot be greater than 60000
215
- *
216
- * @throws {RequiredError}
217
- */
218
- getDualInvestmentPositions: async (status, pageSize, pageIndex, recvWindow) => {
219
- const localVarQueryParameter = {};
220
- if (status !== void 0 && status !== null) {
221
- localVarQueryParameter["status"] = status;
222
- }
223
- if (pageSize !== void 0 && pageSize !== null) {
224
- localVarQueryParameter["pageSize"] = pageSize;
225
- }
226
- if (pageIndex !== void 0 && pageIndex !== null) {
227
- localVarQueryParameter["pageIndex"] = pageIndex;
228
- }
229
- if (recvWindow !== void 0 && recvWindow !== null) {
230
- localVarQueryParameter["recvWindow"] = recvWindow;
231
- }
232
- let _timeUnit;
233
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
234
- return {
235
- endpoint: "/sapi/v1/dci/product/positions",
236
- method: "GET",
237
- params: localVarQueryParameter,
238
- timeUnit: _timeUnit
239
- };
240
- },
241
- /**
242
- * Subscribe Dual Investment products
243
- *
244
- * Products are not available. // this means APR changes to lower value, or orders are not unavailable.
245
- * Failed. This means System or network errors.
246
- *
247
- * Weight: 1(IP)
248
- *
249
- * @summary Subscribe Dual Investment products(USER_DATA)
250
- * @param {string} id get id from `/sapi/v1/dci/product/list`
251
- * @param {string} orderId get orderId from `/sapi/v1/dci/product/list`
252
- * @param {number} depositAmount the amount for subscribing
253
- * @param {string} autoCompoundPlan `NONE`: switch off the plan, `STANDARD`:standard plan,`ADVANCED`:advanced plan
254
- * @param {number} [recvWindow] The value cannot be greater than 60000
255
- *
256
- * @throws {RequiredError}
257
- */
258
- subscribeDualInvestmentProducts: async (id, orderId, depositAmount, autoCompoundPlan, recvWindow) => {
259
- (0, import_common2.assertParamExists)("subscribeDualInvestmentProducts", "id", id);
260
- (0, import_common2.assertParamExists)("subscribeDualInvestmentProducts", "orderId", orderId);
261
- (0, import_common2.assertParamExists)("subscribeDualInvestmentProducts", "depositAmount", depositAmount);
262
- (0, import_common2.assertParamExists)(
263
- "subscribeDualInvestmentProducts",
264
- "autoCompoundPlan",
265
- autoCompoundPlan
266
- );
267
- const localVarQueryParameter = {};
268
- if (id !== void 0 && id !== null) {
269
- localVarQueryParameter["id"] = id;
270
- }
271
- if (orderId !== void 0 && orderId !== null) {
272
- localVarQueryParameter["orderId"] = orderId;
273
- }
274
- if (depositAmount !== void 0 && depositAmount !== null) {
275
- localVarQueryParameter["depositAmount"] = depositAmount;
276
- }
277
- if (autoCompoundPlan !== void 0 && autoCompoundPlan !== null) {
278
- localVarQueryParameter["autoCompoundPlan"] = autoCompoundPlan;
279
- }
280
- if (recvWindow !== void 0 && recvWindow !== null) {
281
- localVarQueryParameter["recvWindow"] = recvWindow;
282
- }
283
- let _timeUnit;
284
- if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
285
- return {
286
- endpoint: "/sapi/v1/dci/product/subscribe",
287
- method: "POST",
288
- params: localVarQueryParameter,
289
- timeUnit: _timeUnit
290
- };
291
- }
292
- };
85
+ //#endregion
86
+ //#region src/rest-api/modules/trade-api.ts
87
+ /**
88
+ * Binance Dual Investment REST API
89
+ *
90
+ * OpenAPI Specification for the Binance Dual Investment REST API
91
+ *
92
+ * The version of the OpenAPI document: 1.0.0
93
+ *
94
+ *
95
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
96
+ * https://openapi-generator.tech
97
+ * Do not edit the class manually.
98
+ */
99
+ /**
100
+ * TradeApi - axios parameter creator
101
+ */
102
+ const TradeApiAxiosParamCreator = function(configuration) {
103
+ return {
104
+ changeAutoCompoundStatus: async (positionId, autoCompoundPlan, recvWindow) => {
105
+ (0, __binance_common.assertParamExists)("changeAutoCompoundStatus", "positionId", positionId);
106
+ const localVarQueryParameter = {};
107
+ if (positionId !== void 0 && positionId !== null) localVarQueryParameter["positionId"] = positionId;
108
+ if (autoCompoundPlan !== void 0 && autoCompoundPlan !== null) localVarQueryParameter["AutoCompoundPlan"] = autoCompoundPlan;
109
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
110
+ let _timeUnit;
111
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
112
+ return {
113
+ endpoint: "/sapi/v1/dci/product/auto_compound/edit-status",
114
+ method: "POST",
115
+ params: localVarQueryParameter,
116
+ timeUnit: _timeUnit
117
+ };
118
+ },
119
+ checkDualInvestmentAccounts: async (recvWindow) => {
120
+ const localVarQueryParameter = {};
121
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
122
+ let _timeUnit;
123
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
124
+ return {
125
+ endpoint: "/sapi/v1/dci/product/accounts",
126
+ method: "GET",
127
+ params: localVarQueryParameter,
128
+ timeUnit: _timeUnit
129
+ };
130
+ },
131
+ getDualInvestmentPositions: async (status, pageSize, pageIndex, recvWindow) => {
132
+ const localVarQueryParameter = {};
133
+ if (status !== void 0 && status !== null) localVarQueryParameter["status"] = status;
134
+ if (pageSize !== void 0 && pageSize !== null) localVarQueryParameter["pageSize"] = pageSize;
135
+ if (pageIndex !== void 0 && pageIndex !== null) localVarQueryParameter["pageIndex"] = pageIndex;
136
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
137
+ let _timeUnit;
138
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
139
+ return {
140
+ endpoint: "/sapi/v1/dci/product/positions",
141
+ method: "GET",
142
+ params: localVarQueryParameter,
143
+ timeUnit: _timeUnit
144
+ };
145
+ },
146
+ subscribeDualInvestmentProducts: async (id, orderId, depositAmount, autoCompoundPlan, recvWindow) => {
147
+ (0, __binance_common.assertParamExists)("subscribeDualInvestmentProducts", "id", id);
148
+ (0, __binance_common.assertParamExists)("subscribeDualInvestmentProducts", "orderId", orderId);
149
+ (0, __binance_common.assertParamExists)("subscribeDualInvestmentProducts", "depositAmount", depositAmount);
150
+ (0, __binance_common.assertParamExists)("subscribeDualInvestmentProducts", "autoCompoundPlan", autoCompoundPlan);
151
+ const localVarQueryParameter = {};
152
+ if (id !== void 0 && id !== null) localVarQueryParameter["id"] = id;
153
+ if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
154
+ if (depositAmount !== void 0 && depositAmount !== null) localVarQueryParameter["depositAmount"] = depositAmount;
155
+ if (autoCompoundPlan !== void 0 && autoCompoundPlan !== null) localVarQueryParameter["autoCompoundPlan"] = autoCompoundPlan;
156
+ if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
157
+ let _timeUnit;
158
+ if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
159
+ return {
160
+ endpoint: "/sapi/v1/dci/product/subscribe",
161
+ method: "POST",
162
+ params: localVarQueryParameter,
163
+ timeUnit: _timeUnit
164
+ };
165
+ }
166
+ };
293
167
  };
168
+ /**
169
+ * TradeApi - object-oriented interface
170
+ * @class TradeApi
171
+ */
294
172
  var TradeApi = class {
295
- constructor(configuration) {
296
- this.configuration = configuration;
297
- this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);
298
- }
299
- /**
300
- * Change Auto-Compound status
301
- *
302
- * Weight: 1(IP)
303
- *
304
- * @summary Change Auto-Compound status(USER_DATA)
305
- * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.
306
- * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}
307
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
308
- * @memberof TradeApi
309
- * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}
310
- */
311
- async changeAutoCompoundStatus(requestParameters) {
312
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(
313
- requestParameters?.positionId,
314
- requestParameters?.autoCompoundPlan,
315
- requestParameters?.recvWindow
316
- );
317
- return (0, import_common2.sendRequest)(
318
- this.configuration,
319
- localVarAxiosArgs.endpoint,
320
- localVarAxiosArgs.method,
321
- localVarAxiosArgs.params,
322
- localVarAxiosArgs?.timeUnit,
323
- { isSigned: true }
324
- );
173
+ constructor(configuration) {
174
+ this.configuration = configuration;
175
+ this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);
176
+ }
177
+ /**
178
+ * Change Auto-Compound status
179
+ *
180
+ * Weight: 1(IP)
181
+ *
182
+ * @summary Change Auto-Compound status(USER_DATA)
183
+ * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.
184
+ * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}
185
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
186
+ * @memberof TradeApi
187
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}
188
+ */
189
+ async changeAutoCompoundStatus(requestParameters) {
190
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.changeAutoCompoundStatus(requestParameters?.positionId, requestParameters?.autoCompoundPlan, requestParameters?.recvWindow);
191
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
192
+ }
193
+ /**
194
+ * Check Dual Investment accounts
195
+ *
196
+ * Weight: 1(IP)
197
+ *
198
+ * @summary Check Dual Investment accounts(USER_DATA)
199
+ * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.
200
+ * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}
201
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
202
+ * @memberof TradeApi
203
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}
204
+ */
205
+ async checkDualInvestmentAccounts(requestParameters = {}) {
206
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(requestParameters?.recvWindow);
207
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
208
+ }
209
+ /**
210
+ * Get Dual Investment positions (batch)
211
+ *
212
+ * Weight: 1(IP)
213
+ *
214
+ * @summary Get Dual Investment positions(USER_DATA)
215
+ * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.
216
+ * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}
217
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
218
+ * @memberof TradeApi
219
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}
220
+ */
221
+ async getDualInvestmentPositions(requestParameters = {}) {
222
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(requestParameters?.status, requestParameters?.pageSize, requestParameters?.pageIndex, requestParameters?.recvWindow);
223
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
224
+ }
225
+ /**
226
+ * Subscribe Dual Investment products
227
+ *
228
+ * Products are not available. // this means APR changes to lower value, or orders are not unavailable.
229
+ * Failed. This means System or network errors.
230
+ *
231
+ * Weight: 1(IP)
232
+ *
233
+ * @summary Subscribe Dual Investment products(USER_DATA)
234
+ * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.
235
+ * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}
236
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
237
+ * @memberof TradeApi
238
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}
239
+ */
240
+ async subscribeDualInvestmentProducts(requestParameters) {
241
+ const localVarAxiosArgs = await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(requestParameters?.id, requestParameters?.orderId, requestParameters?.depositAmount, requestParameters?.autoCompoundPlan, requestParameters?.recvWindow);
242
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.params, localVarAxiosArgs?.timeUnit, { isSigned: true });
243
+ }
244
+ };
245
+
246
+ //#endregion
247
+ //#region src/rest-api/rest-api.ts
248
+ /**
249
+ * Binance Dual Investment REST API
250
+ *
251
+ * OpenAPI Specification for the Binance Dual Investment REST API
252
+ *
253
+ * The version of the OpenAPI document: 1.0.0
254
+ *
255
+ *
256
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
257
+ * https://openapi-generator.tech
258
+ * Do not edit the class manually.
259
+ */
260
+ var RestAPI = class {
261
+ constructor(configuration) {
262
+ this.configuration = configuration;
263
+ this.marketDataApi = new MarketDataApi(configuration);
264
+ this.tradeApi = new TradeApi(configuration);
265
+ }
266
+ /**
267
+ * Generic function to send a request.
268
+ * @param endpoint - The API endpoint to call.
269
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
270
+ * @param params - Query parameters for the request.
271
+ *
272
+ * @returns A promise resolving to the response data object.
273
+ */
274
+ sendRequest(endpoint, method, params = {}) {
275
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0);
276
+ }
277
+ /**
278
+ * Generic function to send a signed request.
279
+ * @param endpoint - The API endpoint to call.
280
+ * @param method - HTTP method to use (GET, POST, DELETE, etc.).
281
+ * @param params - Query parameters for the request.
282
+ *
283
+ * @returns A promise resolving to the response data object.
284
+ */
285
+ sendSignedRequest(endpoint, method, params = {}) {
286
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, params, void 0, { isSigned: true });
287
+ }
288
+ /**
289
+ * Get Dual Investment product list
290
+ *
291
+ * Weight: 1(IP)
292
+ *
293
+ * @summary Get Dual Investment product list
294
+ * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.
295
+ *
296
+ * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}
297
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
298
+ * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}
299
+ */
300
+ getDualInvestmentProductList(requestParameters) {
301
+ return this.marketDataApi.getDualInvestmentProductList(requestParameters);
302
+ }
303
+ /**
304
+ * Change Auto-Compound status
305
+ *
306
+ * Weight: 1(IP)
307
+ *
308
+ * @summary Change Auto-Compound status(USER_DATA)
309
+ * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.
310
+ *
311
+ * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}
312
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
313
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}
314
+ */
315
+ changeAutoCompoundStatus(requestParameters) {
316
+ return this.tradeApi.changeAutoCompoundStatus(requestParameters);
317
+ }
318
+ /**
319
+ * Check Dual Investment accounts
320
+ *
321
+ * Weight: 1(IP)
322
+ *
323
+ * @summary Check Dual Investment accounts(USER_DATA)
324
+ * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.
325
+ *
326
+ * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}
327
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
328
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}
329
+ */
330
+ checkDualInvestmentAccounts(requestParameters = {}) {
331
+ return this.tradeApi.checkDualInvestmentAccounts(requestParameters);
332
+ }
333
+ /**
334
+ * Get Dual Investment positions (batch)
335
+ *
336
+ * Weight: 1(IP)
337
+ *
338
+ * @summary Get Dual Investment positions(USER_DATA)
339
+ * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.
340
+ *
341
+ * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}
342
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
343
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}
344
+ */
345
+ getDualInvestmentPositions(requestParameters = {}) {
346
+ return this.tradeApi.getDualInvestmentPositions(requestParameters);
347
+ }
348
+ /**
349
+ * Subscribe Dual Investment products
350
+ *
351
+ * Products are not available. // this means APR changes to lower value, or orders are not unavailable.
352
+ * Failed. This means System or network errors.
353
+ *
354
+ * Weight: 1(IP)
355
+ *
356
+ * @summary Subscribe Dual Investment products(USER_DATA)
357
+ * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.
358
+ *
359
+ * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}
360
+ * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
361
+ * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}
362
+ */
363
+ subscribeDualInvestmentProducts(requestParameters) {
364
+ return this.tradeApi.subscribeDualInvestmentProducts(requestParameters);
365
+ }
366
+ };
367
+
368
+ //#endregion
369
+ //#region src/rest-api/index.ts
370
+ var rest_api_exports = /* @__PURE__ */ __export({
371
+ MarketDataApi: () => MarketDataApi,
372
+ RestAPI: () => RestAPI,
373
+ TradeApi: () => TradeApi
374
+ });
375
+
376
+ //#endregion
377
+ //#region src/dual-investment.ts
378
+ var DualInvestment = class {
379
+ constructor(config) {
380
+ const userAgent = (0, __binance_common.buildUserAgent)(name, version);
381
+ if (config?.configurationRestAPI) {
382
+ const configRestAPI = new __binance_common.ConfigurationRestAPI(config.configurationRestAPI);
383
+ configRestAPI.basePath = configRestAPI.basePath || __binance_common.DUAL_INVESTMENT_REST_API_PROD_URL;
384
+ configRestAPI.baseOptions = configRestAPI.baseOptions || {};
385
+ configRestAPI.baseOptions.headers = {
386
+ ...configRestAPI.baseOptions.headers || {},
387
+ "User-Agent": userAgent
388
+ };
389
+ this.restAPI = new RestAPI(configRestAPI);
390
+ }
391
+ }
392
+ };
393
+
394
+ //#endregion
395
+ Object.defineProperty(exports, 'BadRequestError', {
396
+ enumerable: true,
397
+ get: function () {
398
+ return __binance_common.BadRequestError;
325
399
  }
326
- /**
327
- * Check Dual Investment accounts
328
- *
329
- * Weight: 1(IP)
330
- *
331
- * @summary Check Dual Investment accounts(USER_DATA)
332
- * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.
333
- * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}
334
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
335
- * @memberof TradeApi
336
- * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}
337
- */
338
- async checkDualInvestmentAccounts(requestParameters = {}) {
339
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.checkDualInvestmentAccounts(
340
- requestParameters?.recvWindow
341
- );
342
- return (0, import_common2.sendRequest)(
343
- this.configuration,
344
- localVarAxiosArgs.endpoint,
345
- localVarAxiosArgs.method,
346
- localVarAxiosArgs.params,
347
- localVarAxiosArgs?.timeUnit,
348
- { isSigned: true }
349
- );
400
+ });
401
+ Object.defineProperty(exports, 'ConfigurationDualInvestment', {
402
+ enumerable: true,
403
+ get: function () {
404
+ return ConfigurationDualInvestment;
350
405
  }
351
- /**
352
- * Get Dual Investment positions (batch)
353
- *
354
- * Weight: 1(IP)
355
- *
356
- * @summary Get Dual Investment positions(USER_DATA)
357
- * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.
358
- * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}
359
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
360
- * @memberof TradeApi
361
- * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}
362
- */
363
- async getDualInvestmentPositions(requestParameters = {}) {
364
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDualInvestmentPositions(
365
- requestParameters?.status,
366
- requestParameters?.pageSize,
367
- requestParameters?.pageIndex,
368
- requestParameters?.recvWindow
369
- );
370
- return (0, import_common2.sendRequest)(
371
- this.configuration,
372
- localVarAxiosArgs.endpoint,
373
- localVarAxiosArgs.method,
374
- localVarAxiosArgs.params,
375
- localVarAxiosArgs?.timeUnit,
376
- { isSigned: true }
377
- );
406
+ });
407
+ Object.defineProperty(exports, 'ConnectorClientError', {
408
+ enumerable: true,
409
+ get: function () {
410
+ return __binance_common.ConnectorClientError;
378
411
  }
379
- /**
380
- * Subscribe Dual Investment products
381
- *
382
- * Products are not available. // this means APR changes to lower value, or orders are not unavailable.
383
- * Failed. This means System or network errors.
384
- *
385
- * Weight: 1(IP)
386
- *
387
- * @summary Subscribe Dual Investment products(USER_DATA)
388
- * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.
389
- * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}
390
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
391
- * @memberof TradeApi
392
- * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}
393
- */
394
- async subscribeDualInvestmentProducts(requestParameters) {
395
- const localVarAxiosArgs = await this.localVarAxiosParamCreator.subscribeDualInvestmentProducts(
396
- requestParameters?.id,
397
- requestParameters?.orderId,
398
- requestParameters?.depositAmount,
399
- requestParameters?.autoCompoundPlan,
400
- requestParameters?.recvWindow
401
- );
402
- return (0, import_common2.sendRequest)(
403
- this.configuration,
404
- localVarAxiosArgs.endpoint,
405
- localVarAxiosArgs.method,
406
- localVarAxiosArgs.params,
407
- localVarAxiosArgs?.timeUnit,
408
- { isSigned: true }
409
- );
412
+ });
413
+ Object.defineProperty(exports, 'DUAL_INVESTMENT_REST_API_PROD_URL', {
414
+ enumerable: true,
415
+ get: function () {
416
+ return __binance_common.DUAL_INVESTMENT_REST_API_PROD_URL;
410
417
  }
411
- };
412
-
413
- // src/rest-api/rest-api.ts
414
- var import_common3 = require("@binance/common");
415
- var RestAPI = class {
416
- constructor(configuration) {
417
- this.configuration = configuration;
418
- this.marketDataApi = new MarketDataApi(configuration);
419
- this.tradeApi = new TradeApi(configuration);
418
+ });
419
+ exports.DualInvestment = DualInvestment;
420
+ Object.defineProperty(exports, 'DualInvestmentRestAPI', {
421
+ enumerable: true,
422
+ get: function () {
423
+ return rest_api_exports;
420
424
  }
421
- /**
422
- * Generic function to send a request.
423
- * @param endpoint - The API endpoint to call.
424
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
425
- * @param params - Query parameters for the request.
426
- *
427
- * @returns A promise resolving to the response data object.
428
- */
429
- sendRequest(endpoint, method, params = {}) {
430
- return (0, import_common3.sendRequest)(this.configuration, endpoint, method, params, void 0);
425
+ });
426
+ Object.defineProperty(exports, 'ForbiddenError', {
427
+ enumerable: true,
428
+ get: function () {
429
+ return __binance_common.ForbiddenError;
431
430
  }
432
- /**
433
- * Generic function to send a signed request.
434
- * @param endpoint - The API endpoint to call.
435
- * @param method - HTTP method to use (GET, POST, DELETE, etc.).
436
- * @param params - Query parameters for the request.
437
- *
438
- * @returns A promise resolving to the response data object.
439
- */
440
- sendSignedRequest(endpoint, method, params = {}) {
441
- return (0, import_common3.sendRequest)(this.configuration, endpoint, method, params, void 0, {
442
- isSigned: true
443
- });
431
+ });
432
+ Object.defineProperty(exports, 'NetworkError', {
433
+ enumerable: true,
434
+ get: function () {
435
+ return __binance_common.NetworkError;
444
436
  }
445
- /**
446
- * Get Dual Investment product list
447
- *
448
- * Weight: 1(IP)
449
- *
450
- * @summary Get Dual Investment product list
451
- * @param {GetDualInvestmentProductListRequest} requestParameters Request parameters.
452
- *
453
- * @returns {Promise<RestApiResponse<GetDualInvestmentProductListResponse>>}
454
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
455
- * @see {@link https://developers.binance.com/docs/dual_investment/market-data/Get-Dual-Investment-product-list Binance API Documentation}
456
- */
457
- getDualInvestmentProductList(requestParameters) {
458
- return this.marketDataApi.getDualInvestmentProductList(requestParameters);
437
+ });
438
+ Object.defineProperty(exports, 'NotFoundError', {
439
+ enumerable: true,
440
+ get: function () {
441
+ return __binance_common.NotFoundError;
459
442
  }
460
- /**
461
- * Change Auto-Compound status
462
- *
463
- * Weight: 1(IP)
464
- *
465
- * @summary Change Auto-Compound status(USER_DATA)
466
- * @param {ChangeAutoCompoundStatusRequest} requestParameters Request parameters.
467
- *
468
- * @returns {Promise<RestApiResponse<ChangeAutoCompoundStatusResponse>>}
469
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
470
- * @see {@link https://developers.binance.com/docs/dual_investment/trade/Change-Auto-Compound-status Binance API Documentation}
471
- */
472
- changeAutoCompoundStatus(requestParameters) {
473
- return this.tradeApi.changeAutoCompoundStatus(requestParameters);
443
+ });
444
+ Object.defineProperty(exports, 'RateLimitBanError', {
445
+ enumerable: true,
446
+ get: function () {
447
+ return __binance_common.RateLimitBanError;
474
448
  }
475
- /**
476
- * Check Dual Investment accounts
477
- *
478
- * Weight: 1(IP)
479
- *
480
- * @summary Check Dual Investment accounts(USER_DATA)
481
- * @param {CheckDualInvestmentAccountsRequest} requestParameters Request parameters.
482
- *
483
- * @returns {Promise<RestApiResponse<CheckDualInvestmentAccountsResponse>>}
484
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
485
- * @see {@link https://developers.binance.com/docs/dual_investment/trade/Check-Dual-Investment-accounts Binance API Documentation}
486
- */
487
- checkDualInvestmentAccounts(requestParameters = {}) {
488
- return this.tradeApi.checkDualInvestmentAccounts(requestParameters);
449
+ });
450
+ Object.defineProperty(exports, 'RequiredError', {
451
+ enumerable: true,
452
+ get: function () {
453
+ return __binance_common.RequiredError;
489
454
  }
490
- /**
491
- * Get Dual Investment positions (batch)
492
- *
493
- * Weight: 1(IP)
494
- *
495
- * @summary Get Dual Investment positions(USER_DATA)
496
- * @param {GetDualInvestmentPositionsRequest} requestParameters Request parameters.
497
- *
498
- * @returns {Promise<RestApiResponse<GetDualInvestmentPositionsResponse>>}
499
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
500
- * @see {@link https://developers.binance.com/docs/dual_investment/trade/Get-Dual-Investment-positions Binance API Documentation}
501
- */
502
- getDualInvestmentPositions(requestParameters = {}) {
503
- return this.tradeApi.getDualInvestmentPositions(requestParameters);
455
+ });
456
+ Object.defineProperty(exports, 'ServerError', {
457
+ enumerable: true,
458
+ get: function () {
459
+ return __binance_common.ServerError;
504
460
  }
505
- /**
506
- * Subscribe Dual Investment products
507
- *
508
- * Products are not available. // this means APR changes to lower value, or orders are not unavailable.
509
- * Failed. This means System or network errors.
510
- *
511
- * Weight: 1(IP)
512
- *
513
- * @summary Subscribe Dual Investment products(USER_DATA)
514
- * @param {SubscribeDualInvestmentProductsRequest} requestParameters Request parameters.
515
- *
516
- * @returns {Promise<RestApiResponse<SubscribeDualInvestmentProductsResponse>>}
517
- * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
518
- * @see {@link https://developers.binance.com/docs/dual_investment/trade/Subscribe-Dual-Investment-products Binance API Documentation}
519
- */
520
- subscribeDualInvestmentProducts(requestParameters) {
521
- return this.tradeApi.subscribeDualInvestmentProducts(requestParameters);
461
+ });
462
+ Object.defineProperty(exports, 'TooManyRequestsError', {
463
+ enumerable: true,
464
+ get: function () {
465
+ return __binance_common.TooManyRequestsError;
522
466
  }
523
- };
524
-
525
- // src/dual-investment.ts
526
- var DualInvestment = class {
527
- constructor(config) {
528
- const userAgent = (0, import_common4.buildUserAgent)(name, version);
529
- if (config?.configurationRestAPI) {
530
- const configRestAPI = new import_common4.ConfigurationRestAPI(
531
- config.configurationRestAPI
532
- );
533
- configRestAPI.basePath = configRestAPI.basePath || import_common4.DUAL_INVESTMENT_REST_API_PROD_URL;
534
- configRestAPI.baseOptions = configRestAPI.baseOptions || {};
535
- configRestAPI.baseOptions.headers = {
536
- ...configRestAPI.baseOptions.headers || {},
537
- "User-Agent": userAgent
538
- };
539
- this.restAPI = new RestAPI(configRestAPI);
540
- }
467
+ });
468
+ Object.defineProperty(exports, 'UnauthorizedError', {
469
+ enumerable: true,
470
+ get: function () {
471
+ return __binance_common.UnauthorizedError;
541
472
  }
542
- };
543
-
544
- // src/index.ts
545
- var import_common5 = require("@binance/common");
546
- // Annotate the CommonJS export names for ESM import in node:
547
- 0 && (module.exports = {
548
- BadRequestError,
549
- ConnectorClientError,
550
- DUAL_INVESTMENT_REST_API_PROD_URL,
551
- DualInvestment,
552
- DualInvestmentRestAPI,
553
- ForbiddenError,
554
- NetworkError,
555
- NotFoundError,
556
- RateLimitBanError,
557
- RequiredError,
558
- ServerError,
559
- TooManyRequestsError,
560
- UnauthorizedError
561
473
  });
562
474
  //# sourceMappingURL=index.js.map