@binance/derivatives-trading-options 13.0.4 → 15.0.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 +92 -6
- package/dist/index.d.ts +92 -6
- package/dist/index.js +29 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +29 -5
- 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-options";
|
|
6
|
-
var version = "
|
|
6
|
+
var version = "15.0.0";
|
|
7
7
|
|
|
8
8
|
//#endregion
|
|
9
9
|
//#region src/rest-api/types/place-multiple-orders-orders-parameter-inner.ts
|
|
@@ -22,6 +22,11 @@ const PlaceMultipleOrdersOrdersParameterInnerNewOrderRespTypeEnum = {
|
|
|
22
22
|
ACK: "ACK",
|
|
23
23
|
RESULT: "RESULT"
|
|
24
24
|
};
|
|
25
|
+
const PlaceMultipleOrdersOrdersParameterInnerSelfTradePreventionModeEnum = {
|
|
26
|
+
EXPIRE_TAKER: "EXPIRE_TAKER",
|
|
27
|
+
EXPIRE_BOTH: "EXPIRE_BOTH",
|
|
28
|
+
EXPIRE_MAKER: "EXPIRE_MAKER"
|
|
29
|
+
};
|
|
25
30
|
|
|
26
31
|
//#endregion
|
|
27
32
|
//#region src/rest-api/modules/account-api.ts
|
|
@@ -90,6 +95,9 @@ var AccountApi = class {
|
|
|
90
95
|
/**
|
|
91
96
|
* Query account funding flows.
|
|
92
97
|
*
|
|
98
|
+
*
|
|
99
|
+
* Only support querying data in the past 3 months
|
|
100
|
+
*
|
|
93
101
|
* Weight: 1
|
|
94
102
|
*
|
|
95
103
|
* @summary Account Funding Flow (USER_DATA)
|
|
@@ -999,7 +1007,7 @@ var MarketMakerEndpointsApi = class {
|
|
|
999
1007
|
* This rest endpoint sets up the parameters to cancel your open orders in case of an outage or disconnection.
|
|
1000
1008
|
* Example usage:
|
|
1001
1009
|
* Call this endpoint with a countdownTime value of 10000 (10 seconds) to turn on the auto-cancel feature. If the corresponding countdownCancelAllHeartBeat endpoint is not called within 10 seconds with the specified underlying symbol, all open orders of the specified symbol will be automatically canceled. If this endpoint is called with an countdownTime of 0, the countdown timer will be stopped.
|
|
1002
|
-
* The system will check all countdowns approximately every
|
|
1010
|
+
* The system will check all countdowns approximately every 100 milliseconds, **please note that sufficient redundancy should be considered when using this function**. We do not recommend setting the countdown time to be too precise or too small.
|
|
1003
1011
|
*
|
|
1004
1012
|
* Weight: 1
|
|
1005
1013
|
*
|
|
@@ -1139,7 +1147,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1139
1147
|
timeUnit: _timeUnit
|
|
1140
1148
|
};
|
|
1141
1149
|
},
|
|
1142
|
-
newOrder: async (symbol, side, type, quantity, price, timeInForce, reduceOnly, postOnly, newOrderRespType, clientOrderId, isMmp, recvWindow) => {
|
|
1150
|
+
newOrder: async (symbol, side, type, quantity, price, timeInForce, reduceOnly, postOnly, newOrderRespType, clientOrderId, isMmp, selfTradePreventionMode, recvWindow) => {
|
|
1143
1151
|
assertParamExists("newOrder", "symbol", symbol);
|
|
1144
1152
|
assertParamExists("newOrder", "side", side);
|
|
1145
1153
|
assertParamExists("newOrder", "type", type);
|
|
@@ -1157,6 +1165,7 @@ const TradeApiAxiosParamCreator = function(configuration) {
|
|
|
1157
1165
|
if (newOrderRespType !== void 0 && newOrderRespType !== null) localVarQueryParameter["newOrderRespType"] = newOrderRespType;
|
|
1158
1166
|
if (clientOrderId !== void 0 && clientOrderId !== null) localVarQueryParameter["clientOrderId"] = clientOrderId;
|
|
1159
1167
|
if (isMmp !== void 0 && isMmp !== null) localVarQueryParameter["isMmp"] = isMmp;
|
|
1168
|
+
if (selfTradePreventionMode !== void 0 && selfTradePreventionMode !== null) localVarQueryParameter["selfTradePreventionMode"] = selfTradePreventionMode;
|
|
1160
1169
|
if (recvWindow !== void 0 && recvWindow !== null) localVarQueryParameter["recvWindow"] = recvWindow;
|
|
1161
1170
|
let _timeUnit;
|
|
1162
1171
|
if ("timeUnit" in configuration) _timeUnit = configuration.timeUnit;
|
|
@@ -1301,6 +1310,8 @@ var TradeApi = class {
|
|
|
1301
1310
|
/**
|
|
1302
1311
|
* Get trades for a specific account and symbol.
|
|
1303
1312
|
*
|
|
1313
|
+
* Only support querying trades in the past 3 months
|
|
1314
|
+
*
|
|
1304
1315
|
* Weight: 5
|
|
1305
1316
|
*
|
|
1306
1317
|
* @summary Account Trade List (USER_DATA)
|
|
@@ -1395,7 +1406,7 @@ var TradeApi = class {
|
|
|
1395
1406
|
* @see {@link https://developers.binance.com/docs/derivatives/options-trading/trade/New-Order Binance API Documentation}
|
|
1396
1407
|
*/
|
|
1397
1408
|
async newOrder(requestParameters) {
|
|
1398
|
-
const localVarAxiosArgs = await this.localVarAxiosParamCreator.newOrder(requestParameters?.symbol, requestParameters?.side, requestParameters?.type, requestParameters?.quantity, requestParameters?.price, requestParameters?.timeInForce, requestParameters?.reduceOnly, requestParameters?.postOnly, requestParameters?.newOrderRespType, requestParameters?.clientOrderId, requestParameters?.isMmp, requestParameters?.recvWindow);
|
|
1409
|
+
const localVarAxiosArgs = await this.localVarAxiosParamCreator.newOrder(requestParameters?.symbol, requestParameters?.side, requestParameters?.type, requestParameters?.quantity, requestParameters?.price, requestParameters?.timeInForce, requestParameters?.reduceOnly, requestParameters?.postOnly, requestParameters?.newOrderRespType, requestParameters?.clientOrderId, requestParameters?.isMmp, requestParameters?.selfTradePreventionMode, requestParameters?.recvWindow);
|
|
1399
1410
|
return sendRequest(this.configuration, localVarAxiosArgs.endpoint, localVarAxiosArgs.method, localVarAxiosArgs.queryParams, localVarAxiosArgs.bodyParams, localVarAxiosArgs?.timeUnit, { isSigned: true });
|
|
1400
1411
|
}
|
|
1401
1412
|
/**
|
|
@@ -1543,6 +1554,12 @@ let NewOrderNewOrderRespTypeEnum = /* @__PURE__ */ function(NewOrderNewOrderResp
|
|
|
1543
1554
|
NewOrderNewOrderRespTypeEnum$1["RESULT"] = "RESULT";
|
|
1544
1555
|
return NewOrderNewOrderRespTypeEnum$1;
|
|
1545
1556
|
}({});
|
|
1557
|
+
let NewOrderSelfTradePreventionModeEnum = /* @__PURE__ */ function(NewOrderSelfTradePreventionModeEnum$1) {
|
|
1558
|
+
NewOrderSelfTradePreventionModeEnum$1["EXPIRE_TAKER"] = "EXPIRE_TAKER";
|
|
1559
|
+
NewOrderSelfTradePreventionModeEnum$1["EXPIRE_BOTH"] = "EXPIRE_BOTH";
|
|
1560
|
+
NewOrderSelfTradePreventionModeEnum$1["EXPIRE_MAKER"] = "EXPIRE_MAKER";
|
|
1561
|
+
return NewOrderSelfTradePreventionModeEnum$1;
|
|
1562
|
+
}({});
|
|
1546
1563
|
|
|
1547
1564
|
//#endregion
|
|
1548
1565
|
//#region src/rest-api/modules/user-data-streams-api.ts
|
|
@@ -1711,6 +1728,9 @@ var RestAPI = class {
|
|
|
1711
1728
|
/**
|
|
1712
1729
|
* Query account funding flows.
|
|
1713
1730
|
*
|
|
1731
|
+
*
|
|
1732
|
+
* Only support querying data in the past 3 months
|
|
1733
|
+
*
|
|
1714
1734
|
* Weight: 1
|
|
1715
1735
|
*
|
|
1716
1736
|
* @summary Account Funding Flow (USER_DATA)
|
|
@@ -2101,7 +2121,7 @@ var RestAPI = class {
|
|
|
2101
2121
|
* This rest endpoint sets up the parameters to cancel your open orders in case of an outage or disconnection.
|
|
2102
2122
|
* Example usage:
|
|
2103
2123
|
* Call this endpoint with a countdownTime value of 10000 (10 seconds) to turn on the auto-cancel feature. If the corresponding countdownCancelAllHeartBeat endpoint is not called within 10 seconds with the specified underlying symbol, all open orders of the specified symbol will be automatically canceled. If this endpoint is called with an countdownTime of 0, the countdown timer will be stopped.
|
|
2104
|
-
* The system will check all countdowns approximately every
|
|
2124
|
+
* The system will check all countdowns approximately every 100 milliseconds, **please note that sufficient redundancy should be considered when using this function**. We do not recommend setting the countdown time to be too precise or too small.
|
|
2105
2125
|
*
|
|
2106
2126
|
* Weight: 1
|
|
2107
2127
|
*
|
|
@@ -2134,6 +2154,8 @@ var RestAPI = class {
|
|
|
2134
2154
|
/**
|
|
2135
2155
|
* Get trades for a specific account and symbol.
|
|
2136
2156
|
*
|
|
2157
|
+
* Only support querying trades in the past 3 months
|
|
2158
|
+
*
|
|
2137
2159
|
* Weight: 5
|
|
2138
2160
|
*
|
|
2139
2161
|
* @summary Account Trade List (USER_DATA)
|
|
@@ -2393,10 +2415,12 @@ var rest_api_exports = /* @__PURE__ */ __export({
|
|
|
2393
2415
|
MarketMakerBlockTradeApi: () => MarketMakerBlockTradeApi,
|
|
2394
2416
|
MarketMakerEndpointsApi: () => MarketMakerEndpointsApi,
|
|
2395
2417
|
NewOrderNewOrderRespTypeEnum: () => NewOrderNewOrderRespTypeEnum,
|
|
2418
|
+
NewOrderSelfTradePreventionModeEnum: () => NewOrderSelfTradePreventionModeEnum,
|
|
2396
2419
|
NewOrderSideEnum: () => NewOrderSideEnum,
|
|
2397
2420
|
NewOrderTimeInForceEnum: () => NewOrderTimeInForceEnum,
|
|
2398
2421
|
NewOrderTypeEnum: () => NewOrderTypeEnum,
|
|
2399
2422
|
PlaceMultipleOrdersOrdersParameterInnerNewOrderRespTypeEnum: () => PlaceMultipleOrdersOrdersParameterInnerNewOrderRespTypeEnum,
|
|
2423
|
+
PlaceMultipleOrdersOrdersParameterInnerSelfTradePreventionModeEnum: () => PlaceMultipleOrdersOrdersParameterInnerSelfTradePreventionModeEnum,
|
|
2400
2424
|
PlaceMultipleOrdersOrdersParameterInnerSideEnum: () => PlaceMultipleOrdersOrdersParameterInnerSideEnum,
|
|
2401
2425
|
PlaceMultipleOrdersOrdersParameterInnerTimeInForceEnum: () => PlaceMultipleOrdersOrdersParameterInnerTimeInForceEnum,
|
|
2402
2426
|
PlaceMultipleOrdersOrdersParameterInnerTypeEnum: () => PlaceMultipleOrdersOrdersParameterInnerTypeEnum,
|