Merge pull request #387 from JJ-Cro/update281024
chore(): marked clients for deprecation
This commit is contained in:
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.10.22",
|
"version": "3.10.23",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.10.22",
|
"version": "3.10.23",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.6.6",
|
"axios": "^1.6.6",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "3.10.22",
|
"version": "3.10.23",
|
||||||
"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",
|
||||||
|
|||||||
@@ -43,6 +43,10 @@ import BaseRestClient from './util/BaseRestClient';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* REST API client for Account Asset V3 APIs
|
* REST API client for Account Asset V3 APIs
|
||||||
|
* @deprecated WARNING
|
||||||
|
* These endpoints are being switched off gradually and are expected to be completely turned off by the end of 2024.
|
||||||
|
* They may stop working at any point before then.
|
||||||
|
* Please update your code as soon as possible to use the V5 APIs instead.
|
||||||
*/
|
*/
|
||||||
export class AccountAssetClientV3 extends BaseRestClient {
|
export class AccountAssetClientV3 extends BaseRestClient {
|
||||||
getClientType() {
|
getClientType() {
|
||||||
@@ -67,20 +71,20 @@ export class AccountAssetClientV3 extends BaseRestClient {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
createInternalTransfer(
|
createInternalTransfer(
|
||||||
params: InternalTransferRequestV3
|
params: InternalTransferRequestV3,
|
||||||
): Promise<APIResponseWithTime<{ transferId: string }>> {
|
): Promise<APIResponseWithTime<{ transferId: string }>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/asset/v3/private/transfer/inter-transfer',
|
'/asset/v3/private/transfer/inter-transfer',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getInternalTransfers(
|
getInternalTransfers(
|
||||||
params: QueryInternalTransfersRequestV3
|
params: QueryInternalTransfersRequestV3,
|
||||||
): Promise<APIResponseWithTime<QueryInternalTransferSResponseV3>> {
|
): Promise<APIResponseWithTime<QueryInternalTransferSResponseV3>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/asset/v3/private/transfer/inter-transfer/list/query',
|
'/asset/v3/private/transfer/inter-transfer/list/query',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -93,16 +97,16 @@ export class AccountAssetClientV3 extends BaseRestClient {
|
|||||||
}): Promise<APIResponseWithTime<{ transferId: string }>> {
|
}): Promise<APIResponseWithTime<{ transferId: string }>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/asset/v3/private/transfer/sub-member-transfer',
|
'/asset/v3/private/transfer/sub-member-transfer',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getSubAccountTransfers(
|
getSubAccountTransfers(
|
||||||
params?: SubAccountTransferRequestV3
|
params?: SubAccountTransferRequestV3,
|
||||||
): Promise<APIResponseWithTime<SubAccountTransferResponseV3>> {
|
): Promise<APIResponseWithTime<SubAccountTransferResponseV3>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/asset/v3/private/transfer/sub-member-transfer/list/query',
|
'/asset/v3/private/transfer/sub-member-transfer/list/query',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,61 +124,61 @@ export class AccountAssetClientV3 extends BaseRestClient {
|
|||||||
}): Promise<APIResponseWithTime<any>> {
|
}): Promise<APIResponseWithTime<any>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/asset/v3/private/transfer/transfer-sub-member-save',
|
'/asset/v3/private/transfer/transfer-sub-member-save',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
createUniversalTransfer(
|
createUniversalTransfer(
|
||||||
params: UniversalTransferRequestV3
|
params: UniversalTransferRequestV3,
|
||||||
): Promise<APIResponseWithTime<UniversalTransferCreateResponse>> {
|
): Promise<APIResponseWithTime<UniversalTransferCreateResponse>> {
|
||||||
return this.postPrivate(
|
return this.postPrivate(
|
||||||
'/asset/v3/private/transfer/universal-transfer',
|
'/asset/v3/private/transfer/universal-transfer',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getUniversalTransfers(
|
getUniversalTransfers(
|
||||||
params: UniversalTransferListRequestV3
|
params: UniversalTransferListRequestV3,
|
||||||
): Promise<APIResponseWithTime<UniversalTransferListResponseV3>> {
|
): Promise<APIResponseWithTime<UniversalTransferListResponseV3>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/asset/v3/private/transfer/universal-transfer/list/query',
|
'/asset/v3/private/transfer/universal-transfer/list/query',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getTransferableCoinList(
|
getTransferableCoinList(
|
||||||
params: TransferCoinListRequestV3
|
params: TransferCoinListRequestV3,
|
||||||
): Promise<APIResponseWithTime<{ list: string[] }>> {
|
): Promise<APIResponseWithTime<{ list: string[] }>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/asset/v3/private/transfer/transfer-coin/list/query',
|
'/asset/v3/private/transfer/transfer-coin/list/query',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getAccountCoinBalance(
|
getAccountCoinBalance(
|
||||||
params: SingleAccountCoinBalanceRequestV3
|
params: SingleAccountCoinBalanceRequestV3,
|
||||||
): Promise<APIResponseWithTime<AccountCoinBalanceResponseV3>> {
|
): Promise<APIResponseWithTime<AccountCoinBalanceResponseV3>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/asset/v3/private/transfer/account-coin/balance/query',
|
'/asset/v3/private/transfer/account-coin/balance/query',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getAccountCoinBalances(
|
getAccountCoinBalances(
|
||||||
params: AccountCoinBalancesRequestV3
|
params: AccountCoinBalancesRequestV3,
|
||||||
): Promise<APIResponseWithTime<AccountCoinBalancesResponseV3>> {
|
): Promise<APIResponseWithTime<AccountCoinBalancesResponseV3>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/asset/v3/private/transfer/account-coins/balance/query',
|
'/asset/v3/private/transfer/account-coins/balance/query',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getAssetInfo(
|
getAssetInfo(
|
||||||
params?: AssetInfoRequestV3
|
params?: AssetInfoRequestV3,
|
||||||
): Promise<APIResponseWithTime<AssetInfoResponseV3>> {
|
): Promise<APIResponseWithTime<AssetInfoResponseV3>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/asset/v3/private/transfer/asset-info/query',
|
'/asset/v3/private/transfer/asset-info/query',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -186,49 +190,49 @@ export class AccountAssetClientV3 extends BaseRestClient {
|
|||||||
|
|
||||||
/** Get Deposit Spec */
|
/** Get Deposit Spec */
|
||||||
getSupportedDepositList(
|
getSupportedDepositList(
|
||||||
params?: SupportedDepositListRequestV3
|
params?: SupportedDepositListRequestV3,
|
||||||
): Promise<APIResponseWithTime<SupportedDepositListResponseV3>> {
|
): Promise<APIResponseWithTime<SupportedDepositListResponseV3>> {
|
||||||
return this.get(
|
return this.get(
|
||||||
'/asset/v3/public/deposit/allowed-deposit-list/query',
|
'/asset/v3/public/deposit/allowed-deposit-list/query',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getDepositRecords(
|
getDepositRecords(
|
||||||
params?: DepositRecordQueryRequestV3
|
params?: DepositRecordQueryRequestV3,
|
||||||
): Promise<APIResponseWithTime<DepositRecordQueryResponseV3>> {
|
): Promise<APIResponseWithTime<DepositRecordQueryResponseV3>> {
|
||||||
return this.getPrivate('/asset/v3/private/deposit/record/query', params);
|
return this.getPrivate('/asset/v3/private/deposit/record/query', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
getSubDepositRecords(
|
getSubDepositRecords(
|
||||||
params: SubDepositRecordQueryRequestV3
|
params: SubDepositRecordQueryRequestV3,
|
||||||
): Promise<APIResponseWithTime<DepositRecordQueryResponseV3>> {
|
): Promise<APIResponseWithTime<DepositRecordQueryResponseV3>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/asset/v3/private/deposit/sub-member-record/query',
|
'/asset/v3/private/deposit/sub-member-record/query',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
getWithdrawRecords(
|
getWithdrawRecords(
|
||||||
params?: WithdrawRecordQueryRequestV3
|
params?: WithdrawRecordQueryRequestV3,
|
||||||
): Promise<APIResponseWithTime<WithdrawRecordsQueryResponseV3>> {
|
): Promise<APIResponseWithTime<WithdrawRecordsQueryResponseV3>> {
|
||||||
return this.getPrivate('/asset/v3/private/withdraw/record/query', params);
|
return this.getPrivate('/asset/v3/private/withdraw/record/query', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
getCoinInformation(
|
getCoinInformation(
|
||||||
coin?: string
|
coin?: string,
|
||||||
): Promise<APIResponseWithTime<CoinInfoQueryResponseV3>> {
|
): Promise<APIResponseWithTime<CoinInfoQueryResponseV3>> {
|
||||||
return this.getPrivate('/asset/v3/private/coin-info/query', { coin });
|
return this.getPrivate('/asset/v3/private/coin-info/query', { coin });
|
||||||
}
|
}
|
||||||
|
|
||||||
submitWithdrawal(
|
submitWithdrawal(
|
||||||
params: WithdrawCreateRequestV3
|
params: WithdrawCreateRequestV3,
|
||||||
): Promise<APIResponseWithTime<{ id: string }>> {
|
): Promise<APIResponseWithTime<{ id: string }>> {
|
||||||
return this.postPrivate('/asset/v3/private/withdraw/create', params);
|
return this.postPrivate('/asset/v3/private/withdraw/create', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
cancelWithdrawal(
|
cancelWithdrawal(
|
||||||
withdrawalId: number
|
withdrawalId: number,
|
||||||
): Promise<APIResponseWithTime<{ status: 1 | 0 }>> {
|
): Promise<APIResponseWithTime<{ status: 1 | 0 }>> {
|
||||||
return this.postPrivate('/asset/v3/private/withdraw/create', {
|
return this.postPrivate('/asset/v3/private/withdraw/create', {
|
||||||
withdrawalId,
|
withdrawalId,
|
||||||
@@ -236,28 +240,28 @@ export class AccountAssetClientV3 extends BaseRestClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
getMasterAccountDepositAddress(
|
getMasterAccountDepositAddress(
|
||||||
params?: QueryDepositAddressRequestV3
|
params?: QueryDepositAddressRequestV3,
|
||||||
): Promise<APIResponseWithTime<DepositAddressResponseV3>> {
|
): Promise<APIResponseWithTime<DepositAddressResponseV3>> {
|
||||||
return this.getPrivate('/asset/v3/private/deposit/address/query', params);
|
return this.getPrivate('/asset/v3/private/deposit/address/query', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
getSubAccountDepositAddress(
|
getSubAccountDepositAddress(
|
||||||
params: QuerySubAccountDepositAddressRequestV3
|
params: QuerySubAccountDepositAddressRequestV3,
|
||||||
): Promise<APIResponseWithTime<DepositAddressResponseV3>> {
|
): Promise<APIResponseWithTime<DepositAddressResponseV3>> {
|
||||||
return this.getPrivate(
|
return this.getPrivate(
|
||||||
'/asset/v3/private/deposit/sub-member-address/query',
|
'/asset/v3/private/deposit/sub-member-address/query',
|
||||||
params
|
params,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
createSubMember(
|
createSubMember(
|
||||||
params: CreateSubMemberRequestV3
|
params: CreateSubMemberRequestV3,
|
||||||
): Promise<APIResponseWithTime<CreateSubMemberResponseV3>> {
|
): Promise<APIResponseWithTime<CreateSubMemberResponseV3>> {
|
||||||
return this.postPrivate('/user/v3/private/create-sub-member', params);
|
return this.postPrivate('/user/v3/private/create-sub-member', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
createSubAPIKey(
|
createSubAPIKey(
|
||||||
params: CreateSubAPIKeyRequestV3
|
params: CreateSubAPIKeyRequestV3,
|
||||||
): Promise<APIResponseWithTime<CreateSubAPIKeyResponseV3>> {
|
): Promise<APIResponseWithTime<CreateSubAPIKeyResponseV3>> {
|
||||||
return this.postPrivate('/user/v3/private/create-sub-api', params);
|
return this.postPrivate('/user/v3/private/create-sub-api', params);
|
||||||
}
|
}
|
||||||
@@ -274,7 +278,7 @@ export class AccountAssetClientV3 extends BaseRestClient {
|
|||||||
*/
|
*/
|
||||||
freezeSubMember(
|
freezeSubMember(
|
||||||
subuid: number,
|
subuid: number,
|
||||||
frozenStatus: 0 | 1
|
frozenStatus: 0 | 1,
|
||||||
): Promise<APIResponseWithTime<{}>> {
|
): Promise<APIResponseWithTime<{}>> {
|
||||||
return this.postPrivate('/user/v3/private/frozen-sub-member', {
|
return this.postPrivate('/user/v3/private/frozen-sub-member', {
|
||||||
subuid,
|
subuid,
|
||||||
@@ -287,13 +291,13 @@ export class AccountAssetClientV3 extends BaseRestClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
modifyMasterAPIKey(
|
modifyMasterAPIKey(
|
||||||
params: ModifyAPIKeyRequestV3
|
params: ModifyAPIKeyRequestV3,
|
||||||
): Promise<APIResponseWithTime<APIKeyInfoV3>> {
|
): Promise<APIResponseWithTime<APIKeyInfoV3>> {
|
||||||
return this.postPrivate('/user/v3/private/update-api', params);
|
return this.postPrivate('/user/v3/private/update-api', params);
|
||||||
}
|
}
|
||||||
|
|
||||||
modifySubAPIKey(
|
modifySubAPIKey(
|
||||||
params: ModifyAPIKeyRequestV3
|
params: ModifyAPIKeyRequestV3,
|
||||||
): Promise<APIResponseWithTime<APIKeyInfoV3>> {
|
): Promise<APIResponseWithTime<APIKeyInfoV3>> {
|
||||||
return this.postPrivate('/user/v3/private/update-sub-api', params);
|
return this.postPrivate('/user/v3/private/update-sub-api', params);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,6 +32,10 @@ import BaseRestClient from './util/BaseRestClient';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* REST API client for Derivatives V3 Contract APIs
|
* REST API client for Derivatives V3 Contract APIs
|
||||||
|
* @deprecated WARNING
|
||||||
|
* These endpoints are being switched off gradually and are expected to be completely turned off by the end of 2024.
|
||||||
|
* They may stop working at any point before then.
|
||||||
|
* Please update your code as soon as possible to use the V5 APIs instead.
|
||||||
*/
|
*/
|
||||||
export class ContractClient extends BaseRestClient {
|
export class ContractClient extends BaseRestClient {
|
||||||
getClientType() {
|
getClientType() {
|
||||||
|
|||||||
@@ -14,6 +14,10 @@ import BaseRestClient from './util/BaseRestClient';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* REST API client for USDC Perpetual APIs
|
* REST API client for USDC Perpetual APIs
|
||||||
|
* @deprecated WARNING
|
||||||
|
* These endpoints are being switched off gradually and are expected to be completely turned off by the end of 2024.
|
||||||
|
* They may stop working at any point before then.
|
||||||
|
* Please update your code as soon as possible to use the V5 APIs instead.
|
||||||
*/
|
*/
|
||||||
export class CopyTradingClient extends BaseRestClient {
|
export class CopyTradingClient extends BaseRestClient {
|
||||||
getClientType() {
|
getClientType() {
|
||||||
|
|||||||
@@ -17,6 +17,10 @@ import BaseRestClient from './util/BaseRestClient';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* REST API client for newer Spot V3 APIs.
|
* REST API client for newer Spot V3 APIs.
|
||||||
|
* @deprecated WARNING
|
||||||
|
* These endpoints are being switched off gradually and are expected to be completely turned off by the end of 2024.
|
||||||
|
* They may stop working at any point before then.
|
||||||
|
* Please update your code as soon as possible to use the V5 APIs instead.
|
||||||
*/
|
*/
|
||||||
export class SpotClientV3 extends BaseRestClient {
|
export class SpotClientV3 extends BaseRestClient {
|
||||||
getClientType() {
|
getClientType() {
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ import BaseRestClient from './util/BaseRestClient';
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* REST API client for Derivatives V3 unified margin APIs
|
* REST API client for Derivatives V3 unified margin APIs
|
||||||
|
* @deprecated WARNING
|
||||||
|
* These endpoints are being switched off gradually and are expected to be completely turned off by the end of 2024.
|
||||||
|
* They may stop working at any point before then.
|
||||||
|
* Please update your code as soon as possible to use the V5 APIs instead.
|
||||||
*/
|
*/
|
||||||
export class UnifiedMarginClient extends BaseRestClient {
|
export class UnifiedMarginClient extends BaseRestClient {
|
||||||
getClientType() {
|
getClientType() {
|
||||||
|
|||||||
Reference in New Issue
Block a user