@binance/derivatives-trading-portfolio-margin 22.0.4 → 22.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +2214 -91
- package/dist/index.d.ts +2214 -91
- package/dist/index.js +842 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +842 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
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/derivatives-trading-portfolio-margin";
|
|
17
|
-
var version = "22.0
|
|
17
|
+
var version = "22.2.0";
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/rest-api/modules/account-api.ts
|
|
@@ -283,6 +283,60 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
283
283
|
timeUnit: _timeUnit
|
|
284
284
|
};
|
|
285
285
|
},
|
|
286
|
+
getCmFuturesOrderDownloadLinkById: async (downloadId, recvWindow) => {
|
|
287
|
+
(0, __binance_common.assertParamExists)("getCmFuturesOrderDownloadLinkById", "downloadId", downloadId);
|
|
288
|
+
const localVarQueryParameter = {};
|
|
289
|
+
const localVarBodyParameter = {};
|
|
290
|
+
const localVarHeaderParameter = {};
|
|
291
|
+
if (downloadId !== void 0 && downloadId !== null) localVarQueryParameter["downloadId"] = downloadId;
|
|
292
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
293
|
+
let _timeUnit;
|
|
294
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
295
|
+
return {
|
|
296
|
+
endpoint: "/papi/v1/cm/order/asyn/id",
|
|
297
|
+
method: "GET",
|
|
298
|
+
queryParams: localVarQueryParameter,
|
|
299
|
+
bodyParams: localVarBodyParameter,
|
|
300
|
+
headerParams: localVarHeaderParameter,
|
|
301
|
+
timeUnit: _timeUnit
|
|
302
|
+
};
|
|
303
|
+
},
|
|
304
|
+
getCmFuturesTradeDownloadLinkById: async (downloadId, recvWindow) => {
|
|
305
|
+
(0, __binance_common.assertParamExists)("getCmFuturesTradeDownloadLinkById", "downloadId", downloadId);
|
|
306
|
+
const localVarQueryParameter = {};
|
|
307
|
+
const localVarBodyParameter = {};
|
|
308
|
+
const localVarHeaderParameter = {};
|
|
309
|
+
if (downloadId !== void 0 && downloadId !== null) localVarQueryParameter["downloadId"] = downloadId;
|
|
310
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
311
|
+
let _timeUnit;
|
|
312
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
313
|
+
return {
|
|
314
|
+
endpoint: "/papi/v1/cm/trade/asyn/id",
|
|
315
|
+
method: "GET",
|
|
316
|
+
queryParams: localVarQueryParameter,
|
|
317
|
+
bodyParams: localVarBodyParameter,
|
|
318
|
+
headerParams: localVarHeaderParameter,
|
|
319
|
+
timeUnit: _timeUnit
|
|
320
|
+
};
|
|
321
|
+
},
|
|
322
|
+
getCmFuturesTransactionDownloadLinkById: async (downloadId, recvWindow) => {
|
|
323
|
+
(0, __binance_common.assertParamExists)("getCmFuturesTransactionDownloadLinkById", "downloadId", downloadId);
|
|
324
|
+
const localVarQueryParameter = {};
|
|
325
|
+
const localVarBodyParameter = {};
|
|
326
|
+
const localVarHeaderParameter = {};
|
|
327
|
+
if (downloadId !== void 0 && downloadId !== null) localVarQueryParameter["downloadId"] = downloadId;
|
|
328
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
329
|
+
let _timeUnit;
|
|
330
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
331
|
+
return {
|
|
332
|
+
endpoint: "/papi/v1/cm/income/asyn/id",
|
|
333
|
+
method: "GET",
|
|
334
|
+
queryParams: localVarQueryParameter,
|
|
335
|
+
bodyParams: localVarBodyParameter,
|
|
336
|
+
headerParams: localVarHeaderParameter,
|
|
337
|
+
timeUnit: _timeUnit
|
|
338
|
+
};
|
|
339
|
+
},
|
|
286
340
|
getCmIncomeHistory: async (symbol, incomeType, startTime, endTime, limit, recvWindow) => {
|
|
287
341
|
const localVarQueryParameter = {};
|
|
288
342
|
const localVarBodyParameter = {};
|
|
@@ -304,6 +358,66 @@ const AccountApiAxiosParamCreator = function(configuration) {
|
|
|
304
358
|
timeUnit: _timeUnit
|
|
305
359
|
};
|
|
306
360
|
},
|
|
361
|
+
getDownloadIdForCmFuturesOrderHistory: async (startTime, endTime, recvWindow) => {
|
|
362
|
+
(0, __binance_common.assertParamExists)("getDownloadIdForCmFuturesOrderHistory", "startTime", startTime);
|
|
363
|
+
(0, __binance_common.assertParamExists)("getDownloadIdForCmFuturesOrderHistory", "endTime", endTime);
|
|
364
|
+
const localVarQueryParameter = {};
|
|
365
|
+
const localVarBodyParameter = {};
|
|
366
|
+
const localVarHeaderParameter = {};
|
|
367
|
+
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
368
|
+
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
369
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
370
|
+
let _timeUnit;
|
|
371
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
372
|
+
return {
|
|
373
|
+
endpoint: "/papi/v1/cm/order/asyn",
|
|
374
|
+
method: "GET",
|
|
375
|
+
queryParams: localVarQueryParameter,
|
|
376
|
+
bodyParams: localVarBodyParameter,
|
|
377
|
+
headerParams: localVarHeaderParameter,
|
|
378
|
+
timeUnit: _timeUnit
|
|
379
|
+
};
|
|
380
|
+
},
|
|
381
|
+
getDownloadIdForCmFuturesTradeHistory: async (startTime, endTime, recvWindow) => {
|
|
382
|
+
(0, __binance_common.assertParamExists)("getDownloadIdForCmFuturesTradeHistory", "startTime", startTime);
|
|
383
|
+
(0, __binance_common.assertParamExists)("getDownloadIdForCmFuturesTradeHistory", "endTime", endTime);
|
|
384
|
+
const localVarQueryParameter = {};
|
|
385
|
+
const localVarBodyParameter = {};
|
|
386
|
+
const localVarHeaderParameter = {};
|
|
387
|
+
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
388
|
+
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
389
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
390
|
+
let _timeUnit;
|
|
391
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
392
|
+
return {
|
|
393
|
+
endpoint: "/papi/v1/cm/trade/asyn",
|
|
394
|
+
method: "GET",
|
|
395
|
+
queryParams: localVarQueryParameter,
|
|
396
|
+
bodyParams: localVarBodyParameter,
|
|
397
|
+
headerParams: localVarHeaderParameter,
|
|
398
|
+
timeUnit: _timeUnit
|
|
399
|
+
};
|
|
400
|
+
},
|
|
401
|
+
getDownloadIdForCmFuturesTransactionHistory: async (startTime, endTime, recvWindow) => {
|
|
402
|
+
(0, __binance_common.assertParamExists)("getDownloadIdForCmFuturesTransactionHistory", "startTime", startTime);
|
|
403
|
+
(0, __binance_common.assertParamExists)("getDownloadIdForCmFuturesTransactionHistory", "endTime", endTime);
|
|
404
|
+
const localVarQueryParameter = {};
|
|
405
|
+
const localVarBodyParameter = {};
|
|
406
|
+
const localVarHeaderParameter = {};
|
|
407
|
+
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
408
|
+
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
409
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
410
|
+
let _timeUnit;
|
|
411
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
412
|
+
return {
|
|
413
|
+
endpoint: "/papi/v1/cm/income/asyn",
|
|
414
|
+
method: "GET",
|
|
415
|
+
queryParams: localVarQueryParameter,
|
|
416
|
+
bodyParams: localVarBodyParameter,
|
|
417
|
+
headerParams: localVarHeaderParameter,
|
|
418
|
+
timeUnit: _timeUnit
|
|
419
|
+
};
|
|
420
|
+
},
|
|
307
421
|
getDownloadIdForUmFuturesOrderHistory: async (startTime, endTime, recvWindow) => {
|
|
308
422
|
(0, __binance_common.assertParamExists)("getDownloadIdForUmFuturesOrderHistory", "startTime", startTime);
|
|
309
423
|
(0, __binance_common.assertParamExists)("getDownloadIdForUmFuturesOrderHistory", "endTime", endTime);
|
|
@@ -1077,6 +1191,69 @@ var AccountApi = class {
|
|
|
1077
1191
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1078
1192
|
}
|
|
1079
1193
|
/**
|
|
1194
|
+
* Get CM futures order download link by Id
|
|
1195
|
+
*
|
|
1196
|
+
* Weight(IP): 10
|
|
1197
|
+
*
|
|
1198
|
+
* Security Type: USER_DATA
|
|
1199
|
+
*
|
|
1200
|
+
* Notes:
|
|
1201
|
+
* - Download link expiration: 7 days
|
|
1202
|
+
*
|
|
1203
|
+
* @summary Get CM Futures Order Download Link by Id (USER_DATA)
|
|
1204
|
+
* @param {GetCmFuturesOrderDownloadLinkByIdRequest} requestParameters Request parameters.
|
|
1205
|
+
* @returns {Promise<RestApiResponse<GetCmFuturesOrderDownloadLinkByIdResponse>>}
|
|
1206
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1207
|
+
* @memberof AccountApi
|
|
1208
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-futures-order-download-link-by-id Binance API Documentation}
|
|
1209
|
+
*/
|
|
1210
|
+
async getCmFuturesOrderDownloadLinkById(requestParameters) {
|
|
1211
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCmFuturesOrderDownloadLinkById(requestParameters?.downloadId, requestParameters?.recvWindow);
|
|
1212
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1213
|
+
}
|
|
1214
|
+
/**
|
|
1215
|
+
* Get CM futures trade download link by Id
|
|
1216
|
+
*
|
|
1217
|
+
* Weight(IP): 10
|
|
1218
|
+
*
|
|
1219
|
+
* Security Type: USER_DATA
|
|
1220
|
+
*
|
|
1221
|
+
* Notes:
|
|
1222
|
+
* - Download link expiration: 7 days
|
|
1223
|
+
*
|
|
1224
|
+
* @summary Get CM Futures Trade Download Link by Id (USER_DATA)
|
|
1225
|
+
* @param {GetCmFuturesTradeDownloadLinkByIdRequest} requestParameters Request parameters.
|
|
1226
|
+
* @returns {Promise<RestApiResponse<GetCmFuturesTradeDownloadLinkByIdResponse>>}
|
|
1227
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1228
|
+
* @memberof AccountApi
|
|
1229
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-futures-trade-download-link-by-id Binance API Documentation}
|
|
1230
|
+
*/
|
|
1231
|
+
async getCmFuturesTradeDownloadLinkById(requestParameters) {
|
|
1232
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCmFuturesTradeDownloadLinkById(requestParameters?.downloadId, requestParameters?.recvWindow);
|
|
1233
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1234
|
+
}
|
|
1235
|
+
/**
|
|
1236
|
+
* Get CM futures Transaction download link by Id
|
|
1237
|
+
*
|
|
1238
|
+
* Weight(IP): 10
|
|
1239
|
+
*
|
|
1240
|
+
* Security Type: USER_DATA
|
|
1241
|
+
*
|
|
1242
|
+
* Notes:
|
|
1243
|
+
* - Download link expiration: 7 days
|
|
1244
|
+
*
|
|
1245
|
+
* @summary Get CM Futures Transaction Download Link by Id (USER_DATA)
|
|
1246
|
+
* @param {GetCmFuturesTransactionDownloadLinkByIdRequest} requestParameters Request parameters.
|
|
1247
|
+
* @returns {Promise<RestApiResponse<GetCmFuturesTransactionDownloadLinkByIdResponse>>}
|
|
1248
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1249
|
+
* @memberof AccountApi
|
|
1250
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-futures-transaction-download-link-by-id Binance API Documentation}
|
|
1251
|
+
*/
|
|
1252
|
+
async getCmFuturesTransactionDownloadLinkById(requestParameters) {
|
|
1253
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getCmFuturesTransactionDownloadLinkById(requestParameters?.downloadId, requestParameters?.recvWindow);
|
|
1254
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1255
|
+
}
|
|
1256
|
+
/**
|
|
1080
1257
|
* Get CM Income History.
|
|
1081
1258
|
*
|
|
1082
1259
|
* Weight(IP): 30
|
|
@@ -1101,6 +1278,72 @@ var AccountApi = class {
|
|
|
1101
1278
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1102
1279
|
}
|
|
1103
1280
|
/**
|
|
1281
|
+
* Get download id for CM futures order history
|
|
1282
|
+
*
|
|
1283
|
+
* Weight(IP): 1500
|
|
1284
|
+
*
|
|
1285
|
+
* Security Type: USER_DATA
|
|
1286
|
+
*
|
|
1287
|
+
* Notes:
|
|
1288
|
+
* - Request Limitation is 10 times per month, shared by front end download page and rest api
|
|
1289
|
+
* - The time between `startTime` and `endTime` can not be longer than 1 year
|
|
1290
|
+
*
|
|
1291
|
+
* @summary Get Download Id For CM Futures Order History (USER_DATA)
|
|
1292
|
+
* @param {GetDownloadIdForCmFuturesOrderHistoryRequest} requestParameters Request parameters.
|
|
1293
|
+
* @returns {Promise<RestApiResponse<GetDownloadIdForCmFuturesOrderHistoryResponse>>}
|
|
1294
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1295
|
+
* @memberof AccountApi
|
|
1296
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-cm-futures-order-history Binance API Documentation}
|
|
1297
|
+
*/
|
|
1298
|
+
async getDownloadIdForCmFuturesOrderHistory(requestParameters) {
|
|
1299
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDownloadIdForCmFuturesOrderHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
|
|
1300
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1301
|
+
}
|
|
1302
|
+
/**
|
|
1303
|
+
* Get download id for CM futures trade history
|
|
1304
|
+
*
|
|
1305
|
+
* Weight(IP): 1500
|
|
1306
|
+
*
|
|
1307
|
+
* Security Type: USER_DATA
|
|
1308
|
+
*
|
|
1309
|
+
* Notes:
|
|
1310
|
+
* - Request Limitation is 5 times per month, shared by front end download page and rest api
|
|
1311
|
+
* - The time between `startTime` and `endTime` can not be longer than 1 year
|
|
1312
|
+
*
|
|
1313
|
+
* @summary Get Download Id For CM Futures Trade History (USER_DATA)
|
|
1314
|
+
* @param {GetDownloadIdForCmFuturesTradeHistoryRequest} requestParameters Request parameters.
|
|
1315
|
+
* @returns {Promise<RestApiResponse<GetDownloadIdForCmFuturesTradeHistoryResponse>>}
|
|
1316
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1317
|
+
* @memberof AccountApi
|
|
1318
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-cm-futures-trade-history Binance API Documentation}
|
|
1319
|
+
*/
|
|
1320
|
+
async getDownloadIdForCmFuturesTradeHistory(requestParameters) {
|
|
1321
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDownloadIdForCmFuturesTradeHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
|
|
1322
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1323
|
+
}
|
|
1324
|
+
/**
|
|
1325
|
+
* Get download id for CM futures transaction history
|
|
1326
|
+
*
|
|
1327
|
+
* Weight(IP): 1500
|
|
1328
|
+
*
|
|
1329
|
+
* Security Type: USER_DATA
|
|
1330
|
+
*
|
|
1331
|
+
* Notes:
|
|
1332
|
+
* - Request Limitation is 5 times per month, shared by front end download page and rest api
|
|
1333
|
+
* - The time between `startTime` and `endTime` can not be longer than 1 year
|
|
1334
|
+
*
|
|
1335
|
+
* @summary Get Download Id For CM Futures Transaction History (USER_DATA)
|
|
1336
|
+
* @param {GetDownloadIdForCmFuturesTransactionHistoryRequest} requestParameters Request parameters.
|
|
1337
|
+
* @returns {Promise<RestApiResponse<GetDownloadIdForCmFuturesTransactionHistoryResponse>>}
|
|
1338
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
1339
|
+
* @memberof AccountApi
|
|
1340
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-cm-futures-transaction-history Binance API Documentation}
|
|
1341
|
+
*/
|
|
1342
|
+
async getDownloadIdForCmFuturesTransactionHistory(requestParameters) {
|
|
1343
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.getDownloadIdForCmFuturesTransactionHistory(requestParameters?.startTime, requestParameters?.endTime, requestParameters?.recvWindow);
|
|
1344
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1345
|
+
}
|
|
1346
|
+
/**
|
|
1104
1347
|
* Get download id for UM futures order history
|
|
1105
1348
|
*
|
|
1106
1349
|
* Weight(IP): 1500
|
|
@@ -1816,6 +2059,24 @@ var MarketDataApi = class {
|
|
|
1816
2059
|
*/
|
|
1817
2060
|
const TradeApiAxiosParamCreator = function(configuration) {
|
|
1818
2061
|
return {
|
|
2062
|
+
cancelAllCmAlgoOpenOrders: async (symbol, recvWindow) => {
|
|
2063
|
+
(0, __binance_common.assertParamExists)("cancelAllCmAlgoOpenOrders", "symbol", symbol);
|
|
2064
|
+
const localVarQueryParameter = {};
|
|
2065
|
+
const localVarBodyParameter = {};
|
|
2066
|
+
const localVarHeaderParameter = {};
|
|
2067
|
+
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
2068
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
2069
|
+
let _timeUnit;
|
|
2070
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
2071
|
+
return {
|
|
2072
|
+
endpoint: "/papi/v1/cm/algo/allOpenOrders",
|
|
2073
|
+
method: "DELETE",
|
|
2074
|
+
queryParams: localVarQueryParameter,
|
|
2075
|
+
bodyParams: localVarBodyParameter,
|
|
2076
|
+
headerParams: localVarHeaderParameter,
|
|
2077
|
+
timeUnit: _timeUnit
|
|
2078
|
+
};
|
|
2079
|
+
},
|
|
1819
2080
|
cancelAllCmOpenConditionalOrders: async (symbol, recvWindow) => {
|
|
1820
2081
|
(0, __binance_common.assertParamExists)("cancelAllCmOpenConditionalOrders", "symbol", symbol);
|
|
1821
2082
|
const localVarQueryParameter = {};
|
|
@@ -1888,6 +2149,24 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1888
2149
|
timeUnit: _timeUnit
|
|
1889
2150
|
};
|
|
1890
2151
|
},
|
|
2152
|
+
cancelCmAlgoOrder: async (algoId, clientAlgoId, recvWindow) => {
|
|
2153
|
+
const localVarQueryParameter = {};
|
|
2154
|
+
const localVarBodyParameter = {};
|
|
2155
|
+
const localVarHeaderParameter = {};
|
|
2156
|
+
if (algoId !== void 0 && algoId !== null) localVarQueryParameter["algoId"] = algoId;
|
|
2157
|
+
if (clientAlgoId !== void 0 && clientAlgoId !== null) localVarQueryParameter["clientAlgoId"] = clientAlgoId;
|
|
2158
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
2159
|
+
let _timeUnit;
|
|
2160
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
2161
|
+
return {
|
|
2162
|
+
endpoint: "/papi/v1/cm/algo/order",
|
|
2163
|
+
method: "DELETE",
|
|
2164
|
+
queryParams: localVarQueryParameter,
|
|
2165
|
+
bodyParams: localVarBodyParameter,
|
|
2166
|
+
headerParams: localVarHeaderParameter,
|
|
2167
|
+
timeUnit: _timeUnit
|
|
2168
|
+
};
|
|
2169
|
+
},
|
|
1891
2170
|
cancelCmConditionalOrder: async (symbol, strategyId, newClientStrategyId, recvWindow) => {
|
|
1892
2171
|
(0, __binance_common.assertParamExists)("cancelCmConditionalOrder", "symbol", symbol);
|
|
1893
2172
|
const localVarQueryParameter = {};
|
|
@@ -2271,6 +2550,45 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2271
2550
|
timeUnit: _timeUnit
|
|
2272
2551
|
};
|
|
2273
2552
|
},
|
|
2553
|
+
newCmAlgoOrder: async (algoType, symbol, side, type, positionSide, timeInForce, quantity, price, triggerPrice, workingType, priceMatch, closePosition, priceProtect, reduceOnly, activatePrice, callbackRate, clientAlgoId, newOrderRespType, selfTradePreventionMode, recvWindow) => {
|
|
2554
|
+
(0, __binance_common.assertParamExists)("newCmAlgoOrder", "algoType", algoType);
|
|
2555
|
+
(0, __binance_common.assertParamExists)("newCmAlgoOrder", "symbol", symbol);
|
|
2556
|
+
(0, __binance_common.assertParamExists)("newCmAlgoOrder", "side", side);
|
|
2557
|
+
(0, __binance_common.assertParamExists)("newCmAlgoOrder", "type", type);
|
|
2558
|
+
const localVarQueryParameter = {};
|
|
2559
|
+
const localVarBodyParameter = {};
|
|
2560
|
+
const localVarHeaderParameter = {};
|
|
2561
|
+
if (algoType !== void 0 && algoType !== null) localVarQueryParameter["algoType"] = algoType;
|
|
2562
|
+
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
2563
|
+
if (side !== void 0 && side !== null) localVarQueryParameter["side"] = side;
|
|
2564
|
+
if (positionSide !== void 0 && positionSide !== null) localVarQueryParameter["positionSide"] = positionSide;
|
|
2565
|
+
if (type !== void 0 && type !== null) localVarQueryParameter["type"] = type;
|
|
2566
|
+
if (timeInForce !== void 0 && timeInForce !== null) localVarQueryParameter["timeInForce"] = timeInForce;
|
|
2567
|
+
if (quantity !== void 0 && quantity !== null) localVarQueryParameter["quantity"] = quantity;
|
|
2568
|
+
if (price !== void 0 && price !== null) localVarQueryParameter["price"] = price;
|
|
2569
|
+
if (triggerPrice !== void 0 && triggerPrice !== null) localVarQueryParameter["triggerPrice"] = triggerPrice;
|
|
2570
|
+
if (workingType !== void 0 && workingType !== null) localVarQueryParameter["workingType"] = workingType;
|
|
2571
|
+
if (priceMatch !== void 0 && priceMatch !== null) localVarQueryParameter["priceMatch"] = priceMatch;
|
|
2572
|
+
if (closePosition !== void 0 && closePosition !== null) localVarQueryParameter["closePosition"] = closePosition;
|
|
2573
|
+
if (priceProtect !== void 0 && priceProtect !== null) localVarQueryParameter["priceProtect"] = priceProtect;
|
|
2574
|
+
if (reduceOnly !== void 0 && reduceOnly !== null) localVarQueryParameter["reduceOnly"] = reduceOnly;
|
|
2575
|
+
if (activatePrice !== void 0 && activatePrice !== null) localVarQueryParameter["activatePrice"] = activatePrice;
|
|
2576
|
+
if (callbackRate !== void 0 && callbackRate !== null) localVarQueryParameter["callbackRate"] = callbackRate;
|
|
2577
|
+
if (clientAlgoId !== void 0 && clientAlgoId !== null) localVarQueryParameter["clientAlgoId"] = clientAlgoId;
|
|
2578
|
+
if (newOrderRespType !== void 0 && newOrderRespType !== null) localVarQueryParameter["newOrderRespType"] = newOrderRespType;
|
|
2579
|
+
if (selfTradePreventionMode !== void 0 && selfTradePreventionMode !== null) localVarQueryParameter["selfTradePreventionMode"] = selfTradePreventionMode;
|
|
2580
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
2581
|
+
let _timeUnit;
|
|
2582
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
2583
|
+
return {
|
|
2584
|
+
endpoint: "/papi/v1/cm/algo/order",
|
|
2585
|
+
method: "POST",
|
|
2586
|
+
queryParams: localVarQueryParameter,
|
|
2587
|
+
bodyParams: localVarBodyParameter,
|
|
2588
|
+
headerParams: localVarHeaderParameter,
|
|
2589
|
+
timeUnit: _timeUnit
|
|
2590
|
+
};
|
|
2591
|
+
},
|
|
2274
2592
|
newCmConditionalOrder: async (symbol, side, strategyType, positionSide, timeInForce, quantity, reduceOnly, price, workingType, priceProtect, newClientStrategyId, stopPrice, activationPrice, callbackRate, recvWindow) => {
|
|
2275
2593
|
(0, __binance_common.assertParamExists)("newCmConditionalOrder", "symbol", symbol);
|
|
2276
2594
|
(0, __binance_common.assertParamExists)("newCmConditionalOrder", "side", side);
|
|
@@ -2482,6 +2800,25 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2482
2800
|
timeUnit: _timeUnit
|
|
2483
2801
|
};
|
|
2484
2802
|
},
|
|
2803
|
+
queryAllCurrentCmOpenAlgoOrders: async (algoType, symbol, algoId, recvWindow) => {
|
|
2804
|
+
const localVarQueryParameter = {};
|
|
2805
|
+
const localVarBodyParameter = {};
|
|
2806
|
+
const localVarHeaderParameter = {};
|
|
2807
|
+
if (algoType !== void 0 && algoType !== null) localVarQueryParameter["algoType"] = algoType;
|
|
2808
|
+
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
2809
|
+
if (algoId !== void 0 && algoId !== null) localVarQueryParameter["algoId"] = algoId;
|
|
2810
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
2811
|
+
let _timeUnit;
|
|
2812
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
2813
|
+
return {
|
|
2814
|
+
endpoint: "/papi/v1/cm/algo/openAlgoOrders",
|
|
2815
|
+
method: "GET",
|
|
2816
|
+
queryParams: localVarQueryParameter,
|
|
2817
|
+
bodyParams: localVarBodyParameter,
|
|
2818
|
+
headerParams: localVarHeaderParameter,
|
|
2819
|
+
timeUnit: _timeUnit
|
|
2820
|
+
};
|
|
2821
|
+
},
|
|
2485
2822
|
queryAllCurrentCmOpenConditionalOrders: async (symbol, recvWindow) => {
|
|
2486
2823
|
const localVarQueryParameter = {};
|
|
2487
2824
|
const localVarBodyParameter = {};
|
|
@@ -2597,6 +2934,28 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2597
2934
|
timeUnit: _timeUnit
|
|
2598
2935
|
};
|
|
2599
2936
|
},
|
|
2937
|
+
queryCmAlgoOrderHistory: async (symbol, algoId, startTime, endTime, limit, recvWindow) => {
|
|
2938
|
+
(0, __binance_common.assertParamExists)("queryCmAlgoOrderHistory", "symbol", symbol);
|
|
2939
|
+
const localVarQueryParameter = {};
|
|
2940
|
+
const localVarBodyParameter = {};
|
|
2941
|
+
const localVarHeaderParameter = {};
|
|
2942
|
+
if (symbol !== void 0 && symbol !== null) localVarQueryParameter["symbol"] = symbol;
|
|
2943
|
+
if (algoId !== void 0 && algoId !== null) localVarQueryParameter["algoId"] = algoId;
|
|
2944
|
+
if (startTime !== void 0 && startTime !== null) localVarQueryParameter["startTime"] = startTime;
|
|
2945
|
+
if (endTime !== void 0 && endTime !== null) localVarQueryParameter["endTime"] = endTime;
|
|
2946
|
+
if (limit !== void 0 && limit !== null) localVarQueryParameter["limit"] = limit;
|
|
2947
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
2948
|
+
let _timeUnit;
|
|
2949
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
2950
|
+
return {
|
|
2951
|
+
endpoint: "/papi/v1/cm/algo/allAlgoOrders",
|
|
2952
|
+
method: "GET",
|
|
2953
|
+
queryParams: localVarQueryParameter,
|
|
2954
|
+
bodyParams: localVarBodyParameter,
|
|
2955
|
+
headerParams: localVarHeaderParameter,
|
|
2956
|
+
timeUnit: _timeUnit
|
|
2957
|
+
};
|
|
2958
|
+
},
|
|
2600
2959
|
queryCmConditionalOrderHistory: async (symbol, strategyId, newClientStrategyId, recvWindow) => {
|
|
2601
2960
|
(0, __binance_common.assertParamExists)("queryCmConditionalOrderHistory", "symbol", symbol);
|
|
2602
2961
|
const localVarQueryParameter = {};
|
|
@@ -2660,6 +3019,24 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2660
3019
|
timeUnit: _timeUnit
|
|
2661
3020
|
};
|
|
2662
3021
|
},
|
|
3022
|
+
queryCurrentCmOpenAlgoOrder: async (algoId, clientAlgoId, recvWindow) => {
|
|
3023
|
+
const localVarQueryParameter = {};
|
|
3024
|
+
const localVarBodyParameter = {};
|
|
3025
|
+
const localVarHeaderParameter = {};
|
|
3026
|
+
if (algoId !== void 0 && algoId !== null) localVarQueryParameter["algoId"] = algoId;
|
|
3027
|
+
if (clientAlgoId !== void 0 && clientAlgoId !== null) localVarQueryParameter["clientAlgoId"] = clientAlgoId;
|
|
3028
|
+
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
3029
|
+
let _timeUnit;
|
|
3030
|
+
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
3031
|
+
return {
|
|
3032
|
+
endpoint: "/papi/v1/cm/algo/algoOrder",
|
|
3033
|
+
method: "GET",
|
|
3034
|
+
queryParams: localVarQueryParameter,
|
|
3035
|
+
bodyParams: localVarBodyParameter,
|
|
3036
|
+
headerParams: localVarHeaderParameter,
|
|
3037
|
+
timeUnit: _timeUnit
|
|
3038
|
+
};
|
|
3039
|
+
},
|
|
2663
3040
|
queryCurrentCmOpenConditionalOrder: async (symbol, strategyId, newClientStrategyId, recvWindow) => {
|
|
2664
3041
|
(0, __binance_common.assertParamExists)("queryCurrentCmOpenConditionalOrder", "symbol", symbol);
|
|
2665
3042
|
const localVarQueryParameter = {};
|
|
@@ -3026,6 +3403,24 @@ var TradeApi = class {
|
|
|
3026
3403
|
this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);
|
|
3027
3404
|
}
|
|
3028
3405
|
/**
|
|
3406
|
+
* Cancel All CM Algo Open Orders
|
|
3407
|
+
*
|
|
3408
|
+
* Weight(IP): 1
|
|
3409
|
+
*
|
|
3410
|
+
* Security Type: TRADE
|
|
3411
|
+
*
|
|
3412
|
+
* @summary Cancel All CM Algo Open Orders (TRADE)
|
|
3413
|
+
* @param {CancelAllCmAlgoOpenOrdersRequest} requestParameters Request parameters.
|
|
3414
|
+
* @returns {Promise<RestApiResponse<CancelAllCmAlgoOpenOrdersResponse>>}
|
|
3415
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3416
|
+
* @memberof TradeApi
|
|
3417
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-cm-algo-open-orders Binance API Documentation}
|
|
3418
|
+
*/
|
|
3419
|
+
async cancelAllCmAlgoOpenOrders(requestParameters) {
|
|
3420
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelAllCmAlgoOpenOrders(requestParameters?.symbol, requestParameters?.recvWindow);
|
|
3421
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3422
|
+
}
|
|
3423
|
+
/**
|
|
3029
3424
|
* Cancel All CM Open Conditional Orders
|
|
3030
3425
|
*
|
|
3031
3426
|
* Weight(IP): 1
|
|
@@ -3098,6 +3493,27 @@ var TradeApi = class {
|
|
|
3098
3493
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3099
3494
|
}
|
|
3100
3495
|
/**
|
|
3496
|
+
* Cancel an active CM algo order
|
|
3497
|
+
*
|
|
3498
|
+
* Weight(IP): 1
|
|
3499
|
+
*
|
|
3500
|
+
* Security Type: TRADE
|
|
3501
|
+
*
|
|
3502
|
+
* Notes:
|
|
3503
|
+
* - Either `algoId` or `clientAlgoId` must be sent.
|
|
3504
|
+
*
|
|
3505
|
+
* @summary Cancel CM Algo Order (TRADE)
|
|
3506
|
+
* @param {CancelCmAlgoOrderRequest} requestParameters Request parameters.
|
|
3507
|
+
* @returns {Promise<RestApiResponse<CancelCmAlgoOrderResponse>>}
|
|
3508
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3509
|
+
* @memberof TradeApi
|
|
3510
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-cm-algo-order Binance API Documentation}
|
|
3511
|
+
*/
|
|
3512
|
+
async cancelCmAlgoOrder(requestParameters = {}) {
|
|
3513
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.cancelCmAlgoOrder(requestParameters?.algoId, requestParameters?.clientAlgoId, requestParameters?.recvWindow);
|
|
3514
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3515
|
+
}
|
|
3516
|
+
/**
|
|
3101
3517
|
* Cancel CM Conditional Order
|
|
3102
3518
|
*
|
|
3103
3519
|
* Weight(IP): 1
|
|
@@ -3494,6 +3910,34 @@ var TradeApi = class {
|
|
|
3494
3910
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3495
3911
|
}
|
|
3496
3912
|
/**
|
|
3913
|
+
* Place new CM conditional order
|
|
3914
|
+
*
|
|
3915
|
+
* Weight(IP): 1
|
|
3916
|
+
*
|
|
3917
|
+
* Security Type: TRADE
|
|
3918
|
+
*
|
|
3919
|
+
* Notes:
|
|
3920
|
+
* - Algo order with type `STOP`, parameter `timeInForce` can be sent (default `GTC`).
|
|
3921
|
+
* - Algo order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent (default `GTC`).
|
|
3922
|
+
* - Condition orders will be triggered when price reaches the `triggerPrice`.
|
|
3923
|
+
* - `STOP`, `STOP_MARKET`: BUY: latest price >= `triggerPrice`; SELL: latest price <= `triggerPrice`.
|
|
3924
|
+
* - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: BUY: latest price <= `triggerPrice`; SELL: latest price >= `triggerPrice`.
|
|
3925
|
+
* - `TRAILING_STOP_MARKET`: BUY: lowest price after order placed <= `activatePrice`, and latest price >= lowest price * (1 + `callbackRate`); SELL: highest price after order placed >= `activatePrice`, and latest price <= highest price * (1 - `callbackRate`).
|
|
3926
|
+
* - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with `closePosition`=`true`: follow the same rules for conditional orders; if triggered, close all current long position (if `SELL`) or current short position (if `BUY`); cannot be used with `quantity` parameter; cannot be used with `reduceOnly` parameter; in Hedge Mode, cannot be used with `BUY` orders in `LONG` position side, and cannot be used with `SELL` orders in `SHORT` position side.
|
|
3927
|
+
* - `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC`.
|
|
3928
|
+
*
|
|
3929
|
+
* @summary New CM Algo Order (TRADE)
|
|
3930
|
+
* @param {NewCmAlgoOrderRequest} requestParameters Request parameters.
|
|
3931
|
+
* @returns {Promise<RestApiResponse<NewCmAlgoOrderResponse>>}
|
|
3932
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
3933
|
+
* @memberof TradeApi
|
|
3934
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-cm-algo-order Binance API Documentation}
|
|
3935
|
+
*/
|
|
3936
|
+
async newCmAlgoOrder(requestParameters) {
|
|
3937
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.newCmAlgoOrder(requestParameters?.algoType, requestParameters?.symbol, requestParameters?.side, requestParameters?.type, requestParameters?.positionSide, requestParameters?.timeInForce, requestParameters?.quantity, requestParameters?.price, requestParameters?.triggerPrice, requestParameters?.workingType, requestParameters?.priceMatch, requestParameters?.closePosition, requestParameters?.priceProtect, requestParameters?.reduceOnly, requestParameters?.activatePrice, requestParameters?.callbackRate, requestParameters?.clientAlgoId, requestParameters?.newOrderRespType, requestParameters?.selfTradePreventionMode, requestParameters?.recvWindow);
|
|
3938
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3939
|
+
}
|
|
3940
|
+
/**
|
|
3497
3941
|
* New CM Conditional Order
|
|
3498
3942
|
*
|
|
3499
3943
|
* Weight(IP): 1
|
|
@@ -3677,6 +4121,27 @@ var TradeApi = class {
|
|
|
3677
4121
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3678
4122
|
}
|
|
3679
4123
|
/**
|
|
4124
|
+
* Get all CM open algo orders on a symbol. If the symbol is not sent, orders for all symbols will be returned.
|
|
4125
|
+
*
|
|
4126
|
+
* Weight(IP): 1
|
|
4127
|
+
*
|
|
4128
|
+
* Security Type: USER_DATA
|
|
4129
|
+
*
|
|
4130
|
+
* Notes:
|
|
4131
|
+
* - Weight: 1 for a single symbol; 40 when the symbol parameter is omitted.
|
|
4132
|
+
*
|
|
4133
|
+
* @summary Query All Current CM Open Algo Orders (USER_DATA)
|
|
4134
|
+
* @param {QueryAllCurrentCmOpenAlgoOrdersRequest} requestParameters Request parameters.
|
|
4135
|
+
* @returns {Promise<RestApiResponse<QueryAllCurrentCmOpenAlgoOrdersResponse>>}
|
|
4136
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4137
|
+
* @memberof TradeApi
|
|
4138
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-cm-open-algo-orders Binance API Documentation}
|
|
4139
|
+
*/
|
|
4140
|
+
async queryAllCurrentCmOpenAlgoOrders(requestParameters = {}) {
|
|
4141
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryAllCurrentCmOpenAlgoOrders(requestParameters?.algoType, requestParameters?.symbol, requestParameters?.algoId, requestParameters?.recvWindow);
|
|
4142
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
4143
|
+
}
|
|
4144
|
+
/**
|
|
3680
4145
|
* Get all open conditional orders on a symbol. **Careful** when accessing this with no symbol.
|
|
3681
4146
|
*
|
|
3682
4147
|
* Weight: - 1 for a single `symbol`
|
|
@@ -3807,6 +4272,28 @@ var TradeApi = class {
|
|
|
3807
4272
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3808
4273
|
}
|
|
3809
4274
|
/**
|
|
4275
|
+
* Get all algo orders: ACTIVE, CANCELED, TRIGGERED or FINISHED.
|
|
4276
|
+
*
|
|
4277
|
+
* Weight(IP): 5
|
|
4278
|
+
*
|
|
4279
|
+
* Security Type: USER_DATA
|
|
4280
|
+
*
|
|
4281
|
+
* Notes:
|
|
4282
|
+
* - If `algoId` is set, it will get orders >= that `algoId`. Otherwise most recent orders are returned.
|
|
4283
|
+
* - The query time period must be less than 7 days (default as the recent 7 days).
|
|
4284
|
+
*
|
|
4285
|
+
* @summary Query CM Algo Order History (USER_DATA)
|
|
4286
|
+
* @param {QueryCmAlgoOrderHistoryRequest} requestParameters Request parameters.
|
|
4287
|
+
* @returns {Promise<RestApiResponse<QueryCmAlgoOrderHistoryResponse>>}
|
|
4288
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4289
|
+
* @memberof TradeApi
|
|
4290
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-algo-order-history Binance API Documentation}
|
|
4291
|
+
*/
|
|
4292
|
+
async queryCmAlgoOrderHistory(requestParameters) {
|
|
4293
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCmAlgoOrderHistory(requestParameters?.symbol, requestParameters?.algoId, requestParameters?.startTime, requestParameters?.endTime, requestParameters?.limit, requestParameters?.recvWindow);
|
|
4294
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
4295
|
+
}
|
|
4296
|
+
/**
|
|
3810
4297
|
* Query CM Conditional Order History
|
|
3811
4298
|
*
|
|
3812
4299
|
* Weight(IP): 1
|
|
@@ -3879,6 +4366,27 @@ var TradeApi = class {
|
|
|
3879
4366
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3880
4367
|
}
|
|
3881
4368
|
/**
|
|
4369
|
+
* Check a CM algo order's status. Orders will not be found if: status is CANCELED/EXPIRED with no fills and created 3+ days ago; or created 90+ days ago.
|
|
4370
|
+
*
|
|
4371
|
+
* Weight(IP): 1
|
|
4372
|
+
*
|
|
4373
|
+
* Security Type: USER_DATA
|
|
4374
|
+
*
|
|
4375
|
+
* Notes:
|
|
4376
|
+
* - Either `algoId` or `clientAlgoId` must be sent. `algoId` is self-increment for each specific `symbol`.
|
|
4377
|
+
*
|
|
4378
|
+
* @summary Query Current CM Open Algo Order (USER_DATA)
|
|
4379
|
+
* @param {QueryCurrentCmOpenAlgoOrderRequest} requestParameters Request parameters.
|
|
4380
|
+
* @returns {Promise<RestApiResponse<QueryCurrentCmOpenAlgoOrderResponse>>}
|
|
4381
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
4382
|
+
* @memberof TradeApi
|
|
4383
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-cm-open-algo-order Binance API Documentation}
|
|
4384
|
+
*/
|
|
4385
|
+
async queryCurrentCmOpenAlgoOrder(requestParameters = {}) {
|
|
4386
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.queryCurrentCmOpenAlgoOrder(requestParameters?.algoId, requestParameters?.clientAlgoId, requestParameters?.recvWindow);
|
|
4387
|
+
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
4388
|
+
}
|
|
4389
|
+
/**
|
|
3882
4390
|
* Query Current CM Open Conditional Order
|
|
3883
4391
|
*
|
|
3884
4392
|
* Weight(IP): 1
|
|
@@ -4321,6 +4829,79 @@ let ModifyUmOrderPriceMatchEnum = /* @__PURE__ */ function(ModifyUmOrderPriceMat
|
|
|
4321
4829
|
ModifyUmOrderPriceMatchEnum$1["QUEUE_20"] = "QUEUE_20";
|
|
4322
4830
|
return ModifyUmOrderPriceMatchEnum$1;
|
|
4323
4831
|
}({});
|
|
4832
|
+
let NewCmAlgoOrderAlgoTypeEnum = /* @__PURE__ */ function(NewCmAlgoOrderAlgoTypeEnum$1) {
|
|
4833
|
+
NewCmAlgoOrderAlgoTypeEnum$1["CONDITIONAL"] = "CONDITIONAL";
|
|
4834
|
+
return NewCmAlgoOrderAlgoTypeEnum$1;
|
|
4835
|
+
}({});
|
|
4836
|
+
let NewCmAlgoOrderSideEnum = /* @__PURE__ */ function(NewCmAlgoOrderSideEnum$1) {
|
|
4837
|
+
NewCmAlgoOrderSideEnum$1["BUY"] = "BUY";
|
|
4838
|
+
NewCmAlgoOrderSideEnum$1["SELL"] = "SELL";
|
|
4839
|
+
return NewCmAlgoOrderSideEnum$1;
|
|
4840
|
+
}({});
|
|
4841
|
+
let NewCmAlgoOrderTypeEnum = /* @__PURE__ */ function(NewCmAlgoOrderTypeEnum$1) {
|
|
4842
|
+
NewCmAlgoOrderTypeEnum$1["STOP"] = "STOP";
|
|
4843
|
+
NewCmAlgoOrderTypeEnum$1["TAKE_PROFIT"] = "TAKE_PROFIT";
|
|
4844
|
+
NewCmAlgoOrderTypeEnum$1["STOP_MARKET"] = "STOP_MARKET";
|
|
4845
|
+
NewCmAlgoOrderTypeEnum$1["TAKE_PROFIT_MARKET"] = "TAKE_PROFIT_MARKET";
|
|
4846
|
+
NewCmAlgoOrderTypeEnum$1["TRAILING_STOP_MARKET"] = "TRAILING_STOP_MARKET";
|
|
4847
|
+
return NewCmAlgoOrderTypeEnum$1;
|
|
4848
|
+
}({});
|
|
4849
|
+
let NewCmAlgoOrderPositionSideEnum = /* @__PURE__ */ function(NewCmAlgoOrderPositionSideEnum$1) {
|
|
4850
|
+
NewCmAlgoOrderPositionSideEnum$1["BOTH"] = "BOTH";
|
|
4851
|
+
NewCmAlgoOrderPositionSideEnum$1["LONG"] = "LONG";
|
|
4852
|
+
NewCmAlgoOrderPositionSideEnum$1["SHORT"] = "SHORT";
|
|
4853
|
+
return NewCmAlgoOrderPositionSideEnum$1;
|
|
4854
|
+
}({});
|
|
4855
|
+
let NewCmAlgoOrderTimeInForceEnum = /* @__PURE__ */ function(NewCmAlgoOrderTimeInForceEnum$1) {
|
|
4856
|
+
NewCmAlgoOrderTimeInForceEnum$1["IOC"] = "IOC";
|
|
4857
|
+
NewCmAlgoOrderTimeInForceEnum$1["GTC"] = "GTC";
|
|
4858
|
+
NewCmAlgoOrderTimeInForceEnum$1["FOK"] = "FOK";
|
|
4859
|
+
NewCmAlgoOrderTimeInForceEnum$1["GTX"] = "GTX";
|
|
4860
|
+
return NewCmAlgoOrderTimeInForceEnum$1;
|
|
4861
|
+
}({});
|
|
4862
|
+
let NewCmAlgoOrderWorkingTypeEnum = /* @__PURE__ */ function(NewCmAlgoOrderWorkingTypeEnum$1) {
|
|
4863
|
+
NewCmAlgoOrderWorkingTypeEnum$1["MARK_PRICE"] = "MARK_PRICE";
|
|
4864
|
+
NewCmAlgoOrderWorkingTypeEnum$1["CONTRACT_PRICE"] = "CONTRACT_PRICE";
|
|
4865
|
+
return NewCmAlgoOrderWorkingTypeEnum$1;
|
|
4866
|
+
}({});
|
|
4867
|
+
let NewCmAlgoOrderPriceMatchEnum = /* @__PURE__ */ function(NewCmAlgoOrderPriceMatchEnum$1) {
|
|
4868
|
+
NewCmAlgoOrderPriceMatchEnum$1["OPPONENT"] = "OPPONENT";
|
|
4869
|
+
NewCmAlgoOrderPriceMatchEnum$1["OPPONENT_5"] = "OPPONENT_5";
|
|
4870
|
+
NewCmAlgoOrderPriceMatchEnum$1["OPPONENT_10"] = "OPPONENT_10";
|
|
4871
|
+
NewCmAlgoOrderPriceMatchEnum$1["OPPONENT_20"] = "OPPONENT_20";
|
|
4872
|
+
NewCmAlgoOrderPriceMatchEnum$1["QUEUE"] = "QUEUE";
|
|
4873
|
+
NewCmAlgoOrderPriceMatchEnum$1["QUEUE_5"] = "QUEUE_5";
|
|
4874
|
+
NewCmAlgoOrderPriceMatchEnum$1["QUEUE_10"] = "QUEUE_10";
|
|
4875
|
+
NewCmAlgoOrderPriceMatchEnum$1["QUEUE_20"] = "QUEUE_20";
|
|
4876
|
+
return NewCmAlgoOrderPriceMatchEnum$1;
|
|
4877
|
+
}({});
|
|
4878
|
+
let NewCmAlgoOrderClosePositionEnum = /* @__PURE__ */ function(NewCmAlgoOrderClosePositionEnum$1) {
|
|
4879
|
+
NewCmAlgoOrderClosePositionEnum$1["TRUE"] = "true";
|
|
4880
|
+
NewCmAlgoOrderClosePositionEnum$1["FALSE"] = "false";
|
|
4881
|
+
return NewCmAlgoOrderClosePositionEnum$1;
|
|
4882
|
+
}({});
|
|
4883
|
+
let NewCmAlgoOrderPriceProtectEnum = /* @__PURE__ */ function(NewCmAlgoOrderPriceProtectEnum$1) {
|
|
4884
|
+
NewCmAlgoOrderPriceProtectEnum$1["TRUE"] = "true";
|
|
4885
|
+
NewCmAlgoOrderPriceProtectEnum$1["FALSE"] = "false";
|
|
4886
|
+
return NewCmAlgoOrderPriceProtectEnum$1;
|
|
4887
|
+
}({});
|
|
4888
|
+
let NewCmAlgoOrderReduceOnlyEnum = /* @__PURE__ */ function(NewCmAlgoOrderReduceOnlyEnum$1) {
|
|
4889
|
+
NewCmAlgoOrderReduceOnlyEnum$1["TRUE"] = "true";
|
|
4890
|
+
NewCmAlgoOrderReduceOnlyEnum$1["FALSE"] = "false";
|
|
4891
|
+
return NewCmAlgoOrderReduceOnlyEnum$1;
|
|
4892
|
+
}({});
|
|
4893
|
+
let NewCmAlgoOrderNewOrderRespTypeEnum = /* @__PURE__ */ function(NewCmAlgoOrderNewOrderRespTypeEnum$1) {
|
|
4894
|
+
NewCmAlgoOrderNewOrderRespTypeEnum$1["ACK"] = "ACK";
|
|
4895
|
+
NewCmAlgoOrderNewOrderRespTypeEnum$1["RESULT"] = "RESULT";
|
|
4896
|
+
return NewCmAlgoOrderNewOrderRespTypeEnum$1;
|
|
4897
|
+
}({});
|
|
4898
|
+
let NewCmAlgoOrderSelfTradePreventionModeEnum = /* @__PURE__ */ function(NewCmAlgoOrderSelfTradePreventionModeEnum$1) {
|
|
4899
|
+
NewCmAlgoOrderSelfTradePreventionModeEnum$1["NONE"] = "NONE";
|
|
4900
|
+
NewCmAlgoOrderSelfTradePreventionModeEnum$1["EXPIRE_TAKER"] = "EXPIRE_TAKER";
|
|
4901
|
+
NewCmAlgoOrderSelfTradePreventionModeEnum$1["EXPIRE_MAKER"] = "EXPIRE_MAKER";
|
|
4902
|
+
NewCmAlgoOrderSelfTradePreventionModeEnum$1["EXPIRE_BOTH"] = "EXPIRE_BOTH";
|
|
4903
|
+
return NewCmAlgoOrderSelfTradePreventionModeEnum$1;
|
|
4904
|
+
}({});
|
|
4324
4905
|
let NewCmConditionalOrderSideEnum = /* @__PURE__ */ function(NewCmConditionalOrderSideEnum$1) {
|
|
4325
4906
|
NewCmConditionalOrderSideEnum$1["BUY"] = "BUY";
|
|
4326
4907
|
NewCmConditionalOrderSideEnum$1["SELL"] = "SELL";
|
|
@@ -5008,6 +5589,66 @@ var RestAPI = class {
|
|
|
5008
5589
|
return this.accountApi.getCmCurrentPositionMode(requestParameters);
|
|
5009
5590
|
}
|
|
5010
5591
|
/**
|
|
5592
|
+
* Get CM futures order download link by Id
|
|
5593
|
+
*
|
|
5594
|
+
* Weight(IP): 10
|
|
5595
|
+
*
|
|
5596
|
+
* Security Type: USER_DATA
|
|
5597
|
+
*
|
|
5598
|
+
* Notes:
|
|
5599
|
+
* - Download link expiration: 7 days
|
|
5600
|
+
*
|
|
5601
|
+
* @summary Get CM Futures Order Download Link by Id (USER_DATA)
|
|
5602
|
+
* @param {GetCmFuturesOrderDownloadLinkByIdRequest} requestParameters Request parameters.
|
|
5603
|
+
*
|
|
5604
|
+
* @returns {Promise<RestApiResponse<GetCmFuturesOrderDownloadLinkByIdResponse>>}
|
|
5605
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5606
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-futures-order-download-link-by-id Binance API Documentation}
|
|
5607
|
+
*/
|
|
5608
|
+
getCmFuturesOrderDownloadLinkById(requestParameters) {
|
|
5609
|
+
return this.accountApi.getCmFuturesOrderDownloadLinkById(requestParameters);
|
|
5610
|
+
}
|
|
5611
|
+
/**
|
|
5612
|
+
* Get CM futures trade download link by Id
|
|
5613
|
+
*
|
|
5614
|
+
* Weight(IP): 10
|
|
5615
|
+
*
|
|
5616
|
+
* Security Type: USER_DATA
|
|
5617
|
+
*
|
|
5618
|
+
* Notes:
|
|
5619
|
+
* - Download link expiration: 7 days
|
|
5620
|
+
*
|
|
5621
|
+
* @summary Get CM Futures Trade Download Link by Id (USER_DATA)
|
|
5622
|
+
* @param {GetCmFuturesTradeDownloadLinkByIdRequest} requestParameters Request parameters.
|
|
5623
|
+
*
|
|
5624
|
+
* @returns {Promise<RestApiResponse<GetCmFuturesTradeDownloadLinkByIdResponse>>}
|
|
5625
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5626
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-futures-trade-download-link-by-id Binance API Documentation}
|
|
5627
|
+
*/
|
|
5628
|
+
getCmFuturesTradeDownloadLinkById(requestParameters) {
|
|
5629
|
+
return this.accountApi.getCmFuturesTradeDownloadLinkById(requestParameters);
|
|
5630
|
+
}
|
|
5631
|
+
/**
|
|
5632
|
+
* Get CM futures Transaction download link by Id
|
|
5633
|
+
*
|
|
5634
|
+
* Weight(IP): 10
|
|
5635
|
+
*
|
|
5636
|
+
* Security Type: USER_DATA
|
|
5637
|
+
*
|
|
5638
|
+
* Notes:
|
|
5639
|
+
* - Download link expiration: 7 days
|
|
5640
|
+
*
|
|
5641
|
+
* @summary Get CM Futures Transaction Download Link by Id (USER_DATA)
|
|
5642
|
+
* @param {GetCmFuturesTransactionDownloadLinkByIdRequest} requestParameters Request parameters.
|
|
5643
|
+
*
|
|
5644
|
+
* @returns {Promise<RestApiResponse<GetCmFuturesTransactionDownloadLinkByIdResponse>>}
|
|
5645
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5646
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-cm-futures-transaction-download-link-by-id Binance API Documentation}
|
|
5647
|
+
*/
|
|
5648
|
+
getCmFuturesTransactionDownloadLinkById(requestParameters) {
|
|
5649
|
+
return this.accountApi.getCmFuturesTransactionDownloadLinkById(requestParameters);
|
|
5650
|
+
}
|
|
5651
|
+
/**
|
|
5011
5652
|
* Get CM Income History.
|
|
5012
5653
|
*
|
|
5013
5654
|
* Weight(IP): 30
|
|
@@ -5031,6 +5672,69 @@ var RestAPI = class {
|
|
|
5031
5672
|
return this.accountApi.getCmIncomeHistory(requestParameters);
|
|
5032
5673
|
}
|
|
5033
5674
|
/**
|
|
5675
|
+
* Get download id for CM futures order history
|
|
5676
|
+
*
|
|
5677
|
+
* Weight(IP): 1500
|
|
5678
|
+
*
|
|
5679
|
+
* Security Type: USER_DATA
|
|
5680
|
+
*
|
|
5681
|
+
* Notes:
|
|
5682
|
+
* - Request Limitation is 10 times per month, shared by front end download page and rest api
|
|
5683
|
+
* - The time between `startTime` and `endTime` can not be longer than 1 year
|
|
5684
|
+
*
|
|
5685
|
+
* @summary Get Download Id For CM Futures Order History (USER_DATA)
|
|
5686
|
+
* @param {GetDownloadIdForCmFuturesOrderHistoryRequest} requestParameters Request parameters.
|
|
5687
|
+
*
|
|
5688
|
+
* @returns {Promise<RestApiResponse<GetDownloadIdForCmFuturesOrderHistoryResponse>>}
|
|
5689
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5690
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-cm-futures-order-history Binance API Documentation}
|
|
5691
|
+
*/
|
|
5692
|
+
getDownloadIdForCmFuturesOrderHistory(requestParameters) {
|
|
5693
|
+
return this.accountApi.getDownloadIdForCmFuturesOrderHistory(requestParameters);
|
|
5694
|
+
}
|
|
5695
|
+
/**
|
|
5696
|
+
* Get download id for CM futures trade history
|
|
5697
|
+
*
|
|
5698
|
+
* Weight(IP): 1500
|
|
5699
|
+
*
|
|
5700
|
+
* Security Type: USER_DATA
|
|
5701
|
+
*
|
|
5702
|
+
* Notes:
|
|
5703
|
+
* - Request Limitation is 5 times per month, shared by front end download page and rest api
|
|
5704
|
+
* - The time between `startTime` and `endTime` can not be longer than 1 year
|
|
5705
|
+
*
|
|
5706
|
+
* @summary Get Download Id For CM Futures Trade History (USER_DATA)
|
|
5707
|
+
* @param {GetDownloadIdForCmFuturesTradeHistoryRequest} requestParameters Request parameters.
|
|
5708
|
+
*
|
|
5709
|
+
* @returns {Promise<RestApiResponse<GetDownloadIdForCmFuturesTradeHistoryResponse>>}
|
|
5710
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5711
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-cm-futures-trade-history Binance API Documentation}
|
|
5712
|
+
*/
|
|
5713
|
+
getDownloadIdForCmFuturesTradeHistory(requestParameters) {
|
|
5714
|
+
return this.accountApi.getDownloadIdForCmFuturesTradeHistory(requestParameters);
|
|
5715
|
+
}
|
|
5716
|
+
/**
|
|
5717
|
+
* Get download id for CM futures transaction history
|
|
5718
|
+
*
|
|
5719
|
+
* Weight(IP): 1500
|
|
5720
|
+
*
|
|
5721
|
+
* Security Type: USER_DATA
|
|
5722
|
+
*
|
|
5723
|
+
* Notes:
|
|
5724
|
+
* - Request Limitation is 5 times per month, shared by front end download page and rest api
|
|
5725
|
+
* - The time between `startTime` and `endTime` can not be longer than 1 year
|
|
5726
|
+
*
|
|
5727
|
+
* @summary Get Download Id For CM Futures Transaction History (USER_DATA)
|
|
5728
|
+
* @param {GetDownloadIdForCmFuturesTransactionHistoryRequest} requestParameters Request parameters.
|
|
5729
|
+
*
|
|
5730
|
+
* @returns {Promise<RestApiResponse<GetDownloadIdForCmFuturesTransactionHistoryResponse>>}
|
|
5731
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
5732
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/account#get-download-id-for-cm-futures-transaction-history Binance API Documentation}
|
|
5733
|
+
*/
|
|
5734
|
+
getDownloadIdForCmFuturesTransactionHistory(requestParameters) {
|
|
5735
|
+
return this.accountApi.getDownloadIdForCmFuturesTransactionHistory(requestParameters);
|
|
5736
|
+
}
|
|
5737
|
+
/**
|
|
5034
5738
|
* Get download id for UM futures order history
|
|
5035
5739
|
*
|
|
5036
5740
|
* Weight(IP): 1500
|
|
@@ -5581,6 +6285,23 @@ var RestAPI = class {
|
|
|
5581
6285
|
return this.marketDataApi.testConnectivity();
|
|
5582
6286
|
}
|
|
5583
6287
|
/**
|
|
6288
|
+
* Cancel All CM Algo Open Orders
|
|
6289
|
+
*
|
|
6290
|
+
* Weight(IP): 1
|
|
6291
|
+
*
|
|
6292
|
+
* Security Type: TRADE
|
|
6293
|
+
*
|
|
6294
|
+
* @summary Cancel All CM Algo Open Orders (TRADE)
|
|
6295
|
+
* @param {CancelAllCmAlgoOpenOrdersRequest} requestParameters Request parameters.
|
|
6296
|
+
*
|
|
6297
|
+
* @returns {Promise<RestApiResponse<CancelAllCmAlgoOpenOrdersResponse>>}
|
|
6298
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
6299
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-all-cm-algo-open-orders Binance API Documentation}
|
|
6300
|
+
*/
|
|
6301
|
+
cancelAllCmAlgoOpenOrders(requestParameters) {
|
|
6302
|
+
return this.tradeApi.cancelAllCmAlgoOpenOrders(requestParameters);
|
|
6303
|
+
}
|
|
6304
|
+
/**
|
|
5584
6305
|
* Cancel All CM Open Conditional Orders
|
|
5585
6306
|
*
|
|
5586
6307
|
* Weight(IP): 1
|
|
@@ -5649,6 +6370,26 @@ var RestAPI = class {
|
|
|
5649
6370
|
return this.tradeApi.cancelAllUmOpenOrders(requestParameters);
|
|
5650
6371
|
}
|
|
5651
6372
|
/**
|
|
6373
|
+
* Cancel an active CM algo order
|
|
6374
|
+
*
|
|
6375
|
+
* Weight(IP): 1
|
|
6376
|
+
*
|
|
6377
|
+
* Security Type: TRADE
|
|
6378
|
+
*
|
|
6379
|
+
* Notes:
|
|
6380
|
+
* - Either `algoId` or `clientAlgoId` must be sent.
|
|
6381
|
+
*
|
|
6382
|
+
* @summary Cancel CM Algo Order (TRADE)
|
|
6383
|
+
* @param {CancelCmAlgoOrderRequest} requestParameters Request parameters.
|
|
6384
|
+
*
|
|
6385
|
+
* @returns {Promise<RestApiResponse<CancelCmAlgoOrderResponse>>}
|
|
6386
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
6387
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#cancel-cm-algo-order Binance API Documentation}
|
|
6388
|
+
*/
|
|
6389
|
+
cancelCmAlgoOrder(requestParameters = {}) {
|
|
6390
|
+
return this.tradeApi.cancelCmAlgoOrder(requestParameters);
|
|
6391
|
+
}
|
|
6392
|
+
/**
|
|
5652
6393
|
* Cancel CM Conditional Order
|
|
5653
6394
|
*
|
|
5654
6395
|
* Weight(IP): 1
|
|
@@ -6027,6 +6768,33 @@ var RestAPI = class {
|
|
|
6027
6768
|
return this.tradeApi.modifyUmOrder(requestParameters);
|
|
6028
6769
|
}
|
|
6029
6770
|
/**
|
|
6771
|
+
* Place new CM conditional order
|
|
6772
|
+
*
|
|
6773
|
+
* Weight(IP): 1
|
|
6774
|
+
*
|
|
6775
|
+
* Security Type: TRADE
|
|
6776
|
+
*
|
|
6777
|
+
* Notes:
|
|
6778
|
+
* - Algo order with type `STOP`, parameter `timeInForce` can be sent (default `GTC`).
|
|
6779
|
+
* - Algo order with type `TAKE_PROFIT`, parameter `timeInForce` can be sent (default `GTC`).
|
|
6780
|
+
* - Condition orders will be triggered when price reaches the `triggerPrice`.
|
|
6781
|
+
* - `STOP`, `STOP_MARKET`: BUY: latest price >= `triggerPrice`; SELL: latest price <= `triggerPrice`.
|
|
6782
|
+
* - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: BUY: latest price <= `triggerPrice`; SELL: latest price >= `triggerPrice`.
|
|
6783
|
+
* - `TRAILING_STOP_MARKET`: BUY: lowest price after order placed <= `activatePrice`, and latest price >= lowest price * (1 + `callbackRate`); SELL: highest price after order placed >= `activatePrice`, and latest price <= highest price * (1 - `callbackRate`).
|
|
6784
|
+
* - `STOP_MARKET`, `TAKE_PROFIT_MARKET` with `closePosition`=`true`: follow the same rules for conditional orders; if triggered, close all current long position (if `SELL`) or current short position (if `BUY`); cannot be used with `quantity` parameter; cannot be used with `reduceOnly` parameter; in Hedge Mode, cannot be used with `BUY` orders in `LONG` position side, and cannot be used with `SELL` orders in `SHORT` position side.
|
|
6785
|
+
* - `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC`.
|
|
6786
|
+
*
|
|
6787
|
+
* @summary New CM Algo Order (TRADE)
|
|
6788
|
+
* @param {NewCmAlgoOrderRequest} requestParameters Request parameters.
|
|
6789
|
+
*
|
|
6790
|
+
* @returns {Promise<RestApiResponse<NewCmAlgoOrderResponse>>}
|
|
6791
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
6792
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-cm-algo-order Binance API Documentation}
|
|
6793
|
+
*/
|
|
6794
|
+
newCmAlgoOrder(requestParameters) {
|
|
6795
|
+
return this.tradeApi.newCmAlgoOrder(requestParameters);
|
|
6796
|
+
}
|
|
6797
|
+
/**
|
|
6030
6798
|
* New CM Conditional Order
|
|
6031
6799
|
*
|
|
6032
6800
|
* Weight(IP): 1
|
|
@@ -6203,6 +6971,26 @@ var RestAPI = class {
|
|
|
6203
6971
|
return this.tradeApi.queryAllCmOrders(requestParameters);
|
|
6204
6972
|
}
|
|
6205
6973
|
/**
|
|
6974
|
+
* Get all CM open algo orders on a symbol. If the symbol is not sent, orders for all symbols will be returned.
|
|
6975
|
+
*
|
|
6976
|
+
* Weight(IP): 1
|
|
6977
|
+
*
|
|
6978
|
+
* Security Type: USER_DATA
|
|
6979
|
+
*
|
|
6980
|
+
* Notes:
|
|
6981
|
+
* - Weight: 1 for a single symbol; 40 when the symbol parameter is omitted.
|
|
6982
|
+
*
|
|
6983
|
+
* @summary Query All Current CM Open Algo Orders (USER_DATA)
|
|
6984
|
+
* @param {QueryAllCurrentCmOpenAlgoOrdersRequest} requestParameters Request parameters.
|
|
6985
|
+
*
|
|
6986
|
+
* @returns {Promise<RestApiResponse<QueryAllCurrentCmOpenAlgoOrdersResponse>>}
|
|
6987
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
6988
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-all-current-cm-open-algo-orders Binance API Documentation}
|
|
6989
|
+
*/
|
|
6990
|
+
queryAllCurrentCmOpenAlgoOrders(requestParameters = {}) {
|
|
6991
|
+
return this.tradeApi.queryAllCurrentCmOpenAlgoOrders(requestParameters);
|
|
6992
|
+
}
|
|
6993
|
+
/**
|
|
6206
6994
|
* Get all open conditional orders on a symbol. **Careful** when accessing this with no symbol.
|
|
6207
6995
|
*
|
|
6208
6996
|
* Weight: - 1 for a single `symbol`
|
|
@@ -6327,6 +7115,27 @@ var RestAPI = class {
|
|
|
6327
7115
|
return this.tradeApi.queryAllUmOrders(requestParameters);
|
|
6328
7116
|
}
|
|
6329
7117
|
/**
|
|
7118
|
+
* Get all algo orders: ACTIVE, CANCELED, TRIGGERED or FINISHED.
|
|
7119
|
+
*
|
|
7120
|
+
* Weight(IP): 5
|
|
7121
|
+
*
|
|
7122
|
+
* Security Type: USER_DATA
|
|
7123
|
+
*
|
|
7124
|
+
* Notes:
|
|
7125
|
+
* - If `algoId` is set, it will get orders >= that `algoId`. Otherwise most recent orders are returned.
|
|
7126
|
+
* - The query time period must be less than 7 days (default as the recent 7 days).
|
|
7127
|
+
*
|
|
7128
|
+
* @summary Query CM Algo Order History (USER_DATA)
|
|
7129
|
+
* @param {QueryCmAlgoOrderHistoryRequest} requestParameters Request parameters.
|
|
7130
|
+
*
|
|
7131
|
+
* @returns {Promise<RestApiResponse<QueryCmAlgoOrderHistoryResponse>>}
|
|
7132
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
7133
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-cm-algo-order-history Binance API Documentation}
|
|
7134
|
+
*/
|
|
7135
|
+
queryCmAlgoOrderHistory(requestParameters) {
|
|
7136
|
+
return this.tradeApi.queryCmAlgoOrderHistory(requestParameters);
|
|
7137
|
+
}
|
|
7138
|
+
/**
|
|
6330
7139
|
* Query CM Conditional Order History
|
|
6331
7140
|
*
|
|
6332
7141
|
* Weight(IP): 1
|
|
@@ -6396,6 +7205,26 @@ var RestAPI = class {
|
|
|
6396
7205
|
return this.tradeApi.queryCmOrder(requestParameters);
|
|
6397
7206
|
}
|
|
6398
7207
|
/**
|
|
7208
|
+
* Check a CM algo order's status. Orders will not be found if: status is CANCELED/EXPIRED with no fills and created 3+ days ago; or created 90+ days ago.
|
|
7209
|
+
*
|
|
7210
|
+
* Weight(IP): 1
|
|
7211
|
+
*
|
|
7212
|
+
* Security Type: USER_DATA
|
|
7213
|
+
*
|
|
7214
|
+
* Notes:
|
|
7215
|
+
* - Either `algoId` or `clientAlgoId` must be sent. `algoId` is self-increment for each specific `symbol`.
|
|
7216
|
+
*
|
|
7217
|
+
* @summary Query Current CM Open Algo Order (USER_DATA)
|
|
7218
|
+
* @param {QueryCurrentCmOpenAlgoOrderRequest} requestParameters Request parameters.
|
|
7219
|
+
*
|
|
7220
|
+
* @returns {Promise<RestApiResponse<QueryCurrentCmOpenAlgoOrderResponse>>}
|
|
7221
|
+
* @throws {RequiredError | ConnectorClientError | UnauthorizedError | ForbiddenError | TooManyRequestsError | RateLimitBanError | ServerError | NotFoundError | NetworkError | BadRequestError}
|
|
7222
|
+
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#query-current-cm-open-algo-order Binance API Documentation}
|
|
7223
|
+
*/
|
|
7224
|
+
queryCurrentCmOpenAlgoOrder(requestParameters = {}) {
|
|
7225
|
+
return this.tradeApi.queryCurrentCmOpenAlgoOrder(requestParameters);
|
|
7226
|
+
}
|
|
7227
|
+
/**
|
|
6399
7228
|
* Query Current CM Open Conditional Order
|
|
6400
7229
|
*
|
|
6401
7230
|
* Weight(IP): 1
|
|
@@ -6838,6 +7667,18 @@ var rest_api_exports = /* @__PURE__ */ __export({
|
|
|
6838
7667
|
ModifyCmOrderSideEnum: () => ModifyCmOrderSideEnum,
|
|
6839
7668
|
ModifyUmOrderPriceMatchEnum: () => ModifyUmOrderPriceMatchEnum,
|
|
6840
7669
|
ModifyUmOrderSideEnum: () => ModifyUmOrderSideEnum,
|
|
7670
|
+
NewCmAlgoOrderAlgoTypeEnum: () => NewCmAlgoOrderAlgoTypeEnum,
|
|
7671
|
+
NewCmAlgoOrderClosePositionEnum: () => NewCmAlgoOrderClosePositionEnum,
|
|
7672
|
+
NewCmAlgoOrderNewOrderRespTypeEnum: () => NewCmAlgoOrderNewOrderRespTypeEnum,
|
|
7673
|
+
NewCmAlgoOrderPositionSideEnum: () => NewCmAlgoOrderPositionSideEnum,
|
|
7674
|
+
NewCmAlgoOrderPriceMatchEnum: () => NewCmAlgoOrderPriceMatchEnum,
|
|
7675
|
+
NewCmAlgoOrderPriceProtectEnum: () => NewCmAlgoOrderPriceProtectEnum,
|
|
7676
|
+
NewCmAlgoOrderReduceOnlyEnum: () => NewCmAlgoOrderReduceOnlyEnum,
|
|
7677
|
+
NewCmAlgoOrderSelfTradePreventionModeEnum: () => NewCmAlgoOrderSelfTradePreventionModeEnum,
|
|
7678
|
+
NewCmAlgoOrderSideEnum: () => NewCmAlgoOrderSideEnum,
|
|
7679
|
+
NewCmAlgoOrderTimeInForceEnum: () => NewCmAlgoOrderTimeInForceEnum,
|
|
7680
|
+
NewCmAlgoOrderTypeEnum: () => NewCmAlgoOrderTypeEnum,
|
|
7681
|
+
NewCmAlgoOrderWorkingTypeEnum: () => NewCmAlgoOrderWorkingTypeEnum,
|
|
6841
7682
|
NewCmConditionalOrderPositionSideEnum: () => NewCmConditionalOrderPositionSideEnum,
|
|
6842
7683
|
NewCmConditionalOrderPriceProtectEnum: () => NewCmConditionalOrderPriceProtectEnum,
|
|
6843
7684
|
NewCmConditionalOrderSideEnum: () => NewCmConditionalOrderSideEnum,
|