@binance/connector
Advanced tools
Comparing version 3.0.0 to 3.1.0
{ | ||
"name": "@binance/connector", | ||
"version": "3.0.0", | ||
"version": "3.1.0", | ||
"description": "This is a lightweight library that works as a connector to the Binance public API.", | ||
@@ -9,3 +9,3 @@ "main": "src/index.js", | ||
"jsdoc:win": "jsdoc -c ./docs_src/conf.json && npx jsdoc --readme ./docs_src/gettingStarted.md src/modules/restful/blvt.js && node ./docs_src/generateDoc.js && RD /S /Q out", | ||
"test": "jest", | ||
"test": "jest --maxWorkers 4 --bail", | ||
"test:watch": "jest --watchAll", | ||
@@ -48,4 +48,4 @@ "coverage": "jest --silent --ci --coverage --testLocationInResults --json --outputFile=\"report.json\"", | ||
"dependencies": { | ||
"axios": "^1.3", | ||
"ws": "^8.13" | ||
"axios": "^1.6", | ||
"ws": "^8.14" | ||
}, | ||
@@ -52,0 +52,0 @@ "jest": { |
@@ -63,137 +63,4 @@ 'use strict' | ||
} | ||
/** | ||
* Cross-Collateral Borrow History (USER_DATA) | ||
* | ||
* GET /sapi/v1/futures/loan/borrow/history | ||
* | ||
* {@link https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-borrow-history-user_data} | ||
* | ||
* @param {object} [options] | ||
* @param {string} [options.coin] | ||
* @param {number} [options.startTime] | ||
* @param {number} [options.endTime] | ||
* @param {number} [options.limit] - default 500, max 1000 | ||
* @param {number} [options.recvWindow] | ||
*/ | ||
futuresLoanBorrowHistory (options = {}) { | ||
return this.signRequest( | ||
'GET', | ||
'/sapi/v1/futures/loan/borrow/history', | ||
options | ||
) | ||
} | ||
/** | ||
* Cross-Collateral Repayment History (USER_DATA) | ||
* | ||
* GET /sapi/v1/futures/loan/repay/history | ||
* | ||
* {@link https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-repayment-history-user_data} | ||
* | ||
* @param {object} [options] | ||
* @param {string} [options.coin] | ||
* @param {number} [options.startTime] | ||
* @param {number} [options.endTime] | ||
* @param {number} [options.limit] - default 500, max 1000 | ||
* @param {number} [options.recvWindow] | ||
*/ | ||
futuresLoanRepayHistory (options = {}) { | ||
return this.signRequest( | ||
'GET', | ||
'/sapi/v1/futures/loan/repay/history', | ||
options | ||
) | ||
} | ||
/** | ||
* Cross-Collateral Wallet (USER_DATA) | ||
* | ||
* GET /sapi/v2/futures/loan/wallet | ||
* | ||
* {@link https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-wallet-v2-user_data} | ||
* | ||
* @param {object} [options] | ||
* @param {number} [options.recvWindow] | ||
*/ | ||
futuresLoanWallet (options = {}) { | ||
return this.signRequest( | ||
'GET', | ||
'/sapi/v2/futures/loan/wallet', | ||
options | ||
) | ||
} | ||
/** | ||
* Adjust Cross-Collateral LTV History (USER_DATA) | ||
* | ||
* GET /sapi/v1/futures/loan/adjustCollateral/history | ||
* | ||
* {@link https://binance-docs.github.io/apidocs/spot/en/#adjust-cross-collateral-ltv-history-user_data} | ||
* | ||
* @param {object} [options] | ||
* @param {string} [options.loanCoin] | ||
* @param {string} [options.collateralCoin] | ||
* @param {number} [options.startTime] | ||
* @param {number} [options.endTime] | ||
* @param {number} [options.limit] - default 500, max 1000 | ||
* @param {number} [options.recvWindow] | ||
* | ||
* All data will be returned if loanCoin or collateralCoin is not sent | ||
*/ | ||
futuresLoanAdjustCollateralHistory (options = {}) { | ||
return this.signRequest( | ||
'GET', | ||
'/sapi/v1/futures/loan/adjustCollateral/history', | ||
options | ||
) | ||
} | ||
/** | ||
* Cross-Collateral Liquidation History (USER_DATA) | ||
* | ||
* GET /sapi/v1/futures/loan/liquidationHistory | ||
* | ||
* {@link https://binance-docs.github.io/apidocs/spot/en/#adjust-cross-collateral-ltv-history-user_data} | ||
* | ||
* @param {object} [options] | ||
* @param {string} [options.loanCoin] | ||
* @param {string} [options.collateralCoin] | ||
* @param {number} [options.startTime] | ||
* @param {number} [options.endTime] | ||
* @param {number} [options.limit] - default 500, max 1000 | ||
* @param {number} [options.recvWindow] | ||
*/ | ||
futuresLoanLiquidationHistory (options = {}) { | ||
return this.signRequest( | ||
'GET', | ||
'/sapi/v1/futures/loan/liquidationHistory', | ||
options | ||
) | ||
} | ||
/** | ||
* Cross-Collateral Interest History (USER_DATA) | ||
* | ||
* GET /sapi/v1/futures/loan/interestHistory | ||
* | ||
* {@link https://binance-docs.github.io/apidocs/spot/en/#cross-collateral-interest-history-user_data} | ||
* | ||
* @param {object} [options] | ||
* @param {string} [options.collateralCoin] | ||
* @param {number} [options.startTime] | ||
* @param {number} [options.endTime] | ||
* @param {number} [options.current] - Currently querying page. Start from 1. Default:1 | ||
* @param {number} [options.limit] - Default:500 Max:1000 | ||
* @param {number} [options.recvWindow] | ||
*/ | ||
futuresLoanInterestHistory (options = {}) { | ||
return this.signRequest( | ||
'GET', | ||
'/sapi/v1/futures/loan/interestHistory', | ||
options | ||
) | ||
} | ||
} | ||
module.exports = Futures |
'use strict' | ||
module.exports.autoInvest = require('./autoInvest') | ||
module.exports.Blvt = require('./blvt') | ||
@@ -4,0 +5,0 @@ module.exports.Bswap = require('./bswap') |
@@ -1027,4 +1027,46 @@ 'use strict' | ||
} | ||
/** | ||
* Query Margin Available Inventory (USER_DATA)<br> | ||
* | ||
* GET /sapi/v1/margin/available-inventory<br> | ||
* | ||
* {@link https://binance-docs.github.io/apidocs/spot/en/#query-margin-available-inventory-user_data} | ||
* | ||
* @param {Type} type | ||
*/ | ||
queryMarginAvailableInventory (type, options = {}) { | ||
validateRequiredParameters({ type }) | ||
return this.signRequest( | ||
'GET', | ||
'/sapi/v1/margin/available-inventory', | ||
Object.assign(options, { | ||
type | ||
}) | ||
) | ||
} | ||
/** | ||
* Margin manual liquidation (MARGIN)<br> | ||
* | ||
* POST /sapi/v1/margin/manual-liquidation<br> | ||
* | ||
* {@link https://binance-docs.github.io/apidocs/spot/en/#margin-manual-liquidation-margin} | ||
* | ||
* @param {Type} type | ||
* @param {object} [options] | ||
* @param {string} [options.symbol] | ||
*/ | ||
marginManualLiquidation (type, options = {}) { | ||
validateRequiredParameters({ type }) | ||
return this.signRequest( | ||
'POST', | ||
'/sapi/v1/margin/manual-liquidation', | ||
Object.assign(options, { | ||
type | ||
}) | ||
) | ||
} | ||
} | ||
module.exports = Margin |
226653
45
6701
Updatedaxios@^1.6
Updatedws@^8.14