Skip to content

Commit

Permalink
Release v0.1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
alplabin committed Oct 3, 2024
1 parent cd23cd1 commit 8788c59
Show file tree
Hide file tree
Showing 11 changed files with 442 additions and 451 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Change log

## v0.1.5 - 2024-10-03
### Changed
- Updated dependencies
- Updated documentation links

## v0.1.4 - 2024-08-19
### Changed
- Updated dependencies
Expand Down
692 changes: 339 additions & 353 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@binance/futures-connector",
"version": "0.1.4",
"version": "0.1.5",
"description": "NodeJS Binance Futures Connector",
"main": "src/index.js",
"scripts": {
Expand Down
46 changes: 23 additions & 23 deletions src/modules/restful/base/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const Account = (superclass) =>
* POST /fapi/v1/positionSide/dual
* POST /dapi/v1/positionSide/dual
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#change-position-mode-trade}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Position-Mode}
*/
changePositionMode (dualSidePosition, options = {}) {
validateRequiredParameters({ dualSidePosition })
Expand All @@ -34,7 +34,7 @@ const Account = (superclass) =>
* GET /fapi/v1/positionSide/dual
* GET /dapi/v1/positionSide/dual
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#position-side-dual-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Current-Position-Mode}
*/
getPositionMode (options = {}) {
return this.signRequest(
Expand All @@ -50,7 +50,7 @@ const Account = (superclass) =>
* POST /fapi/v1/order
* POST /dapi/v1/order
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#new-order-trade}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/New-Order}
* @param {string} symbol
* @param {string} side
* @param {string} type
Expand All @@ -76,7 +76,7 @@ const Account = (superclass) =>
* POST /fapi/v1/batchOrders
* POST /dapi/v1/batchOrders
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#place-multiple-orders-trade}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Place-Multiple-Orders}
* @param {Array} batchOrders
* @param {object} [options]
* @param {number} [options.recvWindow] - The value cannot be greater than 60000
Expand All @@ -98,7 +98,7 @@ const Account = (superclass) =>
* GET /fapi/v1/orderAmendment
* GET /dapi/v1/orderAmendment
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#get-order-modify-history-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Get-Order-Modify-History}
*
* @param {string} symbol - The symbol for which the order modification history is requested.
* @param {Object} options - The additional options for the request. (optional)
Expand All @@ -120,7 +120,7 @@ const Account = (superclass) =>
* GET /fapi/v1/order
* GET /dapi/v1/order
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#query-order-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/websocket-api/Query-Order}
*
* @param {string} symbol - The symbol for which the order is placed.
* @param {string} side - The side of the order (BUY/SELL).
Expand All @@ -144,7 +144,7 @@ const Account = (superclass) =>
* DELETE /fapi/v1/order
* DELETE /dapi/v1/order
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#cancel-order-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Order}
*
* @param {string} symbol
* @param {object} [options]
Expand All @@ -167,7 +167,7 @@ const Account = (superclass) =>
* DELETE /fapi/v1/allOpenOrders
* DELETE /dapi/v1/allOpenOrders
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#cancel-all-open-orders-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-All-Open-Orders}
*
* @param {string} symbol
* @param {object} [options]
Expand All @@ -191,7 +191,7 @@ const Account = (superclass) =>
* DELETE /fapi/v1/batchOrders
* DELETE /dapi/v1/batchOrders
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#cancel-multiple-orders-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Cancel-Multiple-Orders}
*
* @param {string} symbol
* @param {object} [options]
Expand All @@ -211,10 +211,10 @@ const Account = (superclass) =>
/**
* Cancel All Open Orders (USER_DATA)
*
* DELETE /fapi/v1/countdownCancelAll
* DELETE /dapi/v1/countdownCancelAll
* POST /fapi/v1/countdownCancelAll
* POST /dapi/v1/countdownCancelAll
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#cancel-all-open-orders-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Auto-Cancel-All-Open-Orders}
*
* @param {string} symbol
* @param {number} countdownTime
Expand All @@ -239,7 +239,7 @@ const Account = (superclass) =>
* GET /fapi/v1/openOrder
* GET /dapi/v1/openOrder
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#query-current-open-order-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Query-Current-Open-Order}
*
* @param {string} symbol
* @param {object} [options]
Expand All @@ -261,7 +261,7 @@ const Account = (superclass) =>
*
* GET /fapi/v1/openOrders
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#current-all-open-orders-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Current-All-Open-Orders}
*
* @param {object} [options]
* @param {number} [options.recvWindow] - The value cannot be greater than 60000
Expand All @@ -279,7 +279,7 @@ const Account = (superclass) =>
*
* POST /fapi/v1/leverage
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#change-initial-leverage-trade}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Initial-Leverage}
*
* @param {string} symbol
* @param {number} leverage
Expand All @@ -303,7 +303,7 @@ const Account = (superclass) =>
*
* POST /fapi/v1/marginType
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#change-margin-type-trade}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Change-Margin-Type}
*
* @param {string} symbol
* @param {string} marginType
Expand All @@ -327,7 +327,7 @@ const Account = (superclass) =>
*
* POST /fapi/v1/positionMargin
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#modify-isolated-position-margin-trade}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Modify-Isolated-Position-Margin}
*
* @param {string} symbol
* @param {number} amount
Expand All @@ -353,7 +353,7 @@ const Account = (superclass) =>
*
* GET /fapi/v1/positionMargin/history
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#get-position-margin-change-history-trade}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Get-Position-Margin-Change-History}
*
* @param {string} symbol
* @param {object} [options]
Expand All @@ -376,7 +376,7 @@ const Account = (superclass) =>
* GET /fapi/v1/income
* GET /dapi/v1/income
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#get-income-history-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Income-History}
*/
getIncomeHistory (options = {}) {
return this.signRequest(
Expand All @@ -392,7 +392,7 @@ const Account = (superclass) =>
* GET /fapi/v1/forceOrders
* GET /dapi/v1/forceOrders
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#user-s-force-orders-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Users-Force-Orders}
*/
getUsersForceOrders (options = {}) {
return this.signRequest(
Expand All @@ -408,7 +408,7 @@ const Account = (superclass) =>
* GET /fapi/v1/adlQuantile
* GET /dapi/v1/adlQuantile
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#position-adl-quantile-estimation-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/trade/rest-api/Position-ADL-Quantile-Estimation}
*/
getPositionADLQuantileEstimation (options = {}) {
return this.signRequest(
Expand All @@ -424,7 +424,7 @@ const Account = (superclass) =>
* GET /fapi/v1/commissionRate
* GET /dapi/v1/commissionRate
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#user-commission-rate-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/User-Commission-Rate}
*/
getUserCommissionRate (symbol, options = {}) {
validateRequiredParameters({ symbol })
Expand All @@ -448,7 +448,7 @@ const Account = (superclass) =>
* @param {object} [options]
* @param {number} [options.recvWindow] - The value cannot be greater than 60000
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#get-download-id-for-futures-transaction-history-user_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/account/rest-api/Get-Download-Id-For-Futures-Transaction-History}
*/
getDownloadIdForFuturesTransactionHistory (
startTime,
Expand Down
36 changes: 18 additions & 18 deletions src/modules/restful/base/market.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const Market = (superclass) =>
* CM: GET /dapi/v1/ping<br>
*
* Test connectivity to the Rest API.<br>
* {@link https://binance-docs.github.io/apidocs/futures/en/#test-connectivity}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Test-Connectivity}
*/
ping () {
return this.publicRequest(
Expand All @@ -32,7 +32,7 @@ const Market = (superclass) =>
* CM: GET /dapi/v1/time<br>
*
* Test connectivity to the Rest API and get the current server time.<br>
* {@link https://binance-docs.github.io/apidocs/futures/en/#check-server-time}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Check-Server-Time}
*/
getTime () {
return this.publicRequest(
Expand All @@ -48,7 +48,7 @@ const Market = (superclass) =>
* CM: GET /dapi/v1/exchangeInfo<br>
*
* Get current exchange trading rules and symbol information.<br>
* {@link https://binance-docs.github.io/apidocs/futures/en/#exchange-information}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Exchange-Information}
*/
getExchangeInfo () {
return this.publicRequest(
Expand All @@ -64,7 +64,7 @@ const Market = (superclass) =>
* CM: GET /dapi/v1/depth<br>
*
* Get the Order Book for a specific symbol.<br>
* {@link https://binance-docs.github.io/apidocs/futures/en/#order-book}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Order-Book}
*/
getDepth (symbol, limit) {
validateRequiredParameters({ symbol })
Expand All @@ -86,7 +86,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/trades<br>
* CM: GET /dapi/v1/trades<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#recent-trades-list}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Recent-Trades-List}
*/
getTrades (symbol, limit) {
validateRequiredParameters({ symbol })
Expand All @@ -103,7 +103,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/historicalTrades<br>
* CM: GET /dapi/v1/historicalTrades<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#old-trades-lookup-market_data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Old-Trades-Lookup}
*/
getHistoricalTrades (symbol, limit, fromId) {
validateRequiredParameters({ symbol })
Expand All @@ -120,7 +120,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/aggTrades<br>
* CM: GET /dapi/v1/aggTrades<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#compressed-aggregate-trades-list}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Compressed-Aggregate-Trades-List}
*/
getAggTrades (symbol, fromId, startTime, endTime, limit) {
validateRequiredParameters({ symbol })
Expand All @@ -137,7 +137,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/klines<br>
* CM: GET /dapi/v1/klines<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#kline-candlestick-data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Kline-Candlestick-Data}
*/
getKlines (symbol, interval, startTime, endTime, limit) {
validateRequiredParameters({ symbol, interval })
Expand All @@ -154,7 +154,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/premiumIndex<br>
* CM: GET /dapi/v1/premiumIndex<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#get-premium-index-funding-rate}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price}
*/
getPremiumIndex (symbol) {
return this.publicRequest(
Expand All @@ -170,7 +170,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/fundingRate<br>
* CM: GET /dapi/v1/fundingRate<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#get-funding-rate-history}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Get-Funding-Rate-History}
*/
getFundingRate (symbol, startTime, endTime, limit) {
return this.publicRequest(
Expand All @@ -186,7 +186,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/premiumIndexKlines<br>
* CM: GET /dapi/v1/premiumIndexKlines<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#get-premium-index-klines}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Premium-Index-Kline-Data}
*/
getPremiumIndexKlines (symbol, interval, startTime, endTime, limit) {
validateRequiredParameters({ symbol, interval })
Expand All @@ -203,7 +203,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/continuousKlines<br>
* CM: GET /dapi/v1/continuousKlines<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#continuous-contract-kline-candlestick-data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Continuous-Contract-Kline-Candlestick-Data}
*/
getContinuousKlines (
pair,
Expand All @@ -227,7 +227,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/indexPriceKlines<br>
* CM: GET /dapi/v1/indexPriceKlines<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#index-price-kline-candlestick-data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Index-Price-Kline-Candlestick-Data}
*/
getIndexPriceKlines (pair, interval, startTime, endTime, limit) {
validateRequiredParameters({ pair, interval })
Expand All @@ -244,7 +244,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/ticker/24hr<br>
* CM: GET /dapi/v1/ticker/24hr<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#24hr-ticker-price-change-statistics}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/24hr-Ticker-Price-Change-Statistics}
*/
get24hrTicker (symbol, pair) {
if (symbol && pair) {
Expand All @@ -265,7 +265,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/ticker/price<br>
* CM: GET /dapi/v1/ticker/price<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#symbol-price-ticker}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Price-Ticker}
*/
getPriceTicker (symbol, pair) {
if (symbol && pair) {
Expand All @@ -286,7 +286,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/ticker/bookTicker<br>
* CM: GET /dapi/v1/ticker/bookTicker<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#symbol-order-book-ticker}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/websocket-api/Symbol-Order-Book-Ticker}
*/
getBookTicker (symbol, pair) {
if (symbol && pair) {
Expand All @@ -307,7 +307,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/openInterest<br>
* CM: GET /dapi/v1/openInterest<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#open-interest}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Open-Interest}
*/
getOpenInterest (symbol) {
validateRequiredParameters({ symbol })
Expand All @@ -325,7 +325,7 @@ const Market = (superclass) =>
* UM: GET /fapi/v1/markPriceKlines<br>
* CM: GET /dapi/v1/markPriceKlines<br>
*
* {@link https://binance-docs.github.io/apidocs/futures/en/#mark-price-kline-candlestick-data}
* {@link https://developers.binance.com/docs/derivatives/usds-margined-futures/market-data/rest-api/Mark-Price-Kline-Candlestick-Data}
*/
getMarkPriceKlines (symbol, interval, startTime, endTime, limit) {
validateRequiredParameters({ symbol, interval })
Expand Down
Loading

0 comments on commit 8788c59

Please sign in to comment.