@binance/derivatives-trading-portfolio-margin 18.0.2 → 18.1.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 +27 -8
- package/dist/index.d.ts +27 -8
- package/dist/index.js +12 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +12 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -3,7 +3,7 @@ import { BadRequestError, ConfigurationRestAPI, ConfigurationWebsocketStreams, C
|
|
|
3
3
|
|
|
4
4
|
//#region package.json
|
|
5
5
|
var name = "@binance/derivatives-trading-portfolio-margin";
|
|
6
|
-
var version = "18.0
|
|
6
|
+
var version = "18.1.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/rest-api/modules/account-api.ts
|
|
@@ -2389,12 +2389,11 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2389
2389
|
timeUnit: _timeUnit
|
|
2390
2390
|
};
|
|
2391
2391
|
},
|
|
2392
|
-
newUmAlgoOrder: async (algoType, symbol, side, type,
|
|
2392
|
+
newUmAlgoOrder: async (algoType, symbol, side, type, positionSide, timeInForce, quantity, price, triggerPrice, workingType, priceMatch, closePosition, priceProtect, reduceOnly, activatePrice, callbackRate, clientAlgoId, newOrderRespType, selfTradePreventionMode, goodTillDate, recvWindow) => {
|
|
2393
2393
|
assertParamExists("newUmAlgoOrder", "algoType", algoType);
|
|
2394
2394
|
assertParamExists("newUmAlgoOrder", "symbol", symbol);
|
|
2395
2395
|
assertParamExists("newUmAlgoOrder", "side", side);
|
|
2396
2396
|
assertParamExists("newUmAlgoOrder", "type", type);
|
|
2397
|
-
assertParamExists("newUmAlgoOrder", "quantity", quantity);
|
|
2398
2397
|
const localVarQueryParameter = {};
|
|
2399
2398
|
const localVarBodyParameter = {};
|
|
2400
2399
|
const localVarHeaderParameter = {};
|
|
@@ -2409,6 +2408,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
2409
2408
|
if (triggerPrice !== void 0 && triggerPrice !== null) localVarQueryParameter["triggerPrice"] = triggerPrice;
|
|
2410
2409
|
if (workingType !== void 0 && workingType !== null) localVarQueryParameter["workingType"] = workingType;
|
|
2411
2410
|
if (priceMatch !== void 0 && priceMatch !== null) localVarQueryParameter["priceMatch"] = priceMatch;
|
|
2411
|
+
if (closePosition !== void 0 && closePosition !== null) localVarQueryParameter["closePosition"] = closePosition;
|
|
2412
2412
|
if (priceProtect !== void 0 && priceProtect !== null) localVarQueryParameter["priceProtect"] = priceProtect;
|
|
2413
2413
|
if (reduceOnly !== void 0 && reduceOnly !== null) localVarQueryParameter["reduceOnly"] = reduceOnly;
|
|
2414
2414
|
if (activatePrice !== void 0 && activatePrice !== null) localVarQueryParameter["activatePrice"] = activatePrice;
|
|
@@ -3759,6 +3759,7 @@ var TradeApi = class {
|
|
|
3759
3759
|
* - `STOP`, `STOP_MARKET`: BUY: latest price >= `triggerPrice`; SELL: latest price <= `triggerPrice`.
|
|
3760
3760
|
* - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: BUY: latest price <= `triggerPrice`; SELL: latest price >= `triggerPrice`.
|
|
3761
3761
|
* - `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`).
|
|
3762
|
+
* - `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.
|
|
3762
3763
|
* - `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC` or `GTD`.
|
|
3763
3764
|
*
|
|
3764
3765
|
* @summary New UM Algo Order (TRADE)
|
|
@@ -3769,7 +3770,7 @@ var TradeApi = class {
|
|
|
3769
3770
|
* @see {@link https://developers.binance.com/en/docs/catalog/advanced-trading-derivatives-trading-portfolio-margin/api/rest-api/trade#new-um-algo-order Binance API Documentation}
|
|
3770
3771
|
*/
|
|
3771
3772
|
async newUmAlgoOrder(requestParameters) {
|
|
3772
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.newUmAlgoOrder(requestParameters?.algoType, requestParameters?.symbol, requestParameters?.side, requestParameters?.type, requestParameters?.
|
|
3773
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.newUmAlgoOrder(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?.goodTillDate, requestParameters?.recvWindow);
|
|
3773
3774
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs.headerParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
3774
3775
|
}
|
|
3775
3776
|
/**
|
|
@@ -4799,6 +4800,11 @@ let NewUmAlgoOrderPriceMatchEnum = /* @__PURE__ */ function(NewUmAlgoOrderPriceM
|
|
|
4799
4800
|
NewUmAlgoOrderPriceMatchEnum$1["QUEUE_20"] = "QUEUE_20";
|
|
4800
4801
|
return NewUmAlgoOrderPriceMatchEnum$1;
|
|
4801
4802
|
}({});
|
|
4803
|
+
let NewUmAlgoOrderClosePositionEnum = /* @__PURE__ */ function(NewUmAlgoOrderClosePositionEnum$1) {
|
|
4804
|
+
NewUmAlgoOrderClosePositionEnum$1["TRUE"] = "true";
|
|
4805
|
+
NewUmAlgoOrderClosePositionEnum$1["FALSE"] = "false";
|
|
4806
|
+
return NewUmAlgoOrderClosePositionEnum$1;
|
|
4807
|
+
}({});
|
|
4802
4808
|
let NewUmAlgoOrderPriceProtectEnum = /* @__PURE__ */ function(NewUmAlgoOrderPriceProtectEnum$1) {
|
|
4803
4809
|
NewUmAlgoOrderPriceProtectEnum$1["TRUE"] = "true";
|
|
4804
4810
|
NewUmAlgoOrderPriceProtectEnum$1["FALSE"] = "false";
|
|
@@ -6517,6 +6523,7 @@ var RestAPI = class {
|
|
|
6517
6523
|
* - `STOP`, `STOP_MARKET`: BUY: latest price >= `triggerPrice`; SELL: latest price <= `triggerPrice`.
|
|
6518
6524
|
* - `TAKE_PROFIT`, `TAKE_PROFIT_MARKET`: BUY: latest price <= `triggerPrice`; SELL: latest price >= `triggerPrice`.
|
|
6519
6525
|
* - `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`).
|
|
6526
|
+
* - `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.
|
|
6520
6527
|
* - `selfTradePreventionMode` is only effective when `timeInForce` set to `IOC` or `GTC` or `GTD`.
|
|
6521
6528
|
*
|
|
6522
6529
|
* @summary New UM Algo Order (TRADE)
|
|
@@ -7390,6 +7397,7 @@ var rest_api_exports = /* @__PURE__ */ __export({
|
|
|
7390
7397
|
NewMarginOrderTimeInForceEnum: () => NewMarginOrderTimeInForceEnum,
|
|
7391
7398
|
NewMarginOrderTypeEnum: () => NewMarginOrderTypeEnum,
|
|
7392
7399
|
NewUmAlgoOrderAlgoTypeEnum: () => NewUmAlgoOrderAlgoTypeEnum,
|
|
7400
|
+
NewUmAlgoOrderClosePositionEnum: () => NewUmAlgoOrderClosePositionEnum,
|
|
7393
7401
|
NewUmAlgoOrderNewOrderRespTypeEnum: () => NewUmAlgoOrderNewOrderRespTypeEnum,
|
|
7394
7402
|
NewUmAlgoOrderPositionSideEnum: () => NewUmAlgoOrderPositionSideEnum,
|
|
7395
7403
|
NewUmAlgoOrderPriceMatchEnum: () => NewUmAlgoOrderPriceMatchEnum,
|