Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release v3.5.0 #172

Merged
merged 6 commits into from
Oct 2, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,42 @@
# Changelog
## 3.5.0 - 2024-10-02
### 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
Expand Down
13 changes: 0 additions & 13 deletions __tests__/spot/blvt/blvtInfo.test.js

This file was deleted.

36 changes: 0 additions & 36 deletions __tests__/spot/blvt/blvtRedemptionRecord.test.js

This file was deleted.

36 changes: 0 additions & 36 deletions __tests__/spot/blvt/blvtSubscriptionRecord.test.js

This file was deleted.

32 changes: 0 additions & 32 deletions __tests__/spot/blvt/redeemBlvt.test.js

This file was deleted.

38 changes: 0 additions & 38 deletions __tests__/spot/blvt/subscribeBlvt.test.js

This file was deleted.

44 changes: 0 additions & 44 deletions __tests__/spot/futures/futuresTransfer.test.js

This file was deleted.

37 changes: 0 additions & 37 deletions __tests__/spot/futures/futuresTransferHistory.test.js

This file was deleted.

40 changes: 40 additions & 0 deletions __tests__/spot/gift_card/giftCardBuyCode.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
/* global describe, it, expect */
const MissingParameterError = require('../../../src/error/missingParameterError')
const { nockPostMock, buildQueryString, SpotClient } = require('../../testUtils/testSetup')

const {
mockResponse
} = require('../../testUtils/mockData')

const baseToken = 'USDT'
const faceToken = 'BNB'
const baseTokenAmount = 10

describe('#giftCardBuyCode', () => {
it('missing baseToken', () => {
expect(() => {
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 })}`)(mockResponse)

return SpotClient.giftCardBuyCode(baseToken, faceToken, baseTokenAmount).then(response => {
expect(response).toBeDefined()
expect(response.data).toEqual(mockResponse)
})
})
})
23 changes: 0 additions & 23 deletions __tests__/spot/margin/isolatedMarginSymbol.test.js

This file was deleted.

46 changes: 0 additions & 46 deletions __tests__/spot/margin/isolatedMarginTransfer.test.js

This file was deleted.

Loading
Loading