Skip to content

Commit

Permalink
Merge pull request #172 from binance/rc-v3.5.0
Browse files Browse the repository at this point in the history
Release v3.5.0
  • Loading branch information
alplabin authored Oct 2, 2024
2 parents 668debc + adfd5fb commit c01b491
Show file tree
Hide file tree
Showing 71 changed files with 689 additions and 1,903 deletions.
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

0 comments on commit c01b491

Please sign in to comment.