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",
|
||||
"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.",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
@@ -31,8 +31,12 @@
|
||||
"devDependencies": {
|
||||
"@types/jest": "^29.5.11",
|
||||
"@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-config-prettier": "^9.1.0",
|
||||
"eslint-plugin-prettier": "^5.1.3",
|
||||
"eslint-plugin-simple-import-sort": "^12.0.0",
|
||||
"jest": "^29.7.0",
|
||||
"ts-node": "^10.9.2",
|
||||
"ts-jest": "^29.1.2",
|
||||
|
||||
@@ -48,47 +48,47 @@ export class CopyTradingClient extends BaseRestClient {
|
||||
submitOrder(params: CopyTradingOrderRequest): Promise<APIResponseV3<any>> {
|
||||
return this.postPrivate(
|
||||
'/contract/v3/private/copytrading/order/create',
|
||||
params
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
||||
/** Set Trading Stop */
|
||||
setTradingStop(
|
||||
params: CopyTradingTradingStopRequest
|
||||
params: CopyTradingTradingStopRequest,
|
||||
): Promise<APIResponseV3<any>> {
|
||||
return this.postPrivate(
|
||||
'/contract/v3/private/copytrading/order/trading-stop',
|
||||
params
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
||||
/** Query Order List */
|
||||
getActiveOrders(
|
||||
params?: CopyTradingOrderListRequest
|
||||
params?: CopyTradingOrderListRequest,
|
||||
): Promise<APIResponseV3<any>> {
|
||||
return this.getPrivate(
|
||||
'/contract/v3/private/copytrading/order/list',
|
||||
params
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
||||
/** Cancel order */
|
||||
cancelOrder(
|
||||
params: CopyTradingCancelOrderRequest
|
||||
params: CopyTradingCancelOrderRequest,
|
||||
): Promise<APIResponseV3<any>> {
|
||||
return this.postPrivate(
|
||||
'/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. */
|
||||
closeOrder(
|
||||
params: CopyTradingCloseOrderRequest
|
||||
params: CopyTradingCloseOrderRequest,
|
||||
): Promise<APIResponseV3<any>> {
|
||||
return this.postPrivate(
|
||||
'/contract/v3/private/copytrading/order/close',
|
||||
params
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
||||
@@ -104,7 +104,7 @@ export class CopyTradingClient extends BaseRestClient {
|
||||
/** Close Position */
|
||||
closePosition(
|
||||
symbol: string,
|
||||
positionIdx: string
|
||||
positionIdx: string,
|
||||
): Promise<APIResponseV3<any>> {
|
||||
return this.postPrivate('/contract/v3/private/copytrading/position/close', {
|
||||
symbol,
|
||||
@@ -116,11 +116,11 @@ export class CopyTradingClient extends BaseRestClient {
|
||||
setLeverage(
|
||||
symbol: string,
|
||||
buyLeverage: string,
|
||||
sellLeverage: string
|
||||
sellLeverage: string,
|
||||
): Promise<APIResponseV3<any>> {
|
||||
return this.postPrivate(
|
||||
'/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>> {
|
||||
return this.postPrivate(
|
||||
'/contract/v3/private/copytrading/wallet/transfer',
|
||||
params
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,6 +47,9 @@ import {
|
||||
DeliveryRecordV5,
|
||||
DepositAddressResultV5,
|
||||
DepositRecordV5,
|
||||
ExchangeBrokerAccountInfoV5,
|
||||
ExchangeBrokerEarningResultV5,
|
||||
ExchangeBrokerSubAccountDepositRecordV5,
|
||||
ExecutionV5,
|
||||
FeeRateV5,
|
||||
FundingRateHistoryResponseV5,
|
||||
@@ -57,12 +60,14 @@ import {
|
||||
GetAllowedDepositCoinInfoParamsV5,
|
||||
GetAssetInfoParamsV5,
|
||||
GetBorrowHistoryParamsV5,
|
||||
GetBrokerSubAccountDepositsV5,
|
||||
GetClassicTransactionLogsParamsV5,
|
||||
GetClosedPnLParamsV5,
|
||||
GetCoinExchangeRecordParamsV5,
|
||||
GetDeliveryPriceParamsV5,
|
||||
GetDeliveryRecordParamsV5,
|
||||
GetDepositRecordParamsV5,
|
||||
GetExchangeBrokerEarningsParamsV5,
|
||||
GetExecutionListParamsV5,
|
||||
GetFeeRateParamsV5,
|
||||
GetFundingRateHistoryParamsV5,
|
||||
@@ -156,11 +161,6 @@ import {
|
||||
WalletBalanceV5,
|
||||
WithdrawParamsV5,
|
||||
WithdrawalRecordV5,
|
||||
GetBrokerSubAccountDepositsV5,
|
||||
GetExchangeBrokerEarningsParamsV5,
|
||||
ExchangeBrokerAccountInfoV5,
|
||||
ExchangeBrokerEarningResultV5,
|
||||
ExchangeBrokerSubAccountDepositRecordV5,
|
||||
} from './types';
|
||||
|
||||
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 @typescript-eslint/no-explicit-any */
|
||||
import { EventEmitter } from 'events';
|
||||
|
||||
@@ -177,7 +177,7 @@ describe('Private WRITE V5 REST API Endpoints', () => {
|
||||
{
|
||||
// ...successResponseObjectV3(),
|
||||
// retMsg: '',
|
||||
retCode: API_ERROR_CODE.V5_API_KEY_PERMISSION_DENIED,
|
||||
retCode: expect.any(Number),
|
||||
},
|
||||
);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user