@binance/connector
Advanced tools
Comparing version 3.4.0 to 3.4.1
{ | ||
"name": "@binance/connector", | ||
"version": "3.4.0", | ||
"version": "3.4.1", | ||
"description": "This is a lightweight library that works as a connector to the Binance public API.", | ||
@@ -47,3 +47,3 @@ "main": "src/index.js", | ||
"dependencies": { | ||
"axios": "^1.6", | ||
"axios": "^1.7.4", | ||
"ws": "^8.17.1" | ||
@@ -50,0 +50,0 @@ }, |
@@ -255,5 +255,5 @@ 'use strict' | ||
/** | ||
* New OCO (TRADE)<br> | ||
* New Order List - OCO (TRADE)<br> | ||
* | ||
* POST /api/v3/order/oco<br> | ||
* POST /api/v3/orderList/oco<br> | ||
* | ||
@@ -265,26 +265,32 @@ * {@link https://binance-docs.github.io/apidocs/spot/en/#new-oco-trade} | ||
* @param {number} quantity | ||
* @param {number} price | ||
* @param {number} stopPrice | ||
* @param {string} aboveType | ||
* @param {string} belowType | ||
* @param {object} [options] | ||
* @param {string} [options.listClientOrderId] | ||
* @param {string} [options.limitClientOrderId] | ||
* @param {number} [options.limitStrategyId] | ||
* @param {number} [options.limitStrategytype] - The value cannot be less than 1000000. | ||
* @param {number} [options.limitIcebergQty] | ||
* @param {number} [options.trailingDelta] | ||
* @param {string} [options.stopClientOrderId] | ||
* @param {number} [options.stopStrategyId] | ||
* @param {number} [options.stopStrategytype] - The value cannot be less than 1000000. | ||
* @param {number} [options.stopLimitPrice] | ||
* @param {number} [options.stopIcebergQty] | ||
* @param {string} [options.stopLimitTimeInForce] | ||
* @param {string} [options.aboveClientOrderId] | ||
* @param {number} [options.aboveIcebergQty] | ||
* @param {number} [options.abovePrice] | ||
* @param {number} [options.aboveStopPrice] | ||
* @param {number} [options.aboveTrailingDelta] | ||
* @param {number} [options.aboveTimeInForce] | ||
* @param {number} [options.aboveStrategyId] | ||
* @param {number} [options.aboveStrategyType] | ||
* @param {string} [options.belowClientOrderId] | ||
* @param {number} [options.belowIcebergQty] | ||
* @param {number} [options.belowPrice] | ||
* @param {number} [options.belowStopPrice] | ||
* @param {number} [options.belowTrailingDelta] | ||
* @param {string} [options.belowTimeInForce] | ||
* @param {number} [options.belowStrategyId] | ||
* @param {number} [options.belowStrategyType] | ||
* @param {string} [options.newOrderRespType] | ||
* @param {string} [options.selfTradePreventionMode] | ||
* @param {number} [options.recvWindow] - The value cannot be greater than 60000 | ||
*/ | ||
newOCOOrder (symbol, side, quantity, price, stopPrice, options = {}) { | ||
validateRequiredParameters({ symbol, side, quantity, price, stopPrice }) | ||
newOCOOrder (symbol, side, quantity, aboveType, belowType, options = {}) { | ||
validateRequiredParameters({ symbol, side, quantity, aboveType, belowType }) | ||
return this.signRequest( | ||
'POST', | ||
'/api/v3/order/oco', | ||
'/api/v3/orderList/oco', | ||
Object.assign(options, { | ||
@@ -294,4 +300,4 @@ symbol: symbol.toUpperCase(), | ||
quantity, | ||
price, | ||
stopPrice | ||
aboveType, | ||
belowType | ||
}) | ||
@@ -298,0 +304,0 @@ ) |
@@ -202,3 +202,3 @@ 'use strict' | ||
/** | ||
* Place new OCO< br> | ||
* Place new Order list< br> | ||
* | ||
@@ -211,29 +211,35 @@ * Send in a new OCO order.<br> | ||
* @param {string} side | ||
* @param {number} price | ||
* @param {number} quantity | ||
* @param {string} aboveType | ||
* @param {string} belowType | ||
* @param {object} [options] | ||
* @param {string} [options.listClientOrderId] | ||
* @param {string} [options.limitClientOrderId] | ||
* @param {number} [options.limitIcebergQty] | ||
* @param {number} [options.limitStrategyId] | ||
* @param {number} [options.limitStrategyType] | ||
* @param {number} [options.stopPrice] | ||
* @param {number} [options.trailingDelta] | ||
* @param {number} [options.stopClientOrderId] | ||
* @param {number} [options.stopLimitPrice] | ||
* @param {string} [options.stopLimitTimeInForce] | ||
* @param {number} [options.stopIcebergQty] | ||
* @param {number} [options.stopStrategyId] | ||
* @param {string} [options.stopStrategyType] | ||
* @param {number} [options.newOrderRespType] | ||
* @param {number} [options.selfTradePreventionMode] | ||
* @param {number} [options.recvWindow] | ||
* @param {string} [options.aboveClientOrderId] | ||
* @param {number} [options.aboveIcebergQty] | ||
* @param {number} [options.abovePrice] | ||
* @param {number} [options.aboveStopPrice] | ||
* @param {number} [options.aboveTrailingDelta] | ||
* @param {number} [options.aboveTimeInForce] | ||
* @param {number} [options.aboveStrategyId] | ||
* @param {number} [options.aboveStrategyType] | ||
* @param {string} [options.belowClientOrderId] | ||
* @param {number} [options.belowIcebergQty] | ||
* @param {number} [options.belowPrice] | ||
* @param {number} [options.belowStopPrice] | ||
* @param {number} [options.belowTrailingDelta] | ||
* @param {string} [options.belowTimeInForce] | ||
* @param {number} [options.belowStrategyId] | ||
* @param {number} [options.belowStrategyType] | ||
* @param {string} [options.newOrderRespType] | ||
* @param {string} [options.selfTradePreventionMode] | ||
* @param {number} [options.recvWindow] - The value cannot be greater than 60000 | ||
* | ||
*/ | ||
newOCOOrder (symbol, side, price, quantity, options = {}) { | ||
this.sendSignatureMessage('orderList.place', { | ||
newOCOOrder (symbol, side, quantity, aboveType, belowType, options = {}) { | ||
this.sendSignatureMessage('orderList.place.oco', { | ||
symbol, | ||
side, | ||
price, | ||
quantity, | ||
aboveType, | ||
belowType, | ||
...options | ||
@@ -240,0 +246,0 @@ }) |
215831
6418
Updatedaxios@^1.7.4