From 69bfea7256ef1e2a7289dd7e5e12888fab660579 Mon Sep 17 00:00:00 2001 From: alplabin <122352306+alplabin@users.noreply.github.com> Date: Tue, 1 Oct 2024 13:40:33 +0900 Subject: [PATCH] Release v3.5.0 --- CHANGELOG.md | 37 +- __tests__/spot/blvt/blvtInfo.test.js | 13 - .../spot/blvt/blvtRedemptionRecord.test.js | 36 - .../spot/blvt/blvtSubscriptionRecord.test.js | 36 - __tests__/spot/blvt/redeemBlvt.test.js | 32 - __tests__/spot/blvt/subscribeBlvt.test.js | 38 -- .../spot/futures/futuresTransfer.test.js | 44 -- .../futures/futuresTransferHistory.test.js | 37 - .../spot/gift_card/giftCardBuyCode.test.js | 29 +- .../spot/margin/isolatedMarginSymbol.test.js | 23 - .../margin/isolatedMarginTransfer.test.js | 46 -- .../isolatedMarginTransferHistory.test.js | 23 - __tests__/spot/margin/marginAsset.test.js | 28 - __tests__/spot/margin/marginBorrow.test.js | 37 - __tests__/spot/margin/marginDustLog.test.js | 14 - .../spot/margin/marginLoanRecord.test.js | 30 - __tests__/spot/margin/marginPair.test.js | 28 - __tests__/spot/margin/marginRepay.test.js | 37 - .../spot/margin/marginRepayRecord.test.js | 30 - __tests__/spot/margin/marginTransfer.test.js | 25 - .../sub_account/subAccountApiAddIp.test.js | 35 - .../subAccountApiToggleIpRestriction.test.js | 16 +- docs_src/gettingStarted.md | 2 +- docs_src/intro.md | 2 +- examples/spot/blvt/blvtInfo.js | 10 - examples/spot/blvt/blvtRedemptionRecord.js | 11 - examples/spot/blvt/blvtSubscriptionRecord.js | 11 - examples/spot/blvt/redeemBlvt.js | 11 - examples/spot/blvt/subscribeBlvt.js | 11 - examples/spot/futures/futuresTransfer.js | 11 - .../spot/futures/futuresTransferHistory.js | 11 - examples/spot/margin/isolatedMarginSymbol.js | 11 - .../spot/margin/isolatedMarginTransfer.js | 17 - .../margin/isolatedMarginTransferHistory.js | 11 - examples/spot/margin/marginAsset.js | 11 - examples/spot/margin/marginBorrow.js | 13 - examples/spot/margin/marginDustLog.js | 10 - examples/spot/margin/marginLoanRecord.js | 15 - examples/spot/margin/marginPair.js | 11 - examples/spot/margin/marginRepay.js | 13 - examples/spot/margin/marginRepayRecord.js | 15 - examples/spot/margin/marginTransfer.js | 14 - .../spot/sub_account/subAccountApiAddIp.js | 15 - .../subAccountApiToggleIpRestriction.js | 2 +- package-lock.json | 646 +++++++++--------- src/modules/restful/autoInvest.js | 28 +- src/modules/restful/blvt.js | 127 ---- src/modules/restful/c2c.js | 2 +- src/modules/restful/convert.js | 2 +- src/modules/restful/fiat.js | 4 +- src/modules/restful/futures.js | 65 -- src/modules/restful/giftCard.js | 56 +- src/modules/restful/index.js | 2 - src/modules/restful/loan.js | 2 +- src/modules/restful/margin.js | 341 +-------- src/modules/restful/market.js | 28 +- src/modules/restful/mining.js | 26 +- src/modules/restful/nft.js | 8 +- src/modules/restful/portfolioMargin.js | 8 +- src/modules/restful/rebate.js | 2 +- src/modules/restful/simpleEarn.js | 46 +- src/modules/restful/stream.js | 18 +- src/modules/restful/subAccount.js | 109 ++- src/modules/restful/trade.js | 32 +- src/modules/restful/wallet.js | 44 +- src/modules/websocket/api/account.js | 12 +- src/modules/websocket/api/market.js | 28 +- src/modules/websocket/api/trade.js | 22 +- src/modules/websocket/api/userData.js | 6 +- src/modules/websocket/stream.js | 30 +- 70 files changed, 660 insertions(+), 1946 deletions(-) delete mode 100644 __tests__/spot/blvt/blvtInfo.test.js delete mode 100644 __tests__/spot/blvt/blvtRedemptionRecord.test.js delete mode 100644 __tests__/spot/blvt/blvtSubscriptionRecord.test.js delete mode 100644 __tests__/spot/blvt/redeemBlvt.test.js delete mode 100644 __tests__/spot/blvt/subscribeBlvt.test.js delete mode 100644 __tests__/spot/futures/futuresTransfer.test.js delete mode 100644 __tests__/spot/futures/futuresTransferHistory.test.js delete mode 100644 __tests__/spot/margin/isolatedMarginSymbol.test.js delete mode 100644 __tests__/spot/margin/isolatedMarginTransfer.test.js delete mode 100644 __tests__/spot/margin/isolatedMarginTransferHistory.test.js delete mode 100644 __tests__/spot/margin/marginAsset.test.js delete mode 100644 __tests__/spot/margin/marginBorrow.test.js delete mode 100644 __tests__/spot/margin/marginDustLog.test.js delete mode 100644 __tests__/spot/margin/marginLoanRecord.test.js delete mode 100644 __tests__/spot/margin/marginPair.test.js delete mode 100644 __tests__/spot/margin/marginRepay.test.js delete mode 100644 __tests__/spot/margin/marginRepayRecord.test.js delete mode 100644 __tests__/spot/margin/marginTransfer.test.js delete mode 100644 __tests__/spot/sub_account/subAccountApiAddIp.test.js delete mode 100644 examples/spot/blvt/blvtInfo.js delete mode 100644 examples/spot/blvt/blvtRedemptionRecord.js delete mode 100644 examples/spot/blvt/blvtSubscriptionRecord.js delete mode 100644 examples/spot/blvt/redeemBlvt.js delete mode 100644 examples/spot/blvt/subscribeBlvt.js delete mode 100644 examples/spot/futures/futuresTransfer.js delete mode 100644 examples/spot/futures/futuresTransferHistory.js delete mode 100644 examples/spot/margin/isolatedMarginSymbol.js delete mode 100644 examples/spot/margin/isolatedMarginTransfer.js delete mode 100644 examples/spot/margin/isolatedMarginTransferHistory.js delete mode 100644 examples/spot/margin/marginAsset.js delete mode 100644 examples/spot/margin/marginBorrow.js delete mode 100644 examples/spot/margin/marginDustLog.js delete mode 100644 examples/spot/margin/marginLoanRecord.js delete mode 100644 examples/spot/margin/marginPair.js delete mode 100644 examples/spot/margin/marginRepay.js delete mode 100644 examples/spot/margin/marginRepayRecord.js delete mode 100644 examples/spot/margin/marginTransfer.js delete mode 100644 examples/spot/sub_account/subAccountApiAddIp.js delete mode 100644 src/modules/restful/blvt.js delete mode 100644 src/modules/restful/futures.js diff --git a/CHANGELOG.md b/CHANGELOG.md index b62827d8..0aa8ceae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,43 @@ # Changelog - -## 3.4.2 - 2024-09-24 +## 3.5.0 - 2024-10-01 ### Added - Add GiftCard endpoint: - `POST /sapi/v1/giftcard/buyCode` to create a dual-token gift card +### Changed +- Updated dependencies +- Updated endpoint `/sapi/v1/sub-account/subAccountApi/ipRestriction` to `/sapi/v2/sub-account/subAccountApi/ipRestriction` + +### Removed +- Deprecated Margin endpoints: + - `POST /sapi/v1/margin/transfer` + - `POST /sapi/v1/margin/isolated/transfer` + - `POST /sapi/v1/margin/loan` + - `POST /sapi/v1/margin/repay` + - `GET /sapi/v1/margin/isolated/transfer` + - `GET /sapi/v1/margin/asset` + - `GET /sapi/v1/margin/pair` + - `GET /sapi/v1/margin/isolated/pair` + - `GET /sapi/v1/margin/loan` + - `GET /sapi/v1/margin/repay` + - `GET /sapi/v1/margin/dribblet` + - `GET /sapi/v1/margin/dust` + - `POST /sapi/v1/margin/dust` + +- Deprecated Sub-Account endpoints: + - `POST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList` + +- Deprecated Futures endpoints: + - `POST /sapi/v1/futures/transfer` + - `GET /sapi/v1/futures/transfer` + +- BLVT endpoints: + - `GET /sapi/v1/blvt/tokenInfo` + - `POST /sapi/v1/blvt/subscribe` + - `GET /sapi/v1/blvt/subscribe/record` + - `POST /sapi/v1/blvt/redeem` + - `GET /sapi/v1/blvt/redeem/record` + ## 3.4.1 - 2024-08-19 ### Updated - Updated dependencies diff --git a/__tests__/spot/blvt/blvtInfo.test.js b/__tests__/spot/blvt/blvtInfo.test.js deleted file mode 100644 index f6543341..00000000 --- a/__tests__/spot/blvt/blvtInfo.test.js +++ /dev/null @@ -1,13 +0,0 @@ -/* global describe, it, expect */ -const { nockMock, SpotClient } = require('../../testUtils/testSetup') -const { mockResponse } = require('../../testUtils/mockData') - -describe('#blvtInfo', () => { - it('should get blvt token info', () => { - nockMock('/sapi/v1/blvt/tokenInfo')(mockResponse) - return SpotClient.blvtInfo().then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/blvt/blvtRedemptionRecord.test.js b/__tests__/spot/blvt/blvtRedemptionRecord.test.js deleted file mode 100644 index 35b2e7ea..00000000 --- a/__tests__/spot/blvt/blvtRedemptionRecord.test.js +++ /dev/null @@ -1,36 +0,0 @@ -/* global describe, it, expect */ -const { nockMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - startTime, - endTime, - limit, - recvWindow -} = require('../../testUtils/mockData') - -describe('#blvtRedemptionRecord', () => { - it('should query redemption record without parameter attached', () => { - nockMock('/sapi/v1/blvt/redeem/record')(mockResponse) - return SpotClient.blvtRedemptionRecord().then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) - - it('should query redemption record', () => { - const parameters = { - id: 1, - tokenName: 'BTCDOWN', - startTime, - endTime, - limit, - recvWindow - } - nockMock(`/sapi/v1/blvt/redeem/record?${buildQueryString({ ...parameters })}`)(mockResponse) - return SpotClient.blvtRedemptionRecord(parameters).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/blvt/blvtSubscriptionRecord.test.js b/__tests__/spot/blvt/blvtSubscriptionRecord.test.js deleted file mode 100644 index 4e556eaa..00000000 --- a/__tests__/spot/blvt/blvtSubscriptionRecord.test.js +++ /dev/null @@ -1,36 +0,0 @@ -/* global describe, it, expect */ -const { nockMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - startTime, - endTime, - limit, - recvWindow -} = require('../../testUtils/mockData') - -describe('#blvtSubscriptionRecord', () => { - it('should query subscription record without parameter attached', () => { - nockMock('/sapi/v1/blvt/subscribe/record?')(mockResponse) - return SpotClient.blvtSubscriptionRecord().then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) - - it('should query subscription record', () => { - const parameters = { - tokenName: 'BTCDOWN', - id: 1, - startTime, - endTime, - limit, - recvWindow - } - nockMock(`/sapi/v1/blvt/subscribe/record?${buildQueryString({ ...parameters })}`)(mockResponse) - return SpotClient.blvtSubscriptionRecord(parameters).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/blvt/redeemBlvt.test.js b/__tests__/spot/blvt/redeemBlvt.test.js deleted file mode 100644 index 59f80aec..00000000 --- a/__tests__/spot/blvt/redeemBlvt.test.js +++ /dev/null @@ -1,32 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockPostMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - amount -} = require('../../testUtils/mockData') - -const tokenName = 'BTCDOWN' - -describe('#redeemBlvt', () => { - it.each( - [[undefined, undefined], [tokenName, ''], [null, amount]] - )('should throw MissingParameterError when missing parameters', (pTokenName, pAmount) => { - expect(() => { - SpotClient.redeemBlvt(pTokenName, pAmount) - }).toThrow(MissingParameterError) - }) - - it('should redeem blvt', () => { - const parameters = { - tokenName, - amount - } - nockPostMock(`/sapi/v1/blvt/redeem?${buildQueryString({ ...parameters })}`)(mockResponse) - return SpotClient.redeemBlvt(tokenName, amount).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/blvt/subscribeBlvt.test.js b/__tests__/spot/blvt/subscribeBlvt.test.js deleted file mode 100644 index bfb15a8d..00000000 --- a/__tests__/spot/blvt/subscribeBlvt.test.js +++ /dev/null @@ -1,38 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockPostMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - amount -} = require('../../testUtils/mockData') - -const tokenName = 'BTCDOWN' - -describe('#subscribeBlvt', () => { - describe('throw MissingParameterError', () => { - it('missing tokenName', () => { - expect(() => { - SpotClient.subscribeBlvt('', amount) - }).toThrow(MissingParameterError) - }) - - it('missing cost', () => { - expect(() => { - SpotClient.subscribeBlvt(tokenName, '') - }).toThrow(MissingParameterError) - }) - }) - - it('should subscribe blvt', () => { - const parameters = { - tokenName, - cost: amount - } - nockPostMock(`/sapi/v1/blvt/subscribe?${buildQueryString({ ...parameters })}`)(mockResponse) - return SpotClient.subscribeBlvt(tokenName, amount).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/futures/futuresTransfer.test.js b/__tests__/spot/futures/futuresTransfer.test.js deleted file mode 100644 index 1281ed88..00000000 --- a/__tests__/spot/futures/futuresTransfer.test.js +++ /dev/null @@ -1,44 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockPostMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - asset, - amount -} = require('../../testUtils/mockData') - -const type = 1 // transfer from spot account to USDT-Ⓜ futures account. - -describe('#futuresTransfer', () => { - describe('throw MissingParameterError', () => { - it('missing asset', () => { - expect(() => { - SpotClient.futuresTransfer('', amount, type) - }).toThrow(MissingParameterError) - }) - it('missing amount', () => { - expect(() => { - SpotClient.futuresTransfer(asset, '', type) - }).toThrow(MissingParameterError) - }) - it('missing type', () => { - expect(() => { - SpotClient.futuresTransfer(asset, amount, '') - }).toThrow(MissingParameterError) - }) - }) - it('should execute transfer between spot account and futures account', () => { - const parameters = { - asset, - amount, - type - } - nockPostMock(`/sapi/v1/futures/transfer?${buildQueryString(parameters)}`)(mockResponse) - - return SpotClient.futuresTransfer(asset, amount, type).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/futures/futuresTransferHistory.test.js b/__tests__/spot/futures/futuresTransferHistory.test.js deleted file mode 100644 index a92b1071..00000000 --- a/__tests__/spot/futures/futuresTransferHistory.test.js +++ /dev/null @@ -1,37 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - asset, - startTime -} = require('../../testUtils/mockData') - -describe('#futuresTransferHistory', () => { - describe('throw MissingParameterError', () => { - it('missing asset', () => { - expect(() => { - SpotClient.futuresTransferHistory('', startTime) - }).toThrow(MissingParameterError) - }) - it('missing startTime', () => { - expect(() => { - SpotClient.futuresTransferHistory(asset, '') - }).toThrow(MissingParameterError) - }) - }) - - it('should get transfer between spot account and futures account history', () => { - const parameters = { - asset, - startTime - } - nockMock(`/sapi/v1/futures/transfer?${buildQueryString(parameters)}`)(mockResponse) - - return SpotClient.futuresTransferHistory(asset, startTime).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/gift_card/giftCardBuyCode.test.js b/__tests__/spot/gift_card/giftCardBuyCode.test.js index 3f1bc86d..48c31607 100644 --- a/__tests__/spot/gift_card/giftCardBuyCode.test.js +++ b/__tests__/spot/gift_card/giftCardBuyCode.test.js @@ -3,29 +3,36 @@ const MissingParameterError = require('../../../src/error/missingParameterError' const { nockPostMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') const { - mockResponse, - amount + mockResponse } = require('../../testUtils/mockData') const baseToken = 'USDT' const faceToken = 'BNB' +const baseTokenAmount = 10 describe('#giftCardBuyCode', () => { - it.each([ - [undefined, undefined, undefined], ['', '', ''], [null, null, null], - [undefined, faceToken, undefined], ['', faceToken, ''], [null, faceToken, null], - [baseToken, undefined, undefined], [baseToken, '', ''], [baseToken, null, null], - [undefined, undefined, amount], ['', '', amount], [baseToken, faceToken, null] - ])('should throw MissingParameterError given missing params', (baseToken, faceToken, amount) => { + it('missing baseToken', () => { expect(() => { - SpotClient.giftCardBuyCode(baseToken, faceToken, amount) + SpotClient.giftCardBuyCode('', faceToken, baseTokenAmount) + }).toThrow(MissingParameterError) + }) + + it('missing faceToken', () => { + expect(() => { + SpotClient.giftCardBuyCode(baseToken, '', baseTokenAmount) + }).toThrow(MissingParameterError) + }) + + it('missing baseTokenAmount', () => { + expect(() => { + SpotClient.giftCardBuyCode(baseToken, faceToken, '') }).toThrow(MissingParameterError) }) it('should return binance code info', () => { - nockPostMock(`/sapi/v1/giftcard/buyCode?${buildQueryString({ baseToken, faceToken, baseTokenAmount: amount })}`)(mockResponse) + nockPostMock(`/sapi/v1/giftcard/buyCode?${buildQueryString({ baseToken, faceToken, baseTokenAmount })}`)(mockResponse) - return SpotClient.giftCardBuyCode(baseToken, faceToken, amount).then(response => { + return SpotClient.giftCardBuyCode(baseToken, faceToken, baseTokenAmount).then(response => { expect(response).toBeDefined() expect(response.data).toEqual(mockResponse) }) diff --git a/__tests__/spot/margin/isolatedMarginSymbol.test.js b/__tests__/spot/margin/isolatedMarginSymbol.test.js deleted file mode 100644 index a9b35ade..00000000 --- a/__tests__/spot/margin/isolatedMarginSymbol.test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { mockResponse, symbol } = require('../../testUtils/mockData') - -describe('#isolatedMarginSymbol', () => { - it('should throw MissingParameterError when missing symbol', () => { - expect(() => { - SpotClient.isolatedMarginSymbol('') - }).toThrow(MissingParameterError) - }) - - it('should get isolated margin symbol', () => { - nockMock(`/sapi/v1/margin/isolated/pair?${buildQueryString({ symbol })}`)(mockResponse) - - return SpotClient.isolatedMarginSymbol(symbol).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -} -) diff --git a/__tests__/spot/margin/isolatedMarginTransfer.test.js b/__tests__/spot/margin/isolatedMarginTransfer.test.js deleted file mode 100644 index 80f438d6..00000000 --- a/__tests__/spot/margin/isolatedMarginTransfer.test.js +++ /dev/null @@ -1,46 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockPostMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - asset, - symbol, - amount -} = require('../../testUtils/mockData') - -const transFrom = 'SPOT' -const transTo = 'ISOLATED_MARGIN' - -describe('#isolatedMarginTransfer', () => { - it.each( - [[undefined, undefined, undefined, undefined, undefined], - ['', symbol, transFrom, transTo, amount], - [asset, '', transFrom, transTo, amount], - [asset, symbol, '', transTo, amount], - [asset, symbol, transFrom, '', amount], - [asset, symbol, transFrom, transTo, ''] - ] - )('should throw MissingParameterError when missing parameters', (pAsset, pSymbol, pTransFrom, pTransTo, pAmount) => { - expect(() => { - SpotClient.isolatedMarginTransfer(pAsset, pSymbol, pTransFrom, pTransTo, pAmount) - }).toThrow(MissingParameterError) - }) - - it('should transfer funds to isolated margin account', () => { - const parameters = { - asset, - symbol, - transFrom, - transTo, - amount - } - nockPostMock(`/sapi/v1/margin/isolated/transfer?${buildQueryString({ ...parameters })}`)(mockResponse) - - return SpotClient.isolatedMarginTransfer(asset, symbol, transFrom, transTo, amount).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -} -) diff --git a/__tests__/spot/margin/isolatedMarginTransferHistory.test.js b/__tests__/spot/margin/isolatedMarginTransferHistory.test.js deleted file mode 100644 index bd7f734a..00000000 --- a/__tests__/spot/margin/isolatedMarginTransferHistory.test.js +++ /dev/null @@ -1,23 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { mockResponse, symbol } = require('../../testUtils/mockData') - -describe('#isolatedMarginTransferHistory', () => { - it('should throw MissingParameterError when missing symbol', () => { - expect(() => { - SpotClient.isolatedMarginTransferHistory('') - }).toThrow(MissingParameterError) - }) - - it('should get isolated margin account transfer history', () => { - nockMock(`/sapi/v1/margin/isolated/transfer?${buildQueryString({ symbol })}`)(mockResponse) - - return SpotClient.isolatedMarginTransferHistory(symbol).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -} -) diff --git a/__tests__/spot/margin/marginAsset.test.js b/__tests__/spot/margin/marginAsset.test.js deleted file mode 100644 index 9ccf5bb7..00000000 --- a/__tests__/spot/margin/marginAsset.test.js +++ /dev/null @@ -1,28 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - asset -} = require('../../testUtils/mockData') - -describe('#marginAsset', () => { - it('throw MissingParameterError when missing asset', () => { - expect(() => { - SpotClient.marginAsset('') - }).toThrow(MissingParameterError) - }) - - it('should asset details', () => { - const parameters = { - asset - } - nockMock(`/sapi/v1/margin/asset?${buildQueryString({ ...parameters })}`)(mockResponse) - - return SpotClient.marginAsset(asset).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/margin/marginBorrow.test.js b/__tests__/spot/margin/marginBorrow.test.js deleted file mode 100644 index 5a6b77b0..00000000 --- a/__tests__/spot/margin/marginBorrow.test.js +++ /dev/null @@ -1,37 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockPostMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - asset, - amount -} = require('../../testUtils/mockData') - -describe('#marginBorrow', () => { - describe('throw MissingParameterError', () => { - it('missing asset', () => { - expect(() => { - SpotClient.marginBorrow('', amount) - }).toThrow(MissingParameterError) - }) - - it('missing amount', () => { - expect(() => { - SpotClient.marginBorrow(asset, '') - }).toThrow(MissingParameterError) - }) - }) - it('should transfer transaction id', () => { - const parameters = { - asset, - amount - } - nockPostMock(`/sapi/v1/margin/loan?${buildQueryString({ ...parameters })}`)(mockResponse) - - return SpotClient.marginBorrow(asset, amount).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/margin/marginDustLog.test.js b/__tests__/spot/margin/marginDustLog.test.js deleted file mode 100644 index a2c314a9..00000000 --- a/__tests__/spot/margin/marginDustLog.test.js +++ /dev/null @@ -1,14 +0,0 @@ -/* global describe, it, expect */ -const { nockMock, SpotClient } = require('../../testUtils/testSetup') -const { mockResponse } = require('../../testUtils/mockData') - -describe('#marginDustLog', () => { - it('should return margin dust log', () => { - nockMock('/sapi/v1/margin/dribblet')(mockResponse) - - return SpotClient.marginDustLog().then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/margin/marginLoanRecord.test.js b/__tests__/spot/margin/marginLoanRecord.test.js deleted file mode 100644 index 6702f389..00000000 --- a/__tests__/spot/margin/marginLoanRecord.test.js +++ /dev/null @@ -1,30 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - asset, - recvWindow -} = require('../../testUtils/mockData') - -describe('#marginLoanRecord', () => { - it('throw MissingParameterError when missing asset', () => { - expect(() => { - SpotClient.marginLoanRecord('') - }).toThrow(MissingParameterError) - }) - - it('should return margin loan record', () => { - const parameters = { - txId: 10, - recvWindow - } - nockMock(`/sapi/v1/margin/loan?${buildQueryString({ asset, ...parameters })}`)(mockResponse) - - return SpotClient.marginLoanRecord(asset, parameters).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/margin/marginPair.test.js b/__tests__/spot/margin/marginPair.test.js deleted file mode 100644 index 1c4d7ec0..00000000 --- a/__tests__/spot/margin/marginPair.test.js +++ /dev/null @@ -1,28 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - symbol -} = require('../../testUtils/mockData') - -describe('#marginPair', () => { - it('throw MissingParameterError when missing symbol', () => { - expect(() => { - SpotClient.marginPair('') - }).toThrow(MissingParameterError) - }) - - it('should pair details', () => { - const parameters = { - symbol - } - nockMock(`/sapi/v1/margin/pair?${buildQueryString({ ...parameters })}`)(mockResponse) - - return SpotClient.marginPair(symbol).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/margin/marginRepay.test.js b/__tests__/spot/margin/marginRepay.test.js deleted file mode 100644 index 741fce65..00000000 --- a/__tests__/spot/margin/marginRepay.test.js +++ /dev/null @@ -1,37 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockPostMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - asset, - amount -} = require('../../testUtils/mockData') - -describe('#marginRepay', () => { - describe('throw MissingParameterError', () => { - it('missing asset', () => { - expect(() => { - SpotClient.marginRepay('', amount) - }).toThrow(MissingParameterError) - }) - - it('missing amount', () => { - expect(() => { - SpotClient.marginRepay(asset, '') - }).toThrow(MissingParameterError) - }) - }) - it('should transfer transaction id', () => { - const parameters = { - asset, - amount - } - nockPostMock(`/sapi/v1/margin/repay?${buildQueryString({ ...parameters })}`)(mockResponse) - - return SpotClient.marginRepay(asset, amount).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/margin/marginRepayRecord.test.js b/__tests__/spot/margin/marginRepayRecord.test.js deleted file mode 100644 index d1614abe..00000000 --- a/__tests__/spot/margin/marginRepayRecord.test.js +++ /dev/null @@ -1,30 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - asset, - recvWindow -} = require('../../testUtils/mockData') - -describe('#marginRepayRecord', () => { - it('throw MissingParameterError when missing asset', () => { - expect(() => { - SpotClient.marginRepayRecord('') - }).toThrow(MissingParameterError) - }) - - it('should return margin repay record', () => { - const parameters = { - txId: 10, - recvWindow - } - nockMock(`/sapi/v1/margin/repay?${buildQueryString({ asset, ...parameters })}`)(mockResponse) - - return SpotClient.marginRepayRecord(asset, parameters).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/margin/marginTransfer.test.js b/__tests__/spot/margin/marginTransfer.test.js deleted file mode 100644 index f16db52f..00000000 --- a/__tests__/spot/margin/marginTransfer.test.js +++ /dev/null @@ -1,25 +0,0 @@ -/* global describe, it, expect */ -const { nockPostMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { - mockResponse, - asset, - amount, - type -} = require('../../testUtils/mockData') - -describe('#marginTransfer', () => { - it('should transfer funds', () => { - const parameters = { - asset, - amount, - type - } - nockPostMock(`/sapi/v1/margin/transfer?${buildQueryString({ ...parameters })}`)(mockResponse) - - return SpotClient.marginTransfer(asset, amount, type).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/sub_account/subAccountApiAddIp.test.js b/__tests__/spot/sub_account/subAccountApiAddIp.test.js deleted file mode 100644 index 840e5e6a..00000000 --- a/__tests__/spot/sub_account/subAccountApiAddIp.test.js +++ /dev/null @@ -1,35 +0,0 @@ -/* global describe, it, expect */ -const MissingParameterError = require('../../../src/error/missingParameterError') -const { nockPostMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup') - -const { mockResponse, email, recvWindow } = require('../../testUtils/mockData') -const subAccountApiKey = 'subAccountApiKey' -const ipAddress = '1.2.3.4' - -describe('#subAccountApiAddIp', () => { - it.each( - [['', subAccountApiKey, ipAddress], - [email, '', ipAddress], - [email, subAccountApiKey, ''] - ] - )('should throw MissingParameterError when missing parameters', (pEmail, pSubAccountApiKey, pIpAddress) => { - expect(() => { - SpotClient.subAccountApiAddIp(pEmail, pSubAccountApiKey, pIpAddress) - }).toThrow(MissingParameterError) - }) - - it('should add IP for a Sub-account API Key', () => { - const parameters = { - email, - subAccountApiKey, - ipAddress, - recvWindow - } - nockPostMock(`/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList?${buildQueryString(parameters)}`)(mockResponse) - - return SpotClient.subAccountApiAddIp(email, subAccountApiKey, ipAddress, { recvWindow }).then(response => { - expect(response).toBeDefined() - expect(response.data).toEqual(mockResponse) - }) - }) -}) diff --git a/__tests__/spot/sub_account/subAccountApiToggleIpRestriction.test.js b/__tests__/spot/sub_account/subAccountApiToggleIpRestriction.test.js index c0dfe77c..937cc9c3 100644 --- a/__tests__/spot/sub_account/subAccountApiToggleIpRestriction.test.js +++ b/__tests__/spot/sub_account/subAccountApiToggleIpRestriction.test.js @@ -4,17 +4,17 @@ const { nockPostMock, buildQueryString, SpotClient } = require('../../testUtils/ const { mockResponse, email, recvWindow } = require('../../testUtils/mockData') const subAccountApiKey = 'subAccountApiKey' -const ipRestrict = true +const status = '1' describe('#subAccountApiToggleIpRestriction', () => { it.each( - [['', subAccountApiKey, ipRestrict], - [email, '', ipRestrict], + [['', subAccountApiKey, status], + [email, '', status], [email, subAccountApiKey, ''] ] - )('should throw MissingParameterError when missing parameters', (pEmail, pSubAccountApiKey, pIpRestrict) => { + )('should throw MissingParameterError when missing parameters', (pEmail, pSubAccountApiKey, pStatus) => { expect(() => { - SpotClient.subAccountApiToggleIpRestriction(pEmail, pSubAccountApiKey, pIpRestrict) + SpotClient.subAccountApiToggleIpRestriction(pEmail, pSubAccountApiKey, pStatus) }).toThrow(MissingParameterError) }) @@ -22,12 +22,12 @@ describe('#subAccountApiToggleIpRestriction', () => { const parameters = { email, subAccountApiKey, - ipRestrict, + status, recvWindow } - nockPostMock(`/sapi/v1/sub-account/subAccountApi/ipRestriction?${buildQueryString(parameters)}`)(mockResponse) + nockPostMock(`/sapi/v2/sub-account/subAccountApi/ipRestriction?${buildQueryString(parameters)}`)(mockResponse) - return SpotClient.subAccountApiToggleIpRestriction(email, subAccountApiKey, ipRestrict, { recvWindow }).then(response => { + return SpotClient.subAccountApiToggleIpRestriction(email, subAccountApiKey, status, { recvWindow }).then(response => { expect(response).toBeDefined() expect(response.data).toEqual(mockResponse) }) diff --git a/docs_src/gettingStarted.md b/docs_src/gettingStarted.md index a8f45108..0bcda642 100644 --- a/docs_src/gettingStarted.md +++ b/docs_src/gettingStarted.md @@ -163,7 +163,7 @@ setTimeout(() => client.unsubscribe(wsRef), 3000) ``` ### Subscribe a User Data Stream -User data streams provide the account, balance, and order updates related to a user. In order to collect such data, a listen key is required. There are 3 different kind of listen keys provided: spot, cross margin, and isolated margin. Each key refers to one specific data stream. Besides, once a listen key is generated by a POST request, e.g. `POST /api/v3/userDataStream` for spot user data stream, the key is valid for 60 minutes. Do send a PUT request regularly to extend the key validity for another 60 minutes so as to keep utilizing the same connection. For more information, please refer to `Stream` module of the connector document or [User Data Streams](https://binance-docs.github.io/apidocs/spot/en/#user-data-streams) section of official API document. +User data streams provide the account, balance, and order updates related to a user. In order to collect such data, a listen key is required. There are 3 different kind of listen keys provided: spot, cross margin, and isolated margin. Each key refers to one specific data stream. Besides, once a listen key is generated by a POST request, e.g. `POST /api/v3/userDataStream` for spot user data stream, the key is valid for 60 minutes. Do send a PUT request regularly to extend the key validity for another 60 minutes so as to keep utilizing the same connection. For more information, please refer to `Stream` module of the connector document or [User Data Streams](https://developers.binance.com/docs/binance-spot-api-docs/user-data-stream) section of official API document. ### Auto Reconnect diff --git a/docs_src/intro.md b/docs_src/intro.md index d5136bad..ef44ff46 100644 --- a/docs_src/intro.md +++ b/docs_src/intro.md @@ -12,7 +12,7 @@ This is a lightweight library that works as a connector to [Binance public API]( * Source Code: [https://github.com/binance/binance-connector-node](https://github.com/binance/binance-connector-node) * Official API document: * [https://github.com/binance/binance-spot-api-docs](https://github.com/binance/binance-spot-api-docs) - * [https://binance-docs.github.io/apidocs/spot/en](https://binance-docs.github.io/apidocs/spot/en) + * [https://developers.binance.com/docs/binance-spot-api-docs](https://developers.binance.com/docs/binance-spot-api-docs) * Support channels: * Binance developer forum: [https://dev.binance.vision/](https://dev.binance.vision/) * Telegram Channel: [https://t.me/binance_api_english](https://t.me/binance_api_english) diff --git a/examples/spot/blvt/blvtInfo.js b/examples/spot/blvt/blvtInfo.js deleted file mode 100644 index cfb96c94..00000000 --- a/examples/spot/blvt/blvtInfo.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const client = new Spot(apiKey) - -client.blvtInfo({ tokenName: 'BTCDOWN' }) - .then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/blvt/blvtRedemptionRecord.js b/examples/spot/blvt/blvtRedemptionRecord.js deleted file mode 100644 index 006eef9b..00000000 --- a/examples/spot/blvt/blvtRedemptionRecord.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.blvtRedemptionRecord() - .then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/blvt/blvtSubscriptionRecord.js b/examples/spot/blvt/blvtSubscriptionRecord.js deleted file mode 100644 index 0950c778..00000000 --- a/examples/spot/blvt/blvtSubscriptionRecord.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.blvtSubscriptionRecord() - .then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/blvt/redeemBlvt.js b/examples/spot/blvt/redeemBlvt.js deleted file mode 100644 index 632a2c0c..00000000 --- a/examples/spot/blvt/redeemBlvt.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.redeemBlvt('BTCUP', 1) - .then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/blvt/subscribeBlvt.js b/examples/spot/blvt/subscribeBlvt.js deleted file mode 100644 index b2e99c12..00000000 --- a/examples/spot/blvt/subscribeBlvt.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.subscribeBlvt('BTCUP', 1) - .then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/futures/futuresTransfer.js b/examples/spot/futures/futuresTransfer.js deleted file mode 100644 index d063e3a8..00000000 --- a/examples/spot/futures/futuresTransfer.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.futuresTransfer('BNB', 1, 1) - .then(response => console.log(response.data)) - .catch(error => console.log(error)) diff --git a/examples/spot/futures/futuresTransferHistory.js b/examples/spot/futures/futuresTransferHistory.js deleted file mode 100644 index 3472678b..00000000 --- a/examples/spot/futures/futuresTransferHistory.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.futuresTransferHistory('BNB', 1622466784000) - .then(response => console.log(response.data)) - .catch(error => console.log(error)) diff --git a/examples/spot/margin/isolatedMarginSymbol.js b/examples/spot/margin/isolatedMarginSymbol.js deleted file mode 100644 index 6e95f340..00000000 --- a/examples/spot/margin/isolatedMarginSymbol.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' - -const client = new Spot(apiKey, apiSecret) - -client.isolatedMarginSymbol('BNBUSDT').then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/margin/isolatedMarginTransfer.js b/examples/spot/margin/isolatedMarginTransfer.js deleted file mode 100644 index 1a9f43d9..00000000 --- a/examples/spot/margin/isolatedMarginTransfer.js +++ /dev/null @@ -1,17 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' - -const client = new Spot(apiKey, apiSecret) - -client.isolatedMarginTransfer( - 'BNB', - 'BNBUSDT', - 'SPOT', - 'ISOLATED_MARGIN', - 1 -).then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/margin/isolatedMarginTransferHistory.js b/examples/spot/margin/isolatedMarginTransferHistory.js deleted file mode 100644 index 0bd845bf..00000000 --- a/examples/spot/margin/isolatedMarginTransferHistory.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' - -const client = new Spot(apiKey, apiSecret) - -client.isolatedMarginTransferHistory('BNBUSDT').then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/margin/marginAsset.js b/examples/spot/margin/marginAsset.js deleted file mode 100644 index 820f6778..00000000 --- a/examples/spot/margin/marginAsset.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const client = new Spot(apiKey) - -client.marginAsset( - 'BNB' // asset -).then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/margin/marginBorrow.js b/examples/spot/margin/marginBorrow.js deleted file mode 100644 index afda566a..00000000 --- a/examples/spot/margin/marginBorrow.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.marginBorrow( - 'BNB', // asset - 0.1 // amount -).then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/margin/marginDustLog.js b/examples/spot/margin/marginDustLog.js deleted file mode 100644 index d76e8186..00000000 --- a/examples/spot/margin/marginDustLog.js +++ /dev/null @@ -1,10 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.marginTransfer().then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/margin/marginLoanRecord.js b/examples/spot/margin/marginLoanRecord.js deleted file mode 100644 index 6f5e0cac..00000000 --- a/examples/spot/margin/marginLoanRecord.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.marginLoanRecord( - 'BNB', - { - txId: '' - } -).then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/margin/marginPair.js b/examples/spot/margin/marginPair.js deleted file mode 100644 index 00cf0bdf..00000000 --- a/examples/spot/margin/marginPair.js +++ /dev/null @@ -1,11 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const client = new Spot(apiKey) - -client.marginPair( - 'BNBUSDT' -).then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/margin/marginRepay.js b/examples/spot/margin/marginRepay.js deleted file mode 100644 index 3a136f0b..00000000 --- a/examples/spot/margin/marginRepay.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.marginRepay( - 'BNB', // asset - 0.1 // amount -).then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/margin/marginRepayRecord.js b/examples/spot/margin/marginRepayRecord.js deleted file mode 100644 index 8edbe648..00000000 --- a/examples/spot/margin/marginRepayRecord.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.marginRepayRecord( - 'BNB', - { - txId: '' - } -).then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/margin/marginTransfer.js b/examples/spot/margin/marginTransfer.js deleted file mode 100644 index 4b4b4ab7..00000000 --- a/examples/spot/margin/marginTransfer.js +++ /dev/null @@ -1,14 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' -const client = new Spot(apiKey, apiSecret) - -client.marginTransfer( - 'BNB', // asset - 0.1, // amount - 1 // type 1: transfer from main account to margin account 2: transfer from margin account to main account -).then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/sub_account/subAccountApiAddIp.js b/examples/spot/sub_account/subAccountApiAddIp.js deleted file mode 100644 index 4e687171..00000000 --- a/examples/spot/sub_account/subAccountApiAddIp.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict' - -const Spot = require('../../../src/spot') - -const apiKey = '' -const apiSecret = '' - -const client = new Spot(apiKey, apiSecret) - -client.subAccountApiAddIp( - 'alice@test.com', - 'subAccountApiKey', - '1.2.3.4' -).then(response => client.logger.log(response.data)) - .catch(error => client.logger.error(error)) diff --git a/examples/spot/sub_account/subAccountApiToggleIpRestriction.js b/examples/spot/sub_account/subAccountApiToggleIpRestriction.js index 149a6cb3..1a6a9fec 100644 --- a/examples/spot/sub_account/subAccountApiToggleIpRestriction.js +++ b/examples/spot/sub_account/subAccountApiToggleIpRestriction.js @@ -10,6 +10,6 @@ const client = new Spot(apiKey, apiSecret) client.subAccountApiToggleIpRestriction( 'alice@test.com', 'subAccountApiKey', - true + '1' ).then(response => client.logger.log(response.data)) .catch(error => client.logger.error(error)) diff --git a/package-lock.json b/package-lock.json index 5e676618..3ee21f0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -53,30 +53,30 @@ } }, "node_modules/@babel/compat-data": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.24.7.tgz", - "integrity": "sha512-qJzAIcv03PyaWqxRgO4mSU3lihncDT296vnyuE2O8uA4w3UHWI4S3hgeZd1L8W1Bft40w9JxJ2b412iDUFFRhw==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.25.4.tgz", + "integrity": "sha512-+LGRog6RAsCJrrrg/IO6LGmpphNe5DiK30dGjCoxxeGv49B10/3XYGxPsAwrDlMFcFEvdAUavDT8r9k/hSyQqQ==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/core": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.24.7.tgz", - "integrity": "sha512-nykK+LEK86ahTkX/3TgauT0ikKoNCfKHEaZYTUVupJdTLzGNvrblu4u6fa7DhZONAltdf8e662t/abY8idrd/g==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.25.2.tgz", + "integrity": "sha512-BBt3opiCOxUr9euZ5/ro/Xv8/V7yJ5bjYMqG/C1YAo8MIKAnumZalCN+msbci3Pigy4lIQfPUpfMM27HMGaYEA==", "dev": true, "dependencies": { "@ampproject/remapping": "^2.2.0", "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-compilation-targets": "^7.24.7", - "@babel/helper-module-transforms": "^7.24.7", - "@babel/helpers": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/template": "^7.24.7", - "@babel/traverse": "^7.24.7", - "@babel/types": "^7.24.7", + "@babel/generator": "^7.25.0", + "@babel/helper-compilation-targets": "^7.25.2", + "@babel/helper-module-transforms": "^7.25.2", + "@babel/helpers": "^7.25.0", + "@babel/parser": "^7.25.0", + "@babel/template": "^7.25.0", + "@babel/traverse": "^7.25.2", + "@babel/types": "^7.25.2", "convert-source-map": "^2.0.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -92,12 +92,12 @@ } }, "node_modules/@babel/generator": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.24.7.tgz", - "integrity": "sha512-oipXieGC3i45Y1A41t4tAqpnEZWgB/lC6Ehh6+rOviR5XWpTtMmLN+fGjz9vOiNRt0p6RtO6DtD0pdU3vpqdSA==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.25.6.tgz", + "integrity": "sha512-VPC82gr1seXOpkjAAKoLhP50vx4vGNlF4msF64dSFq1P8RfB+QAuJWGHPXXPc8QyfVWwwB/TNNU4+ayZmHNbZw==", "dev": true, "dependencies": { - "@babel/types": "^7.24.7", + "@babel/types": "^7.25.6", "@jridgewell/gen-mapping": "^0.3.5", "@jridgewell/trace-mapping": "^0.3.25", "jsesc": "^2.5.1" @@ -107,14 +107,14 @@ } }, "node_modules/@babel/helper-compilation-targets": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.24.7.tgz", - "integrity": "sha512-ctSdRHBi20qWOfy27RUb4Fhp07KSJ3sXcuSvTrXrc4aG8NSYDo1ici3Vhg9bg69y5bj0Mr1lh0aeEgTvc12rMg==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.25.2.tgz", + "integrity": "sha512-U2U5LsSaZ7TAt3cfaymQ8WHh0pxvdHoEk6HVpaexxixjyEquMh0L0YNJNM6CTGKMXV1iksi0iZkGw4AcFkPaaw==", "dev": true, "dependencies": { - "@babel/compat-data": "^7.24.7", - "@babel/helper-validator-option": "^7.24.7", - "browserslist": "^4.22.2", + "@babel/compat-data": "^7.25.2", + "@babel/helper-validator-option": "^7.24.8", + "browserslist": "^4.23.1", "lru-cache": "^5.1.1", "semver": "^6.3.1" }, @@ -122,43 +122,6 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-environment-visitor": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.24.7.tgz", - "integrity": "sha512-DoiN84+4Gnd0ncbBOM9AZENV4a5ZiL39HYMyZJGZ/AZEykHYdJw0wW3kdcsh9/Kn+BRXHLkkklZ51ecPKmI1CQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.24.7.tgz", - "integrity": "sha512-FyoJTsj/PEUWu1/TYRiXTIHc8lbw+TDYkZuoE43opPS5TrI7MyONBE1oNvfguEXAD9yhQRrVBnXdXzSLQl9XnA==", - "dev": true, - "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.24.7.tgz", - "integrity": "sha512-MJJwhkoGy5c4ehfoRyrJ/owKeMl19U54h27YYftT0o2teQ3FJ3nQUf/I3LlJsX4l3qlw7WRXUmiyajvHXoTubQ==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-module-imports": { "version": "7.24.7", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.24.7.tgz", @@ -173,16 +136,15 @@ } }, "node_modules/@babel/helper-module-transforms": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.24.7.tgz", - "integrity": "sha512-1fuJEwIrp+97rM4RWdO+qrRsZlAeL1lQJoPqtCYWv0NL115XM93hIH4CSRln2w52SqvmY5hqdtauB6QFCDiZNQ==", + "version": "7.25.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.25.2.tgz", + "integrity": "sha512-BjyRAbix6j/wv83ftcVJmBt72QtHI56C7JXZoG2xATiLpmoC7dpd8WnkikExHDVPpi/3qCmO6WY1EaXOluiecQ==", "dev": true, "dependencies": { - "@babel/helper-environment-visitor": "^7.24.7", "@babel/helper-module-imports": "^7.24.7", "@babel/helper-simple-access": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/helper-validator-identifier": "^7.24.7" + "@babel/helper-validator-identifier": "^7.24.7", + "@babel/traverse": "^7.25.2" }, "engines": { "node": ">=6.9.0" @@ -192,9 +154,9 @@ } }, "node_modules/@babel/helper-plugin-utils": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.7.tgz", - "integrity": "sha512-Rq76wjt7yz9AAc1KnlRKNAi/dMSVWgDRx43FHoJEbcYU6xOWaE2dVPwcdTukJrjxS65GITyfbvEYHvkirZ6uEg==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.24.8.tgz", + "integrity": "sha512-FFWx5142D8h2Mgr/iPVGH5G7w6jDn4jUSpZTyDnQO0Yn7Ks2Kuz6Pci8H6MPCoUJegd/UZQ3tAvfLCxQSnWWwg==", "dev": true, "engines": { "node": ">=6.9.0" @@ -213,22 +175,10 @@ "node": ">=6.9.0" } }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.24.7.tgz", - "integrity": "sha512-oy5V7pD+UvfkEATUKvIjvIAH/xCzfsFVw7ygW2SI6NClZzquT+mwdTfgfdbUiceh6iQO0CHtCPsyze/MZ2YbAA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.24.7" - }, - "engines": { - "node": ">=6.9.0" - } - }, "node_modules/@babel/helper-string-parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.7.tgz", - "integrity": "sha512-7MbVt6xrwFQbunH2DNQsAP5sTGxfqQtErvBIvIMi6EQnbgUOuVYanvREcmFrOPhoXBrTtjhhP+lW+o5UfK+tDg==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.24.8.tgz", + "integrity": "sha512-pO9KhhRcuUyGnJWwyEgnRJTSIZHiT+vMD0kPeD+so0l7mxkMT19g3pjY9GTnHySck/hDzq+dtW/4VgnMkippsQ==", "dev": true, "engines": { "node": ">=6.9.0" @@ -244,22 +194,22 @@ } }, "node_modules/@babel/helper-validator-option": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.7.tgz", - "integrity": "sha512-yy1/KvjhV/ZCL+SM7hBrvnZJ3ZuT9OuZgIJAGpPEToANvc3iM6iDvBnRjtElWibHU6n8/LPR/EjX9EtIEYO3pw==", + "version": "7.24.8", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.24.8.tgz", + "integrity": "sha512-xb8t9tD1MHLungh/AIoWYN+gVHaB9kwlu8gffXGSt3FFEIT7RjS+xWbc2vUD1UTZdIpKj/ab3rdqJ7ufngyi2Q==", "dev": true, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/helpers": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.24.7.tgz", - "integrity": "sha512-NlmJJtvcw72yRJRcnCmGvSi+3jDEg8qFu3z0AFoymmzLx5ERVWyzd9kVXr7Th9/8yIJi2Zc6av4Tqz3wFs8QWg==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.25.6.tgz", + "integrity": "sha512-Xg0tn4HcfTijTwfDwYlvVCl43V6h4KyVVX2aEm4qdO/PC6L2YvzLHFdmxhoeSA3eslcE6+ZVXHgWwopXYLNq4Q==", "dev": true, "dependencies": { - "@babel/template": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6" }, "engines": { "node": ">=6.9.0" @@ -352,10 +302,13 @@ } }, "node_modules/@babel/parser": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", - "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.25.6.tgz", + "integrity": "sha512-trGdfBdbD0l1ZPmcJ83eNxB9rbEax4ALFTF7fN386TMYbeCQbyme5cOEXQhbGXKebwGaB/J52w1mrklMcbgy6Q==", "dev": true, + "dependencies": { + "@babel/types": "^7.25.6" + }, "bin": { "parser": "bin/babel-parser.js" }, @@ -399,6 +352,36 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-class-static-block": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", + "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-syntax-import-attributes": { + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.25.6.tgz", + "integrity": "sha512-sXaDXaJN9SNLymBdlWFA+bjzBhFD617ZaFiY13dGt7TVslVvVgA6fkZOP7Ki3IGElC45lwHdOTrCtKZGVAWeLQ==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.24.8" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-import-meta": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz", @@ -510,6 +493,21 @@ "@babel/core": "^7.0.0-0" } }, + "node_modules/@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.5", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", + "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", + "dev": true, + "dependencies": { + "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", @@ -526,12 +524,12 @@ } }, "node_modules/@babel/plugin-syntax-typescript": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.24.7.tgz", - "integrity": "sha512-c/+fVeJBB0FeKsFvwytYiUD+LBvhHjGSI0g446PRGdSVGZLRNArBUno2PETbAly3tpiNAQR5XaZ+JslxkotsbA==", + "version": "7.25.4", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.25.4.tgz", + "integrity": "sha512-uMOCoHVU52BsSWxPOMVv5qKRdeSlPuImUCB2dlPuBSU+W2/ROE7/Zg8F2Kepbk+8yBa68LlRKxO+xgEVWorsDg==", "dev": true, "dependencies": { - "@babel/helper-plugin-utils": "^7.24.7" + "@babel/helper-plugin-utils": "^7.24.8" }, "engines": { "node": ">=6.9.0" @@ -541,33 +539,30 @@ } }, "node_modules/@babel/template": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.24.7.tgz", - "integrity": "sha512-jYqfPrU9JTF0PmPy1tLYHW4Mp4KlgxJD9l2nP9fD6yT/ICi554DmrWBAEYpIelzjHf1msDP3PxJIRt/nFNfBig==", + "version": "7.25.0", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.25.0.tgz", + "integrity": "sha512-aOOgh1/5XzKvg1jvVz7AVrx2piJ2XBi227DHmbY6y+bM9H2FlN+IfecYu4Xl0cNiiVejlsCri89LUsbj8vJD9Q==", "dev": true, "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7" + "@babel/parser": "^7.25.0", + "@babel/types": "^7.25.0" }, "engines": { "node": ">=6.9.0" } }, "node_modules/@babel/traverse": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.24.7.tgz", - "integrity": "sha512-yb65Ed5S/QAcewNPh0nZczy9JdYXkkAbIsEo+P7BE7yO3txAY30Y/oPa3QkQ5It3xVG2kpKMg9MsdxZaO31uKA==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.25.6.tgz", + "integrity": "sha512-9Vrcx5ZW6UwK5tvqsj0nGpp/XzqthkT0dqIc9g1AdtygFToNtTF67XzYS//dm+SAK9cp3B9R4ZO/46p63SCjlQ==", "dev": true, "dependencies": { "@babel/code-frame": "^7.24.7", - "@babel/generator": "^7.24.7", - "@babel/helper-environment-visitor": "^7.24.7", - "@babel/helper-function-name": "^7.24.7", - "@babel/helper-hoist-variables": "^7.24.7", - "@babel/helper-split-export-declaration": "^7.24.7", - "@babel/parser": "^7.24.7", - "@babel/types": "^7.24.7", + "@babel/generator": "^7.25.6", + "@babel/parser": "^7.25.6", + "@babel/template": "^7.25.0", + "@babel/types": "^7.25.6", "debug": "^4.3.1", "globals": "^11.1.0" }, @@ -576,12 +571,12 @@ } }, "node_modules/@babel/types": { - "version": "7.24.7", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.24.7.tgz", - "integrity": "sha512-XEFXSlxiG5td2EJRe8vOmRbaXVgfcBlszKujvVmWIK/UpywWljQCfzAv3RQCGujWQ1RD4YYWEAqDXfuJiy8f5Q==", + "version": "7.25.6", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.25.6.tgz", + "integrity": "sha512-/l42B1qxpG6RdfYf343Uw1vmDjeNhneUXtzhojE7pDgfpEypmRhI6j1kr17XCVv4Cgl9HdAiQY2x0GwKm7rWCw==", "dev": true, "dependencies": { - "@babel/helper-string-parser": "^7.24.7", + "@babel/helper-string-parser": "^7.24.8", "@babel/helper-validator-identifier": "^7.24.7", "to-fast-properties": "^2.0.0" }, @@ -611,9 +606,9 @@ } }, "node_modules/@eslint-community/regexpp": { - "version": "4.10.1", - "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.1.tgz", - "integrity": "sha512-Zm2NGpWELsQAD1xsJzGQpYfvICSsFkEpU0jxBjfdC6uNEWXcHnfs9hScFWtXVDVl+rBQJGrl4g1vcKIejpH9dA==", + "version": "4.11.1", + "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.11.1.tgz", + "integrity": "sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==", "dev": true, "engines": { "node": "^12.0.0 || ^14.0.0 || >=16.0.0" @@ -688,22 +683,22 @@ } }, "node_modules/@eslint/js": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.0.tgz", - "integrity": "sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.57.1.tgz", + "integrity": "sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" } }, "node_modules/@humanwhocodes/config-array": { - "version": "0.11.14", - "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz", - "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==", + "version": "0.13.0", + "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.13.0.tgz", + "integrity": "sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==", "deprecated": "Use @eslint/config-array instead", "dev": true, "dependencies": { - "@humanwhocodes/object-schema": "^2.0.2", + "@humanwhocodes/object-schema": "^2.0.3", "debug": "^4.3.1", "minimatch": "^3.0.5" }, @@ -1077,9 +1072,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.15", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", - "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.0.tgz", + "integrity": "sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { @@ -1139,6 +1134,12 @@ "node": ">= 8" } }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true + }, "node_modules/@sinclair/typebox": { "version": "0.27.8", "resolved": "https://registry.npmjs.org/@sinclair/typebox/-/typebox-0.27.8.tgz", @@ -1250,9 +1251,9 @@ "dev": true }, "node_modules/@types/markdown-it": { - "version": "14.1.1", - "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.1.tgz", - "integrity": "sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg==", + "version": "14.1.2", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.2.tgz", + "integrity": "sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==", "dev": true, "dependencies": { "@types/linkify-it": "^5", @@ -1266,12 +1267,12 @@ "dev": true }, "node_modules/@types/node": { - "version": "20.14.2", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.14.2.tgz", - "integrity": "sha512-xyu6WAMVwv6AKFLB+e/7ySZVr/0zLCzOa7rSpq6jNwpqOrUbcACDWC+53d4n2QHOnDou0fbIsg8wZu/sxrnI4Q==", + "version": "22.7.4", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.7.4.tgz", + "integrity": "sha512-y+NPi1rFzDs1NdQHHToqeiX2TIS79SWEAw9GYhkkx8bD0ChpfqC+n2j5OXOCpzfojBEBt6DnEnnG9MY0zk1XLg==", "dev": true, "dependencies": { - "undici-types": "~5.26.4" + "undici-types": "~6.19.2" } }, "node_modules/@types/stack-utils": { @@ -1281,9 +1282,9 @@ "dev": true }, "node_modules/@types/yargs": { - "version": "17.0.32", - "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz", - "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==", + "version": "17.0.33", + "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.33.tgz", + "integrity": "sha512-WpxBCKWPLr4xSsHgz511rFJAM+wS28w2zEO1QDNY5zM/S8ok70NNfztH0xwhqKyaK0OHCbN98LDAZuy1ctxDkA==", "dev": true, "dependencies": { "@types/yargs-parser": "*" @@ -1302,9 +1303,9 @@ "dev": true }, "node_modules/acorn": { - "version": "8.12.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.0.tgz", - "integrity": "sha512-RTvkC4w+KNXrM39/lWCUaG0IbRkWdCv7W/IOW9oU6SawyxulvkQy5HQPVTKxEjczcUvapcrw3cFx/60VN/NRNw==", + "version": "8.12.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.12.1.tgz", + "integrity": "sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==", "dev": true, "bin": { "acorn": "bin/acorn" @@ -1511,18 +1512,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/array.prototype.toreversed": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/array.prototype.toreversed/-/array.prototype.toreversed-1.1.2.tgz", - "integrity": "sha512-wwDCoT4Ck4Cz7sLtgUmzR5UV3YF5mFHUlbChCzZBQZ+0m2cl/DH3tKgvphv1nKgFsJ48oCSg6p91q2Vm0I/ZMA==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.2", - "define-properties": "^1.2.0", - "es-abstract": "^1.22.1", - "es-shim-unscopables": "^1.0.0" - } - }, "node_modules/array.prototype.tosorted": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/array.prototype.tosorted/-/array.prototype.tosorted-1.1.4.tgz", @@ -1582,9 +1571,9 @@ } }, "node_modules/axios": { - "version": "1.7.4", - "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.4.tgz", - "integrity": "sha512-DukmaFRnY6AzAALSH4J2M3k6PkaC+MfaAGdEERRWcC9q3/TWQwLpHR8ZRLKTdQ3aBDL64EdluRDjJqKw+BPZEw==", + "version": "1.7.7", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.7.tgz", + "integrity": "sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==", "dependencies": { "follow-redirects": "^1.15.6", "form-data": "^4.0.0", @@ -1660,23 +1649,26 @@ } }, "node_modules/babel-preset-current-node-syntax": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.0.1.tgz", - "integrity": "sha512-M7LQ0bxarkxQoN+vz5aJPsLBn77n8QgTFmo8WK0/44auK2xlCXrYcUxHFxgU7qW5Yzw/CjmLRK2uJzaCd7LvqQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/babel-preset-current-node-syntax/-/babel-preset-current-node-syntax-1.1.0.tgz", + "integrity": "sha512-ldYss8SbBlWva1bs28q78Ju5Zq1F+8BrqBZZ0VFhLBvhh6lCpC2o3gDJi/5DRLs9FgYZCnmPYIVFU4lRXCkyUw==", "dev": true, "dependencies": { "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-bigint": "^7.8.3", - "@babel/plugin-syntax-class-properties": "^7.8.3", - "@babel/plugin-syntax-import-meta": "^7.8.3", + "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.14.5", + "@babel/plugin-syntax-import-attributes": "^7.24.7", + "@babel/plugin-syntax-import-meta": "^7.10.4", "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.8.3", + "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.8.3", + "@babel/plugin-syntax-numeric-separator": "^7.10.4", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-top-level-await": "^7.8.3" + "@babel/plugin-syntax-private-property-in-object": "^7.14.5", + "@babel/plugin-syntax-top-level-await": "^7.14.5" }, "peerDependencies": { "@babel/core": "^7.0.0" @@ -1733,9 +1725,9 @@ } }, "node_modules/browserslist": { - "version": "4.23.1", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.23.1.tgz", - "integrity": "sha512-TUfofFo/KsK/bWZ9TWQ5O26tsWW4Uhmt8IYklbnUa70udB6P2wA7w7o4PY4muaEPBQaAX+CEnmmIA41NVHtPVw==", + "version": "4.24.0", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.24.0.tgz", + "integrity": "sha512-Rmb62sR1Zpjql25eSanFGEhAxcFwfA1K0GuQcLoaJBAcENegrQut3hYdhXFF1obQfiDyqIW/cLM5HSJ/9k884A==", "dev": true, "funding": [ { @@ -1752,10 +1744,10 @@ } ], "dependencies": { - "caniuse-lite": "^1.0.30001629", - "electron-to-chromium": "^1.4.796", - "node-releases": "^2.0.14", - "update-browserslist-db": "^1.0.16" + "caniuse-lite": "^1.0.30001663", + "electron-to-chromium": "^1.5.28", + "node-releases": "^2.0.18", + "update-browserslist-db": "^1.1.0" }, "bin": { "browserslist": "cli.js" @@ -1789,9 +1781,9 @@ } }, "node_modules/builtins/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -1848,9 +1840,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001636", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001636.tgz", - "integrity": "sha512-bMg2vmr8XBsbL6Lr0UHXy/21m84FTxDLWn2FSqMd5PrlbMxwJlQnC2YWYxVgp66PZE+BBNF2jYQUBKCo1FDeZg==", + "version": "1.0.30001664", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001664.tgz", + "integrity": "sha512-AmE7k4dXiNKQipgn7a2xg558IRqPN3jMQY/rOsbxDhrd0tyChwbITBfiwtnqz8bi2M5mIWbxAYBvk7W7QBUS2g==", "dev": true, "funding": [ { @@ -1920,9 +1912,9 @@ } }, "node_modules/cjs-module-lexer": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.3.1.tgz", - "integrity": "sha512-a3KdPAANPbNE4ZUv9h6LckSl9zLsYOP4MBmhIPkRaeyybt+r4UghLvq+xw/YwUcC1gqylCkL4rdVs3Lwupjm4Q==", + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.1.tgz", + "integrity": "sha512-cuSVIHi9/9E/+821Qjdvngor+xpnlwnuwIyZOaLmHBVdXL+gP+I6QQB9VkO7RI77YIcTV+S1W9AreJ5eN63JBA==", "dev": true }, "node_modules/clean-css": { @@ -2121,12 +2113,12 @@ } }, "node_modules/debug": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.5.tgz", - "integrity": "sha512-pt0bNEmneDIvdL1Xsd9oDQ/wrQRkXDT4AUWlNZNPKvW5x/jyO9VFXkJUP07vQ2upmw5PlaITaPKc31jK13V+jg==", + "version": "4.3.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.7.tgz", + "integrity": "sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==", "dev": true, "dependencies": { - "ms": "2.1.2" + "ms": "^2.1.3" }, "engines": { "node": ">=6.0" @@ -2249,9 +2241,9 @@ } }, "node_modules/electron-to-chromium": { - "version": "1.4.803", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.803.tgz", - "integrity": "sha512-61H9mLzGOCLLVsnLiRzCbc63uldP0AniRYPV3hbGVtONA1pI7qSGILdbofR7A8TMbOypDocEAjH/e+9k1QIe3g==", + "version": "1.5.29", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.29.tgz", + "integrity": "sha512-PF8n2AlIhCKXQ+gTpiJi0VhcHDb69kYX4MtCiivctc2QD3XuNZ/XIOlbGzt7WAjjEev0TtaH6Cu3arZExm5DOw==", "dev": true }, "node_modules/emittery": { @@ -2452,9 +2444,9 @@ } }, "node_modules/escalade": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", - "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", "dev": true, "engines": { "node": ">=6" @@ -2470,16 +2462,16 @@ } }, "node_modules/eslint": { - "version": "8.57.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.0.tgz", - "integrity": "sha512-dZ6+mexnaTIbSBZWgou51U6OmzIhYM2VcNdtiTtI7qPNZm35Akpr0f6vtw3w1Kmn5PYo+tZVfh13WrhpS6oLqQ==", + "version": "8.57.1", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.57.1.tgz", + "integrity": "sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==", "dev": true, "dependencies": { "@eslint-community/eslint-utils": "^4.2.0", "@eslint-community/regexpp": "^4.6.1", "@eslint/eslintrc": "^2.1.4", - "@eslint/js": "8.57.0", - "@humanwhocodes/config-array": "^0.11.14", + "@eslint/js": "8.57.1", + "@humanwhocodes/config-array": "^0.13.0", "@humanwhocodes/module-importer": "^1.0.1", "@nodelib/fs.walk": "^1.2.8", "@ungap/structured-clone": "^1.2.0", @@ -2598,9 +2590,9 @@ } }, "node_modules/eslint-module-utils": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.1.tgz", - "integrity": "sha512-rXDXR3h7cs7dy9RNpUlQf80nX31XWJEyGq1tRMo+6GsO5VmTe4UTwtmonAD4ZkAsrfMVDA2wlGJ3790Ys+D49Q==", + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", + "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", "dev": true, "dependencies": { "debug": "^3.2.7" @@ -2667,26 +2659,27 @@ } }, "node_modules/eslint-plugin-import": { - "version": "2.29.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz", - "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==", + "version": "2.30.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.30.0.tgz", + "integrity": "sha512-/mHNE9jINJfiD2EKkg1BKyPyUk4zdnT54YgbOgfjSakWT5oyX/qQLVNTkehyfpcMxZXMy1zyonZ2v7hZTX43Yw==", "dev": true, "dependencies": { - "array-includes": "^3.1.7", - "array.prototype.findlastindex": "^1.2.3", + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", "array.prototype.flat": "^1.3.2", "array.prototype.flatmap": "^1.3.2", "debug": "^3.2.7", "doctrine": "^2.1.0", "eslint-import-resolver-node": "^0.3.9", - "eslint-module-utils": "^2.8.0", - "hasown": "^2.0.0", - "is-core-module": "^2.13.1", + "eslint-module-utils": "^2.9.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", "is-glob": "^4.0.3", "minimatch": "^3.1.2", - "object.fromentries": "^2.0.7", - "object.groupby": "^1.0.1", - "object.values": "^1.1.7", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", "semver": "^6.3.1", "tsconfig-paths": "^3.15.0" }, @@ -2744,9 +2737,9 @@ } }, "node_modules/eslint-plugin-n/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -2756,9 +2749,9 @@ } }, "node_modules/eslint-plugin-promise": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.2.0.tgz", - "integrity": "sha512-QmAqwizauvnKOlifxyDj2ObfULpHQawlg/zQdgEixur9vl0CvZGv/LCJV2rtj3210QCoeGBzVMfMXqGAOr/4fA==", + "version": "6.6.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.6.0.tgz", + "integrity": "sha512-57Zzfw8G6+Gq7axm2Pdo3gW/Rx3h9Yywgn61uE/3elTCOePEHVrn2i5CdfBwA1BLK0Q0WqctICIUSqXZW/VprQ==", "dev": true, "engines": { "node": "^12.22.0 || ^14.17.0 || >=16.0.0" @@ -2771,35 +2764,35 @@ } }, "node_modules/eslint-plugin-react": { - "version": "7.34.3", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.34.3.tgz", - "integrity": "sha512-aoW4MV891jkUulwDApQbPYTVZmeuSyFrudpbTAQuj5Fv8VL+o6df2xIGpw8B0hPjAaih1/Fb0om9grCdyFYemA==", + "version": "7.37.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.37.0.tgz", + "integrity": "sha512-IHBePmfWH5lKhJnJ7WB1V+v/GolbB0rjS8XYVCSQCZKaQCAUhMoVoOEn1Ef8Z8Wf0a7l8KTJvuZg5/e4qrZ6nA==", "dev": true, "dependencies": { "array-includes": "^3.1.8", "array.prototype.findlast": "^1.2.5", "array.prototype.flatmap": "^1.3.2", - "array.prototype.toreversed": "^1.1.2", "array.prototype.tosorted": "^1.1.4", "doctrine": "^2.1.0", "es-iterator-helpers": "^1.0.19", "estraverse": "^5.3.0", + "hasown": "^2.0.2", "jsx-ast-utils": "^2.4.1 || ^3.0.0", "minimatch": "^3.1.2", "object.entries": "^1.1.8", "object.fromentries": "^2.0.8", - "object.hasown": "^1.1.4", "object.values": "^1.2.0", "prop-types": "^15.8.1", "resolve": "^2.0.0-next.5", "semver": "^6.3.1", - "string.prototype.matchall": "^4.0.11" + "string.prototype.matchall": "^4.0.11", + "string.prototype.repeat": "^1.0.0" }, "engines": { "node": ">=4" }, "peerDependencies": { - "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8" + "eslint": "^3 || ^4 || ^5 || ^6 || ^7 || ^8 || ^9.7" } }, "node_modules/eslint-plugin-react/node_modules/doctrine": { @@ -3020,9 +3013,9 @@ } }, "node_modules/esquery": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz", - "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==", + "version": "1.6.0", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.6.0.tgz", + "integrity": "sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==", "dev": true, "dependencies": { "estraverse": "^5.1.0" @@ -3203,9 +3196,9 @@ "dev": true }, "node_modules/follow-redirects": { - "version": "1.15.6", - "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", - "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "version": "1.15.9", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.9.tgz", + "integrity": "sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==", "funding": [ { "type": "individual", @@ -3612,9 +3605,9 @@ } }, "node_modules/ignore": { - "version": "5.3.1", - "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.1.tgz", - "integrity": "sha512-5Fytz/IraMjqpwfd34ke28PTVMjZjJG2MPn5t7OE4eUCUNf8BAa7b5WUS9/Qvr6mwOQS7Mk6vdsMno5he+T8Xw==", + "version": "5.3.2", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", + "integrity": "sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==", "dev": true, "engines": { "node": ">= 4" @@ -3646,9 +3639,9 @@ } }, "node_modules/import-local": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.1.0.tgz", - "integrity": "sha512-ASB07uLtnDs1o6EHjKpX34BKYDSqnFerfTOJL2HvMqF70LnxpjkzDB8J44oT9pu4AMPkQwf8jl6szgvNd2tRIg==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/import-local/-/import-local-3.2.0.tgz", + "integrity": "sha512-2SPlun1JUPWoM6t3F0dw0FkCF/jWY8kttcY4f599GLTSjh2OCuuhdTkJQsEcZzBqbXZGKMK2OqW1oZsjtf/gQA==", "dev": true, "dependencies": { "pkg-dir": "^4.2.0", @@ -3782,12 +3775,15 @@ } }, "node_modules/is-core-module": { - "version": "2.13.1", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz", - "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==", + "version": "2.15.1", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.15.1.tgz", + "integrity": "sha512-z0vtXSwucUJtANQWldhbtbt7BnL0vxiFjIdDLAatwhDYty2bad6s+rijD6Ri4YuYJubLzIJLUidCh09e1djEVQ==", "dev": true, "dependencies": { - "hasown": "^2.0.0" + "hasown": "^2.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -4108,9 +4104,9 @@ } }, "node_modules/istanbul-lib-instrument": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.2.tgz", - "integrity": "sha512-1WUsZ9R1lA0HtBSohTkm39WTPlNKSJ5iFk7UwqXkBLoHQT+hfqPsfsTDVuZdKGaBwn7din9bS7SsnoAr943hvw==", + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/istanbul-lib-instrument/-/istanbul-lib-instrument-6.0.3.tgz", + "integrity": "sha512-Vtgk7L/R2JHyyGW07spoFlB8/lpjiOLTjMdms6AFMraYt3BaJauod/NGrfnVG/y4Ix1JEuMRPDPEj2ua+zz1/Q==", "dev": true, "dependencies": { "@babel/core": "^7.23.9", @@ -4124,9 +4120,9 @@ } }, "node_modules/istanbul-lib-instrument/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -4650,9 +4646,9 @@ } }, "node_modules/jest-snapshot/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -5090,9 +5086,9 @@ } }, "node_modules/make-dir/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", "dev": true, "bin": { "semver": "bin/semver.js" @@ -5168,9 +5164,9 @@ "dev": true }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "dev": true, "dependencies": { "braces": "^3.0.3", @@ -5242,9 +5238,9 @@ } }, "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, "node_modules/natural-compare": { @@ -5264,9 +5260,9 @@ } }, "node_modules/nock": { - "version": "13.5.4", - "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.4.tgz", - "integrity": "sha512-yAyTfdeNJGGBFxWdzSKCBYxs5FxLbCg5X5Q4ets974hcQzG1+qCxvIyOo4j2Ry6MUlhWVMX4OoYDefAIIwupjw==", + "version": "13.5.5", + "resolved": "https://registry.npmjs.org/nock/-/nock-13.5.5.tgz", + "integrity": "sha512-XKYnqUrCwXC8DGG1xX4YH5yNIrlh9c065uaMZZHUoeUUINTOyt+x/G+ezYk0Ft6ExSREVIs+qBJDK503viTfFA==", "dev": true, "dependencies": { "debug": "^4.1.0", @@ -5284,9 +5280,9 @@ "dev": true }, "node_modules/node-releases": { - "version": "2.0.14", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz", - "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==", + "version": "2.0.18", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.18.tgz", + "integrity": "sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==", "dev": true }, "node_modules/normalize-path": { @@ -5320,10 +5316,13 @@ } }, "node_modules/object-inspect": { - "version": "1.13.1", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz", - "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==", + "version": "1.13.2", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", + "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", "dev": true, + "engines": { + "node": ">= 0.4" + }, "funding": { "url": "https://github.com/sponsors/ljharb" } @@ -5401,23 +5400,6 @@ "node": ">= 0.4" } }, - "node_modules/object.hasown": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/object.hasown/-/object.hasown-1.1.4.tgz", - "integrity": "sha512-FZ9LZt9/RHzGySlBARE3VF+gE26TxR38SdmqOqliuTnl9wrKulaQs+4dee1V+Io8VfxqzAfHu6YuRgUy8OHoTg==", - "dev": true, - "dependencies": { - "define-properties": "^1.2.1", - "es-abstract": "^1.23.2", - "es-object-atoms": "^1.0.0" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, "node_modules/object.values": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", @@ -5611,9 +5593,9 @@ "dev": true }, "node_modules/picocolors": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", - "integrity": "sha512-anP1Z8qwhkbmu7MFP5iTt+wQKXgwzf7zTyGlcdzabySa9vd0Xt392U0rVmz9poOaBj0uHJKyyo9/upk0HrEQew==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.0.tgz", + "integrity": "sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==", "dev": true }, "node_modules/picomatch": { @@ -6253,9 +6235,9 @@ } }, "node_modules/standard": { - "version": "17.1.0", - "resolved": "https://registry.npmjs.org/standard/-/standard-17.1.0.tgz", - "integrity": "sha512-jaDqlNSzLtWYW4lvQmU0EnxWMUGQiwHasZl5ZEIwx3S/ijZDjZOzs1y1QqKwKs5vqnFpGtizo4NOYX2s0Voq/g==", + "version": "17.1.2", + "resolved": "https://registry.npmjs.org/standard/-/standard-17.1.2.tgz", + "integrity": "sha512-WLm12WoXveKkvnPnPnaFUUHuOB2cUdAsJ4AiGHL2G0UNMrcRAWY2WriQaV8IQ3oRmYr0AWUbLNr94ekYFAHOrA==", "dev": true, "funding": [ { @@ -6278,8 +6260,8 @@ "eslint-plugin-import": "^2.27.5", "eslint-plugin-n": "^15.7.0", "eslint-plugin-promise": "^6.1.1", - "eslint-plugin-react": "^7.32.2", - "standard-engine": "^15.0.0", + "eslint-plugin-react": "^7.36.1", + "standard-engine": "^15.1.0", "version-guard": "^1.1.1" }, "bin": { @@ -6371,6 +6353,16 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/string.prototype.repeat": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/string.prototype.repeat/-/string.prototype.repeat-1.0.0.tgz", + "integrity": "sha512-0u/TldDbKD8bFCQ/4f5+mNRrXwZ8hg2w7ZR8wa16e8z9XpePWl3eGEcUD0OXpEH/VJH/2G3gjUtR3ZOiBe2S/w==", + "dev": true, + "dependencies": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, "node_modules/string.prototype.trim": { "version": "1.2.9", "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.9.tgz", @@ -6487,9 +6479,9 @@ } }, "node_modules/terser": { - "version": "5.31.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.31.1.tgz", - "integrity": "sha512-37upzU1+viGvuFtBo9NPufCb9dwM0+l9hMxYyWfBA+fbwrPqNJAhbZ6W47bBFnZHKHTUBnMvi87434qq+qnxOg==", + "version": "5.34.1", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.34.1.tgz", + "integrity": "sha512-FsJZ7iZLd/BXkz+4xrRTGJ26o/6VTjQytUk8b8OxkwcD2I+79VPJlz7qss1+zE7h8GNIScFqXcDyJ/KqBYZFVA==", "dev": true, "dependencies": { "@jridgewell/source-map": "^0.3.3", @@ -6601,9 +6593,9 @@ } }, "node_modules/tslib": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz", - "integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==", + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.7.0.tgz", + "integrity": "sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==", "dev": true }, "node_modules/type-check": { @@ -6734,15 +6726,15 @@ } }, "node_modules/underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", + "version": "1.13.7", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.7.tgz", + "integrity": "sha512-GMXzWtsc57XAtguZgaQViUOzs0KTkk8ojr3/xAxXLITqf/3EMwxC0inyETfDFjH/Krbhuep0HNbbjI9i/q3F3g==", "dev": true }, "node_modules/undici-types": { - "version": "5.26.5", - "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", - "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==", + "version": "6.19.8", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", + "integrity": "sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==", "dev": true }, "node_modules/universalify": { @@ -6755,9 +6747,9 @@ } }, "node_modules/update-browserslist-db": { - "version": "1.0.16", - "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.16.tgz", - "integrity": "sha512-KVbTxlBYlckhF5wgfyZXTWnMn7MMZjMu9XG8bPlliUOP9ThaF4QnhP8qrjrH7DRzHfSk0oQv1wToW+iA5GajEQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.1.1.tgz", + "integrity": "sha512-R8UzCaa9Az+38REPiJ1tXlImTJXlVfgHZsglwBD/k6nj76ctsH1E3q4doGrukiLQd3sGQYu56r5+lo5r94l29A==", "dev": true, "funding": [ { @@ -6774,8 +6766,8 @@ } ], "dependencies": { - "escalade": "^3.1.2", - "picocolors": "^1.0.1" + "escalade": "^3.2.0", + "picocolors": "^1.1.0" }, "bin": { "update-browserslist-db": "cli.js" @@ -6794,9 +6786,9 @@ } }, "node_modules/v8-to-istanbul": { - "version": "9.2.0", - "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz", - "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==", + "version": "9.3.0", + "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", + "integrity": "sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==", "dev": true, "dependencies": { "@jridgewell/trace-mapping": "^0.3.12", @@ -6808,9 +6800,9 @@ } }, "node_modules/version-guard": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/version-guard/-/version-guard-1.1.2.tgz", - "integrity": "sha512-D8d+YxCUpoqtCnQzDxm6SF7DLU3gr2535T4khAtMq4osBahsQnmSxuwXFdrbAdDGG8Uokzfis/jvyeFPdmlc7w==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/version-guard/-/version-guard-1.1.3.tgz", + "integrity": "sha512-JwPr6erhX53EWH/HCSzfy1tTFrtPXUe927wdM1jqBBeYp1OM+qPHjWbsvv6pIBduqdgxxS+ScfG7S28pzyr2DQ==", "dev": true, "engines": { "node": ">=0.10.48" @@ -6857,13 +6849,13 @@ } }, "node_modules/which-builtin-type": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.3.tgz", - "integrity": "sha512-YmjsSMDBYsM1CaFiayOVT06+KJeXf0o5M/CAd4o1lTadFAtacTUM49zoYxr/oroopFDfhvN6iEcBxUyc3gvKmw==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.1.4.tgz", + "integrity": "sha512-bppkmBSsHFmIMSl8BO9TbsyzsvGjVoppt8xUiGzwiu/bhDCGxnpOKCxgqj6GuyHE0mINMDecBFPlOm2hzY084w==", "dev": true, "dependencies": { - "function.prototype.name": "^1.1.5", - "has-tostringtag": "^1.0.0", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", "is-async-function": "^2.0.0", "is-date-object": "^1.0.5", "is-finalizationregistry": "^1.0.2", @@ -6872,8 +6864,8 @@ "is-weakref": "^1.0.2", "isarray": "^2.0.5", "which-boxed-primitive": "^1.0.2", - "which-collection": "^1.0.1", - "which-typed-array": "^1.1.9" + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.15" }, "engines": { "node": ">= 0.4" @@ -6965,9 +6957,9 @@ } }, "node_modules/ws": { - "version": "8.17.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.1.tgz", - "integrity": "sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==", + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", "engines": { "node": ">=10.0.0" }, diff --git a/src/modules/restful/autoInvest.js b/src/modules/restful/autoInvest.js index 2039d37c..8439692f 100644 --- a/src/modules/restful/autoInvest.js +++ b/src/modules/restful/autoInvest.js @@ -13,7 +13,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/target-asset/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-target-asset-list-user_data} + * {@link https://developers.binance.com/docs/auto_invest/market-data/Get-target-asset-list} * * @param {object} [options] * @param {string} [options.targetAsset] @@ -34,7 +34,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/target-asset/roi/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-target-asset-roi-data-user_data} + * {@link https://developers.binance.com/docs/auto_invest/market-data/Get-target-asset-ROI-data} * * @param {string} targetAsset * @param {string} hisRoiType @@ -58,7 +58,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/all/asset
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-all-source-asset-and-target-asset-user_data} + * {@link https://developers.binance.com/docs/auto_invest/market-data/Query-all-source-asset-and-target-asset} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -76,7 +76,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/source-asset/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-source-asset-list-user_data} + * {@link https://developers.binance.com/docs/auto_invest/market-data/Query-source-asset-list} * * @param {string} usageType * @param {object} [options] @@ -101,7 +101,7 @@ const AutoInvest = superclass => class extends superclass { * * POST /sapi/v1/lending/auto-invest/plan/edit-status
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#change-plan-status} + * {@link https://developers.binance.com/docs/auto_invest/trade/Change-Plan-Status} * * @param {number} planId * @param {Status} status @@ -125,7 +125,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/plan/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-list-of-plans} + * {@link https://developers.binance.com/docs/auto_invest/market-data/Get-list-of-plans} * * @param {string} planType * @param {object} [options] @@ -147,7 +147,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/plan/id
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-holding-details-of-the-plan} + * {@link https://developers.binance.com/docs/auto_invest/trade/Query-holding-details-of-the-plan} * * @param {object} [options] * @param {number} [options.planId] @@ -167,7 +167,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/history/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-subscription-transaction-history} + * {@link https://developers.binance.com/docs/auto_invest/trade/Query-subscription-transaction-history} * * @param {object} [options] * @param {number} [options.planId] @@ -192,7 +192,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/index/info
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-index-details-user_data} + * {@link https://developers.binance.com/docs/auto_invest/market-data/Query-Index-Details} * * @param {number} indexId * @param {object} [options] @@ -214,7 +214,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/index/user-summary
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-index-linked-plan-position-details-user_data} + * {@link https://developers.binance.com/docs/auto_invest/trade/Query-Index-Linked-Plan-Position-Details} * * @param {number} indexId * @param {object} [options] @@ -236,7 +236,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/one-off/status
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-one-time-transaction-status-user_data} + * {@link https://developers.binance.com/docs/auto_invest/trade/Query-One-Time-Transaction-Status} * * @param {number} transactionId * @param {object} [options] @@ -259,7 +259,7 @@ const AutoInvest = superclass => class extends superclass { * * POST /sapi/v1/lending/auto-invest/redeem
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#index-linked-plan-redemption-trade} + * {@link https://developers.binance.com/docs/auto_invest/trade/Index-Linked-Plan-Redemption} * * @param {number} indexId - PORTFOLIO plan's Id * @param {number} redemptionPercentage - user redeem percentage,10/20/100. @@ -284,7 +284,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/redeem/history
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#index-linked-plan-redemption-user_data} + * {@link https://developers.binance.com/docs/auto_invest/trade/Query-Index-Linked-Plan-Redemption} * * @param {number} requestId * @param {object} [options] @@ -311,7 +311,7 @@ const AutoInvest = superclass => class extends superclass { * * GET /sapi/v1/lending/auto-invest/rebalance/history
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#index-linked-plan-rebalance-details-user_data} + * {@link https://developers.binance.com/docs/auto_invest/trade/Index-Linked-Plan-Rebalance-Details} * * @param {object} [options] * @param {number} [options.startTime] - UTC timestamp in ms diff --git a/src/modules/restful/blvt.js b/src/modules/restful/blvt.js deleted file mode 100644 index 82c2667a..00000000 --- a/src/modules/restful/blvt.js +++ /dev/null @@ -1,127 +0,0 @@ -'use strict' - -const { validateRequiredParameters } = require('../../helpers/validation') - -/** - * API blvt endpoints - * @module Blvt - * @param {*} superclass - */ -const Blvt = superclass => class extends superclass { - /** - * Get BLVT Info (MARKET_DATA)
- * - * GET /sapi/v1/blvt/tokenInfo
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-blvt-info-market_data} - * - * @param {object} [options] - * @param {string} [options.tokenName] - */ - blvtInfo (options = {}) { - return this.publicRequest( - 'GET', - '/sapi/v1/blvt/tokenInfo', - options - ) - } - - /** - * Subscribe BLVT (USER_DATA)
- * - * POST /sapi/v1/blvt/subscribe
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#subscribe-blvt-user_data} - * - * @param {string} tokenName - * @param {number} cost - * @param {object} [options] - * @param {number} [options.recvWindow] - The value cannot be greater than 60000 - */ - subscribeBlvt (tokenName, cost, options = {}) { - validateRequiredParameters({ tokenName, cost }) - return this.signRequest( - 'POST', - '/sapi/v1/blvt/subscribe', - Object.assign(options, { - tokenName, - cost - }) - ) - } - - /** - * Query Subscription Record (USER_DATA)
- * - * GET /sapi/v1/blvt/subscribe/record
- * - * Only the data of the latest 90 days is available
- * {@link https://binance-docs.github.io/apidocs/spot/en/#query-subscription-record-user_data} - * - * @param {object} [options] - * @param {string} [options.tokenName] - * @param {number} [options.id] - * @param {number} [options.startTime] - * @param {number} [options.endTime] - * @param {number} [options.limit] - default 1000, max 1000 - * @param {number} [options.recvWindow] - The value cannot be greater than 60000 - * - */ - blvtSubscriptionRecord (options = {}) { - return this.signRequest( - 'GET', - '/sapi/v1/blvt/subscribe/record', - options - ) - } - - /** - * Subscribe BLVT (USER_DATA)
- * - * POST /sapi/v1/blvt/redeem
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#redeem-blvt-user_data} - * - * @param {string} tokenName - * @param {number} amount - * @param {object} [options] - * @param {number} [options.recvWindow] - The value cannot be greater than 60000 - */ - redeemBlvt (tokenName, amount, options = {}) { - validateRequiredParameters({ tokenName, amount }) - return this.signRequest( - 'POST', - '/sapi/v1/blvt/redeem', - Object.assign(options, { - tokenName, - amount - }) - ) - } - - /** - * Query Redemption Record (USER_DATA)
- * - * GET /sapi/v1/blvt/redeem/record
- * - * Only the data of the latest 90 days is available
- * {@link https://binance-docs.github.io/apidocs/spot/en/#query-redemption-record-user_data} - * - * @param {object} [options] - * @param {string} [options.tokenName] - * @param {number} [options.id] - * @param {number} [options.startTime] - * @param {number} [options.endTime] - * @param {number} [options.limit] - default 1000, max 1000 - * @param {number} [options.recvWindow] - The value cannot be greater than 60000 - */ - blvtRedemptionRecord (options = {}) { - return this.signRequest( - 'GET', - '/sapi/v1/blvt/redeem/record', - options - ) - } -} - -module.exports = Blvt diff --git a/src/modules/restful/c2c.js b/src/modules/restful/c2c.js index a1e2c4e3..45561342 100644 --- a/src/modules/restful/c2c.js +++ b/src/modules/restful/c2c.js @@ -12,7 +12,7 @@ const C2C = superclass => class extends superclass { * * GET /sapi/v1/c2c/orderMatch/listUserOrderHistory
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-c2c-trade-history-user_data} + * {@link https://developers.binance.com/docs/c2c/rest-api/Get-C2C-Trade-History} * * @param {string} tradeType - BUY, SELL * @param {object} [options] diff --git a/src/modules/restful/convert.js b/src/modules/restful/convert.js index 5a9e8194..53dfbbed 100644 --- a/src/modules/restful/convert.js +++ b/src/modules/restful/convert.js @@ -12,7 +12,7 @@ const Convert = superclass => class extends superclass { * * GET /sapi/v1/convert/tradeFlow
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-convert-trade-history-user_data} + * {@link https://developers.binance.com/docs/convert/trade/Get-Convert-Trade-History} * * @param {number} [startTime] * @param {number} [endTime] diff --git a/src/modules/restful/fiat.js b/src/modules/restful/fiat.js index c09a3a79..2d86d989 100644 --- a/src/modules/restful/fiat.js +++ b/src/modules/restful/fiat.js @@ -12,7 +12,7 @@ const Fiat = superclass => class extends superclass { * * GET /sapi/v1/fiat/orders
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-fiat-deposit-withdraw-history-user_data} + * {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Deposit-Withdraw-History} * * @param {number} transactionType - 0: deposit, 1: withdraw * @param {object} [options] @@ -37,7 +37,7 @@ const Fiat = superclass => class extends superclass { * * GET /sapi/v1/fiat/payments
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-fiat-payments-history-user_data} + * {@link https://developers.binance.com/docs/fiat/rest-api/Get-Fiat-Payments-History} * * @param {number} transactionType - 0: buy, 1: sell * @param {object} [options] diff --git a/src/modules/restful/futures.js b/src/modules/restful/futures.js deleted file mode 100644 index 427cf13a..00000000 --- a/src/modules/restful/futures.js +++ /dev/null @@ -1,65 +0,0 @@ -'use strict' - -const { validateRequiredParameters } = require('../../helpers/validation') - -/** - * API futures endpoints - * @module Futures - * @param {*} superclass - */ -const Futures = superclass => class extends superclass { - /** - * New Futures Account Transfer (USER_DATA) - * - * Execute transfer between spot account and futures account. - * - * POST /sapi/v1/futures/transfer - * - * {@link https://binance-docs.github.io/apidocs/spot/en/#new-future-account-transfer-user_data} - * - * @param {string} asset - The asset being transferred, e.g., USDT - * @param {number} amount - The amount to be transferred - * @param {number} type - 1: transfer from spot account to USDT-Ⓜ futures account. - *
2: transfer from USDT-Ⓜ futures account to spot account. - *
3: transfer from spot account to COIN-Ⓜ futures account. - *
4: transfer from COIN-Ⓜ futures account to spot account. - * @param {object} [options] - * @param {number} [options.recvWindow] - */ - futuresTransfer (asset, amount, type, options = {}) { - validateRequiredParameters({ asset, amount, type }) - - return this.signRequest( - 'POST', - '/sapi/v1/futures/transfer', - Object.assign(options, { asset, amount, type }) - ) - } - - /** - * Get Futures Account Transaction History List (USER_DATA) - * - * GET /sapi/v1/futures/transfer - * - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-future-account-transaction-history-list-user_data} - * - * @param {string} asset - * @param {number} startTime - * @param {object} [options] - * @param {number} [options.endTime] - * @param {number} [options.current] - Currently querying page. Start from 1. Default:1 - * @param {number} [options.size] - Default:10 Max:100 - * @param {number} [options.recvWindow] - */ - futuresTransferHistory (asset, startTime, options = {}) { - validateRequiredParameters({ asset, startTime }) - - return this.signRequest( - 'GET', - '/sapi/v1/futures/transfer', - Object.assign(options, { asset, startTime }) - ) - } -} - -module.exports = Futures diff --git a/src/modules/restful/giftCard.js b/src/modules/restful/giftCard.js index 0c06c88a..f7e00d09 100644 --- a/src/modules/restful/giftCard.js +++ b/src/modules/restful/giftCard.js @@ -13,7 +13,7 @@ const GiftCard = superclass => class extends superclass { * * POST /sapi/v1/giftcard/createCode
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#create-a-binance-code-user_data} + * {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-single-token-gift-card} * * @param {string} token - The coin type contained in the Binance Code * @param {number} amount - The amount of the coin @@ -30,36 +30,12 @@ const GiftCard = superclass => class extends superclass { ) } - /** - * Create a dual-token gift card (fixed value, discount feature) (TRADE)
- * - * POST /sapi/v1/giftcard/buyCode
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#create-a-dual-token-gift-card-fixed-value-discount-feature-trade} - * - * @param {baseToken} baseToken - The token you want to pay, example: BUSD - * @param {faceToken} faceToken - The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint. - * @param {baseTokenAmount} amount - The base token asset quantity - * @param {discount} discount - Stablecoin-denominated card discount percentage - * @param {object} [options] - * @param {number} [options.recvWindow] - The value cannot be greater than 60000 - */ - giftCardBuyCode (baseToken, faceToken, baseTokenAmount, discount, options = {}) { - validateRequiredParameters({ baseToken, faceToken, baseTokenAmount }) - - return this.signRequest( - 'POST', - '/sapi/v1/giftcard/buyCode', - Object.assign(options, { baseToken, faceToken, baseTokenAmount, discount }) - ) - } - /** * Redeem a Binance Code (USER_DATA)
* * POST /sapi/v1/giftcard/redeemCode
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#redeem-a-binance-code-user_data} + * {@link https://developers.binance.com/docs/gift_card/market-data/Redeem-a-Binance-Gift-Card} * * @param {string} code - Binance Code * @param {object} [options] @@ -81,7 +57,7 @@ const GiftCard = superclass => class extends superclass { * * GET /sapi/v1/giftcard/verify
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#verify-a-binance-code-user_data} + * {@link https://developers.binance.com/docs/gift_card/market-data/Verify-Binance-Gift-Card-by-Gift-Card-Number} * * @param {string} referenceNo - reference number * @param {object} [options] @@ -102,7 +78,7 @@ const GiftCard = superclass => class extends superclass { * * GET /sapi/v1/giftcard/cryptography/rsa-public-key
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#fetch-rsa-public-key-user_data} + * {@link https://developers.binance.com/docs/gift_card/market-data/Fetch-RSA-Public-Key} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -114,6 +90,30 @@ const GiftCard = superclass => class extends superclass { options ) } + + /** + * Create a dual-token gift card (fixed value, discount feature) (TRADE)
+ * + * POST /sapi/v1/giftcard/buyCode
+ * + * {@link https://developers.binance.com/docs/gift_card/market-data/Create-a-dual-token-gift-card} + * + * @param {string} baseToken - The token you want to pay, example: BUSD + * @param {string} faceToken - The token you want to buy, example: BNB. If faceToken = baseToken, it's the same as createCode endpoint. + * @param {number} baseTokenAmount - The base token asset quantity, example : 1.002 + * @param {object} [options] + * @param {number} [options.discount] - Stablecoin-denominated card discount percentage, Example: 1 for 1% discount. Scale should be less than 6. + * @param {number} [options.recvWindow] - The value cannot be greater than 60000 + */ + giftCardBuyCode (baseToken, faceToken, baseTokenAmount, options = {}) { + validateRequiredParameters({ baseToken, faceToken, baseTokenAmount }) + + return this.signRequest( + 'POST', + '/sapi/v1/giftcard/buyCode', + Object.assign(options, { baseToken, faceToken, baseTokenAmount }) + ) + } } module.exports = GiftCard diff --git a/src/modules/restful/index.js b/src/modules/restful/index.js index 64de4683..249ef24c 100644 --- a/src/modules/restful/index.js +++ b/src/modules/restful/index.js @@ -1,7 +1,6 @@ 'use strict' module.exports.autoInvest = require('./autoInvest') -module.exports.Blvt = require('./blvt') module.exports.SubAccount = require('./subAccount') module.exports.Market = require('./market') module.exports.Trade = require('./trade') @@ -9,7 +8,6 @@ module.exports.Wallet = require('./wallet') module.exports.Margin = require('./margin') module.exports.Mining = require('./mining') module.exports.Stream = require('./stream') -module.exports.Futures = require('./futures') module.exports.Fiat = require('./fiat') module.exports.C2C = require('./c2c') module.exports.Loan = require('./loan') diff --git a/src/modules/restful/loan.js b/src/modules/restful/loan.js index 307cfdbb..8bb56810 100644 --- a/src/modules/restful/loan.js +++ b/src/modules/restful/loan.js @@ -12,7 +12,7 @@ const Loan = superclass => class extends superclass { * * GET /sapi/v1/loan/income
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-crypto-loans-income-history-user_data} + * {@link https://developers.binance.com/docs/crypto_loan/stable-rate/market-data/Get-Crypto-Loans-Income-History} * * @param {string} asset * @param {object} [options] diff --git a/src/modules/restful/margin.js b/src/modules/restful/margin.js index 9d06e79e..5b370468 100644 --- a/src/modules/restful/margin.js +++ b/src/modules/restful/margin.js @@ -8,134 +8,12 @@ const { validateRequiredParameters, hasOneOfParameters } = require('../../helper * @param {*} superclass */ const Margin = superclass => class extends superclass { - /** - * Cross Margin Account Transfer (MARGIN)
- * - * POST /sapi/v1/margin/transfer
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#cross-margin-account-transfer-margin} - * - * @param {string} asset - * @param {number} amount - * @param {number} type - 1: transfer from main account to margin account - *
2: transfer from margin account to main account - * @param {object} [options] - * @param {number} [options.recvWindow] - The value cannot be greater than 60000 - */ - marginTransfer (asset, amount, type, options = {}) { - validateRequiredParameters({ asset, amount, type }) - - return this.signRequest( - 'POST', - '/sapi/v1/margin/transfer', - Object.assign(options, { - asset: asset.toUpperCase(), - amount, - type - }) - ) - } - - /** - * Margin Account Borrow (MARGIN)
- * - * POST /sapi/v1/margin/load
- * - * Apply for a loan.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#margin-account-borrow-margin} - * - * @param {string} asset - * @param {number} amount - * @param {object} [options] - * @param {string} [options.isIsolated] - TRUE or FALSE - * @param {string} [options.symbol] - isolated symbol - * @param {number} [options.recvWindow] - The value cannot be greater than 60000 - */ - marginBorrow (asset, amount, options = {}) { - validateRequiredParameters({ asset, amount }) - - return this.signRequest( - 'POST', - '/sapi/v1/margin/loan', - Object.assign(options, { - asset: asset.toUpperCase(), - amount - }) - ) - } - - /** - * Margin Account Repay(MARGIN)
- * - * POST /sapi/v1/margin/repay
- * - * Repay loan for margin account.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#margin-account-repay-margin} - * - * @param {string} asset - * @param {string} amount - * @param {object} [options] - * @param {string} [options.isIsolated] - TRUE or FALSE - * @param {string} [options.symbol] - * @param {number} [options.recvWindow] - The value cannot be greater than 60000 - */ - marginRepay (asset, amount, options = {}) { - validateRequiredParameters({ asset, amount }) - - return this.signRequest( - 'POST', - '/sapi/v1/margin/repay', - Object.assign(options, { - asset: asset.toUpperCase(), - amount - }) - ) - } - - /** - * Query Margin Asset (MARKET_DATA)
- * - * GET /sapi/v1/margin/asset
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-margin-asset-market_data} - * - * @param {string} asset - */ - marginAsset (asset) { - validateRequiredParameters({ asset }) - - return this.publicRequest( - 'GET', - '/sapi/v1/margin/asset', - { asset: asset.toUpperCase() } - ) - } - - /** - * Query Cross Margin Pair (MARKET_DATA)
- * - * GET /sapi/v1/margin/pair
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-pair-market_data} - * - * @param {string} symbol - */ - marginPair (symbol) { - validateRequiredParameters({ symbol }) - - return this.publicRequest( - 'GET', - '/sapi/v1/margin/pair', - { symbol: symbol.toUpperCase() } - ) - } - /** * Get All Margin Assets (MARKET_DATA)
* * GET /sapi/v1/margin/allAssets
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-all-margin-assets-market_data} + * {@link https://developers.binance.com/docs/margin_trading/market-data/Get-All-Margin-Assets} */ marginAllAssets () { return this.publicRequest( @@ -149,7 +27,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/allPairs
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-all-cross-margin-pairs-market_data} + * {@link https://developers.binance.com/docs/margin_trading/market-data/Get-All-Cross-Margin-Pairs} */ marginAllPairs () { return this.publicRequest( @@ -163,7 +41,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/priceIndex
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-margin-priceindex-market_data} + * {@link https://developers.binance.com/docs/margin_trading/market-data/Query-Margin-PriceIndex} * * @param {string} symbol */ @@ -182,7 +60,7 @@ const Margin = superclass => class extends superclass { * * POST /sapi/v1/margin/order
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#margin-account-new-order-trade} + * {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-Order} * * @param {string} symbol * @param {string} side - BUY or SELL @@ -224,7 +102,7 @@ const Margin = superclass => class extends superclass { * * DELETE /sapi/v1/margin/order
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-order-trade} + * {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-Order} * * @param {string} symbol * @param {object} [options] @@ -252,7 +130,7 @@ const Margin = superclass => class extends superclass { * * DELETE /sapi/v1/margin/openOrders
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-all-open-orders-on-a-symbol-trade} + * {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-All-Open-Orders} * * @param {string} symbol * @param {object} [options] @@ -276,7 +154,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/transfer
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-cross-margin-transfer-history-user_data} + * {@link https://developers.binance.com/docs/margin_trading/transfer/Get-Cross-Margin-Transfer-History} * * @param {object} [options] * @param {string} [options.asset] @@ -296,72 +174,12 @@ const Margin = superclass => class extends superclass { ) } - /** - * Query Loan Record (USER_DATA)
- * - * GET /sapi/v1/margin/loan
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-loan-record-user_data} - * - * @param {string} asset - * @param {object} [options] - * @param {string} [options.isolatedSymbol] - * @param {number} [options.txId] - the tranId in POST /sapi/v1/margin/loan - * @param {number} [options.startTime] - * @param {number} [options.endTime] - * @param {number} [options.current] - Currently querying page. Start from 1. Default:1 - * @param {number} [options.size] - Default:10 Max:100 - * @param {boolean} [options.archived] - Default: false. Set to true for archived data from 6 months ago - * @param {number} [options.recvWindow] - The value cannot be greater than 60000 - */ - marginLoanRecord (asset, options = {}) { - validateRequiredParameters({ asset }) - - return this.signRequest( - 'GET', - '/sapi/v1/margin/loan', - Object.assign(options, { - asset: asset.toUpperCase() - }) - ) - } - - /** - * Query Repay Record (USER_DATA)
- * - * GET /sapi/v1/margin/repay
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-repay-record-user_data} - * - * @param {string} asset - * @param {object} [options] - * @param {string} [options.isolatedSymbol] - * @param {number} [options.txId] - return of /sapi/v1/margin/repay - * @param {number} [options.startTime] - * @param {number} [options.endTime] - * @param {number} [options.current] - Currently querying page. Start from 1. Default:1 - * @param {number} [options.size] - Default:10 Max:100 - * @param {boolean} [options.archived] - Default: false. Set to true for archived data from 6 months ago - * @param {number} [options.recvWindow] - The value cannot be greater than 60000 - */ - marginRepayRecord (asset, options = {}) { - validateRequiredParameters({ asset }) - - return this.signRequest( - 'GET', - '/sapi/v1/margin/repay', - Object.assign(options, { - asset: asset.toUpperCase() - }) - ) - } - /** * Get Interest History (USER_DATA)
* * GET /sapi/v1/margin/interestHistory
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-interest-history-user_data} + * {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Get-Interest-History} * * @param {object} [options] * @param {string} [options.asset] @@ -386,7 +204,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/forceLiquidationRec
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-force-liquidation-record-user_data} + * {@link https://developers.binance.com/docs/margin_trading/trade/Get-Force-Liquidation-Record} * * @param {object} [options] * @param {number} [options.startTime] @@ -409,7 +227,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/account
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-account-details-user_data} + * {@link https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Account-Details} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -427,7 +245,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/order
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-order-user_data} + * {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Order} * * @param {string} symbol * @param {object} [options] @@ -453,7 +271,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/openOrders
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-orders-user_data} + * {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-Orders} * * @param {object} [options] * @param {string} [options.symbol] @@ -473,7 +291,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/allOrders
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-all-orders-user_data} + * {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-Orders} * * @param {string} symbol * @param {object} [options] @@ -510,7 +328,7 @@ const Margin = superclass => class extends superclass { * - Order Rate Limit:
* OCO counts as 2 orders against the order rate limit.
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#marign-account-new-oco-trade} + * {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-New-OCO} * * @param {string} symbol * @param {string} side @@ -554,7 +372,7 @@ const Margin = superclass => class extends superclass { * - Either orderListId or listClientOrderId must be provided
* - Canceling an individual leg will cancel the entire OCO
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#margin-account-cancel-oco-trade} + * {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Account-Cancel-OCO} * * @param {string} symbol * @param {object} [options] @@ -584,7 +402,7 @@ const Margin = superclass => class extends superclass { * * Either orderListId or origClientOrderId must be provided
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-oco-user_data} + * {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-OCO} * * @param {object} [options] * @param {string} [options.isIsolated] - For isolated margin or not, "TRUE", "FALSE", default "FALSE" @@ -609,7 +427,7 @@ const Margin = superclass => class extends superclass { * * Retrieves all OCO for a specific margin account based on provided optional parameters.
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-marign-account-39-s-all-oco-user_data} + * {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-All-OCO} * * @param {object} [options] * @param {string} [options.isIsolated] - For isolated margin or not, "TRUE", "FALSE", default "FALSE" @@ -633,7 +451,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/openOrderList
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-open-oco-user_data} + * {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Open-OCO} * * @param {object} [options] * @param {string} [options.isIsolated] - For isolated margin or not, "TRUE", "FALSE", default "FALSE" @@ -653,7 +471,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/myTrades
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-margin-account-39-s-trade-list-user_data} + * {@link https://developers.binance.com/docs/margin_trading/trade/Query-Margin-Account-Trade-List} * * @param {string} symbol * @param {object} [options] @@ -681,7 +499,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/maxBorrowable
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-max-borrow-user_data} + * {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Max-Borrow} * * @param {string} asset * @param {object} [options] @@ -705,7 +523,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/maxTransferable
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-max-transfer-out-amount-user_data} + * {@link https://developers.binance.com/docs/margin_trading/transfer/Query-Max-Transfer-Out-Amount} * * @param {string} asset * @param {object} [options] @@ -729,7 +547,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/interestRateHistory
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-margin-interest-rate-history-user_data} + * {@link https://developers.binance.com/docs/margin_trading/borrow-and-repay/Query-Margin-Interest-Rate-History} * * @param {string} asset * @param {object} [options] @@ -747,63 +565,12 @@ const Margin = superclass => class extends superclass { ) } - /** - * Isolated Margin Account Transfer (MARGIN)
- * - * POST /sapi/v1/margin/isolated/transfer
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#isolated-margin-account-transfer-margin} - * - * @param {string} asset - asset, such as BTC - * @param {string} symbol - * @param {string} transFrom - "SPOT", "ISOLATED_MARGIN" - * @param {string} transTo - "SPOT", "ISOLATED_MARGIN" - * @param {number} amount - * @param {object} [options] - * @param {number} [options.recvWindow] - No more than 60000 - */ - isolatedMarginTransfer (asset, symbol, transFrom, transTo, amount, options = {}) { - validateRequiredParameters({ asset, symbol, transFrom, transTo, amount }) - return this.signRequest( - 'POST', - '/sapi/v1/margin/isolated/transfer', - Object.assign(options, { asset, symbol, transFrom, transTo, amount }) - ) - } - - /** - * Get Isolated Margin Transfer History (USER_DATA)
- * - * GET /sapi/v1/margin/isolated/transfer
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-isolated-margin-transfer-history-user_data} - * - * @param {string} symbol - * @param {object} [options] - * @param {string} [options.asset] - * @param {string} [options.transFrom] - "SPOT", "ISOLATED_MARGIN" - * @param {string} [options.transTo] - "SPOT", "ISOLATED_MARGIN" - * @param {number} [options.startTime] - * @param {number} [options.endTime] - * @param {number} [options.current] - Current page, default 1 - * @param {number} [options.size] - Default 10, max 100 - * @param {number} [options.recvWindow] - No more than 60000 - */ - isolatedMarginTransferHistory (symbol, options = {}) { - validateRequiredParameters({ symbol }) - return this.signRequest( - 'GET', - '/sapi/v1/margin/isolated/transfer', - Object.assign(options, { symbol }) - ) - } - /** * Query Isolated Margin Account Info (USER_DATA)
* * GET /sapi/v1/margin/isolated/account
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-account-info-user_data} + * {@link https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Account-Info} * * @param {object} [options] * @param {string} [options.symbols] - Max 5 symbols can be sent; separated by ",". e.g. "BTCUSDT,BNBUSDT,ADAUSDT" @@ -822,7 +589,7 @@ const Margin = superclass => class extends superclass { * * DELETE /sapi/v1/margin/isolated/account
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#disable-isolated-margin-account-trade} + * {@link https://developers.binance.com/docs/margin_trading/account/Disable-Isolated-Margin-Account} * * @param {string} symbol * @param {object} [options] @@ -842,7 +609,7 @@ const Margin = superclass => class extends superclass { * * POST /sapi/v1/margin/isolated/account
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#enable-isolated-margin-account-trade} + * {@link https://developers.binance.com/docs/margin_trading/account/Enable-Isolated-Margin-Account} * * @param {string} symbol * @param {object} [options] @@ -862,7 +629,7 @@ const Margin = superclass => class extends superclass { * * GET /sapi/v1/margin/isolated/accountLimit
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-enabled-isolated-margin-account-limit-user_data} + * {@link https://developers.binance.com/docs/margin_trading/account/Query-Enabled-Isolated-Margin-Account-Limit} * * @param {object} [options] * @param {number} [options.recvWindow] - No more than 60000 @@ -875,32 +642,12 @@ const Margin = superclass => class extends superclass { ) } - /** - * Query Isolated Margin Symbol (USER_DATA)
- * - * GET /sapi/v1/margin/isolated/pair
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-symbol-user_data} - * - * @param {string} symbol - * @param {object} [options] - * @param {number} [options.recvWindow] - No more than 60000 - */ - isolatedMarginSymbol (symbol, options = {}) { - validateRequiredParameters({ symbol }) - return this.signRequest( - 'GET', - '/sapi/v1/margin/isolated/pair', - Object.assign(options, { symbol }) - ) - } - /** * Get All Isolated Margin Symbol(USER_DATA)
* * GET /sapi/v1/margin/isolated/allPairs
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-all-isolated-margin-symbol-user_data} + * {@link https://developers.binance.com/docs/margin_trading/market-data/Get-All-Isolated-Margin-Symbol} * * @param {object} [options] * @param {number} [options.recvWindow] - No more than 60000 @@ -920,7 +667,7 @@ const Margin = superclass => class extends superclass { * * Get cross margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee * - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-cross-margin-fee-data-user_data} + * {@link https://developers.binance.com/docs/margin_trading/account/Query-Cross-Margin-Fee-Data} * * @param {object} [options] * @param {number} [options.vipLevel] - User's current specific margin data will be returned if vipLevel is omitted @@ -942,7 +689,7 @@ const Margin = superclass => class extends superclass { * * Get isolated margin fee data collection with any vip level or user's current specific data as https://www.binance.com/en/margin-fee * - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-fee-data-user_data} + * {@link https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data} * * @param {object} [options] * @param {number} [options.vipLevel] - User's current specific margin data will be returned if vipLevel is omitted @@ -964,7 +711,7 @@ const Margin = superclass => class extends superclass { * * Get isolated margin tier data collection with any tier as https://www.binance.com/en/margin-data * - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-isolated-margin-fee-data-user_data} + * {@link https://developers.binance.com/docs/margin_trading/account/Query-Isolated-Margin-Fee-Data} * * @param {string} symbol * @param {object} [options] @@ -988,7 +735,7 @@ const Margin = superclass => class extends superclass { * * Displays the user's current margin order count usage for all intervals. * - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-current-margin-order-count-usage-trade} + * {@link https://developers.binance.com/docs/margin_trading/trade/Query-Current-Margin-Order-Count-Usage} * * @param {object} [options] * @param {string} [options.isIsolated] - for isolated margin or not, "TRUE", "FALSE",default "FALSE" @@ -1003,34 +750,12 @@ const Margin = superclass => class extends superclass { ) } - /** - * Margin Dustlog (USER_DATA)
- * - * GET /sapi/v1/margin/dribblet
- * - * Query the historical information of user's margin account small-value asset conversion BNB. - * - * {@link https://binance-docs.github.io/apidocs/spot/en/#margin-dustlog-user_data} - * - * @param {object} [options] - * @param {number} [options.startTime] - * @param {number} [options.endTime] - * @param {number} [options.recvWindow] - No more than 60000 - */ - marginDustLog (options = {}) { - return this.signRequest( - 'GET', - '/sapi/v1/margin/dribblet', - options - ) - } - /** * Query Margin Available Inventory (USER_DATA)
* * GET /sapi/v1/margin/available-inventory
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-margin-available-inventory-user_data} + * {@link https://developers.binance.com/docs/margin_trading/market-data/Query-margin-avaliable-inventory} * * @param {Type} type */ @@ -1050,7 +775,7 @@ const Margin = superclass => class extends superclass { * * POST /sapi/v1/margin/manual-liquidation
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#margin-manual-liquidation-margin} + * {@link https://developers.binance.com/docs/margin_trading/trade/Margin-Manual-Liquidation} * * @param {Type} type * @param {object} [options] diff --git a/src/modules/restful/market.js b/src/modules/restful/market.js index d7dd2d5a..82d63286 100644 --- a/src/modules/restful/market.js +++ b/src/modules/restful/market.js @@ -14,7 +14,7 @@ const Market = superclass => class extends superclass { * GET /api/v3/ping
* * Test connectivity to the Rest API.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#test-connectivity} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-connectivity} */ ping () { return this.publicRequest('GET', '/api/v3/ping') @@ -26,7 +26,7 @@ const Market = superclass => class extends superclass { * GET /api/v3/time
* * Test connectivity to the Rest API and get the current server time.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#check-server-time} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#check-server-time} * */ time () { @@ -39,7 +39,7 @@ const Market = superclass => class extends superclass { * GET /api/v3/exchangeInfo
* * Current exchange trading rules and symbol information
- * {@link https://binance-docs.github.io/apidocs/spot/en/#exchange-information} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#exchange-information} * * @param {object} [options] * @param {string} [options.symbol] - symbol @@ -65,7 +65,7 @@ const Market = superclass => class extends superclass { * * GET /api/v3/depth
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#order-book} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#order-book} * * @param {string} symbol * @param {object} [options] @@ -90,7 +90,7 @@ const Market = superclass => class extends superclass { * GET /api/v3/trades
* * Get recent trades.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#recent-trades-list} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#recent-trades-list} * * @param {string} symbol * @param {object} [options] @@ -114,7 +114,7 @@ const Market = superclass => class extends superclass { * GET /api/v3/historicalTrades
* * Get older market trades.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#old-trade-lookup} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#old-trade-lookup} * * @param {string} symbol * @param {object} [options] @@ -138,7 +138,7 @@ const Market = superclass => class extends superclass { * * GET /api/v3/aggTrades
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#compressed-aggregate-trades-list} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#compressedaggregate-trades-list} * * @param {string} symbol * @param {object} [options] @@ -164,7 +164,7 @@ const Market = superclass => class extends superclass { * * GET /api/v3/klines
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#klinecandlestick-data} * * @param {string} symbol * @param {string} interval @@ -190,7 +190,7 @@ const Market = superclass => class extends superclass { * * GET /api/v3/uiKlines
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#uiklines} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#uiklines} * * @param {string} symbol * @param {string} interval @@ -217,7 +217,7 @@ const Market = superclass => class extends superclass { * GET /api/v3/avgPrice
* * Current average price for a symbol.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#current-average-price} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#current-average-price} * * @param {string} symbol */ @@ -235,7 +235,7 @@ const Market = superclass => class extends superclass { * * GET /api/v3/ticker/24hr
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#24hr-ticker-price-change-statistics} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#24hr-ticker-price-change-statistics} * * @param {string} [symbol] * @param {Array} [symbols] - an array of symbols @@ -255,7 +255,7 @@ const Market = superclass => class extends superclass { * * GET /api/v3/ticker/price
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#symbol-price-ticker} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-price-ticker} * * @param {string} [symbol] * @param {Array} [symbols] - an array of symbols @@ -275,7 +275,7 @@ const Market = superclass => class extends superclass { * GET /api/v3/ticker/bookTicker
* * Best price/qty on the order book for a symbol or symbols.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#symbol-order-book-ticker} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#symbol-order-book-ticker} * * @param {string} [symbol] * @param {Array} [symbols] - an array of symbols @@ -304,7 +304,7 @@ const Market = superclass => class extends superclass { * * The weight for this request will cap at 100 once the number of symbols in the request is more than 50.
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#rolling-window-price-change-statistics} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#rolling-window-price-change-statistics} * * @param {string} [symbol] * @param {Array} [symbols] - an array of symbols diff --git a/src/modules/restful/mining.js b/src/modules/restful/mining.js index d7c6bc24..6e71784b 100644 --- a/src/modules/restful/mining.js +++ b/src/modules/restful/mining.js @@ -13,7 +13,7 @@ const Mining = superclass => class extends superclass { * * GET /sapi/v1/mining/pub/algoList
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#acquiring-algorithm-market_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Acquiring-Algorithm} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -31,7 +31,7 @@ const Mining = superclass => class extends superclass { * * GET /sapi/v1/mining/pub/coinList
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#acquiring-coinname-market_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Acquiring-CoinName} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -49,7 +49,7 @@ const Mining = superclass => class extends superclass { * * GET /sapi/v1/mining/worker/detail
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#request-for-detail-miner-list-user_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Request-for-Detail-Miner-List} * * @param {string} algo * @param {string} userName - Mining account @@ -75,7 +75,7 @@ const Mining = superclass => class extends superclass { * * GET /sapi/v1/mining/worker/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#request-for-miner-list-user_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Request-for-Miner-List} * * @param {string} algo * @param {string} userName - Mining account @@ -107,7 +107,7 @@ const Mining = superclass => class extends superclass { * * GET /sapi/v1/mining/payment/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#earnings-list-user_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Earnings-List} * * @param {string} algo * @param {string} userName - Mining account @@ -136,7 +136,7 @@ const Mining = superclass => class extends superclass { * * GET /sapi/v1/mining/payment/other
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#extra-bonus-list-user_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Extra-Bonus-List} * * @param {string} algo * @param {string} userName @@ -165,7 +165,7 @@ const Mining = superclass => class extends superclass { * * GET /sapi/v1/mining/hash-transfer/config/details/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#hashrate-resale-list-user_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-List} * * @param {object} [options] * @param {number} [options.pageIndex] - Page number,default is first page, 1 @@ -185,7 +185,7 @@ const Mining = superclass => class extends superclass { * * GET /sapi/v1/mining/hash-transfer/profit/details
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#hashrate-resale-detail-user_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-Detail} * * @param {number} configId - Mining ID * @param {string} userName - Mining Account @@ -211,7 +211,7 @@ const Mining = superclass => class extends superclass { * * POST /sapi/v1/mining/hash-transfer/config
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#hashrate-resale-request-user_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Hashrate-Resale-Request} * * @param {string} userName - Mining Account * @param {string} algo @@ -252,7 +252,7 @@ const Mining = superclass => class extends superclass { * * POST /sapi/v1/mining/hash-transfer/config/cancel
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#cancel-hashrate-resale-configuration-user_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Cancel-hashrate-resale-configuration} * * @param {number} configId - Mining ID * @param {string} userName @@ -276,7 +276,7 @@ const Mining = superclass => class extends superclass { * * GET /sapi/v1/mining/statistics/user/status
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#statistic-list-user_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Statistic-List} * * @param {string} algo * @param {string} userName - Mining account @@ -300,7 +300,7 @@ const Mining = superclass => class extends superclass { * * GET /sapi/v1/mining/statistics/user/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#account-list-user_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Account-List} * * @param {string} algo * @param {string} userName - Mining account @@ -324,7 +324,7 @@ const Mining = superclass => class extends superclass { * * GET /sapi/v1/mining/payment/uid
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#mining-account-earning-user_data} + * {@link https://developers.binance.com/docs/mining/rest-api/Mining-Account-Earning} * * @param {string} algo - Algorithm(sha256) * @param {object} [options] diff --git a/src/modules/restful/nft.js b/src/modules/restful/nft.js index 2189fe23..8e4cbfa3 100644 --- a/src/modules/restful/nft.js +++ b/src/modules/restful/nft.js @@ -12,7 +12,7 @@ const NFT = superclass => class extends superclass { * * GET /sapi/v1/nft/history/transactions
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-nft-transaction-history-user_data} + * {@link https://developers.binance.com/docs/nft/rest-api/Get-NFT-Transaction-History} * * @param {number} orderType - 0: purchase order, 1: sell order, 2: royalty income, 3: primary market order, 4: mint fee * @param {object} [options] @@ -38,7 +38,7 @@ const NFT = superclass => class extends superclass { * * GET /sapi/v1/nft/history/deposit
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-nft-deposit-history-user_data} + * {@link https://developers.binance.com/docs/nft/rest-api/Get-NFT-Deposit-History} * * @param {object} [options] * @param {number} [options.startTime] @@ -61,7 +61,7 @@ const NFT = superclass => class extends superclass { * * GET /sapi/v1/nft/history/withdraw
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-nft-withdraw-history-user_data} + * {@link https://developers.binance.com/docs/nft/rest-api/Get-NFT-Withdraw-History} * * @param {object} [options] * @param {number} [options.startTime] @@ -84,7 +84,7 @@ const NFT = superclass => class extends superclass { * * GET /sapi/v1/nft/user/getAsset
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-nft-asset-user_data} + * {@link https://developers.binance.com/docs/nft/rest-api/Get-NFT-Asset} * * @param {object} [options] * @param {number} [options.limit] - default 50, max 50 diff --git a/src/modules/restful/portfolioMargin.js b/src/modules/restful/portfolioMargin.js index 1fb8e214..8c751c1a 100644 --- a/src/modules/restful/portfolioMargin.js +++ b/src/modules/restful/portfolioMargin.js @@ -11,7 +11,7 @@ const PortfolioMargin = superclass => class extends superclass { * * GET /sapi/v1/portfolio/account
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-portfolio-margin-account-info-user_data} + * {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Get-Classic-Portfolio-Margin-Account-Info} * * @param {object} [options] * @param {number} [options.recvWindow] @@ -30,7 +30,7 @@ const PortfolioMargin = superclass => class extends superclass { * * GET /sapi/v1/portfolio/collateralRate
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#portfolio-margin-collateral-rate-market_data} + * {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/market-data/Classic-Portfolio-Margin-Collateral-Rate} */ portfolioMarginCollateralRate () { return this.publicRequest( @@ -44,7 +44,7 @@ const PortfolioMargin = superclass => class extends superclass { * * GET /sapi/v1/portfolio/pmLoan
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-portfolio-margin-bankruptcy-loan-amount-user_data} + * {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Query-Classic-Portfolio-Margin-Bankruptcy-Loan-Amount} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -62,7 +62,7 @@ const PortfolioMargin = superclass => class extends superclass { * * POST /sapi/v1/portfolio/repay
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#portfolio-margin-bankruptcy-loan-repay-user_data} + * {@link https://developers.binance.com/docs/derivatives/portfolio-margin-pro/account/Classic-Portfolio-Margin-Bankruptcy-Loan-Repay} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 diff --git a/src/modules/restful/rebate.js b/src/modules/restful/rebate.js index 20ea2fce..e501d288 100644 --- a/src/modules/restful/rebate.js +++ b/src/modules/restful/rebate.js @@ -11,7 +11,7 @@ const Rebate = superclass => class extends superclass { * * GET /sapi/v1/rebate/taxQuery
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-spot-rebate-history-records-user_data} + * {@link https://developers.binance.com/docs/rebate/rest-api/Get-Spot-Rebate-History-Records} * * @param {object} [options] * @param {number} [options.startTime] diff --git a/src/modules/restful/simpleEarn.js b/src/modules/restful/simpleEarn.js index 454ed1f7..1a5abc83 100644 --- a/src/modules/restful/simpleEarn.js +++ b/src/modules/restful/simpleEarn.js @@ -13,7 +13,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/flexible/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-simple-earn-flexible-product-list-user_data} + * {@link https://developers.binance.com/docs/simple_earn/account/Get-Simple-Earn-Flexible-Product-List} * * @param {object} [options] * @param {string} [options.asset] @@ -35,7 +35,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/locked/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-simple-earn-locked-product-list-user_data} + * {@link https://developers.binance.com/docs/simple_earn/account/Get-Simple-Earn-Locked-Product-List} * * @param {object} [options] * @param {string} [options.asset] @@ -57,7 +57,7 @@ const SimpleEarn = superclass => class extends superclass { * * POST /sapi/v1/simple-earn/flexible/subscribe
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#subscribe-flexible-product-trade} + * {@link https://developers.binance.com/docs/simple_earn/earn/Subscribe-Flexible-Product} * * @param {string} productId * @param {number} amount @@ -81,7 +81,7 @@ const SimpleEarn = superclass => class extends superclass { * * POST /sapi/v1/simple-earn/locked/subscribe
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#subscribe-locked-product-trade} + * {@link https://developers.binance.com/docs/simple_earn/earn/Subscribe-Locked-Product} * * @param {string} projectId * @param {number} amount @@ -105,7 +105,7 @@ const SimpleEarn = superclass => class extends superclass { * * POST /sapi/v1/simple-earn/flexible/redeem
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#redeem-flexible-product-trade} + * {@link https://developers.binance.com/docs/simple_earn/earn/Redeem-Flexible-Product} * * @param {string} productId * @param {object} [options] @@ -129,7 +129,7 @@ const SimpleEarn = superclass => class extends superclass { * * POST /sapi/v1/simple-earn/locked/redeem
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#redeem-locked-product-trade} + * {@link https://developers.binance.com/docs/simple_earn/earn/Redeem-Locked-Product} * * @param {string} positionId * @param {object} [options] @@ -150,7 +150,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/flexible/position
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-flexible-product-position-user_data} + * {@link https://developers.binance.com/docs/simple_earn/account/Get-Flexible-Product-Position} * * @param {object} [options] * @param {string} [options.asset] @@ -173,7 +173,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/locked/position
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-locked-product-position-user_data} + * {@link https://developers.binance.com/docs/simple_earn/account/Get-Locked-Product-Position} * * @param {object} [options] * @param {string} [options.asset] @@ -197,7 +197,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/account
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#simple-account-user_data} + * {@link https://developers.binance.com/docs/simple_earn/account/Simple-Account} * * @param {object} [options] * @param {number} [options.recvWindow] @@ -216,7 +216,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/flexible/history/subscriptionRecord
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-flexible-subscription-record-user_data} + * {@link https://developers.binance.com/docs/simple_earn/history/Get-Flexible-Subscription-Record} * * @param {object} [options] * @param {string} [options.productId] @@ -242,7 +242,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/locked/history/subscriptionRecord
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-locked-subscription-record-user_data} + * {@link https://developers.binance.com/docs/simple_earn/history/Get-Locked-Subscription-Record} * * @param {object} [options] * @param {string} [options.purchaseId] @@ -267,7 +267,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/flexible/history/redemptionRecord
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-flexible-redemption-record-user_data} + * {@link https://developers.binance.com/docs/simple_earn/history/Get-Flexible-Redemption-Record} * * @param {object} [options] * @param {string} [options.productId] @@ -293,7 +293,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/locked/history/redemptionRecord
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-locked-redemption-record-user_data} + * {@link https://developers.binance.com/docs/simple_earn/history/Get-Locked-Redemption-Record} * * @param {object} [options] * @param {string} [options.positionId] @@ -319,7 +319,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/flexible/history/rewardsRecord
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-flexible-rewards-history-user_data} + * {@link https://developers.binance.com/docs/simple_earn/history/Get-Flexible-Rewards-History} * * @param {string} type * @param {object} [options] @@ -346,7 +346,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/locked/history/rewardsRecord
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-locked-rewards-history-user_data} + * {@link https://developers.binance.com/docs/simple_earn/history/Get-Locked-Rewards-History} * * @param {object} [options] * @param {string} [options.positionId] @@ -371,7 +371,7 @@ const SimpleEarn = superclass => class extends superclass { * * POST /sapi/v1/simple-earn/flexible/setAutoSubscribe
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#set-flexible-auto-subscribe-user_data} + * {@link https://developers.binance.com/docs/simple_earn/earn/Set-Flexible-Auto-Subscribe} * * @param {string} productId * @param {boolean} autoSubscribe @@ -393,7 +393,7 @@ const SimpleEarn = superclass => class extends superclass { * * POST /sapi/v1/simple-earn/locked/setAutoSubscribe
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#set-locked-auto-subscribe-user_data} + * {@link https://developers.binance.com/docs/simple_earn/earn/Set-Locked-Auto-Subscribe} * * @param {string} positionId * @param {boolean} autoSubscribe @@ -415,7 +415,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/flexible/personalLeftQuota
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-flexible-personal-left-quota-user_data} + * {@link https://developers.binance.com/docs/simple_earn/account/Get-Flexible-Personal-Left-Quota} * * @param {string} productId * @param {object} [options] @@ -436,7 +436,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/locked/personalLeftQuota
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-locked-personal-left-quota-user_data} + * {@link https://developers.binance.com/docs/simple_earn/account/Get-Locked-Personal-Left-Quota} * * @param {string} projectId * @param {object} [options] @@ -457,7 +457,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/flexible/subscriptionPreview
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-flexible-subscription-preview-user_data} + * {@link https://developers.binance.com/docs/simple_earn/earn/Get-Flexible-Subscription-Preview} * * @param {string} productId * @param {number} amount @@ -479,7 +479,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/locked/subscriptionPreview
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-locked-subscription-preview-user_data} + * {@link https://developers.binance.com/docs/simple_earn/earn/Get-Locked-Subscription-Preview} * * @param {string} projectId * @param {number} amount @@ -502,7 +502,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/flexible/history/rateHistory
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-rate-history-user_data} + * {@link https://developers.binance.com/docs/simple_earn/history/Get-Rate-History} * * @param {string} productId * @param {object} [options] @@ -527,7 +527,7 @@ const SimpleEarn = superclass => class extends superclass { * * GET /sapi/v1/simple-earn/flexible/history/collateralRecord
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-collateral-record-user_data} + * {@link https://developers.binance.com/docs/simple_earn/history/Get-Collateral-Record} * * @param {object} [options] * @param {string} [options.productId] diff --git a/src/modules/restful/stream.js b/src/modules/restful/stream.js index 2946aa63..50acaf63 100644 --- a/src/modules/restful/stream.js +++ b/src/modules/restful/stream.js @@ -13,7 +13,7 @@ const Stream = superclass => class extends superclass { * * POST /api/v3/userDataStream
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#listen-key-spot} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#start-user-data-stream-user_stream} */ createListenKey () { return this.publicRequest( @@ -27,7 +27,7 @@ const Stream = superclass => class extends superclass { * * PUT /api/v3/userDataStream
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#listen-key-spot} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#keepalive-user-data-stream-user_stream} * * @param {string} listenKey */ @@ -45,7 +45,7 @@ const Stream = superclass => class extends superclass { * * DELETE /api/v3/userDataStream
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#listen-key-spot} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#close-user-data-stream-user_stream} * * @param {string} listenKey */ @@ -63,7 +63,7 @@ const Stream = superclass => class extends superclass { * * POST /sapi/v1/userDataStream
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#listen-key-margin} + * {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Start-Margin-User-Data-Stream} * */ createMarginListenKey () { @@ -78,7 +78,7 @@ const Stream = superclass => class extends superclass { * * PUT /sapi/v1/userDataStream
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#listen-key-margin} + * {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Keepalive-Margin-User-Data-Stream} * * @param {string} listenKey */ @@ -96,7 +96,7 @@ const Stream = superclass => class extends superclass { * * DELETE /sapi/v1/userDataStream
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#listen-key-margin} + * {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Close-Margin-User-Data-Stream} * * @param {string} listenKey */ @@ -114,7 +114,7 @@ const Stream = superclass => class extends superclass { * * POST /sapi/v1/userDataStream/isolated
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#listen-key-isolated-margin} + * {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Start-Isolated-Margin-User-Data-Stream} * * @param {string} symbol */ @@ -132,7 +132,7 @@ const Stream = superclass => class extends superclass { * * PUT /sapi/v1/userDataStream/isolated
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#listen-key-isolated-margin} + * {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Keepalive-Isolated-Margin-User-Data-Stream} * * @param {string} symbol * @param {string} listenKey @@ -151,7 +151,7 @@ const Stream = superclass => class extends superclass { * * DELETE /sapi/v1/userDataStream/isolated
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#listen-key-isolated-margin} + * {@link https://developers.binance.com/docs/margin_trading/trade-data-stream/Close-Isolated-Margin-User-Data-Stream} * * @param {string} symbol * @param {string} listenKey diff --git a/src/modules/restful/subAccount.js b/src/modules/restful/subAccount.js index 060b3551..e729ef9c 100644 --- a/src/modules/restful/subAccount.js +++ b/src/modules/restful/subAccount.js @@ -13,7 +13,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/list
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-sub-account-list-sapi-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/account-management/Query-Sub-account-List} * * @param {object} [options] * @param {string} [options.email] @@ -35,7 +35,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/sub/transfer/history
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-sub-account-spot-asset-transfer-history-sapi-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Spot-Asset-Transfer-History} * * @param {object} [options] * @param {string} [options.fromEmail] @@ -59,7 +59,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v3/sub-account/assets
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-sub-account-assets-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Assets-V3} * * @param {string} email * @param {object} [options] @@ -80,7 +80,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/capital/deposit/subAddress
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-sub-account-deposit-address-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Get-Sub-account-Deposit-Address} * * @param {string} email * @param {string} coin @@ -106,7 +106,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/capital/deposit/subHisrec
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-sub-account-deposit-address-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Get-Sub-account-Deposit-Address} * * @param {string} email * @param {object} [options] @@ -133,7 +133,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/status
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-sub-account-39-s-status-on-margin-futures-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/account-management/Get-Sub-accounts-Status-on-Margin-Or-Futures} * * @param {object} [options] * @param {string} [options.email] @@ -152,7 +152,7 @@ const SubAccount = superclass => class extends superclass { * * POST /sapi/v1/sub-account/margin/enable
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#enable-margin-for-sub-account-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/account-management/Enable-Margin-for-Sub-account} * * @param {string} email - Sub-account email * @param {object} [options] @@ -175,7 +175,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/margin/account
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-detail-on-sub-account-39-s-margin-account-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Get-Detail-on-Sub-accounts-Margin-Account} * * @param {string} email * @param {object} [options] @@ -198,7 +198,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/margin/accountSummary
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-detail-on-sub-account-39-s-margin-account-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Get-Detail-on-Sub-accounts-Margin-Account} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -216,7 +216,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/futures/enable
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#enable-futures-for-sub-account-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/account-management/Enable-Futures-for-Sub-account} * * @param {string} email * @param {object} [options] @@ -239,7 +239,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/futures/account
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-detail-on-sub-account-39-s-futures-account-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Get-Detail-on-Sub-accounts-Futures-Account} * * @param {string} email * @param {object} [options] @@ -262,7 +262,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/futures/accountSummary
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-summary-of-sub-account-39-s-futures-account-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Get-Summary-of-Sub-accounts-Futures-Account} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -280,7 +280,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/futures/positionRisk
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-futures-postion-risk-of-sub-account-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/account-management/Get-Futures-Position-Risk-of-Sub-account} * * @param {string} email * @param {object} [options] @@ -303,7 +303,7 @@ const SubAccount = superclass => class extends superclass { * * POST /sapi/v1/sub-account/futures/transfer
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#futures-transfer-for-sub-account-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Futures-Transfer-for-Sub-account} * * @param {string} email * @param {string} asset @@ -335,7 +335,7 @@ const SubAccount = superclass => class extends superclass { * * POST /sapi/v1/sub-account/margin/transfer
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#margin-transfer-for-sub-account-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Margin-Transfer-for-Sub-account} * * @param {string} email * @param {string} asset @@ -366,7 +366,7 @@ const SubAccount = superclass => class extends superclass { * * POST /sapi/v1/sub-account/transfer/subToSub
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#transfer-to-sub-account-of-same-master-for-sub-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Transfer-to-Sub-account-of-Same-Master} * * @param {string} toEmail * @param {string} asset @@ -393,7 +393,7 @@ const SubAccount = superclass => class extends superclass { * * POST /sapi/v1/sub-account/transfer/subToMaster
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#transfer-to-master-for-sub-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Transfer-to-Master} * * @param {string} asset * @param {number} amount @@ -418,7 +418,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/transfer/subUserHistory
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#sub-account-transfer-history-for-sub-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Sub-account-Transfer-History} * * @param {object} [options] * @param {string} [options.asset] - If not sent, result of all assets will be returned @@ -442,7 +442,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/futures/internalTransfer
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-sub-account-futures-asset-transfer-history-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Futures-Asset-Transfer-History} * * @param {string} email - Sub-account email * @param {number} futuresType - 1: USDT-margined Futures,2: Coin-margined Futures @@ -470,7 +470,7 @@ const SubAccount = superclass => class extends superclass { * * POST /sapi/v1/sub-account/futures/internalTransfer
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#sub-account-futures-asset-transfer-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Sub-account-Futures-Asset-Transfer} * * @param {string} fromEmail - Sender email * @param {string} toEmail - Recipient email @@ -502,7 +502,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/spotSummary
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-sub-account-spot-assets-summary-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Query-Sub-account-Spot-Assets-Summary} * * @param {object} [options] * @param {string} [options.email] - Sub account email @@ -523,7 +523,7 @@ const SubAccount = superclass => class extends superclass { * * POST /sapi/v1/sub-account/virtualSubAccount
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#create-a-virtual-sub-account-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/account-management/Create-a-Virtual-Sub-account} * * @param {string} subAccountString * @param {object} [options] @@ -543,7 +543,7 @@ const SubAccount = superclass => class extends superclass { * * POST /sapi/v1/sub-account/blvt/enable
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#enable-leverage-token-for-sub-account-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/account-management/Enable-Leverage-Token-for-Sub-account} * * @param {string} email * @param {boolean} enableBlvt @@ -564,7 +564,7 @@ const SubAccount = superclass => class extends superclass { * * POST /sapi/v1/managed-subaccount/deposit
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#deposit-assets-into-the-managed-sub-account-for-investor-master-account} + * {@link https://developers.binance.com/docs/sub_account/managed-sub-account/Deposit-Assets-Into-The-Managed-Sub-account} * * @param {string} toEmail * @param {string} asset @@ -586,7 +586,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/managed-subaccount/asset
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-managed-sub-account-asset-details-for-investor-master-account} + * {@link https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-Asset-Details} * * @param {string} email * @param {object} [options] @@ -606,7 +606,7 @@ const SubAccount = superclass => class extends superclass { * * POST /sapi/v1/managed-subaccount/withdraw
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#withdrawl-assets-from-the-managed-sub-account-for-investor-master-account} + * {@link https://developers.binance.com/docs/sub_account/managed-sub-account/Withdrawl-Assets-From-The-Managed-Sub-account} * * @param {string} fromEmail * @param {string} asset @@ -630,7 +630,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/managed-subaccount/accountSnapshot
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-managed-sub-account-snapshot-for-investor-master-account} + * {@link https://developers.binance.com/docs/sub_account/managed-sub-account/Query-Managed-Sub-account-Snapshot} * * @param {string} email * @param {string} type "SPOT", "MARGIN"(cross), "FUTURES"(UM) @@ -652,46 +652,23 @@ const SubAccount = superclass => class extends superclass { /** * Enable or Disable IP Restriction for a Sub-account API Key (For Master Account)
* - * POST /sapi/v1/sub-account/subAccountApi/ipRestriction
+ * POST /sapi/v2/sub-account/subAccountApi/ipRestriction
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#enable-or-disable-ip-restriction-for-a-sub-account-api-key-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/api-management/Add-IP-Restriction-for-Sub-Account-API-key} * * @param {string} email - Sub-account email * @param {string} subAccountApiKey - * @param {boolean} ipRestrict - true or false - * @param {object} [options] + * @param {string} status - IP Restriction status. 1 = IP Unrestricted. 2 = Restrict access to trusted IPs only. + * @param {object} [options] - Insert static IP in batch, separated by commas. + * @param {string} [options.ipAddress] * @param {number} [options.recvWindow] */ - subAccountApiToggleIpRestriction (email, subAccountApiKey, ipRestrict, options = {}) { - validateRequiredParameters({ email, subAccountApiKey, ipRestrict }) + subAccountApiToggleIpRestriction (email, subAccountApiKey, status, options = {}) { + validateRequiredParameters({ email, subAccountApiKey, status }) return this.signRequest( 'POST', - '/sapi/v1/sub-account/subAccountApi/ipRestriction', - Object.assign(options, { email, subAccountApiKey, ipRestrict }) - ) - } - - /** - * Add IP List for a Sub-account API Key (For Master Account)
- * - * POST /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList
- * - * Before the usage of this endpoint, please ensure POST /sapi/v1/sub-account/subAccountApi/ipRestriction was used to enable the IP restriction.
- * - * {@link https://binance-docs.github.io/apidocs/spot/en/#add-ip-list-for-a-sub-account-api-key-for-master-account} - * - * @param {string} email - Sub-account email - * @param {string} subAccountApiKey - * @param {string} ipAddress - Can be added in batches, separated by commas - * @param {object} [options] - * @param {number} [options.recvWindow] - */ - subAccountApiAddIp (email, subAccountApiKey, ipAddress, options = {}) { - validateRequiredParameters({ email, subAccountApiKey, ipAddress }) - return this.signRequest( - 'POST', - '/sapi/v1/sub-account/subAccountApi/ipRestriction/ipList', - Object.assign(options, { email, subAccountApiKey, ipAddress }) + '/sapi/v2/sub-account/subAccountApi/ipRestriction', + Object.assign(options, { email, subAccountApiKey, status }) ) } @@ -700,7 +677,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/subAccountApi/ipRestriction
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-ip-restriction-for-a-sub-account-api-key-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/api-management/Get-IP-Restriction-for-a-Sub-account-API-Key} * * @param {string} email - Sub-account email * @param {string} subAccountApiKey @@ -721,7 +698,7 @@ const SubAccount = superclass => class extends superclass { * * DELETE /sapi/v1/sub-account/subAccountApi/ipRestriction/ipList
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#delete-ip-list-for-a-sub-account-api-key-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/api-management/Delete-IP-List-For-a-Sub-account-API-Key} * * @param {string} email - Sub-account email * @param {string} subAccountApiKey @@ -743,7 +720,7 @@ const SubAccount = superclass => class extends superclass { * * POST /sapi/v1/sub-account/universalTransfer
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#universal-transfer-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Universal-Transfer} * * @param {string} fromAccountType - "SPOT", "USDT_FUTURE", "COIN_FUTURE", "MARGIN"(Cross), "ISOLATED_MARGIN" * @param {string} toAccountType - "SPOT", "USDT_FUTURE", "COIN_FUTURE", "MARGIN"(Cross), "ISOLATED_MARGIN" @@ -770,7 +747,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v1/sub-account/universalTransfer
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-universal-transfer-history-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Query-Universal-Transfer-History} * * @param {object} [options] * @param {string} [options.fromEmail] @@ -795,7 +772,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v2/sub-account/futures/account
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-detail-on-sub-account-39-s-futures-account-v2-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Get-Detail-on-Sub-accounts-Futures-Account-V2} * * @param {string} email - Sub-account email * @param {number} futuresType - 1:USDT Margined Futures, 2:COIN Margined Futures @@ -816,7 +793,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v2/sub-account/futures/accountSummary
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-summary-of-sub-account-39-s-futures-account-v2-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/asset-management/Get-Summary-of-Sub-accounts-Futures-Account-V2} * * @param {number} futuresType - 1:USDT Margined Futures, 2:COIN Margined Futures * @param {object} [options] @@ -838,7 +815,7 @@ const SubAccount = superclass => class extends superclass { * * GET /sapi/v2/sub-account/futures/positionRisk
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-futures-position-risk-of-sub-account-v2-for-master-account} + * {@link https://developers.binance.com/docs/sub_account/account-management/Get-Futures-Position-Risk-of-Sub-account-V2} * * @param {string} email - Sub-account email * @param {number} futuresType - 1:USDT Margined Futures, 2:COIN Margined Futures diff --git a/src/modules/restful/trade.js b/src/modules/restful/trade.js index 910ef435..fec0158d 100644 --- a/src/modules/restful/trade.js +++ b/src/modules/restful/trade.js @@ -13,7 +13,7 @@ const Trade = superclass => class extends superclass { * * POST /api/v3/order/test
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#test-new-order-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#test-new-order-trade} * * @param {string} symbol * @param {string} side @@ -52,7 +52,7 @@ const Trade = superclass => class extends superclass { * * POST /api/v3/order
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#new-order-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-order-trade} * * @param {string} symbol * @param {string} side @@ -90,7 +90,7 @@ const Trade = superclass => class extends superclass { * * DELETE /api/v3/order
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#cancel-order-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-order-trade} * * @param {string} symbol * @param {object} [options] @@ -116,7 +116,7 @@ const Trade = superclass => class extends superclass { * * DELETE /api/v3/openOrders
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#cancel-all-open-orders-on-a-symbol-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-all-open-orders-on-a-symbol-trade} * @param {string} symbol * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -138,7 +138,7 @@ const Trade = superclass => class extends superclass { * * GET /api/v3/order
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-order-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#query-order-user_data} * * @param {string} symbol * @param {object} [options] @@ -168,7 +168,7 @@ const Trade = superclass => class extends superclass { * * POST /api/v3/order/cancelReplace
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#cancel-an-existing-order-and-send-a-new-order-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-an-existing-order-and-send-a-new-order-trade} * * @param {string} symbol * @param {string} side @@ -211,7 +211,7 @@ const Trade = superclass => class extends superclass { * * GET /api/v3/openOrders
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#current-open-orders-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#current-open-orders-user_data} * * @param {object} [options] * @param {string} [options.symbol] @@ -230,7 +230,7 @@ const Trade = superclass => class extends superclass { * * GET /api/v3/allOrders
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#all-orders-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#all-orders-user_data} * * @param {string} symbol * @param {object} [options] @@ -256,7 +256,7 @@ const Trade = superclass => class extends superclass { * * POST /api/v3/orderList/oco
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#new-oco-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#new-oco---deprecated-trade} * * @param {string} symbol * @param {string} side @@ -306,7 +306,7 @@ const Trade = superclass => class extends superclass { * * DELETE /api/v3/orderList
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#cancel-oco-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#cancel-order-list-trade} * * @param {string} symbol * @param {object} [options] @@ -332,7 +332,7 @@ const Trade = superclass => class extends superclass { * * GET /api/v3/orderList
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-oco-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#query-order-lists-user_data} * * @param {object} [options] * @param {number} [options.orderListId] @@ -352,7 +352,7 @@ const Trade = superclass => class extends superclass { * * GET /api/v3/allOrderList
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-all-oco-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#query-all-order-lists-user_data} * * @param {object} [options] * @param {number} [options.fromId] @@ -374,7 +374,7 @@ const Trade = superclass => class extends superclass { * * GET /api/v3/openOrderList
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-open-oco-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#query-open-order-lists-user_data} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -392,7 +392,7 @@ const Trade = superclass => class extends superclass { * * GET /api/v3/account
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#account-information-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-information-user_data} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -410,7 +410,7 @@ const Trade = superclass => class extends superclass { * * GET /api/v3/myTrades
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#account-trade-list-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#account-trade-list-user_data} * * @param {string} symbol * @param {object} [options] @@ -438,7 +438,7 @@ const Trade = superclass => class extends superclass { * * GET /api/v3/rateLimit/order
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-current-order-count-usage-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/rest-api#query-current-order-count-usage-trade} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 diff --git a/src/modules/restful/wallet.js b/src/modules/restful/wallet.js index d94388bd..b78c34ac 100644 --- a/src/modules/restful/wallet.js +++ b/src/modules/restful/wallet.js @@ -13,7 +13,7 @@ const Wallet = superclass => class extends superclass { * * GET /sapi/v1/system/status
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#system-status-sapi-system} + * {@link https://developers.binance.com/docs/wallet/others/system-status} */ systemStatus () { return this.publicRequest('GET', '/sapi/v1/system/status') @@ -26,7 +26,7 @@ const Wallet = superclass => class extends superclass { * * Get information of coins (available for deposit and withdraw) for user.
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#all-coins-39-information-user_data} + * {@link https://developers.binance.com/docs/wallet/capital/all-coins-info} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -45,7 +45,7 @@ const Wallet = superclass => class extends superclass { * * GET /sapi/v1/accountSnapshot
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#daily-account-snapshot-user_data} + * {@link https://developers.binance.com/docs/wallet/account/daily-account-snapshoot} * * @param {string} type - "SPOT", "MARGIN", "FUTURES" * @param {object} [options] @@ -71,7 +71,7 @@ const Wallet = superclass => class extends superclass { * * GET /sapi/v1/account/disableFastWithdrawSwitch
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#disable-fast-withdraw-switch-user_data} + * {@link https://developers.binance.com/docs/wallet/account/disable-fast-withdraw-switch} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -89,7 +89,7 @@ const Wallet = superclass => class extends superclass { * * GET /sapi/v1/account/enableFastWithdrawSwitch
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#enable-fast-withdraw-switch-user_data} + * {@link https://developers.binance.com/docs/wallet/account/enable-fast-withdraw-switch} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -107,7 +107,7 @@ const Wallet = superclass => class extends superclass { * * POST /sapi/v1/capital/withdraw/apply
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#withdraw-user_data} + * {@link https://developers.binance.com/docs/wallet/capital/withdraw} * * @param {string} coin * @param {string} address @@ -141,7 +141,7 @@ const Wallet = superclass => class extends superclass { * * GET /sapi/v1/capital/deposit/hisrec
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#deposit-history-supporting-network-user_data} + * {@link https://developers.binance.com/docs/wallet/capital/deposite-history} * * @param {object} [options] * @param {string} [options.coin] @@ -165,7 +165,7 @@ const Wallet = superclass => class extends superclass { * * GET /sapi/v1/capital/withdraw/history
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#withdraw-history-supporting-network-user_data} + * {@link https://developers.binance.com/docs/wallet/capital/withdraw-history} * * @param {object} [options] * @param {string} [options.coin] @@ -190,7 +190,7 @@ const Wallet = superclass => class extends superclass { * * GET /sapi/v1/capital/deposit/address
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#deposit-address-supporting-network-user_data} + * {@link https://developers.binance.com/docs/wallet/capital/deposite-address} * * @param {string} coin * @param {object} [options] @@ -215,7 +215,7 @@ const Wallet = superclass => class extends superclass { * GET /sapi/v1/account/status
* * Fetch account status detail.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#account-status-sapi-user_data} + * {@link https://developers.binance.com/docs/wallet/account/account-status} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -235,7 +235,7 @@ const Wallet = superclass => class extends superclass { * GET /sapi/v1/account/apiTradingStatus
* * Fetch account api trading status detail.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#account-api-trading-status-sapi-user_data} + * {@link https://developers.binance.com/docs/wallet/account/account-api-trading-status} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -253,7 +253,7 @@ const Wallet = superclass => class extends superclass { * * GET /sapi/v1/asset/dribblet
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#dustlog-sapi-user_data} + * {@link https://developers.binance.com/docs/wallet/asset/dust-log} * * @param {object} [options] * @param {number} [options.startTime] @@ -274,7 +274,7 @@ const Wallet = superclass => class extends superclass { * POST /sapi/v1/asset/dust
* * Convert dust assets to BNB.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#dust-transfer-user_data} + * {@link https://developers.binance.com/docs/wallet/asset/dust-transfer} * * @param {array} asset - The asset being converted * @param {object} [options] @@ -300,7 +300,7 @@ const Wallet = superclass => class extends superclass { * GET /sapi/v1/asset/assetDividend
* * Query asset dividend record.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#asset-dividend-record-user_data} + * {@link https://developers.binance.com/docs/wallet/asset/assets-divided-record} * * @param {object} [options] * @param {string} [options.asset] @@ -324,7 +324,7 @@ const Wallet = superclass => class extends superclass { * * Fetch details of assets supported on Binance.
* Please get network and other deposit or withdraw details from GET /sapi/v1/capital/config/getall.
- * {@link https://binance-docs.github.io/apidocs/spot/en/#asset-detail-sapi-user_data} + * {@link https://developers.binance.com/docs/wallet/asset/asset-detail} * * @param {object} [options] * @param {string} [options.asset] @@ -344,7 +344,7 @@ const Wallet = superclass => class extends superclass { * GET /sapi/v1/asset/tradeFee
* * Fetch trade fee
- * {@link https://binance-docs.github.io/apidocs/spot/en/#trade-fee-sapi-user_data} + * {@link https://developers.binance.com/docs/wallet/asset/trade-fee} * * @param {object} [options] * @param {string} [options.symbol] @@ -364,7 +364,7 @@ const Wallet = superclass => class extends superclass { * * POST /sapi/v1/asset/transfer
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#user-universal-transfer} + * {@link https://developers.binance.com/docs/wallet/asset/user-universal-transfer} * * @param {string} type * @param {string} asset @@ -393,7 +393,7 @@ const Wallet = superclass => class extends superclass { * * GET /sapi/v1/asset/transfer
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#query-user-universal-transfer-history} + * {@link https://developers.binance.com/docs/wallet/asset/query-user-universal-transfer} * * @param {string} type * @param {object} [options] @@ -420,7 +420,7 @@ const Wallet = superclass => class extends superclass { * * POST /sapi/v1/asset/get-funding-asset
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#funding-wallet-user_data} + * {@link https://developers.binance.com/docs/wallet/asset/funding-wallet} * * @param {object} [options] * @param {string} [options.asset] @@ -440,7 +440,7 @@ const Wallet = superclass => class extends superclass { * * GET /sapi/v1/account/apiRestrictions
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#get-api-key-permission-user_data} + * {@link https://developers.binance.com/docs/wallet/account/api-key-permission} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 @@ -458,7 +458,7 @@ const Wallet = superclass => class extends superclass { * * POST /sapi/v3/asset/getUserAsset
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#user-asset-user_data} + * {@link https://developers.binance.com/docs/wallet/asset/user-assets} * * @param {object} [options] * @param {string} [options.asset] - If asset is blank, then query all positive assets user have. @@ -477,7 +477,7 @@ const Wallet = superclass => class extends superclass { * * POST /sapi/v1/asset/dust-btc
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#dustlog-user_data} + * {@link https://developers.binance.com/docs/wallet/asset/dust-log} * * @param {object} [options] * @param {number} [options.recvWindow] - The value cannot be greater than 60000 diff --git a/src/modules/websocket/api/account.js b/src/modules/websocket/api/account.js index b3cc6b8c..4e5046b0 100644 --- a/src/modules/websocket/api/account.js +++ b/src/modules/websocket/api/account.js @@ -12,7 +12,7 @@ const Account = superclass => class extends superclass { * Query information about your account.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#account-information-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-information-user_data} * * @param {object} [options] * @param {number} [options.recvWindow] @@ -27,7 +27,7 @@ const Account = superclass => class extends superclass { * Query your current order rate limit.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#account-order-rate-limits-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-order-rate-limits-user_data} * * @param {object} [options] * @param {number} [options.recvWindow] @@ -42,7 +42,7 @@ const Account = superclass => class extends superclass { * Query information about all your orders – active, canceled, filled – filtered by time range.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#account-order-history-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-order-history-user_data} * * @param {string} symbol * @param {object} [options] @@ -68,7 +68,7 @@ const Account = superclass => class extends superclass { * Query information about all your OCOs, filtered by time range.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#account-oco-history-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api} * * @param {object} [options] * @param {number} [options.fromId] @@ -92,7 +92,7 @@ const Account = superclass => class extends superclass { * Query information about all your trades, filtered by time range.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#account-trade-history-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-trade-history-user_data} * * @param {string} [symbol] * @param {object} [options] @@ -119,7 +119,7 @@ const Account = superclass => class extends superclass { * Displays the list of orders that were expired because of STP trigger.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#account-prevented-matches-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#account-prevented-matches-user_data} * * @param {string} [symbol] * @param {object} [options] diff --git a/src/modules/websocket/api/market.js b/src/modules/websocket/api/market.js index b7c7041a..c4c73478 100644 --- a/src/modules/websocket/api/market.js +++ b/src/modules/websocket/api/market.js @@ -12,7 +12,7 @@ const Market = superclass => class extends superclass { * Test connectivity to the WebSocket API.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#test-connectivity} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#test-connectivity} * */ ping (options = {}) { @@ -25,7 +25,7 @@ const Market = superclass => class extends superclass { * Test connectivity to the WebSocket API and get the current server time.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#check-server-time} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#check-server-time} * */ time (options = {}) { @@ -42,7 +42,7 @@ const Market = superclass => class extends superclass { * @param {string|array} [options.symbols] * @param {string|array} [options.permissions] * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#exchange-information} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#exchange-information} * */ exchangeInfo (options = {}) { @@ -62,7 +62,7 @@ const Market = superclass => class extends superclass { * Get current order book.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#order-book} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#order-book} * * @param {string} symbol * @param {object} [options] @@ -84,7 +84,7 @@ const Market = superclass => class extends superclass { * Get recent trades.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#recent-trades} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#recent-trades} * * @param {string} symbol * @param {object} [options] @@ -106,7 +106,7 @@ const Market = superclass => class extends superclass { * Get historical trades.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#historical-trades-market_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api} * * @param {string} symbol * @param {object} [options] @@ -129,7 +129,7 @@ const Market = superclass => class extends superclass { * Get aggregate trades.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#aggregate-trades} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#aggregate-trades} * * @param {string} symbol * @param {object} [options] @@ -154,7 +154,7 @@ const Market = superclass => class extends superclass { * Get klines (candlestick bars).
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#klines} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#klines} * * @param {string} symbol * @param {string} interval @@ -180,7 +180,7 @@ const Market = superclass => class extends superclass { * Get klines (candlestick bars) optimized for presentation.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#ui-klines} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#ui-klines} * * @param {string} symbol * @param {string} interval @@ -206,7 +206,7 @@ const Market = superclass => class extends superclass { * Get current average price for a symbol.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#current-average-price} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#current-average-price} * * @param {string} symbol * @@ -221,7 +221,7 @@ const Market = superclass => class extends superclass { * Get 24-hour rolling window price change statistics.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#24hr-ticker-price-change-statistics} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#24hr-ticker-price-change-statistics} * * @param {object} [options] * @param {string} [options.symbol] @@ -239,7 +239,7 @@ const Market = superclass => class extends superclass { * Get rolling window price change statistics with a custom window.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#rolling-window-price-change-statistics} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#rolling-window-price-change-statistics} * * @param {object} [options] * @param {string} [options.symbol] @@ -257,7 +257,7 @@ const Market = superclass => class extends superclass { * Get the latest market price for a symbol.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#symbol-price-ticker} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#symbol-price-ticker} * * @param {object} [options] * @param {string} [options.symbol] @@ -274,7 +274,7 @@ const Market = superclass => class extends superclass { * Get the current best price and quantity on the order book.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#symbol-order-book-ticker} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#symbol-order-book-ticker} * * @param {object} [options] * @param {string} [options.symbol] diff --git a/src/modules/websocket/api/trade.js b/src/modules/websocket/api/trade.js index 616075e8..dcef0abf 100644 --- a/src/modules/websocket/api/trade.js +++ b/src/modules/websocket/api/trade.js @@ -11,7 +11,7 @@ const Trade = superclass => class extends superclass { * * Send in a new order.
* - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#place-new-order-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#place-new-order-trade} * * @param {string} symbol * @param {string} side @@ -46,7 +46,7 @@ const Trade = superclass => class extends superclass { * * Test a new order.
* - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#test-new-order-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#test-new-order-trade} * * @param {string} symbol * @param {string} side @@ -81,7 +81,7 @@ const Trade = superclass => class extends superclass { * * Check execution status of an order.
* - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#query-order-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#query-order-user_data} * * @param {string} symbol * @param {object} [options] @@ -102,7 +102,7 @@ const Trade = superclass => class extends superclass { * * Cancel an active order.
* - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#cancel-order-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-order-trade} * * @param {string} symbol * @param {object} [options] @@ -124,7 +124,7 @@ const Trade = superclass => class extends superclass { * * Cancel an existing order and immediately place a new order instead of the canceled one.
* - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#cancel-and-replace-order-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-and-replace-order-trade} * * @param {string} symbol * @param {string} cancelReplaceMode @@ -165,7 +165,7 @@ const Trade = superclass => class extends superclass { * * Query execution status of all open orders.
* - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#current-open-orders-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#current-open-orders-user_data} * * @param {string} symbol * @param {object} [options] @@ -184,7 +184,7 @@ const Trade = superclass => class extends superclass { * * Cancel all open orders on a symbol, including OCO orders.
* - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#cancel-open-orders-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#cancel-open-orders-trade} * * @param {string} symbol * @param {object} [options] @@ -203,7 +203,7 @@ const Trade = superclass => class extends superclass { * * Send in a new OCO order.
* - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#place-new-oco-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api} * * @param {string} symbol * @param {string} side @@ -249,7 +249,7 @@ const Trade = superclass => class extends superclass { * * Check execution status of an OCO.
* - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#query-oco-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api} * * @param {object} [options] * @param {string} [options.origClientOrderId] @@ -266,7 +266,7 @@ const Trade = superclass => class extends superclass { * * Check execution status of an OCO.
* - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#cancel-oco-trade} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api} * * @param {string} symbol * @param {object} [options] @@ -288,7 +288,7 @@ const Trade = superclass => class extends superclass { * * Query execution status of all open OCOs.
* - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#current-open-ocos-user_data} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api} * * @param {object} [options] * @param {number} [options.recvWindow] diff --git a/src/modules/websocket/api/userData.js b/src/modules/websocket/api/userData.js index d2aea130..9e74c6d0 100644 --- a/src/modules/websocket/api/userData.js +++ b/src/modules/websocket/api/userData.js @@ -11,7 +11,7 @@ const UserData = superclass => class extends superclass { * Start a new user data stream.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#start-user-data-stream-user_stream} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#start-user-data-stream-user_stream} * */ startUserDataStream () { @@ -24,7 +24,7 @@ const UserData = superclass => class extends superclass { * Ping a user data stream to keep it alive.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#ping-user-data-stream-user_stream} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#ping-user-data-stream-user_stream} * * @param {string} listenKey * @@ -39,7 +39,7 @@ const UserData = superclass => class extends superclass { * Explicitly stop and close the user data stream.
* * - * {@link https://binance-docs.github.io/apidocs/websocket_api/en/#stop-user-data-stream-user_stream} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-api#stop-user-data-stream-user_stream} * */ stopUserDataStream (listenKey) { diff --git a/src/modules/websocket/stream.js b/src/modules/websocket/stream.js index 7eeecb06..0b9b7b60 100644 --- a/src/modules/websocket/stream.js +++ b/src/modules/websocket/stream.js @@ -17,7 +17,7 @@ const Stream = superclass => class extends superclass { * Stream Name: <symbol>@aggTrade
* Update Speed: Real-time
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#aggregate-trade-streams} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#aggregate-trade-streams} * * @param {string} symbol */ @@ -34,7 +34,7 @@ const Stream = superclass => class extends superclass { * Stream Name: <symbol>@trade
* Update Speed: Real-time
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#trade-streams} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#trade-streams} * * @param {string} symbol */ @@ -44,14 +44,14 @@ const Stream = superclass => class extends superclass { } /** - * Kline/Candlestick Streams
+ * Kline/Candlestick Streams for UTC
* * The Kline/Candlestick Stream push updates to the current klines/candlestick every second.
* * Stream Name: <symbol>@kline_<interval>
* Update Speed: 2000ms
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#kline-candlestick-streams} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#klinecandlestick-streams-for-utc} * * @param {string} symbol * @param {string} interval - m -> minutes; h -> hours; d -> days; w -> weeks; M -> months:
@@ -71,9 +71,9 @@ const Stream = superclass => class extends superclass { * Stream Name: <symbol>@miniTicker or !miniTicker@arr
* Update Speed: 1000ms
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-mini-ticker-stream} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-mini-ticker-stream} *
- * {@link https://binance-docs.github.io/apidocs/spot/en/#all-market-mini-tickers-stream} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#all-market-mini-tickers-stream} * * @param {string} [symbol] */ @@ -94,9 +94,9 @@ const Stream = superclass => class extends superclass { * Stream Name: <symbol>@ticker or !ticker@arr
* Update Speed: 1000ms
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-ticker-streams} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-ticker-streams} *
- * {@link https://binance-docs.github.io/apidocs/spot/en/#all-market-tickers-stream} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#all-market-tickers-stream} * * @param {string} [symbol] * @@ -122,9 +122,9 @@ const Stream = superclass => class extends superclass { * * As such, the effective window might be up to 59999ms wider that <window_size>. * - * {@link https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-rolling-window-statistics-streams} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-rolling-window-statistics-streams} *
- * {@link https://binance-docs.github.io/apidocs/spot/en/#all-market-rolling-window-statistics-streams} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#all-market-rolling-window-statistics-streams} * * @param {string} [windowSize] * @param {string} [symbol] @@ -146,9 +146,7 @@ const Stream = superclass => class extends superclass { * Stream Name: <symbol>@bookTicker or !bookTicker
* Update Speed: Real-time
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#individual-symbol-book-ticker-streams} - *
- * {@link https://binance-docs.github.io/apidocs/spot/en/#all-book-tickers-stream} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#individual-symbol-book-ticker-streams} * * @param {string} [symbol] */ @@ -165,7 +163,7 @@ const Stream = superclass => class extends superclass { * Stream Names: <symbol>@depth<levels> or <symbol>@depth<levels>@100ms.
* Update Speed: 1000ms or 100ms
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#partial-book-depth-streams} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#partial-book-depth-streams} * * @param {string} symbol * @param {string} levels - 5, 10, or 20 @@ -185,7 +183,7 @@ const Stream = superclass => class extends superclass { * Stream Names: <symbol>@depth or <symbol>@depth@100ms
* Update Speed: 1000ms or 100ms
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#diff-depth-stream} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/web-socket-streams#diff-depth-stream} * * @param {string} symbol * @param {string} speed - 1000ms or 100ms @@ -199,7 +197,7 @@ const Stream = superclass => class extends superclass { /** * Listen to User data stream
* - * {@link https://binance-docs.github.io/apidocs/spot/en/#user-data-streams} + * {@link https://developers.binance.com/docs/binance-spot-api-docs/user-data-stream} * * @param {string} listenKey */