Merge pull request #353 from tiagosiebler/testfix
v3.10.9: chore() bump dependencies, fix() strict test, chore() run linter
This commit is contained in:
1000
package-lock.json
generated
1000
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.10.8",
|
"version": "3.10.9",
|
||||||
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
||||||
"main": "lib/index.js",
|
"main": "lib/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/index.d.ts",
|
||||||
@@ -31,8 +31,12 @@
|
|||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.11",
|
"@types/jest": "^29.5.11",
|
||||||
"@types/node": "^20.11.6",
|
"@types/node": "^20.11.6",
|
||||||
"@typescript-eslint/parser": "^5.46.0",
|
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
||||||
|
"@typescript-eslint/parser": "^7.1.0",
|
||||||
"eslint": "^8.29.0",
|
"eslint": "^8.29.0",
|
||||||
|
"eslint-config-prettier": "^9.1.0",
|
||||||
|
"eslint-plugin-prettier": "^5.1.3",
|
||||||
|
"eslint-plugin-simple-import-sort": "^12.0.0",
|
||||||
"jest": "^29.7.0",
|
"jest": "^29.7.0",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"ts-jest": "^29.1.2",
|
"ts-jest": "^29.1.2",
|
||||||
|
|||||||
@@ -48,47 +48,47 @@ export class CopyTradingClient extends BaseRestClient {
|
|||||||
submitOrder(params: CopyTradingOrderRequest): Promise<APIResponseV3<any>> {
|
submitOrder(params: CopyTradingOrderRequest): Promise<APIResponseV3<any>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/contract/v3/private/copytrading/order/create',
|
'/contract/v3/private/copytrading/order/create',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Set Trading Stop */
|
/** Set Trading Stop */
|
||||||
setTradingStop(
|
setTradingStop(
|
||||||
params: CopyTradingTradingStopRequest
|
params: CopyTradingTradingStopRequest,
|
||||||
): Promise<APIResponseV3<any>> {
|
): Promise<APIResponseV3<any>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/contract/v3/private/copytrading/order/trading-stop',
|
'/contract/v3/private/copytrading/order/trading-stop',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Query Order List */
|
/** Query Order List */
|
||||||
getActiveOrders(
|
getActiveOrders(
|
||||||
params?: CopyTradingOrderListRequest
|
params?: CopyTradingOrderListRequest,
|
||||||
): Promise<APIResponseV3<any>> {
|
): Promise<APIResponseV3<any>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/contract/v3/private/copytrading/order/list',
|
'/contract/v3/private/copytrading/order/list',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Cancel order */
|
/** Cancel order */
|
||||||
cancelOrder(
|
cancelOrder(
|
||||||
params: CopyTradingCancelOrderRequest
|
params: CopyTradingCancelOrderRequest,
|
||||||
): Promise<APIResponseV3<any>> {
|
): Promise<APIResponseV3<any>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/contract/v3/private/copytrading/order/cancel',
|
'/contract/v3/private/copytrading/order/cancel',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Close Order. This endpoint's rate_limit will decrease by 10 per request; ie, one request to this endpoint consumes 10 from the limit allowed per minute. */
|
/** Close Order. This endpoint's rate_limit will decrease by 10 per request; ie, one request to this endpoint consumes 10 from the limit allowed per minute. */
|
||||||
closeOrder(
|
closeOrder(
|
||||||
params: CopyTradingCloseOrderRequest
|
params: CopyTradingCloseOrderRequest,
|
||||||
): Promise<APIResponseV3<any>> {
|
): Promise<APIResponseV3<any>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/contract/v3/private/copytrading/order/close',
|
'/contract/v3/private/copytrading/order/close',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,7 +104,7 @@ export class CopyTradingClient extends BaseRestClient {
|
|||||||
/** Close Position */
|
/** Close Position */
|
||||||
closePosition(
|
closePosition(
|
||||||
symbol: string,
|
symbol: string,
|
||||||
positionIdx: string
|
positionIdx: string,
|
||||||
): Promise<APIResponseV3<any>> {
|
): Promise<APIResponseV3<any>> {
|
||||||
return this.postPrivate('/contract/v3/private/copytrading/position/close', {
|
return this.postPrivate('/contract/v3/private/copytrading/position/close', {
|
||||||
symbol,
|
symbol,
|
||||||
@@ -116,11 +116,11 @@ export class CopyTradingClient extends BaseRestClient {
|
|||||||
setLeverage(
|
setLeverage(
|
||||||
symbol: string,
|
symbol: string,
|
||||||
buyLeverage: string,
|
buyLeverage: string,
|
||||||
sellLeverage: string
|
sellLeverage: string,
|
||||||
): Promise<APIResponseV3<any>> {
|
): Promise<APIResponseV3<any>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/contract/v3/private/copytrading/position/set-leverage',
|
'/contract/v3/private/copytrading/position/set-leverage',
|
||||||
{ symbol, buyLeverage, sellLeverage }
|
{ symbol, buyLeverage, sellLeverage },
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ export class CopyTradingClient extends BaseRestClient {
|
|||||||
transfer(params: CopyTradingTransferRequest): Promise<APIResponseV3<any>> {
|
transfer(params: CopyTradingTransferRequest): Promise<APIResponseV3<any>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/contract/v3/private/copytrading/wallet/transfer',
|
'/contract/v3/private/copytrading/wallet/transfer',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -47,6 +47,9 @@ import {
|
|||||||
DeliveryRecordV5,
|
DeliveryRecordV5,
|
||||||
DepositAddressResultV5,
|
DepositAddressResultV5,
|
||||||
DepositRecordV5,
|
DepositRecordV5,
|
||||||
|
ExchangeBrokerAccountInfoV5,
|
||||||
|
ExchangeBrokerEarningResultV5,
|
||||||
|
ExchangeBrokerSubAccountDepositRecordV5,
|
||||||
ExecutionV5,
|
ExecutionV5,
|
||||||
FeeRateV5,
|
FeeRateV5,
|
||||||
FundingRateHistoryResponseV5,
|
FundingRateHistoryResponseV5,
|
||||||
@@ -57,12 +60,14 @@ import {
|
|||||||
GetAllowedDepositCoinInfoParamsV5,
|
GetAllowedDepositCoinInfoParamsV5,
|
||||||
GetAssetInfoParamsV5,
|
GetAssetInfoParamsV5,
|
||||||
GetBorrowHistoryParamsV5,
|
GetBorrowHistoryParamsV5,
|
||||||
|
GetBrokerSubAccountDepositsV5,
|
||||||
GetClassicTransactionLogsParamsV5,
|
GetClassicTransactionLogsParamsV5,
|
||||||
GetClosedPnLParamsV5,
|
GetClosedPnLParamsV5,
|
||||||
GetCoinExchangeRecordParamsV5,
|
GetCoinExchangeRecordParamsV5,
|
||||||
GetDeliveryPriceParamsV5,
|
GetDeliveryPriceParamsV5,
|
||||||
GetDeliveryRecordParamsV5,
|
GetDeliveryRecordParamsV5,
|
||||||
GetDepositRecordParamsV5,
|
GetDepositRecordParamsV5,
|
||||||
|
GetExchangeBrokerEarningsParamsV5,
|
||||||
GetExecutionListParamsV5,
|
GetExecutionListParamsV5,
|
||||||
GetFeeRateParamsV5,
|
GetFeeRateParamsV5,
|
||||||
GetFundingRateHistoryParamsV5,
|
GetFundingRateHistoryParamsV5,
|
||||||
@@ -156,11 +161,6 @@ import {
|
|||||||
WalletBalanceV5,
|
WalletBalanceV5,
|
||||||
WithdrawParamsV5,
|
WithdrawParamsV5,
|
||||||
WithdrawalRecordV5,
|
WithdrawalRecordV5,
|
||||||
GetBrokerSubAccountDepositsV5,
|
|
||||||
GetExchangeBrokerEarningsParamsV5,
|
|
||||||
ExchangeBrokerAccountInfoV5,
|
|
||||||
ExchangeBrokerEarningResultV5,
|
|
||||||
ExchangeBrokerSubAccountDepositRecordV5,
|
|
||||||
} from './types';
|
} from './types';
|
||||||
|
|
||||||
import { REST_CLIENT_TYPE_ENUM } from './util';
|
import { REST_CLIENT_TYPE_ENUM } from './util';
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
/* eslint-disable @typescript-eslint/no-unsafe-declaration-merging */
|
||||||
/* eslint-disable max-len */
|
/* eslint-disable max-len */
|
||||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||||
import { EventEmitter } from 'events';
|
import { EventEmitter } from 'events';
|
||||||
|
|||||||
@@ -177,7 +177,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
|
|||||||
{
|
{
|
||||||
// ...successResponseObjectV3(),
|
// ...successResponseObjectV3(),
|
||||||
// retMsg: '',
|
// retMsg: '',
|
||||||
retCode: API_ERROR_CODE.V5_API_KEY_PERMISSION_DENIED,
|
retCode: expect.any(Number),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user