@binance/convert 5.0.11 → 5.0.13

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/convert";
17
- var version = "5.0.11";
17
+ var version = "5.0.13";
18
18
 
19
19
  //#endregion
20
20
  //#region src/rest-api/modules/market-data-api.ts
@@ -38,6 +38,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
38
38
  listAllConvertPairs: async (fromAsset, toAsset) => {
39
39
  const localVarQueryParameter = {};
40
40
  const localVarBodyParameter = {};
41
+ const localVarHeaderParameter = {};
41
42
  if (fromAsset !== void 0 && fromAsset !== null) localVarQueryParameter["fromAsset"] = fromAsset;
42
43
  if (toAsset !== void 0 && toAsset !== null) localVarQueryParameter["toAsset"] = toAsset;
43
44
  let _timeUnit;
@@ -47,12 +48,14 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
47
48
  method: "GET",
48
49
  queryParams: localVarQueryParameter,
49
50
  bodyParams: localVarBodyParameter,
51
+ headerParams: localVarHeaderParameter,
50
52
  timeUnit: _timeUnit
51
53
  };
52
54
  },
53
55
  queryOrderQuantityPrecisionPerAsset: async (recvWindow) => {
54
56
  const localVarQueryParameter = {};
55
57
  const localVarBodyParameter = {};
58
+ const localVarHeaderParameter = {};
56
59
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
57
60
  let _timeUnit;
58
61
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -61,6 +64,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
61
64
  method: "GET",
62
65
  queryParams: localVarQueryParameter,
63
66
  bodyParams: localVarBodyParameter,
67
+ headerParams: localVarHeaderParameter,
64
68
  timeUnit: _timeUnit
65
69
  };
66
70
  }
@@ -92,7 +96,7 @@ var MarketDataApi = class {
92
96
  */
93
97
  async listAllConvertPairs(requestParameters = {}) {
94
98
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.listAllConvertPairs(requestParameters?.fromAsset, requestParameters?.toAsset);
95
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
99
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
96
100
  }
97
101
  /**
98
102
  * Query for supported asset’s precision information
@@ -108,7 +112,7 @@ var MarketDataApi = class {
108
112
  */
109
113
  async queryOrderQuantityPrecisionPerAsset(requestParameters = {}) {
110
114
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryOrderQuantityPrecisionPerAsset(requestParameters?.recvWindow);
111
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
115
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
112
116
  }
113
117
  };
114
118
 
@@ -135,6 +139,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
135
139
  (0, __binance_common.assertParamExists)("acceptQuote", "quoteId", quoteId);
136
140
  const localVarQueryParameter = {};
137
141
  const localVarBodyParameter = {};
142
+ const localVarHeaderParameter = {};
138
143
  if (quoteId !== void 0 && quoteId !== null) localVarQueryParameter["quoteId"] = quoteId;
139
144
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
140
145
  let _timeUnit;
@@ -144,6 +149,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
144
149
  method: "POST",
145
150
  queryParams: localVarQueryParameter,
146
151
  bodyParams: localVarBodyParameter,
152
+ headerParams: localVarHeaderParameter,
147
153
  timeUnit: _timeUnit
148
154
  };
149
155
  },
@@ -151,6 +157,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
151
157
  (0, __binance_common.assertParamExists)("cancelLimitOrder", "orderId", orderId);
152
158
  const localVarQueryParameter = {};
153
159
  const localVarBodyParameter = {};
160
+ const localVarHeaderParameter = {};
154
161
  if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
155
162
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
156
163
  let _timeUnit;
@@ -160,6 +167,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
160
167
  method: "POST",
161
168
  queryParams: localVarQueryParameter,
162
169
  bodyParams: localVarBodyParameter,
170
+ headerParams: localVarHeaderParameter,
163
171
  timeUnit: _timeUnit
164
172
  };
165
173
  },
@@ -168,6 +176,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
168
176
  (0, __binance_common.assertParamExists)("getConvertTradeHistory", "endTime", endTime);
169
177
  const localVarQueryParameter = {};
170
178
  const localVarBodyParameter = {};
179
+ const localVarHeaderParameter = {};
171
180
  if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
172
181
  if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
173
182
  if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
@@ -179,12 +188,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
179
188
  method: "GET",
180
189
  queryParams: localVarQueryParameter,
181
190
  bodyParams: localVarBodyParameter,
191
+ headerParams: localVarHeaderParameter,
182
192
  timeUnit: _timeUnit
183
193
  };
184
194
  },
185
195
  orderStatus: async (orderId, quoteId) => {
186
196
  const localVarQueryParameter = {};
187
197
  const localVarBodyParameter = {};
198
+ const localVarHeaderParameter = {};
188
199
  if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
189
200
  if (quoteId !== void 0 && quoteId !== null) localVarQueryParameter["quoteId"] = quoteId;
190
201
  let _timeUnit;
@@ -194,6 +205,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
194
205
  method: "GET",
195
206
  queryParams: localVarQueryParameter,
196
207
  bodyParams: localVarBodyParameter,
208
+ headerParams: localVarHeaderParameter,
197
209
  timeUnit: _timeUnit
198
210
  };
199
211
  },
@@ -205,6 +217,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
205
217
  (0, __binance_common.assertParamExists)("placeLimitOrder", "expiredType", expiredType);
206
218
  const localVarQueryParameter = {};
207
219
  const localVarBodyParameter = {};
220
+ const localVarHeaderParameter = {};
208
221
  if (baseAsset !== void 0 && baseAsset !== null) localVarQueryParameter["baseAsset"] = baseAsset;
209
222
  if (quoteAsset !== void 0 && quoteAsset !== null) localVarQueryParameter["quoteAsset"] = quoteAsset;
210
223
  if (limitPrice !== void 0 && limitPrice !== null) localVarQueryParameter["limitPrice"] = limitPrice;
@@ -221,12 +234,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
221
234
  method: "POST",
222
235
  queryParams: localVarQueryParameter,
223
236
  bodyParams: localVarBodyParameter,
237
+ headerParams: localVarHeaderParameter,
224
238
  timeUnit: _timeUnit
225
239
  };
226
240
  },
227
241
  queryLimitOpenOrders: async (recvWindow) => {
228
242
  const localVarQueryParameter = {};
229
243
  const localVarBodyParameter = {};
244
+ const localVarHeaderParameter = {};
230
245
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
231
246
  let _timeUnit;
232
247
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -235,6 +250,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
235
250
  method: "GET",
236
251
  queryParams: localVarQueryParameter,
237
252
  bodyParams: localVarBodyParameter,
253
+ headerParams: localVarHeaderParameter,
238
254
  timeUnit: _timeUnit
239
255
  };
240
256
  },
@@ -243,6 +259,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
243
259
  (0, __binance_common.assertParamExists)("sendQuoteRequest", "toAsset", toAsset);
244
260
  const localVarQueryParameter = {};
245
261
  const localVarBodyParameter = {};
262
+ const localVarHeaderParameter = {};
246
263
  if (fromAsset !== void 0 && fromAsset !== null) localVarQueryParameter["fromAsset"] = fromAsset;
247
264
  if (toAsset !== void 0 && toAsset !== null) localVarQueryParameter["toAsset"] = toAsset;
248
265
  if (fromAmount !== void 0 && fromAmount !== null) localVarQueryParameter["fromAmount"] = fromAmount;
@@ -257,6 +274,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
257
274
  method: "POST",
258
275
  queryParams: localVarQueryParameter,
259
276
  bodyParams: localVarBodyParameter,
277
+ headerParams: localVarHeaderParameter,
260
278
  timeUnit: _timeUnit
261
279
  };
262
280
  }
@@ -285,7 +303,7 @@ var TradeApi = class {
285
303
  */
286
304
  async acceptQuote(requestParameters) {
287
305
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.acceptQuote(requestParameters?.quoteId, requestParameters?.recvWindow);
288
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
306
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
289
307
  }
290
308
  /**
291
309
  * Enable users to cancel a limit order
@@ -301,7 +319,7 @@ var TradeApi = class {
301
319
  */
302
320
  async cancelLimitOrder(requestParameters) {
303
321
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelLimitOrder(requestParameters?.orderId, requestParameters?.recvWindow);
304
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
322
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
305
323
  }
306
324
  /**
307
325
  * Get Convert Trade History
@@ -319,7 +337,7 @@ var TradeApi = class {
319
337
  */
320
338
  async getConvertTradeHistory(requestParameters) {
321
339
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getConvertTradeHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
322
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
340
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
323
341
  }
324
342
  /**
325
343
  * Query order status by order ID.
@@ -335,7 +353,7 @@ var TradeApi = class {
335
353
  */
336
354
  async orderStatus(requestParameters = {}) {
337
355
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.orderStatus(requestParameters?.orderId, requestParameters?.quoteId);
338
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
356
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
339
357
  }
340
358
  /**
341
359
  * Enable users to place a limit order
@@ -355,7 +373,7 @@ var TradeApi = class {
355
373
  */
356
374
  async placeLimitOrder(requestParameters) {
357
375
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.placeLimitOrder(requestParameters?.baseAsset, requestParameters?.quoteAsset, requestParameters?.limitPrice, requestParameters?.side, requestParameters?.expiredType, requestParameters?.baseAmount, requestParameters?.quoteAmount, requestParameters?.walletType, requestParameters?.recvWindow);
358
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
376
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
359
377
  }
360
378
  /**
361
379
  * Request a quote for the requested token pairs
@@ -371,7 +389,7 @@ var TradeApi = class {
371
389
  */
372
390
  async queryLimitOpenOrders(requestParameters = {}) {
373
391
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLimitOpenOrders(requestParameters?.recvWindow);
374
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
392
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
375
393
  }
376
394
  /**
377
395
  * Request a quote for the requested token pairs
@@ -390,7 +408,7 @@ var TradeApi = class {
390
408
  */
391
409
  async sendQuoteRequest(requestParameters) {
392
410
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.sendQuoteRequest(requestParameters?.fromAsset, requestParameters?.toAsset, requestParameters?.fromAmount, requestParameters?.toAmount, requestParameters?.walletType, requestParameters?.validTime, requestParameters?.recvWindow);
393
- return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
411
+ return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
394
412
  }
395
413
  };
396
414
 
@@ -424,7 +442,7 @@ var RestAPI = class {
424
442
  * @returns A promise resolving to the response data object.
425
443
  */
426
444
  sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
427
- return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
445
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0);
428
446
  }
429
447
  /**
430
448
  * Generic function to send a signed request.
@@ -436,7 +454,7 @@ var RestAPI = class {
436
454
  * @returns A promise resolving to the response data object.
437
455
  */
438
456
  sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
439
- return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
457
+ return (0, __binance_common.sendRequest)(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0, { isSigned: true });
440
458
  }
441
459
  /**
442
460
  * Query for all convertible token pairs and the tokens’ respective upper/lower limits
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","CONVERT_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/convert.ts"],"sourcesContent":["{\n \"name\": \"@binance/convert\",\n \"description\": \"Official Binance Convert Connector - A lightweight library that provides a convenient interface to Binance's Convert REST API.\",\n \"version\": \"5.0.11\",\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 \"Convert\",\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ListAllConvertPairsResponse,\n QueryOrderQuantityPrecisionPerAssetResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {string} [fromAsset] User spends coin\n * @param {string} [toAsset] User receives coin\n *\n * @throws {RequiredError}\n */\n listAllConvertPairs: async (fromAsset?: string, toAsset?: string): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (fromAsset !== undefined && fromAsset !== null) {\n localVarQueryParameter['fromAsset'] = fromAsset;\n }\n if (toAsset !== undefined && toAsset !== null) {\n localVarQueryParameter['toAsset'] = toAsset;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/convert/exchangeInfo',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n queryOrderQuantityPrecisionPerAsset: async (\n recvWindow?: number | bigint\n ): 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/convert/assetInfo',\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n listAllConvertPairs(\n requestParameters?: ListAllConvertPairsRequest\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>>;\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n queryOrderQuantityPrecisionPerAsset(\n requestParameters?: QueryOrderQuantityPrecisionPerAssetRequest\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>;\n}\n\n/**\n * Request parameters for listAllConvertPairs operation in MarketDataApi.\n * @interface ListAllConvertPairsRequest\n */\nexport interface ListAllConvertPairsRequest {\n /**\n * User spends coin\n * @type {string}\n * @memberof MarketDataApiListAllConvertPairs\n */\n readonly fromAsset?: string;\n\n /**\n * User receives coin\n * @type {string}\n * @memberof MarketDataApiListAllConvertPairs\n */\n readonly toAsset?: string;\n}\n\n/**\n * Request parameters for queryOrderQuantityPrecisionPerAsset operation in MarketDataApi.\n * @interface QueryOrderQuantityPrecisionPerAssetRequest\n */\nexport interface QueryOrderQuantityPrecisionPerAssetRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof MarketDataApiQueryOrderQuantityPrecisionPerAsset\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ListAllConvertPairsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/convert/market-data/ Binance API Documentation}\n */\n public async listAllConvertPairs(\n requestParameters: ListAllConvertPairsRequest = {}\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.listAllConvertPairs(\n requestParameters?.fromAsset,\n requestParameters?.toAsset\n );\n return sendRequest<ListAllConvertPairsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset Binance API Documentation}\n */\n public async queryOrderQuantityPrecisionPerAsset(\n requestParameters: QueryOrderQuantityPrecisionPerAssetRequest = {}\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.queryOrderQuantityPrecisionPerAsset(\n requestParameters?.recvWindow\n );\n return sendRequest<QueryOrderQuantityPrecisionPerAssetResponse>(\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 AcceptQuoteResponse,\n CancelLimitOrderResponse,\n GetConvertTradeHistoryResponse,\n OrderStatusResponse,\n PlaceLimitOrderResponse,\n QueryLimitOpenOrdersResponse,\n SendQuoteRequestResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {string} quoteId\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n acceptQuote: async (\n quoteId: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'quoteId' is not null or undefined\n assertParamExists('acceptQuote', 'quoteId', quoteId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (quoteId !== undefined && quoteId !== null) {\n localVarQueryParameter['quoteId'] = quoteId;\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/convert/acceptQuote',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {number | bigint} orderId The orderId from `placeOrder` api\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n cancelLimitOrder: async (\n orderId: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('cancelLimitOrder', 'orderId', orderId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\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/convert/limit/cancelOrder',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {number | bigint} startTime\n * @param {number | bigint} endTime\n * @param {number | bigint} [limit] Default 100, Max 1000\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getConvertTradeHistory: async (\n startTime: number | bigint,\n endTime: number | bigint,\n limit?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'startTime' is not null or undefined\n assertParamExists('getConvertTradeHistory', 'startTime', startTime);\n // verify required parameter 'endTime' is not null or undefined\n assertParamExists('getConvertTradeHistory', 'endTime', endTime);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\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/convert/tradeFlow',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {string} [orderId] Either orderId or quoteId is required\n * @param {string} [quoteId] Either orderId or quoteId is required\n *\n * @throws {RequiredError}\n */\n orderStatus: async (orderId?: string, quoteId?: string): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (quoteId !== undefined && quoteId !== null) {\n localVarQueryParameter['quoteId'] = quoteId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/convert/orderStatus',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {string} baseAsset base asset (use the response `fromIsBase` from `GET /sapi/v1/convert/exchangeInfo` api to check which one is baseAsset )\n * @param {string} quoteAsset quote asset\n * @param {number} limitPrice Symbol limit price (from baseAsset to quoteAsset)\n * @param {string} side `BUY` or `SELL`\n * @param {string} expiredType 1_D, 3_D, 7_D, 30_D (D means day)\n * @param {number} [baseAmount] Base asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @param {number} [quoteAmount] Quote asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @param {string} [walletType] It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n placeLimitOrder: async (\n baseAsset: string,\n quoteAsset: string,\n limitPrice: number,\n side: string,\n expiredType: string,\n baseAmount?: number,\n quoteAmount?: number,\n walletType?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseAsset' is not null or undefined\n assertParamExists('placeLimitOrder', 'baseAsset', baseAsset);\n // verify required parameter 'quoteAsset' is not null or undefined\n assertParamExists('placeLimitOrder', 'quoteAsset', quoteAsset);\n // verify required parameter 'limitPrice' is not null or undefined\n assertParamExists('placeLimitOrder', 'limitPrice', limitPrice);\n // verify required parameter 'side' is not null or undefined\n assertParamExists('placeLimitOrder', 'side', side);\n // verify required parameter 'expiredType' is not null or undefined\n assertParamExists('placeLimitOrder', 'expiredType', expiredType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (baseAsset !== undefined && baseAsset !== null) {\n localVarQueryParameter['baseAsset'] = baseAsset;\n }\n if (quoteAsset !== undefined && quoteAsset !== null) {\n localVarQueryParameter['quoteAsset'] = quoteAsset;\n }\n if (limitPrice !== undefined && limitPrice !== null) {\n localVarQueryParameter['limitPrice'] = limitPrice;\n }\n if (baseAmount !== undefined && baseAmount !== null) {\n localVarQueryParameter['baseAmount'] = baseAmount;\n }\n if (quoteAmount !== undefined && quoteAmount !== null) {\n localVarQueryParameter['quoteAmount'] = quoteAmount;\n }\n if (side !== undefined && side !== null) {\n localVarQueryParameter['side'] = side;\n }\n if (walletType !== undefined && walletType !== null) {\n localVarQueryParameter['walletType'] = walletType;\n }\n if (expiredType !== undefined && expiredType !== null) {\n localVarQueryParameter['expiredType'] = expiredType;\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/convert/limit/placeOrder',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n queryLimitOpenOrders: 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/convert/limit/queryOpenOrders',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {string} fromAsset\n * @param {string} toAsset\n * @param {number} [fromAmount] When specified, it is the amount you will be debited after the conversion\n * @param {number} [toAmount] When specified, it is the amount you will be credited after the conversion\n * @param {string} [walletType] It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @param {string} [validTime] 10s, 30s, 1m, default 10s\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n sendQuoteRequest: async (\n fromAsset: string,\n toAsset: string,\n fromAmount?: number,\n toAmount?: number,\n walletType?: string,\n validTime?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'fromAsset' is not null or undefined\n assertParamExists('sendQuoteRequest', 'fromAsset', fromAsset);\n // verify required parameter 'toAsset' is not null or undefined\n assertParamExists('sendQuoteRequest', 'toAsset', toAsset);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (fromAsset !== undefined && fromAsset !== null) {\n localVarQueryParameter['fromAsset'] = fromAsset;\n }\n if (toAsset !== undefined && toAsset !== null) {\n localVarQueryParameter['toAsset'] = toAsset;\n }\n if (fromAmount !== undefined && fromAmount !== null) {\n localVarQueryParameter['fromAmount'] = fromAmount;\n }\n if (toAmount !== undefined && toAmount !== null) {\n localVarQueryParameter['toAmount'] = toAmount;\n }\n if (walletType !== undefined && walletType !== null) {\n localVarQueryParameter['walletType'] = walletType;\n }\n if (validTime !== undefined && validTime !== null) {\n localVarQueryParameter['validTime'] = validTime;\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/convert/getQuote',\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 * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>>;\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>>;\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>>;\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n orderStatus(\n requestParameters?: OrderStatusRequest\n ): Promise<RestApiResponse<OrderStatusResponse>>;\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>>;\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n queryLimitOpenOrders(\n requestParameters?: QueryLimitOpenOrdersRequest\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>;\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>>;\n}\n\n/**\n * Request parameters for acceptQuote operation in TradeApi.\n * @interface AcceptQuoteRequest\n */\nexport interface AcceptQuoteRequest {\n /**\n *\n * @type {string}\n * @memberof TradeApiAcceptQuote\n */\n readonly quoteId: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiAcceptQuote\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for cancelLimitOrder operation in TradeApi.\n * @interface CancelLimitOrderRequest\n */\nexport interface CancelLimitOrderRequest {\n /**\n * The orderId from `placeOrder` api\n * @type {number | bigint}\n * @memberof TradeApiCancelLimitOrder\n */\n readonly orderId: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiCancelLimitOrder\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getConvertTradeHistory operation in TradeApi.\n * @interface GetConvertTradeHistoryRequest\n */\nexport interface GetConvertTradeHistoryRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly startTime: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly endTime: number | bigint;\n\n /**\n * Default 100, Max 1000\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly limit?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for orderStatus operation in TradeApi.\n * @interface OrderStatusRequest\n */\nexport interface OrderStatusRequest {\n /**\n * Either orderId or quoteId is required\n * @type {string}\n * @memberof TradeApiOrderStatus\n */\n readonly orderId?: string;\n\n /**\n * Either orderId or quoteId is required\n * @type {string}\n * @memberof TradeApiOrderStatus\n */\n readonly quoteId?: string;\n}\n\n/**\n * Request parameters for placeLimitOrder operation in TradeApi.\n * @interface PlaceLimitOrderRequest\n */\nexport interface PlaceLimitOrderRequest {\n /**\n * base asset (use the response `fromIsBase` from `GET /sapi/v1/convert/exchangeInfo` api to check which one is baseAsset )\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly baseAsset: string;\n\n /**\n * quote asset\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly quoteAsset: string;\n\n /**\n * Symbol limit price (from baseAsset to quoteAsset)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly limitPrice: number;\n\n /**\n * `BUY` or `SELL`\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly side: string;\n\n /**\n * 1_D, 3_D, 7_D, 30_D (D means day)\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly expiredType: string;\n\n /**\n * Base asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly baseAmount?: number;\n\n /**\n * Quote asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly quoteAmount?: number;\n\n /**\n * It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly walletType?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryLimitOpenOrders operation in TradeApi.\n * @interface QueryLimitOpenOrdersRequest\n */\nexport interface QueryLimitOpenOrdersRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiQueryLimitOpenOrders\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for sendQuoteRequest operation in TradeApi.\n * @interface SendQuoteRequestRequest\n */\nexport interface SendQuoteRequestRequest {\n /**\n *\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly fromAsset: string;\n\n /**\n *\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly toAsset: string;\n\n /**\n * When specified, it is the amount you will be debited after the conversion\n * @type {number}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly fromAmount?: number;\n\n /**\n * When specified, it is the amount you will be credited after the conversion\n * @type {number}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly toAmount?: number;\n\n /**\n * It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly walletType?: string;\n\n /**\n * 10s, 30s, 1m, default 10s\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly validTime?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiSendQuoteRequest\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 * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<AcceptQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Accept-Quote Binance API Documentation}\n */\n public async acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.acceptQuote(\n requestParameters?.quoteId,\n requestParameters?.recvWindow\n );\n return sendRequest<AcceptQuoteResponse>(\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 * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CancelLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Cancel-Order Binance API Documentation}\n */\n public async cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelLimitOrder(\n requestParameters?.orderId,\n requestParameters?.recvWindow\n );\n return sendRequest<CancelLimitOrderResponse>(\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 Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetConvertTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History Binance API Documentation}\n */\n public async getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getConvertTradeHistory(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<GetConvertTradeHistoryResponse>(\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 * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<OrderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Order-Status Binance API Documentation}\n */\n public async orderStatus(\n requestParameters: OrderStatusRequest = {}\n ): Promise<RestApiResponse<OrderStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.orderStatus(\n requestParameters?.orderId,\n requestParameters?.quoteId\n );\n return sendRequest<OrderStatusResponse>(\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 * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<PlaceLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Place-Order Binance API Documentation}\n */\n public async placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.placeLimitOrder(\n requestParameters?.baseAsset,\n requestParameters?.quoteAsset,\n requestParameters?.limitPrice,\n requestParameters?.side,\n requestParameters?.expiredType,\n requestParameters?.baseAmount,\n requestParameters?.quoteAmount,\n requestParameters?.walletType,\n requestParameters?.recvWindow\n );\n return sendRequest<PlaceLimitOrderResponse>(\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 * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Query-Order Binance API Documentation}\n */\n public async queryLimitOpenOrders(\n requestParameters: QueryLimitOpenOrdersRequest = {}\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLimitOpenOrders(\n requestParameters?.recvWindow\n );\n return sendRequest<QueryLimitOpenOrdersResponse>(\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 * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SendQuoteRequestResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Send-quote-request Binance API Documentation}\n */\n public async sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.sendQuoteRequest(\n requestParameters?.fromAsset,\n requestParameters?.toAsset,\n requestParameters?.fromAmount,\n requestParameters?.toAmount,\n requestParameters?.walletType,\n requestParameters?.validTime,\n requestParameters?.recvWindow\n );\n return sendRequest<SendQuoteRequestResponse>(\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 {\n ListAllConvertPairsRequest,\n QueryOrderQuantityPrecisionPerAssetRequest,\n} from './modules/market-data-api';\nimport type {\n AcceptQuoteRequest,\n CancelLimitOrderRequest,\n GetConvertTradeHistoryRequest,\n OrderStatusRequest,\n PlaceLimitOrderRequest,\n QueryLimitOpenOrdersRequest,\n SendQuoteRequestRequest,\n} from './modules/trade-api';\n\nimport type {\n ListAllConvertPairsResponse,\n QueryOrderQuantityPrecisionPerAssetResponse,\n} from './types';\nimport type {\n AcceptQuoteResponse,\n CancelLimitOrderResponse,\n GetConvertTradeHistoryResponse,\n OrderStatusResponse,\n PlaceLimitOrderResponse,\n QueryLimitOpenOrdersResponse,\n SendQuoteRequestResponse,\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ListAllConvertPairsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/market-data/ Binance API Documentation}\n */\n listAllConvertPairs(\n requestParameters: ListAllConvertPairsRequest = {}\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>> {\n return this.marketDataApi.listAllConvertPairs(requestParameters);\n }\n\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset Binance API Documentation}\n */\n queryOrderQuantityPrecisionPerAsset(\n requestParameters: QueryOrderQuantityPrecisionPerAssetRequest = {}\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>> {\n return this.marketDataApi.queryOrderQuantityPrecisionPerAsset(requestParameters);\n }\n\n /**\n * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<AcceptQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Accept-Quote Binance API Documentation}\n */\n acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>> {\n return this.tradeApi.acceptQuote(requestParameters);\n }\n\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CancelLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Cancel-Order Binance API Documentation}\n */\n cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>> {\n return this.tradeApi.cancelLimitOrder(requestParameters);\n }\n\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetConvertTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History Binance API Documentation}\n */\n getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>> {\n return this.tradeApi.getConvertTradeHistory(requestParameters);\n }\n\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<OrderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Order-Status Binance API Documentation}\n */\n orderStatus(\n requestParameters: OrderStatusRequest = {}\n ): Promise<RestApiResponse<OrderStatusResponse>> {\n return this.tradeApi.orderStatus(requestParameters);\n }\n\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<PlaceLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Place-Order Binance API Documentation}\n */\n placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>> {\n return this.tradeApi.placeLimitOrder(requestParameters);\n }\n\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Query-Order Binance API Documentation}\n */\n queryLimitOpenOrders(\n requestParameters: QueryLimitOpenOrdersRequest = {}\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>> {\n return this.tradeApi.queryLimitOpenOrders(requestParameters);\n }\n\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<SendQuoteRequestResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Send-quote-request Binance API Documentation}\n */\n sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>> {\n return this.tradeApi.sendQuoteRequest(requestParameters);\n }\n}\n","/**\n * Binance Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 { buildUserAgent, ConfigurationRestAPI, CONVERT_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationConvert {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Convert {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationConvert) {\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 || CONVERT_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;;;;;;;;;;;;;;;;;;;ACyBf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EAeH,qBAAqB,OAAO,WAAoB,YAA2C;GACvF,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;AAEzD,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;GAGxC,IAAIC;AACJ,O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;;;;;;;;;;CAmBvD,gBACI,mBACiD;AACjD,SAAO,KAAK,SAAS,gBAAgB,kBAAkB;;;;;;;;;;;;;;CAe3D,qBACI,oBAAiD,EAAE,EACG;AACtD,SAAO,KAAK,SAAS,qBAAqB,kBAAkB;;;;;;;;;;;;;;;;;CAkBhE,iBACI,mBACkD;AAClD,SAAO,KAAK,SAAS,iBAAiB,kBAAkB;;;;;;;;;;;;;;AE9QhE,IAAa,UAAb,MAAqB;CAGjB,YAAY,QAA8B;EACtC,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","CONVERT_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/convert.ts"],"sourcesContent":["{\n \"name\": \"@binance/convert\",\n \"description\": \"Official Binance Convert Connector - A lightweight library that provides a convenient interface to Binance's Convert REST API.\",\n \"version\": \"5.0.13\",\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 \"Convert\",\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ListAllConvertPairsResponse,\n QueryOrderQuantityPrecisionPerAssetResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {string} [fromAsset] User spends coin\n * @param {string} [toAsset] User receives coin\n *\n * @throws {RequiredError}\n */\n listAllConvertPairs: async (fromAsset?: string, toAsset?: string): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (fromAsset !== undefined && fromAsset !== null) {\n localVarQueryParameter['fromAsset'] = fromAsset;\n }\n if (toAsset !== undefined && toAsset !== null) {\n localVarQueryParameter['toAsset'] = toAsset;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/convert/exchangeInfo',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n queryOrderQuantityPrecisionPerAsset: async (\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 (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/convert/assetInfo',\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n listAllConvertPairs(\n requestParameters?: ListAllConvertPairsRequest\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>>;\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n queryOrderQuantityPrecisionPerAsset(\n requestParameters?: QueryOrderQuantityPrecisionPerAssetRequest\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>;\n}\n\n/**\n * Request parameters for listAllConvertPairs operation in MarketDataApi.\n * @interface ListAllConvertPairsRequest\n */\nexport interface ListAllConvertPairsRequest {\n /**\n * User spends coin\n * @type {string}\n * @memberof MarketDataApiListAllConvertPairs\n */\n readonly fromAsset?: string;\n\n /**\n * User receives coin\n * @type {string}\n * @memberof MarketDataApiListAllConvertPairs\n */\n readonly toAsset?: string;\n}\n\n/**\n * Request parameters for queryOrderQuantityPrecisionPerAsset operation in MarketDataApi.\n * @interface QueryOrderQuantityPrecisionPerAssetRequest\n */\nexport interface QueryOrderQuantityPrecisionPerAssetRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof MarketDataApiQueryOrderQuantityPrecisionPerAsset\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ListAllConvertPairsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/convert/market-data/ Binance API Documentation}\n */\n public async listAllConvertPairs(\n requestParameters: ListAllConvertPairsRequest = {}\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.listAllConvertPairs(\n requestParameters?.fromAsset,\n requestParameters?.toAsset\n );\n return sendRequest<ListAllConvertPairsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset Binance API Documentation}\n */\n public async queryOrderQuantityPrecisionPerAsset(\n requestParameters: QueryOrderQuantityPrecisionPerAssetRequest = {}\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.queryOrderQuantityPrecisionPerAsset(\n requestParameters?.recvWindow\n );\n return sendRequest<QueryOrderQuantityPrecisionPerAssetResponse>(\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 AcceptQuoteResponse,\n CancelLimitOrderResponse,\n GetConvertTradeHistoryResponse,\n OrderStatusResponse,\n PlaceLimitOrderResponse,\n QueryLimitOpenOrdersResponse,\n SendQuoteRequestResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {string} quoteId\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n acceptQuote: async (\n quoteId: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'quoteId' is not null or undefined\n assertParamExists('acceptQuote', 'quoteId', quoteId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (quoteId !== undefined && quoteId !== null) {\n localVarQueryParameter['quoteId'] = quoteId;\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/convert/acceptQuote',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {number | bigint} orderId The orderId from `placeOrder` api\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n cancelLimitOrder: async (\n orderId: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('cancelLimitOrder', 'orderId', orderId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\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/convert/limit/cancelOrder',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {number | bigint} startTime\n * @param {number | bigint} endTime\n * @param {number | bigint} [limit] Default 100, Max 1000\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getConvertTradeHistory: async (\n startTime: number | bigint,\n endTime: number | bigint,\n limit?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'startTime' is not null or undefined\n assertParamExists('getConvertTradeHistory', 'startTime', startTime);\n // verify required parameter 'endTime' is not null or undefined\n assertParamExists('getConvertTradeHistory', 'endTime', endTime);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\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/convert/tradeFlow',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {string} [orderId] Either orderId or quoteId is required\n * @param {string} [quoteId] Either orderId or quoteId is required\n *\n * @throws {RequiredError}\n */\n orderStatus: async (orderId?: string, quoteId?: string): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (quoteId !== undefined && quoteId !== null) {\n localVarQueryParameter['quoteId'] = quoteId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/convert/orderStatus',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {string} baseAsset base asset (use the response `fromIsBase` from `GET /sapi/v1/convert/exchangeInfo` api to check which one is baseAsset )\n * @param {string} quoteAsset quote asset\n * @param {number} limitPrice Symbol limit price (from baseAsset to quoteAsset)\n * @param {string} side `BUY` or `SELL`\n * @param {string} expiredType 1_D, 3_D, 7_D, 30_D (D means day)\n * @param {number} [baseAmount] Base asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @param {number} [quoteAmount] Quote asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @param {string} [walletType] It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n placeLimitOrder: async (\n baseAsset: string,\n quoteAsset: string,\n limitPrice: number,\n side: string,\n expiredType: string,\n baseAmount?: number,\n quoteAmount?: number,\n walletType?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseAsset' is not null or undefined\n assertParamExists('placeLimitOrder', 'baseAsset', baseAsset);\n // verify required parameter 'quoteAsset' is not null or undefined\n assertParamExists('placeLimitOrder', 'quoteAsset', quoteAsset);\n // verify required parameter 'limitPrice' is not null or undefined\n assertParamExists('placeLimitOrder', 'limitPrice', limitPrice);\n // verify required parameter 'side' is not null or undefined\n assertParamExists('placeLimitOrder', 'side', side);\n // verify required parameter 'expiredType' is not null or undefined\n assertParamExists('placeLimitOrder', 'expiredType', expiredType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (baseAsset !== undefined && baseAsset !== null) {\n localVarQueryParameter['baseAsset'] = baseAsset;\n }\n if (quoteAsset !== undefined && quoteAsset !== null) {\n localVarQueryParameter['quoteAsset'] = quoteAsset;\n }\n if (limitPrice !== undefined && limitPrice !== null) {\n localVarQueryParameter['limitPrice'] = limitPrice;\n }\n if (baseAmount !== undefined && baseAmount !== null) {\n localVarQueryParameter['baseAmount'] = baseAmount;\n }\n if (quoteAmount !== undefined && quoteAmount !== null) {\n localVarQueryParameter['quoteAmount'] = quoteAmount;\n }\n if (side !== undefined && side !== null) {\n localVarQueryParameter['side'] = side;\n }\n if (walletType !== undefined && walletType !== null) {\n localVarQueryParameter['walletType'] = walletType;\n }\n if (expiredType !== undefined && expiredType !== null) {\n localVarQueryParameter['expiredType'] = expiredType;\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/convert/limit/placeOrder',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n queryLimitOpenOrders: 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/convert/limit/queryOpenOrders',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {string} fromAsset\n * @param {string} toAsset\n * @param {number} [fromAmount] When specified, it is the amount you will be debited after the conversion\n * @param {number} [toAmount] When specified, it is the amount you will be credited after the conversion\n * @param {string} [walletType] It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @param {string} [validTime] 10s, 30s, 1m, default 10s\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n sendQuoteRequest: async (\n fromAsset: string,\n toAsset: string,\n fromAmount?: number,\n toAmount?: number,\n walletType?: string,\n validTime?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'fromAsset' is not null or undefined\n assertParamExists('sendQuoteRequest', 'fromAsset', fromAsset);\n // verify required parameter 'toAsset' is not null or undefined\n assertParamExists('sendQuoteRequest', 'toAsset', toAsset);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (fromAsset !== undefined && fromAsset !== null) {\n localVarQueryParameter['fromAsset'] = fromAsset;\n }\n if (toAsset !== undefined && toAsset !== null) {\n localVarQueryParameter['toAsset'] = toAsset;\n }\n if (fromAmount !== undefined && fromAmount !== null) {\n localVarQueryParameter['fromAmount'] = fromAmount;\n }\n if (toAmount !== undefined && toAmount !== null) {\n localVarQueryParameter['toAmount'] = toAmount;\n }\n if (walletType !== undefined && walletType !== null) {\n localVarQueryParameter['walletType'] = walletType;\n }\n if (validTime !== undefined && validTime !== null) {\n localVarQueryParameter['validTime'] = validTime;\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/convert/getQuote',\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 * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>>;\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>>;\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>>;\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n orderStatus(\n requestParameters?: OrderStatusRequest\n ): Promise<RestApiResponse<OrderStatusResponse>>;\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>>;\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n queryLimitOpenOrders(\n requestParameters?: QueryLimitOpenOrdersRequest\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>;\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>>;\n}\n\n/**\n * Request parameters for acceptQuote operation in TradeApi.\n * @interface AcceptQuoteRequest\n */\nexport interface AcceptQuoteRequest {\n /**\n *\n * @type {string}\n * @memberof TradeApiAcceptQuote\n */\n readonly quoteId: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiAcceptQuote\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for cancelLimitOrder operation in TradeApi.\n * @interface CancelLimitOrderRequest\n */\nexport interface CancelLimitOrderRequest {\n /**\n * The orderId from `placeOrder` api\n * @type {number | bigint}\n * @memberof TradeApiCancelLimitOrder\n */\n readonly orderId: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiCancelLimitOrder\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getConvertTradeHistory operation in TradeApi.\n * @interface GetConvertTradeHistoryRequest\n */\nexport interface GetConvertTradeHistoryRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly startTime: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly endTime: number | bigint;\n\n /**\n * Default 100, Max 1000\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly limit?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for orderStatus operation in TradeApi.\n * @interface OrderStatusRequest\n */\nexport interface OrderStatusRequest {\n /**\n * Either orderId or quoteId is required\n * @type {string}\n * @memberof TradeApiOrderStatus\n */\n readonly orderId?: string;\n\n /**\n * Either orderId or quoteId is required\n * @type {string}\n * @memberof TradeApiOrderStatus\n */\n readonly quoteId?: string;\n}\n\n/**\n * Request parameters for placeLimitOrder operation in TradeApi.\n * @interface PlaceLimitOrderRequest\n */\nexport interface PlaceLimitOrderRequest {\n /**\n * base asset (use the response `fromIsBase` from `GET /sapi/v1/convert/exchangeInfo` api to check which one is baseAsset )\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly baseAsset: string;\n\n /**\n * quote asset\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly quoteAsset: string;\n\n /**\n * Symbol limit price (from baseAsset to quoteAsset)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly limitPrice: number;\n\n /**\n * `BUY` or `SELL`\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly side: string;\n\n /**\n * 1_D, 3_D, 7_D, 30_D (D means day)\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly expiredType: string;\n\n /**\n * Base asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly baseAmount?: number;\n\n /**\n * Quote asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly quoteAmount?: number;\n\n /**\n * It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly walletType?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryLimitOpenOrders operation in TradeApi.\n * @interface QueryLimitOpenOrdersRequest\n */\nexport interface QueryLimitOpenOrdersRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiQueryLimitOpenOrders\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for sendQuoteRequest operation in TradeApi.\n * @interface SendQuoteRequestRequest\n */\nexport interface SendQuoteRequestRequest {\n /**\n *\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly fromAsset: string;\n\n /**\n *\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly toAsset: string;\n\n /**\n * When specified, it is the amount you will be debited after the conversion\n * @type {number}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly fromAmount?: number;\n\n /**\n * When specified, it is the amount you will be credited after the conversion\n * @type {number}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly toAmount?: number;\n\n /**\n * It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly walletType?: string;\n\n /**\n * 10s, 30s, 1m, default 10s\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly validTime?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiSendQuoteRequest\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 * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<AcceptQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Accept-Quote Binance API Documentation}\n */\n public async acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.acceptQuote(\n requestParameters?.quoteId,\n requestParameters?.recvWindow\n );\n return sendRequest<AcceptQuoteResponse>(\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 * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CancelLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Cancel-Order Binance API Documentation}\n */\n public async cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelLimitOrder(\n requestParameters?.orderId,\n requestParameters?.recvWindow\n );\n return sendRequest<CancelLimitOrderResponse>(\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 Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetConvertTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History Binance API Documentation}\n */\n public async getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getConvertTradeHistory(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<GetConvertTradeHistoryResponse>(\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 * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<OrderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Order-Status Binance API Documentation}\n */\n public async orderStatus(\n requestParameters: OrderStatusRequest = {}\n ): Promise<RestApiResponse<OrderStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.orderStatus(\n requestParameters?.orderId,\n requestParameters?.quoteId\n );\n return sendRequest<OrderStatusResponse>(\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 * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<PlaceLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Place-Order Binance API Documentation}\n */\n public async placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.placeLimitOrder(\n requestParameters?.baseAsset,\n requestParameters?.quoteAsset,\n requestParameters?.limitPrice,\n requestParameters?.side,\n requestParameters?.expiredType,\n requestParameters?.baseAmount,\n requestParameters?.quoteAmount,\n requestParameters?.walletType,\n requestParameters?.recvWindow\n );\n return sendRequest<PlaceLimitOrderResponse>(\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 * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Query-Order Binance API Documentation}\n */\n public async queryLimitOpenOrders(\n requestParameters: QueryLimitOpenOrdersRequest = {}\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLimitOpenOrders(\n requestParameters?.recvWindow\n );\n return sendRequest<QueryLimitOpenOrdersResponse>(\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 * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SendQuoteRequestResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Send-quote-request Binance API Documentation}\n */\n public async sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.sendQuoteRequest(\n requestParameters?.fromAsset,\n requestParameters?.toAsset,\n requestParameters?.fromAmount,\n requestParameters?.toAmount,\n requestParameters?.walletType,\n requestParameters?.validTime,\n requestParameters?.recvWindow\n );\n return sendRequest<SendQuoteRequestResponse>(\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 {\n ListAllConvertPairsRequest,\n QueryOrderQuantityPrecisionPerAssetRequest,\n} from './modules/market-data-api';\nimport type {\n AcceptQuoteRequest,\n CancelLimitOrderRequest,\n GetConvertTradeHistoryRequest,\n OrderStatusRequest,\n PlaceLimitOrderRequest,\n QueryLimitOpenOrdersRequest,\n SendQuoteRequestRequest,\n} from './modules/trade-api';\n\nimport type {\n ListAllConvertPairsResponse,\n QueryOrderQuantityPrecisionPerAssetResponse,\n} from './types';\nimport type {\n AcceptQuoteResponse,\n CancelLimitOrderResponse,\n GetConvertTradeHistoryResponse,\n OrderStatusResponse,\n PlaceLimitOrderResponse,\n QueryLimitOpenOrdersResponse,\n SendQuoteRequestResponse,\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ListAllConvertPairsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/market-data/ Binance API Documentation}\n */\n listAllConvertPairs(\n requestParameters: ListAllConvertPairsRequest = {}\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>> {\n return this.marketDataApi.listAllConvertPairs(requestParameters);\n }\n\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset Binance API Documentation}\n */\n queryOrderQuantityPrecisionPerAsset(\n requestParameters: QueryOrderQuantityPrecisionPerAssetRequest = {}\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>> {\n return this.marketDataApi.queryOrderQuantityPrecisionPerAsset(requestParameters);\n }\n\n /**\n * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<AcceptQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Accept-Quote Binance API Documentation}\n */\n acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>> {\n return this.tradeApi.acceptQuote(requestParameters);\n }\n\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CancelLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Cancel-Order Binance API Documentation}\n */\n cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>> {\n return this.tradeApi.cancelLimitOrder(requestParameters);\n }\n\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetConvertTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History Binance API Documentation}\n */\n getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>> {\n return this.tradeApi.getConvertTradeHistory(requestParameters);\n }\n\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<OrderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Order-Status Binance API Documentation}\n */\n orderStatus(\n requestParameters: OrderStatusRequest = {}\n ): Promise<RestApiResponse<OrderStatusResponse>> {\n return this.tradeApi.orderStatus(requestParameters);\n }\n\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<PlaceLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Place-Order Binance API Documentation}\n */\n placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>> {\n return this.tradeApi.placeLimitOrder(requestParameters);\n }\n\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Query-Order Binance API Documentation}\n */\n queryLimitOpenOrders(\n requestParameters: QueryLimitOpenOrdersRequest = {}\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>> {\n return this.tradeApi.queryLimitOpenOrders(requestParameters);\n }\n\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<SendQuoteRequestResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Send-quote-request Binance API Documentation}\n */\n sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>> {\n return this.tradeApi.sendQuoteRequest(requestParameters);\n }\n}\n","/**\n * Binance Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 { buildUserAgent, ConfigurationRestAPI, CONVERT_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationConvert {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Convert {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationConvert) {\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 || CONVERT_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;;;;;;;;;;;;;;;;;;;ACyBf,MAAM,iCAAiC,SAAU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Y,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, CONVERT_REST_API_PROD_URL, CONVERT_REST_API_PROD_URL a
3
3
 
4
4
  //#region package.json
5
5
  var name = "@binance/convert";
6
- var version = "5.0.11";
6
+ var version = "5.0.13";
7
7
 
8
8
  //#endregion
9
9
  //#region src/rest-api/modules/market-data-api.ts
@@ -27,6 +27,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
27
27
  listAllConvertPairs: async (fromAsset, toAsset) => {
28
28
  const localVarQueryParameter = {};
29
29
  const localVarBodyParameter = {};
30
+ const localVarHeaderParameter = {};
30
31
  if (fromAsset !== void 0 && fromAsset !== null) localVarQueryParameter["fromAsset"] = fromAsset;
31
32
  if (toAsset !== void 0 && toAsset !== null) localVarQueryParameter["toAsset"] = toAsset;
32
33
  let _timeUnit;
@@ -36,12 +37,14 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
36
37
  method: "GET",
37
38
  queryParams: localVarQueryParameter,
38
39
  bodyParams: localVarBodyParameter,
40
+ headerParams: localVarHeaderParameter,
39
41
  timeUnit: _timeUnit
40
42
  };
41
43
  },
42
44
  queryOrderQuantityPrecisionPerAsset: async (recvWindow) => {
43
45
  const localVarQueryParameter = {};
44
46
  const localVarBodyParameter = {};
47
+ const localVarHeaderParameter = {};
45
48
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
46
49
  let _timeUnit;
47
50
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -50,6 +53,7 @@ const MarketDataApiAxiosParamCreator = function(configuration) {
50
53
  method: "GET",
51
54
  queryParams: localVarQueryParameter,
52
55
  bodyParams: localVarBodyParameter,
56
+ headerParams: localVarHeaderParameter,
53
57
  timeUnit: _timeUnit
54
58
  };
55
59
  }
@@ -81,7 +85,7 @@ var MarketDataApi = class {
81
85
  */
82
86
  async listAllConvertPairs(requestParameters = {}) {
83
87
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.listAllConvertPairs(requestParameters?.fromAsset, requestParameters?.toAsset);
84
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
88
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: false });
85
89
  }
86
90
  /**
87
91
  * Query for supported asset’s precision information
@@ -97,7 +101,7 @@ var MarketDataApi = class {
97
101
  */
98
102
  async queryOrderQuantityPrecisionPerAsset(requestParameters = {}) {
99
103
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryOrderQuantityPrecisionPerAsset(requestParameters?.recvWindow);
100
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
104
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
101
105
  }
102
106
  };
103
107
 
@@ -124,6 +128,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
124
128
  assertParamExists("acceptQuote", "quoteId", quoteId);
125
129
  const localVarQueryParameter = {};
126
130
  const localVarBodyParameter = {};
131
+ const localVarHeaderParameter = {};
127
132
  if (quoteId !== void 0 && quoteId !== null) localVarQueryParameter["quoteId"] = quoteId;
128
133
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
129
134
  let _timeUnit;
@@ -133,6 +138,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
133
138
  method: "POST",
134
139
  queryParams: localVarQueryParameter,
135
140
  bodyParams: localVarBodyParameter,
141
+ headerParams: localVarHeaderParameter,
136
142
  timeUnit: _timeUnit
137
143
  };
138
144
  },
@@ -140,6 +146,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
140
146
  assertParamExists("cancelLimitOrder", "orderId", orderId);
141
147
  const localVarQueryParameter = {};
142
148
  const localVarBodyParameter = {};
149
+ const localVarHeaderParameter = {};
143
150
  if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
144
151
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
145
152
  let _timeUnit;
@@ -149,6 +156,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
149
156
  method: "POST",
150
157
  queryParams: localVarQueryParameter,
151
158
  bodyParams: localVarBodyParameter,
159
+ headerParams: localVarHeaderParameter,
152
160
  timeUnit: _timeUnit
153
161
  };
154
162
  },
@@ -157,6 +165,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
157
165
  assertParamExists("getConvertTradeHistory", "endTime", endTime);
158
166
  const localVarQueryParameter = {};
159
167
  const localVarBodyParameter = {};
168
+ const localVarHeaderParameter = {};
160
169
  if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
161
170
  if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
162
171
  if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
@@ -168,12 +177,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
168
177
  method: "GET",
169
178
  queryParams: localVarQueryParameter,
170
179
  bodyParams: localVarBodyParameter,
180
+ headerParams: localVarHeaderParameter,
171
181
  timeUnit: _timeUnit
172
182
  };
173
183
  },
174
184
  orderStatus: async (orderId, quoteId) => {
175
185
  const localVarQueryParameter = {};
176
186
  const localVarBodyParameter = {};
187
+ const localVarHeaderParameter = {};
177
188
  if (orderId !== void 0 && orderId !== null) localVarQueryParameter["orderId"] = orderId;
178
189
  if (quoteId !== void 0 && quoteId !== null) localVarQueryParameter["quoteId"] = quoteId;
179
190
  let _timeUnit;
@@ -183,6 +194,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
183
194
  method: "GET",
184
195
  queryParams: localVarQueryParameter,
185
196
  bodyParams: localVarBodyParameter,
197
+ headerParams: localVarHeaderParameter,
186
198
  timeUnit: _timeUnit
187
199
  };
188
200
  },
@@ -194,6 +206,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
194
206
  assertParamExists("placeLimitOrder", "expiredType", expiredType);
195
207
  const localVarQueryParameter = {};
196
208
  const localVarBodyParameter = {};
209
+ const localVarHeaderParameter = {};
197
210
  if (baseAsset !== void 0 && baseAsset !== null) localVarQueryParameter["baseAsset"] = baseAsset;
198
211
  if (quoteAsset !== void 0 && quoteAsset !== null) localVarQueryParameter["quoteAsset"] = quoteAsset;
199
212
  if (limitPrice !== void 0 && limitPrice !== null) localVarQueryParameter["limitPrice"] = limitPrice;
@@ -210,12 +223,14 @@ const TradeApiAxiosParamCreator = function(configuration) {
210
223
  method: "POST",
211
224
  queryParams: localVarQueryParameter,
212
225
  bodyParams: localVarBodyParameter,
226
+ headerParams: localVarHeaderParameter,
213
227
  timeUnit: _timeUnit
214
228
  };
215
229
  },
216
230
  queryLimitOpenOrders: async (recvWindow) => {
217
231
  const localVarQueryParameter = {};
218
232
  const localVarBodyParameter = {};
233
+ const localVarHeaderParameter = {};
219
234
  if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
220
235
  let _timeUnit;
221
236
  if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
@@ -224,6 +239,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
224
239
  method: "GET",
225
240
  queryParams: localVarQueryParameter,
226
241
  bodyParams: localVarBodyParameter,
242
+ headerParams: localVarHeaderParameter,
227
243
  timeUnit: _timeUnit
228
244
  };
229
245
  },
@@ -232,6 +248,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
232
248
  assertParamExists("sendQuoteRequest", "toAsset", toAsset);
233
249
  const localVarQueryParameter = {};
234
250
  const localVarBodyParameter = {};
251
+ const localVarHeaderParameter = {};
235
252
  if (fromAsset !== void 0 && fromAsset !== null) localVarQueryParameter["fromAsset"] = fromAsset;
236
253
  if (toAsset !== void 0 && toAsset !== null) localVarQueryParameter["toAsset"] = toAsset;
237
254
  if (fromAmount !== void 0 && fromAmount !== null) localVarQueryParameter["fromAmount"] = fromAmount;
@@ -246,6 +263,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
246
263
  method: "POST",
247
264
  queryParams: localVarQueryParameter,
248
265
  bodyParams: localVarBodyParameter,
266
+ headerParams: localVarHeaderParameter,
249
267
  timeUnit: _timeUnit
250
268
  };
251
269
  }
@@ -274,7 +292,7 @@ var TradeApi = class {
274
292
  */
275
293
  async acceptQuote(requestParameters) {
276
294
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.acceptQuote(requestParameters?.quoteId, requestParameters?.recvWindow);
277
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
295
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
278
296
  }
279
297
  /**
280
298
  * Enable users to cancel a limit order
@@ -290,7 +308,7 @@ var TradeApi = class {
290
308
  */
291
309
  async cancelLimitOrder(requestParameters) {
292
310
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelLimitOrder(requestParameters?.orderId, requestParameters?.recvWindow);
293
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
311
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
294
312
  }
295
313
  /**
296
314
  * Get Convert Trade History
@@ -308,7 +326,7 @@ var TradeApi = class {
308
326
  */
309
327
  async getConvertTradeHistory(requestParameters) {
310
328
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.getConvertTradeHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
311
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
329
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
312
330
  }
313
331
  /**
314
332
  * Query order status by order ID.
@@ -324,7 +342,7 @@ var TradeApi = class {
324
342
  */
325
343
  async orderStatus(requestParameters = {}) {
326
344
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.orderStatus(requestParameters?.orderId, requestParameters?.quoteId);
327
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
345
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
328
346
  }
329
347
  /**
330
348
  * Enable users to place a limit order
@@ -344,7 +362,7 @@ var TradeApi = class {
344
362
  */
345
363
  async placeLimitOrder(requestParameters) {
346
364
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.placeLimitOrder(requestParameters?.baseAsset, requestParameters?.quoteAsset, requestParameters?.limitPrice, requestParameters?.side, requestParameters?.expiredType, requestParameters?.baseAmount, requestParameters?.quoteAmount, requestParameters?.walletType, requestParameters?.recvWindow);
347
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
365
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
348
366
  }
349
367
  /**
350
368
  * Request a quote for the requested token pairs
@@ -360,7 +378,7 @@ var TradeApi = class {
360
378
  */
361
379
  async queryLimitOpenOrders(requestParameters = {}) {
362
380
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLimitOpenOrders(requestParameters?.recvWindow);
363
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
381
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
364
382
  }
365
383
  /**
366
384
  * Request a quote for the requested token pairs
@@ -379,7 +397,7 @@ var TradeApi = class {
379
397
  */
380
398
  async sendQuoteRequest(requestParameters) {
381
399
  const localVarAxiosArgs = await this.localVarAxiosParamCreator.sendQuoteRequest(requestParameters?.fromAsset, requestParameters?.toAsset, requestParameters?.fromAmount, requestParameters?.toAmount, requestParameters?.walletType, requestParameters?.validTime, requestParameters?.recvWindow);
382
- return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
400
+ return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
383
401
  }
384
402
  };
385
403
 
@@ -413,7 +431,7 @@ var RestAPI = class {
413
431
  * @returns A promise resolving to the response data object.
414
432
  */
415
433
  sendRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
416
- return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0);
434
+ return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0);
417
435
  }
418
436
  /**
419
437
  * Generic function to send a signed request.
@@ -425,7 +443,7 @@ var RestAPI = class {
425
443
  * @returns A promise resolving to the response data object.
426
444
  */
427
445
  sendSignedRequest(endpoint, method, queryParams = {}, bodyParams = {}) {
428
- return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, { isSigned: true });
446
+ return sendRequest(this.configuration, endpoint, method, queryParams, bodyParams, void 0, void 0, { isSigned: true });
429
447
  }
430
448
  /**
431
449
  * Query for all convertible token pairs and the tokens’ respective upper/lower limits
@@ -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","CONVERT_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/convert.ts"],"sourcesContent":["{\n \"name\": \"@binance/convert\",\n \"description\": \"Official Binance Convert Connector - A lightweight library that provides a convenient interface to Binance's Convert REST API.\",\n \"version\": \"5.0.11\",\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 \"Convert\",\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ListAllConvertPairsResponse,\n QueryOrderQuantityPrecisionPerAssetResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {string} [fromAsset] User spends coin\n * @param {string} [toAsset] User receives coin\n *\n * @throws {RequiredError}\n */\n listAllConvertPairs: async (fromAsset?: string, toAsset?: string): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (fromAsset !== undefined && fromAsset !== null) {\n localVarQueryParameter['fromAsset'] = fromAsset;\n }\n if (toAsset !== undefined && toAsset !== null) {\n localVarQueryParameter['toAsset'] = toAsset;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/convert/exchangeInfo',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n queryOrderQuantityPrecisionPerAsset: async (\n recvWindow?: number | bigint\n ): 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/convert/assetInfo',\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n listAllConvertPairs(\n requestParameters?: ListAllConvertPairsRequest\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>>;\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n queryOrderQuantityPrecisionPerAsset(\n requestParameters?: QueryOrderQuantityPrecisionPerAssetRequest\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>;\n}\n\n/**\n * Request parameters for listAllConvertPairs operation in MarketDataApi.\n * @interface ListAllConvertPairsRequest\n */\nexport interface ListAllConvertPairsRequest {\n /**\n * User spends coin\n * @type {string}\n * @memberof MarketDataApiListAllConvertPairs\n */\n readonly fromAsset?: string;\n\n /**\n * User receives coin\n * @type {string}\n * @memberof MarketDataApiListAllConvertPairs\n */\n readonly toAsset?: string;\n}\n\n/**\n * Request parameters for queryOrderQuantityPrecisionPerAsset operation in MarketDataApi.\n * @interface QueryOrderQuantityPrecisionPerAssetRequest\n */\nexport interface QueryOrderQuantityPrecisionPerAssetRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof MarketDataApiQueryOrderQuantityPrecisionPerAsset\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ListAllConvertPairsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/convert/market-data/ Binance API Documentation}\n */\n public async listAllConvertPairs(\n requestParameters: ListAllConvertPairsRequest = {}\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.listAllConvertPairs(\n requestParameters?.fromAsset,\n requestParameters?.toAsset\n );\n return sendRequest<ListAllConvertPairsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset Binance API Documentation}\n */\n public async queryOrderQuantityPrecisionPerAsset(\n requestParameters: QueryOrderQuantityPrecisionPerAssetRequest = {}\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.queryOrderQuantityPrecisionPerAsset(\n requestParameters?.recvWindow\n );\n return sendRequest<QueryOrderQuantityPrecisionPerAssetResponse>(\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 AcceptQuoteResponse,\n CancelLimitOrderResponse,\n GetConvertTradeHistoryResponse,\n OrderStatusResponse,\n PlaceLimitOrderResponse,\n QueryLimitOpenOrdersResponse,\n SendQuoteRequestResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {string} quoteId\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n acceptQuote: async (\n quoteId: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'quoteId' is not null or undefined\n assertParamExists('acceptQuote', 'quoteId', quoteId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (quoteId !== undefined && quoteId !== null) {\n localVarQueryParameter['quoteId'] = quoteId;\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/convert/acceptQuote',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {number | bigint} orderId The orderId from `placeOrder` api\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n cancelLimitOrder: async (\n orderId: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('cancelLimitOrder', 'orderId', orderId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\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/convert/limit/cancelOrder',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {number | bigint} startTime\n * @param {number | bigint} endTime\n * @param {number | bigint} [limit] Default 100, Max 1000\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getConvertTradeHistory: async (\n startTime: number | bigint,\n endTime: number | bigint,\n limit?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'startTime' is not null or undefined\n assertParamExists('getConvertTradeHistory', 'startTime', startTime);\n // verify required parameter 'endTime' is not null or undefined\n assertParamExists('getConvertTradeHistory', 'endTime', endTime);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\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/convert/tradeFlow',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {string} [orderId] Either orderId or quoteId is required\n * @param {string} [quoteId] Either orderId or quoteId is required\n *\n * @throws {RequiredError}\n */\n orderStatus: async (orderId?: string, quoteId?: string): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (quoteId !== undefined && quoteId !== null) {\n localVarQueryParameter['quoteId'] = quoteId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/convert/orderStatus',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {string} baseAsset base asset (use the response `fromIsBase` from `GET /sapi/v1/convert/exchangeInfo` api to check which one is baseAsset )\n * @param {string} quoteAsset quote asset\n * @param {number} limitPrice Symbol limit price (from baseAsset to quoteAsset)\n * @param {string} side `BUY` or `SELL`\n * @param {string} expiredType 1_D, 3_D, 7_D, 30_D (D means day)\n * @param {number} [baseAmount] Base asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @param {number} [quoteAmount] Quote asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @param {string} [walletType] It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n placeLimitOrder: async (\n baseAsset: string,\n quoteAsset: string,\n limitPrice: number,\n side: string,\n expiredType: string,\n baseAmount?: number,\n quoteAmount?: number,\n walletType?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseAsset' is not null or undefined\n assertParamExists('placeLimitOrder', 'baseAsset', baseAsset);\n // verify required parameter 'quoteAsset' is not null or undefined\n assertParamExists('placeLimitOrder', 'quoteAsset', quoteAsset);\n // verify required parameter 'limitPrice' is not null or undefined\n assertParamExists('placeLimitOrder', 'limitPrice', limitPrice);\n // verify required parameter 'side' is not null or undefined\n assertParamExists('placeLimitOrder', 'side', side);\n // verify required parameter 'expiredType' is not null or undefined\n assertParamExists('placeLimitOrder', 'expiredType', expiredType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (baseAsset !== undefined && baseAsset !== null) {\n localVarQueryParameter['baseAsset'] = baseAsset;\n }\n if (quoteAsset !== undefined && quoteAsset !== null) {\n localVarQueryParameter['quoteAsset'] = quoteAsset;\n }\n if (limitPrice !== undefined && limitPrice !== null) {\n localVarQueryParameter['limitPrice'] = limitPrice;\n }\n if (baseAmount !== undefined && baseAmount !== null) {\n localVarQueryParameter['baseAmount'] = baseAmount;\n }\n if (quoteAmount !== undefined && quoteAmount !== null) {\n localVarQueryParameter['quoteAmount'] = quoteAmount;\n }\n if (side !== undefined && side !== null) {\n localVarQueryParameter['side'] = side;\n }\n if (walletType !== undefined && walletType !== null) {\n localVarQueryParameter['walletType'] = walletType;\n }\n if (expiredType !== undefined && expiredType !== null) {\n localVarQueryParameter['expiredType'] = expiredType;\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/convert/limit/placeOrder',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n queryLimitOpenOrders: 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/convert/limit/queryOpenOrders',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {string} fromAsset\n * @param {string} toAsset\n * @param {number} [fromAmount] When specified, it is the amount you will be debited after the conversion\n * @param {number} [toAmount] When specified, it is the amount you will be credited after the conversion\n * @param {string} [walletType] It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @param {string} [validTime] 10s, 30s, 1m, default 10s\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n sendQuoteRequest: async (\n fromAsset: string,\n toAsset: string,\n fromAmount?: number,\n toAmount?: number,\n walletType?: string,\n validTime?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'fromAsset' is not null or undefined\n assertParamExists('sendQuoteRequest', 'fromAsset', fromAsset);\n // verify required parameter 'toAsset' is not null or undefined\n assertParamExists('sendQuoteRequest', 'toAsset', toAsset);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n\n if (fromAsset !== undefined && fromAsset !== null) {\n localVarQueryParameter['fromAsset'] = fromAsset;\n }\n if (toAsset !== undefined && toAsset !== null) {\n localVarQueryParameter['toAsset'] = toAsset;\n }\n if (fromAmount !== undefined && fromAmount !== null) {\n localVarQueryParameter['fromAmount'] = fromAmount;\n }\n if (toAmount !== undefined && toAmount !== null) {\n localVarQueryParameter['toAmount'] = toAmount;\n }\n if (walletType !== undefined && walletType !== null) {\n localVarQueryParameter['walletType'] = walletType;\n }\n if (validTime !== undefined && validTime !== null) {\n localVarQueryParameter['validTime'] = validTime;\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/convert/getQuote',\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 * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>>;\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>>;\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>>;\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n orderStatus(\n requestParameters?: OrderStatusRequest\n ): Promise<RestApiResponse<OrderStatusResponse>>;\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>>;\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n queryLimitOpenOrders(\n requestParameters?: QueryLimitOpenOrdersRequest\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>;\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>>;\n}\n\n/**\n * Request parameters for acceptQuote operation in TradeApi.\n * @interface AcceptQuoteRequest\n */\nexport interface AcceptQuoteRequest {\n /**\n *\n * @type {string}\n * @memberof TradeApiAcceptQuote\n */\n readonly quoteId: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiAcceptQuote\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for cancelLimitOrder operation in TradeApi.\n * @interface CancelLimitOrderRequest\n */\nexport interface CancelLimitOrderRequest {\n /**\n * The orderId from `placeOrder` api\n * @type {number | bigint}\n * @memberof TradeApiCancelLimitOrder\n */\n readonly orderId: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiCancelLimitOrder\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getConvertTradeHistory operation in TradeApi.\n * @interface GetConvertTradeHistoryRequest\n */\nexport interface GetConvertTradeHistoryRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly startTime: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly endTime: number | bigint;\n\n /**\n * Default 100, Max 1000\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly limit?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for orderStatus operation in TradeApi.\n * @interface OrderStatusRequest\n */\nexport interface OrderStatusRequest {\n /**\n * Either orderId or quoteId is required\n * @type {string}\n * @memberof TradeApiOrderStatus\n */\n readonly orderId?: string;\n\n /**\n * Either orderId or quoteId is required\n * @type {string}\n * @memberof TradeApiOrderStatus\n */\n readonly quoteId?: string;\n}\n\n/**\n * Request parameters for placeLimitOrder operation in TradeApi.\n * @interface PlaceLimitOrderRequest\n */\nexport interface PlaceLimitOrderRequest {\n /**\n * base asset (use the response `fromIsBase` from `GET /sapi/v1/convert/exchangeInfo` api to check which one is baseAsset )\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly baseAsset: string;\n\n /**\n * quote asset\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly quoteAsset: string;\n\n /**\n * Symbol limit price (from baseAsset to quoteAsset)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly limitPrice: number;\n\n /**\n * `BUY` or `SELL`\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly side: string;\n\n /**\n * 1_D, 3_D, 7_D, 30_D (D means day)\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly expiredType: string;\n\n /**\n * Base asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly baseAmount?: number;\n\n /**\n * Quote asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly quoteAmount?: number;\n\n /**\n * It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly walletType?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryLimitOpenOrders operation in TradeApi.\n * @interface QueryLimitOpenOrdersRequest\n */\nexport interface QueryLimitOpenOrdersRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiQueryLimitOpenOrders\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for sendQuoteRequest operation in TradeApi.\n * @interface SendQuoteRequestRequest\n */\nexport interface SendQuoteRequestRequest {\n /**\n *\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly fromAsset: string;\n\n /**\n *\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly toAsset: string;\n\n /**\n * When specified, it is the amount you will be debited after the conversion\n * @type {number}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly fromAmount?: number;\n\n /**\n * When specified, it is the amount you will be credited after the conversion\n * @type {number}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly toAmount?: number;\n\n /**\n * It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly walletType?: string;\n\n /**\n * 10s, 30s, 1m, default 10s\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly validTime?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiSendQuoteRequest\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 * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<AcceptQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Accept-Quote Binance API Documentation}\n */\n public async acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.acceptQuote(\n requestParameters?.quoteId,\n requestParameters?.recvWindow\n );\n return sendRequest<AcceptQuoteResponse>(\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 * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CancelLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Cancel-Order Binance API Documentation}\n */\n public async cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelLimitOrder(\n requestParameters?.orderId,\n requestParameters?.recvWindow\n );\n return sendRequest<CancelLimitOrderResponse>(\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 Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetConvertTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History Binance API Documentation}\n */\n public async getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getConvertTradeHistory(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<GetConvertTradeHistoryResponse>(\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 * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<OrderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Order-Status Binance API Documentation}\n */\n public async orderStatus(\n requestParameters: OrderStatusRequest = {}\n ): Promise<RestApiResponse<OrderStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.orderStatus(\n requestParameters?.orderId,\n requestParameters?.quoteId\n );\n return sendRequest<OrderStatusResponse>(\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 * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<PlaceLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Place-Order Binance API Documentation}\n */\n public async placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.placeLimitOrder(\n requestParameters?.baseAsset,\n requestParameters?.quoteAsset,\n requestParameters?.limitPrice,\n requestParameters?.side,\n requestParameters?.expiredType,\n requestParameters?.baseAmount,\n requestParameters?.quoteAmount,\n requestParameters?.walletType,\n requestParameters?.recvWindow\n );\n return sendRequest<PlaceLimitOrderResponse>(\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 * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Query-Order Binance API Documentation}\n */\n public async queryLimitOpenOrders(\n requestParameters: QueryLimitOpenOrdersRequest = {}\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLimitOpenOrders(\n requestParameters?.recvWindow\n );\n return sendRequest<QueryLimitOpenOrdersResponse>(\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 * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SendQuoteRequestResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Send-quote-request Binance API Documentation}\n */\n public async sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.sendQuoteRequest(\n requestParameters?.fromAsset,\n requestParameters?.toAsset,\n requestParameters?.fromAmount,\n requestParameters?.toAmount,\n requestParameters?.walletType,\n requestParameters?.validTime,\n requestParameters?.recvWindow\n );\n return sendRequest<SendQuoteRequestResponse>(\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 {\n ListAllConvertPairsRequest,\n QueryOrderQuantityPrecisionPerAssetRequest,\n} from './modules/market-data-api';\nimport type {\n AcceptQuoteRequest,\n CancelLimitOrderRequest,\n GetConvertTradeHistoryRequest,\n OrderStatusRequest,\n PlaceLimitOrderRequest,\n QueryLimitOpenOrdersRequest,\n SendQuoteRequestRequest,\n} from './modules/trade-api';\n\nimport type {\n ListAllConvertPairsResponse,\n QueryOrderQuantityPrecisionPerAssetResponse,\n} from './types';\nimport type {\n AcceptQuoteResponse,\n CancelLimitOrderResponse,\n GetConvertTradeHistoryResponse,\n OrderStatusResponse,\n PlaceLimitOrderResponse,\n QueryLimitOpenOrdersResponse,\n SendQuoteRequestResponse,\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ListAllConvertPairsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/market-data/ Binance API Documentation}\n */\n listAllConvertPairs(\n requestParameters: ListAllConvertPairsRequest = {}\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>> {\n return this.marketDataApi.listAllConvertPairs(requestParameters);\n }\n\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset Binance API Documentation}\n */\n queryOrderQuantityPrecisionPerAsset(\n requestParameters: QueryOrderQuantityPrecisionPerAssetRequest = {}\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>> {\n return this.marketDataApi.queryOrderQuantityPrecisionPerAsset(requestParameters);\n }\n\n /**\n * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<AcceptQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Accept-Quote Binance API Documentation}\n */\n acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>> {\n return this.tradeApi.acceptQuote(requestParameters);\n }\n\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CancelLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Cancel-Order Binance API Documentation}\n */\n cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>> {\n return this.tradeApi.cancelLimitOrder(requestParameters);\n }\n\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetConvertTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History Binance API Documentation}\n */\n getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>> {\n return this.tradeApi.getConvertTradeHistory(requestParameters);\n }\n\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<OrderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Order-Status Binance API Documentation}\n */\n orderStatus(\n requestParameters: OrderStatusRequest = {}\n ): Promise<RestApiResponse<OrderStatusResponse>> {\n return this.tradeApi.orderStatus(requestParameters);\n }\n\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<PlaceLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Place-Order Binance API Documentation}\n */\n placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>> {\n return this.tradeApi.placeLimitOrder(requestParameters);\n }\n\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Query-Order Binance API Documentation}\n */\n queryLimitOpenOrders(\n requestParameters: QueryLimitOpenOrdersRequest = {}\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>> {\n return this.tradeApi.queryLimitOpenOrders(requestParameters);\n }\n\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<SendQuoteRequestResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Send-quote-request Binance API Documentation}\n */\n sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>> {\n return this.tradeApi.sendQuoteRequest(requestParameters);\n }\n}\n","/**\n * Binance Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 { buildUserAgent, ConfigurationRestAPI, CONVERT_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationConvert {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Convert {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationConvert) {\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 || CONVERT_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;;;;;;;;;;;;;;;;;;;ACyBf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EAeH,qBAAqB,OAAO,WAAoB,YAA2C;GACvF,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;AAEzD,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;GAGxC,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,UAAU;IACb;;EAYL,qCAAqC,OACjC,eACuB;GACvB,MAAMF,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;AAEzD,OAAI,eAAe,UAAa,eAAe,KAC3C,wBAAuB,gBAAgB;GAG3C,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;IACH,UAAU;IACV,QAAQ;IACR,aA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AqB;CAGjB,YAAY,QAA8B;EACtC,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","CONVERT_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/convert.ts"],"sourcesContent":["{\n \"name\": \"@binance/convert\",\n \"description\": \"Official Binance Convert Connector - A lightweight library that provides a convenient interface to Binance's Convert REST API.\",\n \"version\": \"5.0.13\",\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 \"Convert\",\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 sendRequest,\n type RequestArgs,\n} from '@binance/common';\nimport type {\n ListAllConvertPairsResponse,\n QueryOrderQuantityPrecisionPerAssetResponse,\n} from '../types';\n\n/**\n * MarketDataApi - axios parameter creator\n */\nconst MarketDataApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {string} [fromAsset] User spends coin\n * @param {string} [toAsset] User receives coin\n *\n * @throws {RequiredError}\n */\n listAllConvertPairs: async (fromAsset?: string, toAsset?: string): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (fromAsset !== undefined && fromAsset !== null) {\n localVarQueryParameter['fromAsset'] = fromAsset;\n }\n if (toAsset !== undefined && toAsset !== null) {\n localVarQueryParameter['toAsset'] = toAsset;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/convert/exchangeInfo',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n queryOrderQuantityPrecisionPerAsset: async (\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 (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/convert/assetInfo',\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n listAllConvertPairs(\n requestParameters?: ListAllConvertPairsRequest\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>>;\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApiInterface\n */\n queryOrderQuantityPrecisionPerAsset(\n requestParameters?: QueryOrderQuantityPrecisionPerAssetRequest\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>;\n}\n\n/**\n * Request parameters for listAllConvertPairs operation in MarketDataApi.\n * @interface ListAllConvertPairsRequest\n */\nexport interface ListAllConvertPairsRequest {\n /**\n * User spends coin\n * @type {string}\n * @memberof MarketDataApiListAllConvertPairs\n */\n readonly fromAsset?: string;\n\n /**\n * User receives coin\n * @type {string}\n * @memberof MarketDataApiListAllConvertPairs\n */\n readonly toAsset?: string;\n}\n\n/**\n * Request parameters for queryOrderQuantityPrecisionPerAsset operation in MarketDataApi.\n * @interface QueryOrderQuantityPrecisionPerAssetRequest\n */\nexport interface QueryOrderQuantityPrecisionPerAssetRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof MarketDataApiQueryOrderQuantityPrecisionPerAsset\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<ListAllConvertPairsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/convert/market-data/ Binance API Documentation}\n */\n public async listAllConvertPairs(\n requestParameters: ListAllConvertPairsRequest = {}\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.listAllConvertPairs(\n requestParameters?.fromAsset,\n requestParameters?.toAsset\n );\n return sendRequest<ListAllConvertPairsResponse>(\n this.configuration,\n localVarAxiosArgs.endpoint,\n localVarAxiosArgs.method,\n localVarAxiosArgs.queryParams,\n localVarAxiosArgs.bodyParams,\n localVarAxiosArgs.headerParams,\n localVarAxiosArgs?.timeUnit,\n { isSigned: false }\n );\n }\n\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof MarketDataApi\n * @see {@link https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset Binance API Documentation}\n */\n public async queryOrderQuantityPrecisionPerAsset(\n requestParameters: QueryOrderQuantityPrecisionPerAssetRequest = {}\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>> {\n const localVarAxiosArgs =\n await this.localVarAxiosParamCreator.queryOrderQuantityPrecisionPerAsset(\n requestParameters?.recvWindow\n );\n return sendRequest<QueryOrderQuantityPrecisionPerAssetResponse>(\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 AcceptQuoteResponse,\n CancelLimitOrderResponse,\n GetConvertTradeHistoryResponse,\n OrderStatusResponse,\n PlaceLimitOrderResponse,\n QueryLimitOpenOrdersResponse,\n SendQuoteRequestResponse,\n} from '../types';\n\n/**\n * TradeApi - axios parameter creator\n */\nconst TradeApiAxiosParamCreator = function (configuration: ConfigurationRestAPI) {\n return {\n /**\n * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {string} quoteId\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n acceptQuote: async (\n quoteId: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'quoteId' is not null or undefined\n assertParamExists('acceptQuote', 'quoteId', quoteId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (quoteId !== undefined && quoteId !== null) {\n localVarQueryParameter['quoteId'] = quoteId;\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/convert/acceptQuote',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {number | bigint} orderId The orderId from `placeOrder` api\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n cancelLimitOrder: async (\n orderId: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'orderId' is not null or undefined\n assertParamExists('cancelLimitOrder', 'orderId', orderId);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\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/convert/limit/cancelOrder',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {number | bigint} startTime\n * @param {number | bigint} endTime\n * @param {number | bigint} [limit] Default 100, Max 1000\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n getConvertTradeHistory: async (\n startTime: number | bigint,\n endTime: number | bigint,\n limit?: number | bigint,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'startTime' is not null or undefined\n assertParamExists('getConvertTradeHistory', 'startTime', startTime);\n // verify required parameter 'endTime' is not null or undefined\n assertParamExists('getConvertTradeHistory', 'endTime', endTime);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (startTime !== undefined && startTime !== null) {\n localVarQueryParameter['startTime'] = startTime;\n }\n if (endTime !== undefined && endTime !== null) {\n localVarQueryParameter['endTime'] = endTime;\n }\n if (limit !== undefined && limit !== null) {\n localVarQueryParameter['limit'] = limit;\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/convert/tradeFlow',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {string} [orderId] Either orderId or quoteId is required\n * @param {string} [quoteId] Either orderId or quoteId is required\n *\n * @throws {RequiredError}\n */\n orderStatus: async (orderId?: string, quoteId?: string): Promise<RequestArgs> => {\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (orderId !== undefined && orderId !== null) {\n localVarQueryParameter['orderId'] = orderId;\n }\n if (quoteId !== undefined && quoteId !== null) {\n localVarQueryParameter['quoteId'] = quoteId;\n }\n\n let _timeUnit: TimeUnit | undefined;\n if ('timeUnit' in configuration) _timeUnit = configuration.timeUnit as TimeUnit;\n\n return {\n endpoint: '/sapi/v1/convert/orderStatus',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {string} baseAsset base asset (use the response `fromIsBase` from `GET /sapi/v1/convert/exchangeInfo` api to check which one is baseAsset )\n * @param {string} quoteAsset quote asset\n * @param {number} limitPrice Symbol limit price (from baseAsset to quoteAsset)\n * @param {string} side `BUY` or `SELL`\n * @param {string} expiredType 1_D, 3_D, 7_D, 30_D (D means day)\n * @param {number} [baseAmount] Base asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @param {number} [quoteAmount] Quote asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @param {string} [walletType] It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n placeLimitOrder: async (\n baseAsset: string,\n quoteAsset: string,\n limitPrice: number,\n side: string,\n expiredType: string,\n baseAmount?: number,\n quoteAmount?: number,\n walletType?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'baseAsset' is not null or undefined\n assertParamExists('placeLimitOrder', 'baseAsset', baseAsset);\n // verify required parameter 'quoteAsset' is not null or undefined\n assertParamExists('placeLimitOrder', 'quoteAsset', quoteAsset);\n // verify required parameter 'limitPrice' is not null or undefined\n assertParamExists('placeLimitOrder', 'limitPrice', limitPrice);\n // verify required parameter 'side' is not null or undefined\n assertParamExists('placeLimitOrder', 'side', side);\n // verify required parameter 'expiredType' is not null or undefined\n assertParamExists('placeLimitOrder', 'expiredType', expiredType);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (baseAsset !== undefined && baseAsset !== null) {\n localVarQueryParameter['baseAsset'] = baseAsset;\n }\n if (quoteAsset !== undefined && quoteAsset !== null) {\n localVarQueryParameter['quoteAsset'] = quoteAsset;\n }\n if (limitPrice !== undefined && limitPrice !== null) {\n localVarQueryParameter['limitPrice'] = limitPrice;\n }\n if (baseAmount !== undefined && baseAmount !== null) {\n localVarQueryParameter['baseAmount'] = baseAmount;\n }\n if (quoteAmount !== undefined && quoteAmount !== null) {\n localVarQueryParameter['quoteAmount'] = quoteAmount;\n }\n if (side !== undefined && side !== null) {\n localVarQueryParameter['side'] = side;\n }\n if (walletType !== undefined && walletType !== null) {\n localVarQueryParameter['walletType'] = walletType;\n }\n if (expiredType !== undefined && expiredType !== null) {\n localVarQueryParameter['expiredType'] = expiredType;\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/convert/limit/placeOrder',\n method: 'POST',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n queryLimitOpenOrders: 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/convert/limit/queryOpenOrders',\n method: 'GET',\n queryParams: localVarQueryParameter,\n bodyParams: localVarBodyParameter,\n headerParams: localVarHeaderParameter,\n timeUnit: _timeUnit,\n };\n },\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {string} fromAsset\n * @param {string} toAsset\n * @param {number} [fromAmount] When specified, it is the amount you will be debited after the conversion\n * @param {number} [toAmount] When specified, it is the amount you will be credited after the conversion\n * @param {string} [walletType] It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @param {string} [validTime] 10s, 30s, 1m, default 10s\n * @param {number | bigint} [recvWindow] The value cannot be greater than 60000\n *\n * @throws {RequiredError}\n */\n sendQuoteRequest: async (\n fromAsset: string,\n toAsset: string,\n fromAmount?: number,\n toAmount?: number,\n walletType?: string,\n validTime?: string,\n recvWindow?: number | bigint\n ): Promise<RequestArgs> => {\n // verify required parameter 'fromAsset' is not null or undefined\n assertParamExists('sendQuoteRequest', 'fromAsset', fromAsset);\n // verify required parameter 'toAsset' is not null or undefined\n assertParamExists('sendQuoteRequest', 'toAsset', toAsset);\n\n const localVarQueryParameter: Record<string, unknown> = {};\n const localVarBodyParameter: Record<string, unknown> = {};\n const localVarHeaderParameter: Record<string, unknown> = {};\n\n if (fromAsset !== undefined && fromAsset !== null) {\n localVarQueryParameter['fromAsset'] = fromAsset;\n }\n if (toAsset !== undefined && toAsset !== null) {\n localVarQueryParameter['toAsset'] = toAsset;\n }\n if (fromAmount !== undefined && fromAmount !== null) {\n localVarQueryParameter['fromAmount'] = fromAmount;\n }\n if (toAmount !== undefined && toAmount !== null) {\n localVarQueryParameter['toAmount'] = toAmount;\n }\n if (walletType !== undefined && walletType !== null) {\n localVarQueryParameter['walletType'] = walletType;\n }\n if (validTime !== undefined && validTime !== null) {\n localVarQueryParameter['validTime'] = validTime;\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/convert/getQuote',\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 * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>>;\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>>;\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>>;\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n orderStatus(\n requestParameters?: OrderStatusRequest\n ): Promise<RestApiResponse<OrderStatusResponse>>;\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>>;\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n queryLimitOpenOrders(\n requestParameters?: QueryLimitOpenOrdersRequest\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>;\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n *\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApiInterface\n */\n sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>>;\n}\n\n/**\n * Request parameters for acceptQuote operation in TradeApi.\n * @interface AcceptQuoteRequest\n */\nexport interface AcceptQuoteRequest {\n /**\n *\n * @type {string}\n * @memberof TradeApiAcceptQuote\n */\n readonly quoteId: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiAcceptQuote\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for cancelLimitOrder operation in TradeApi.\n * @interface CancelLimitOrderRequest\n */\nexport interface CancelLimitOrderRequest {\n /**\n * The orderId from `placeOrder` api\n * @type {number | bigint}\n * @memberof TradeApiCancelLimitOrder\n */\n readonly orderId: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiCancelLimitOrder\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for getConvertTradeHistory operation in TradeApi.\n * @interface GetConvertTradeHistoryRequest\n */\nexport interface GetConvertTradeHistoryRequest {\n /**\n *\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly startTime: number | bigint;\n\n /**\n *\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly endTime: number | bigint;\n\n /**\n * Default 100, Max 1000\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly limit?: number | bigint;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiGetConvertTradeHistory\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for orderStatus operation in TradeApi.\n * @interface OrderStatusRequest\n */\nexport interface OrderStatusRequest {\n /**\n * Either orderId or quoteId is required\n * @type {string}\n * @memberof TradeApiOrderStatus\n */\n readonly orderId?: string;\n\n /**\n * Either orderId or quoteId is required\n * @type {string}\n * @memberof TradeApiOrderStatus\n */\n readonly quoteId?: string;\n}\n\n/**\n * Request parameters for placeLimitOrder operation in TradeApi.\n * @interface PlaceLimitOrderRequest\n */\nexport interface PlaceLimitOrderRequest {\n /**\n * base asset (use the response `fromIsBase` from `GET /sapi/v1/convert/exchangeInfo` api to check which one is baseAsset )\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly baseAsset: string;\n\n /**\n * quote asset\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly quoteAsset: string;\n\n /**\n * Symbol limit price (from baseAsset to quoteAsset)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly limitPrice: number;\n\n /**\n * `BUY` or `SELL`\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly side: string;\n\n /**\n * 1_D, 3_D, 7_D, 30_D (D means day)\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly expiredType: string;\n\n /**\n * Base asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly baseAmount?: number;\n\n /**\n * Quote asset amount. (One of `baseAmount` or `quoteAmount` is required)\n * @type {number}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly quoteAmount?: number;\n\n /**\n * It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @type {string}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly walletType?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiPlaceLimitOrder\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for queryLimitOpenOrders operation in TradeApi.\n * @interface QueryLimitOpenOrdersRequest\n */\nexport interface QueryLimitOpenOrdersRequest {\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiQueryLimitOpenOrders\n */\n readonly recvWindow?: number | bigint;\n}\n\n/**\n * Request parameters for sendQuoteRequest operation in TradeApi.\n * @interface SendQuoteRequestRequest\n */\nexport interface SendQuoteRequestRequest {\n /**\n *\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly fromAsset: string;\n\n /**\n *\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly toAsset: string;\n\n /**\n * When specified, it is the amount you will be debited after the conversion\n * @type {number}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly fromAmount?: number;\n\n /**\n * When specified, it is the amount you will be credited after the conversion\n * @type {number}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly toAmount?: number;\n\n /**\n * It is to choose which wallet of assets. The wallet selection is `SPOT`, `FUNDING` and `EARN`. Combination of wallet is supported i.e. `SPOT_FUNDING`, `FUNDING_EARN`, `SPOT_FUNDING_EARN` or `SPOT_EARN` Default is `SPOT`.\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly walletType?: string;\n\n /**\n * 10s, 30s, 1m, default 10s\n * @type {string}\n * @memberof TradeApiSendQuoteRequest\n */\n readonly validTime?: string;\n\n /**\n * The value cannot be greater than 60000\n * @type {number | bigint}\n * @memberof TradeApiSendQuoteRequest\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 * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<AcceptQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Accept-Quote Binance API Documentation}\n */\n public async acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.acceptQuote(\n requestParameters?.quoteId,\n requestParameters?.recvWindow\n );\n return sendRequest<AcceptQuoteResponse>(\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 * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<CancelLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Cancel-Order Binance API Documentation}\n */\n public async cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelLimitOrder(\n requestParameters?.orderId,\n requestParameters?.recvWindow\n );\n return sendRequest<CancelLimitOrderResponse>(\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 Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<GetConvertTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History Binance API Documentation}\n */\n public async getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.getConvertTradeHistory(\n requestParameters?.startTime,\n requestParameters?.endTime,\n requestParameters?.limit,\n requestParameters?.recvWindow\n );\n return sendRequest<GetConvertTradeHistoryResponse>(\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 * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<OrderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Order-Status Binance API Documentation}\n */\n public async orderStatus(\n requestParameters: OrderStatusRequest = {}\n ): Promise<RestApiResponse<OrderStatusResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.orderStatus(\n requestParameters?.orderId,\n requestParameters?.quoteId\n );\n return sendRequest<OrderStatusResponse>(\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 * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<PlaceLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Place-Order Binance API Documentation}\n */\n public async placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.placeLimitOrder(\n requestParameters?.baseAsset,\n requestParameters?.quoteAsset,\n requestParameters?.limitPrice,\n requestParameters?.side,\n requestParameters?.expiredType,\n requestParameters?.baseAmount,\n requestParameters?.quoteAmount,\n requestParameters?.walletType,\n requestParameters?.recvWindow\n );\n return sendRequest<PlaceLimitOrderResponse>(\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 * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Query-Order Binance API Documentation}\n */\n public async queryLimitOpenOrders(\n requestParameters: QueryLimitOpenOrdersRequest = {}\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryLimitOpenOrders(\n requestParameters?.recvWindow\n );\n return sendRequest<QueryLimitOpenOrdersResponse>(\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 * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n * @returns {Promise<RestApiResponse<SendQuoteRequestResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @memberof TradeApi\n * @see {@link https://developers.binance.com/docs/convert/trade/Send-quote-request Binance API Documentation}\n */\n public async sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>> {\n const localVarAxiosArgs = await this.localVarAxiosParamCreator.sendQuoteRequest(\n requestParameters?.fromAsset,\n requestParameters?.toAsset,\n requestParameters?.fromAmount,\n requestParameters?.toAmount,\n requestParameters?.walletType,\n requestParameters?.validTime,\n requestParameters?.recvWindow\n );\n return sendRequest<SendQuoteRequestResponse>(\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 Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 {\n ListAllConvertPairsRequest,\n QueryOrderQuantityPrecisionPerAssetRequest,\n} from './modules/market-data-api';\nimport type {\n AcceptQuoteRequest,\n CancelLimitOrderRequest,\n GetConvertTradeHistoryRequest,\n OrderStatusRequest,\n PlaceLimitOrderRequest,\n QueryLimitOpenOrdersRequest,\n SendQuoteRequestRequest,\n} from './modules/trade-api';\n\nimport type {\n ListAllConvertPairsResponse,\n QueryOrderQuantityPrecisionPerAssetResponse,\n} from './types';\nimport type {\n AcceptQuoteResponse,\n CancelLimitOrderResponse,\n GetConvertTradeHistoryResponse,\n OrderStatusResponse,\n PlaceLimitOrderResponse,\n QueryLimitOpenOrdersResponse,\n SendQuoteRequestResponse,\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 * Query for all convertible token pairs and the tokens’ respective upper/lower limits\n *\n * User needs to supply either or both of the input parameter\n * If not defined for both fromAsset and toAsset, only partial token pairs will be returned\n *\n * Weight: 3000(IP)\n *\n * @summary List All Convert Pairs\n * @param {ListAllConvertPairsRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<ListAllConvertPairsResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/market-data/ Binance API Documentation}\n */\n listAllConvertPairs(\n requestParameters: ListAllConvertPairsRequest = {}\n ): Promise<RestApiResponse<ListAllConvertPairsResponse>> {\n return this.marketDataApi.listAllConvertPairs(requestParameters);\n }\n\n /**\n * Query for supported asset’s precision information\n *\n * Weight: 100(IP)\n *\n * @summary Query order quantity precision per asset(USER_DATA)\n * @param {QueryOrderQuantityPrecisionPerAssetRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/market-data/Query-order-quantity-precision-per-asset Binance API Documentation}\n */\n queryOrderQuantityPrecisionPerAsset(\n requestParameters: QueryOrderQuantityPrecisionPerAssetRequest = {}\n ): Promise<RestApiResponse<QueryOrderQuantityPrecisionPerAssetResponse>> {\n return this.marketDataApi.queryOrderQuantityPrecisionPerAsset(requestParameters);\n }\n\n /**\n * Accept the offered quote by quote ID.\n *\n * Weight: 500(UID)\n *\n * @summary Accept Quote (TRADE)\n * @param {AcceptQuoteRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<AcceptQuoteResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Accept-Quote Binance API Documentation}\n */\n acceptQuote(\n requestParameters: AcceptQuoteRequest\n ): Promise<RestApiResponse<AcceptQuoteResponse>> {\n return this.tradeApi.acceptQuote(requestParameters);\n }\n\n /**\n * Enable users to cancel a limit order\n *\n * Weight: 200(UID)\n *\n * @summary Cancel limit order (USER_DATA)\n * @param {CancelLimitOrderRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<CancelLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Cancel-Order Binance API Documentation}\n */\n cancelLimitOrder(\n requestParameters: CancelLimitOrderRequest\n ): Promise<RestApiResponse<CancelLimitOrderResponse>> {\n return this.tradeApi.cancelLimitOrder(requestParameters);\n }\n\n /**\n * Get Convert Trade History\n *\n * The max interval between startTime and endTime is 30 days.\n *\n * Weight: 3000\n *\n * @summary Get Convert Trade History(USER_DATA)\n * @param {GetConvertTradeHistoryRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<GetConvertTradeHistoryResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History Binance API Documentation}\n */\n getConvertTradeHistory(\n requestParameters: GetConvertTradeHistoryRequest\n ): Promise<RestApiResponse<GetConvertTradeHistoryResponse>> {\n return this.tradeApi.getConvertTradeHistory(requestParameters);\n }\n\n /**\n * Query order status by order ID.\n *\n * Weight: 100(UID)\n *\n * @summary Order status(USER_DATA)\n * @param {OrderStatusRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<OrderStatusResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Order-Status Binance API Documentation}\n */\n orderStatus(\n requestParameters: OrderStatusRequest = {}\n ): Promise<RestApiResponse<OrderStatusResponse>> {\n return this.tradeApi.orderStatus(requestParameters);\n }\n\n /**\n * Enable users to place a limit order\n *\n * `baseAsset` or `quoteAsset` can be determined via `exchangeInfo` endpoint.\n * Limit price is defined from `baseAsset` to `quoteAsset`.\n * Either `baseAmount` or `quoteAmount` is used.\n *\n * Weight: 500(UID)\n *\n * @summary Place limit order (USER_DATA)\n * @param {PlaceLimitOrderRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<PlaceLimitOrderResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Place-Order Binance API Documentation}\n */\n placeLimitOrder(\n requestParameters: PlaceLimitOrderRequest\n ): Promise<RestApiResponse<PlaceLimitOrderResponse>> {\n return this.tradeApi.placeLimitOrder(requestParameters);\n }\n\n /**\n * Request a quote for the requested token pairs\n *\n * Weight: 3000(UID)\n *\n * @summary Query limit open orders (USER_DATA)\n * @param {QueryLimitOpenOrdersRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<QueryLimitOpenOrdersResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Query-Order Binance API Documentation}\n */\n queryLimitOpenOrders(\n requestParameters: QueryLimitOpenOrdersRequest = {}\n ): Promise<RestApiResponse<QueryLimitOpenOrdersResponse>> {\n return this.tradeApi.queryLimitOpenOrders(requestParameters);\n }\n\n /**\n * Request a quote for the requested token pairs\n *\n * Either fromAmount or toAmount should be sent\n * `quoteId` will be returned only if you have enough funds to convert\n *\n * Weight: 200(UID)\n *\n * @summary Send Quote Request(USER_DATA)\n * @param {SendQuoteRequestRequest} requestParameters Request parameters.\n *\n * @returns {Promise<RestApiResponse<SendQuoteRequestResponse>>}\n * @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}\n * @see {@link https://developers.binance.com/docs/convert/trade/Send-quote-request Binance API Documentation}\n */\n sendQuoteRequest(\n requestParameters: SendQuoteRequestRequest\n ): Promise<RestApiResponse<SendQuoteRequestResponse>> {\n return this.tradeApi.sendQuoteRequest(requestParameters);\n }\n}\n","/**\n * Binance Convert REST API\n *\n * OpenAPI Specification for the Binance Convert 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 { buildUserAgent, ConfigurationRestAPI, CONVERT_REST_API_PROD_URL } from '@binance/common';\nimport { name, version } from '../package.json';\nimport { RestAPI } from './rest-api';\n\nexport interface ConfigurationConvert {\n configurationRestAPI?: ConfigurationRestAPI;\n}\n\nexport class Convert {\n public restAPI!: RestAPI;\n\n constructor(config: ConfigurationConvert) {\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 || CONVERT_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;;;;;;;;;;;;;;;;;;;ACyBf,MAAM,iCAAiC,SAAU,eAAqC;AAClF,QAAO;EAeH,qBAAqB,OAAO,WAAoB,YAA2C;GACvF,MAAMA,yBAAkD,EAAE;GAC1D,MAAMC,wBAAiD,EAAE;GACzD,MAAMC,0BAAmD,EAAE;AAE3D,OAAI,cAAc,UAAa,cAAc,KACzC,wBAAuB,eAAe;AAE1C,OAAI,YAAY,UAAa,YAAY,KACrC,wBAAuB,aAAa;GAGxC,IAAIC;AACJ,OAAI,cAAc,cAAe,aAAY,cAAc;AAE3D,UAAO;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AAgD,EAAE,EACG;AACrD,SAAO,KAAK,cAAc,oBAAoB,kBAAkB;;;;;;;;;;;;;;CAepE,oCACI,oBAAgE,EAAE,EACG;AACrE,SAAO,KAAK,cAAc,oCAAoC,kBAAkB;;;;;;;;;;;;;;CAepF,YACI,mBAC6C;AAC7C,SAAO,KAAK,SAAS,YAAY,kBAAkB;;;;;;;;;;;;;;CAevD,iBACI,mBACkD;AAClD,SAAO,KAAK,SAAS,iBAAiB,kBAAkB;;;;;;;;;;;;;;;;CAiB5D,uBACI,mBACwD;AACxD,SAAO,KAAK,SAAS,uBAAuB,kBAAkB;;;;;;;;;;;;;;CAelE,YACI,oBAAwC,EAAE,EACG;AAC7C,SAAO,KAAK,SAAS,YAAY,kBAAkB;;;;;;;;;;;;;;;;;;CAmBvD,gBACI,mBACiD;AACjD,SAAO,KAAK,SAAS,gBAAgB,kBAAkB;;;;;;;;;;;;;;CAe3D,qBACI,oBAAiD,EAAE,EACG;AACtD,SAAO,KAAK,SAAS,qBAAqB,kBAAkB;;;;;;;;;;;;;;;;;CAkBhE,iBACI,mBACkD;AAClD,SAAO,KAAK,SAAS,iBAAiB,kBAAkB;;;;;;;;;;;;;;AEhRhE,IAAa,UAAb,MAAqB;CAGjB,YAAY,QAA8B;EACtC,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/convert",
3
3
  "description": "Official Binance Convert Connector - A lightweight library that provides a convenient interface to Binance's Convert REST API.",
4
- "version": "5.0.11",
4
+ "version": "5.0.13",
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
  }