diff --git a/package.json b/package.json index 74a5e49..a0203d7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "3.5.4", + "version": "3.5.5", "description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/types/response/v5-account.ts b/src/types/response/v5-account.ts index 33fa08b..1b11132 100644 --- a/src/types/response/v5-account.ts +++ b/src/types/response/v5-account.ts @@ -11,6 +11,8 @@ export interface WalletBalanceV5Coin { equity: string; usdValue: string; walletBalance: string; + free: string; // spot only + locked: string; // spot only borrowAmount: string; availableToBorrow: string; availableToWithdraw: string; @@ -20,10 +22,12 @@ export interface WalletBalanceV5Coin { totalPositionMM: string; unrealisedPnl: string; cumRealisedPnl: string; + bonus: string; } export interface WalletBalanceV5 { accountType: AccountTypeV5; + accountLTV: string; accountIMRate: string; accountMMRate: string; totalEquity: string; diff --git a/test/contract/private.write.test.ts b/test/contract/private.write.test.ts index c917f29..2145a58 100644 --- a/test/contract/private.write.test.ts +++ b/test/contract/private.write.test.ts @@ -89,8 +89,8 @@ describe('Private Contract REST API POST Endpoints', () => { await api.setMarginSwitch({ symbol, tradeMode: 1, - buyLeverage: '10', - sellLeverage: '10', + buyLeverage: '5', + sellLeverage: '5', }) ).toMatchObject({ retCode: API_ERROR_CODE.CONTRACT_MARGIN_MODE_NOT_MODIFIED, @@ -116,7 +116,7 @@ describe('Private Contract REST API POST Endpoints', () => { }); it('setLeverage()', async () => { - expect(await api.setLeverage(symbol, '10', '10')).toMatchObject({ + expect(await api.setLeverage(symbol, '5', '5')).toMatchObject({ retCode: API_ERROR_CODE.CONTRACT_SET_LEVERAGE_NOT_MODIFIED, }); }); diff --git a/test/linear/private.write.test.ts b/test/linear/private.write.test.ts index e0acba8..65d4eb5 100644 --- a/test/linear/private.write.test.ts +++ b/test/linear/private.write.test.ts @@ -186,8 +186,8 @@ describe('Private Linear REST API POST Endpoints', () => { expect( await api.setUserLeverage({ symbol, - buy_leverage: 10, - sell_leverage: 10, + buy_leverage: 5, + sell_leverage: 5, }) ).toMatchObject({ ret_code: API_ERROR_CODE.LEVERAGE_NOT_MODIFIED, diff --git a/test/usdc/perpetual/private.write.test.ts b/test/usdc/perpetual/private.write.test.ts index d4f0646..37f485c 100644 --- a/test/usdc/perpetual/private.write.test.ts +++ b/test/usdc/perpetual/private.write.test.ts @@ -78,7 +78,7 @@ describe('Private USDC Perp REST API POST Endpoints', () => { }); it('setLeverage()', async () => { - expect(await api.setLeverage(symbol, '10')).toMatchObject({ + expect(await api.setLeverage(symbol, '5')).toMatchObject({ retCode: API_ERROR_CODE.LEVERAGE_NOT_MODIFIED, }); }); diff --git a/test/v5/private.write.test.ts b/test/v5/private.write.test.ts index cd3b958..724f2b9 100644 --- a/test/v5/private.write.test.ts +++ b/test/v5/private.write.test.ts @@ -181,8 +181,8 @@ describe('Private WRITE V5 REST API Endpoints', () => { expect( await api.setLeverage({ category: 'linear', - buyLeverage: '10', - sellLeverage: '10', + buyLeverage: '5', + sellLeverage: '5', symbol: linearSymbol, }) ).toMatchObject({ @@ -196,8 +196,8 @@ describe('Private WRITE V5 REST API Endpoints', () => { expect( await api.switchIsolatedMargin({ category: 'linear', - buyLeverage: '10', - sellLeverage: '10', + buyLeverage: '5', + sellLeverage: '5', symbol: linearSymbol, // isolated tradeMode: 1,