@binance/derivatives-trading-portfolio-margin 22.1.0 → 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 +1451 -69
- package/dist/index.d.ts +1451 -69
- package/dist/index.js +476 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +476 -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.
|
|
17
|
+
var version = "22.2.0";
|
|
18
18
|
|
|
19
19
|
//#endregion
|
|
20
20
|
//#region src/rest-api/modules/account-api.ts
|
|
@@ -2059,6 +2059,24 @@ var MarketDataApi = class {
|
|
|
2059
2059
|
*/
|
|
2060
2060
|
const TradeApiAxiosParamCreator = function(configuration) {
|
|
2061
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
|
+
},
|
|
2062
2080
|
cancelAllCmOpenConditionalOrders: async (symbol, recvWindow) => {
|
|
2063
2081
|
(0, __binance_common.assertParamExists)("cancelAllCmOpenConditionalOrders", "symbol", symbol);
|
|
2064
2082
|
const localVarQueryParameter = {};
|
|
@@ -2131,6 +2149,24 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2131
2149
|
timeUnit: _timeUnit
|
|
2132
2150
|
};
|
|
2133
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
|
+
},
|
|
2134
2170
|
cancelCmConditionalOrder: async (symbol, strategyId, newClientStrategyId, recvWindow) => {
|
|
2135
2171
|
(0, __binance_common.assertParamExists)("cancelCmConditionalOrder", "symbol", symbol);
|
|
2136
2172
|
const localVarQueryParameter = {};
|
|
@@ -2514,6 +2550,45 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2514
2550
|
timeUnit: _timeUnit
|
|
2515
2551
|
};
|
|
2516
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
|
+
},
|
|
2517
2592
|
newCmConditionalOrder: async (symbol, side, strategyType, positionSide, timeInForce, quantity, reduceOnly, price, workingType, priceProtect, newClientStrategyId, stopPrice, activationPrice, callbackRate, recvWindow) => {
|
|
2518
2593
|
(0, __binance_common.assertParamExists)("newCmConditionalOrder", "symbol", symbol);
|
|
2519
2594
|
(0, __binance_common.assertParamExists)("newCmConditionalOrder", "side", side);
|
|
@@ -2725,6 +2800,25 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2725
2800
|
timeUnit: _timeUnit
|
|
2726
2801
|
};
|
|
2727
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
|
+
},
|
|
2728
2822
|
queryAllCurrentCmOpenConditionalOrders: async (symbol, recvWindow) => {
|
|
2729
2823
|
const localVarQueryParameter = {};
|
|
2730
2824
|
const localVarBodyParameter = {};
|
|
@@ -2840,6 +2934,28 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2840
2934
|
timeUnit: _timeUnit
|
|
2841
2935
|
};
|
|
2842
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
|
+
},
|
|
2843
2959
|
queryCmConditionalOrderHistory: async (symbol, strategyId, newClientStrategyId, recvWindow) => {
|
|
2844
2960
|
(0, __binance_common.assertParamExists)("queryCmConditionalOrderHistory", "symbol", symbol);
|
|
2845
2961
|
const localVarQueryParameter = {};
|
|
@@ -2903,6 +3019,24 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2903
3019
|
timeUnit: _timeUnit
|
|
2904
3020
|
};
|
|
2905
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
|
+
},
|
|
2906
3040
|
queryCurrentCmOpenConditionalOrder: async (symbol, strategyId, newClientStrategyId, recvWindow) => {
|
|
2907
3041
|
(0, __binance_common.assertParamExists)("queryCurrentCmOpenConditionalOrder", "symbol", symbol);
|
|
2908
3042
|
const localVarQueryParameter = {};
|
|
@@ -3269,6 +3403,24 @@ var TradeApi = class {
|
|
|
3269
3403
|
this.localVarAxiosParamCreator = TradeApiAxiosParamCreator(configuration);
|
|
3270
3404
|
}
|
|
3271
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
|
+
/**
|
|
3272
3424
|
* Cancel All CM Open Conditional Orders
|
|
3273
3425
|
*
|
|
3274
3426
|
* Weight(IP): 1
|
|
@@ -3341,6 +3493,27 @@ var TradeApi = class {
|
|
|
3341
3493
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3342
3494
|
}
|
|
3343
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
|
+
/**
|
|
3344
3517
|
* Cancel CM Conditional Order
|
|
3345
3518
|
*
|
|
3346
3519
|
* Weight(IP): 1
|
|
@@ -3737,6 +3910,34 @@ var TradeApi = class {
|
|
|
3737
3910
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3738
3911
|
}
|
|
3739
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
|
+
/**
|
|
3740
3941
|
* New CM Conditional Order
|
|
3741
3942
|
*
|
|
3742
3943
|
* Weight(IP): 1
|
|
@@ -3920,6 +4121,27 @@ var TradeApi = class {
|
|
|
3920
4121
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3921
4122
|
}
|
|
3922
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
|
+
/**
|
|
3923
4145
|
* Get all open conditional orders on a symbol. **Careful** when accessing this with no symbol.
|
|
3924
4146
|
*
|
|
3925
4147
|
* Weight: - 1 for a single `symbol`
|
|
@@ -4050,6 +4272,28 @@ var TradeApi = class {
|
|
|
4050
4272
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
4051
4273
|
}
|
|
4052
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
|
+
/**
|
|
4053
4297
|
* Query CM Conditional Order History
|
|
4054
4298
|
*
|
|
4055
4299
|
* Weight(IP): 1
|
|
@@ -4122,6 +4366,27 @@ var TradeApi = class {
|
|
|
4122
4366
|
return (0, __binance_common.sendRequest)(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
4123
4367
|
}
|
|
4124
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
|
+
/**
|
|
4125
4390
|
* Query Current CM Open Conditional Order
|
|
4126
4391
|
*
|
|
4127
4392
|
* Weight(IP): 1
|
|
@@ -4564,6 +4829,79 @@ let ModifyUmOrderPriceMatchEnum = /* @__PURE__ */ function(ModifyUmOrderPriceMat
|
|
|
4564
4829
|
ModifyUmOrderPriceMatchEnum$1["QUEUE_20"] = "QUEUE_20";
|
|
4565
4830
|
return ModifyUmOrderPriceMatchEnum$1;
|
|
4566
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
|
+
}({});
|
|
4567
4905
|
let NewCmConditionalOrderSideEnum = /* @__PURE__ */ function(NewCmConditionalOrderSideEnum$1) {
|
|
4568
4906
|
NewCmConditionalOrderSideEnum$1["BUY"] = "BUY";
|
|
4569
4907
|
NewCmConditionalOrderSideEnum$1["SELL"] = "SELL";
|
|
@@ -5947,6 +6285,23 @@ var RestAPI = class {
|
|
|
5947
6285
|
return this.marketDataApi.testConnectivity();
|
|
5948
6286
|
}
|
|
5949
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
|
+
/**
|
|
5950
6305
|
* Cancel All CM Open Conditional Orders
|
|
5951
6306
|
*
|
|
5952
6307
|
* Weight(IP): 1
|
|
@@ -6015,6 +6370,26 @@ var RestAPI = class {
|
|
|
6015
6370
|
return this.tradeApi.cancelAllUmOpenOrders(requestParameters);
|
|
6016
6371
|
}
|
|
6017
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
|
+
/**
|
|
6018
6393
|
* Cancel CM Conditional Order
|
|
6019
6394
|
*
|
|
6020
6395
|
* Weight(IP): 1
|
|
@@ -6393,6 +6768,33 @@ var RestAPI = class {
|
|
|
6393
6768
|
return this.tradeApi.modifyUmOrder(requestParameters);
|
|
6394
6769
|
}
|
|
6395
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
|
+
/**
|
|
6396
6798
|
* New CM Conditional Order
|
|
6397
6799
|
*
|
|
6398
6800
|
* Weight(IP): 1
|
|
@@ -6569,6 +6971,26 @@ var RestAPI = class {
|
|
|
6569
6971
|
return this.tradeApi.queryAllCmOrders(requestParameters);
|
|
6570
6972
|
}
|
|
6571
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
|
+
/**
|
|
6572
6994
|
* Get all open conditional orders on a symbol. **Careful** when accessing this with no symbol.
|
|
6573
6995
|
*
|
|
6574
6996
|
* Weight: - 1 for a single `symbol`
|
|
@@ -6693,6 +7115,27 @@ var RestAPI = class {
|
|
|
6693
7115
|
return this.tradeApi.queryAllUmOrders(requestParameters);
|
|
6694
7116
|
}
|
|
6695
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
|
+
/**
|
|
6696
7139
|
* Query CM Conditional Order History
|
|
6697
7140
|
*
|
|
6698
7141
|
* Weight(IP): 1
|
|
@@ -6762,6 +7205,26 @@ var RestAPI = class {
|
|
|
6762
7205
|
return this.tradeApi.queryCmOrder(requestParameters);
|
|
6763
7206
|
}
|
|
6764
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
|
+
/**
|
|
6765
7228
|
* Query Current CM Open Conditional Order
|
|
6766
7229
|
*
|
|
6767
7230
|
* Weight(IP): 1
|
|
@@ -7204,6 +7667,18 @@ var rest_api_exports = /* @__PURE__ */ __export({
|
|
|
7204
7667
|
ModifyCmOrderSideEnum: () => ModifyCmOrderSideEnum,
|
|
7205
7668
|
ModifyUmOrderPriceMatchEnum: () => ModifyUmOrderPriceMatchEnum,
|
|
7206
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,
|
|
7207
7682
|
NewCmConditionalOrderPositionSideEnum: () => NewCmConditionalOrderPositionSideEnum,
|
|
7208
7683
|
NewCmConditionalOrderPriceProtectEnum: () => NewCmConditionalOrderPriceProtectEnum,
|
|
7209
7684
|
NewCmConditionalOrderSideEnum: () => NewCmConditionalOrderSideEnum,
|