chore(v4.1.15): marked removed functions for deprecation, updated tests
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": "4.1.14",
|
"version": "4.1.15",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "4.1.14",
|
"version": "4.1.15",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"axios": "^1.7.9",
|
"axios": "^1.7.9",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "bybit-api",
|
"name": "bybit-api",
|
||||||
"version": "4.1.14",
|
"version": "4.1.15",
|
||||||
"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",
|
||||||
|
|||||||
@@ -2143,6 +2143,8 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Query leverage token information
|
* Query leverage token information
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
getLeveragedTokenInfo(
|
getLeveragedTokenInfo(
|
||||||
ltCoin?: string,
|
ltCoin?: string,
|
||||||
@@ -2152,6 +2154,8 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get leverage token market information.
|
* Get leverage token market information.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
getLeveragedTokenMarket(
|
getLeveragedTokenMarket(
|
||||||
ltCoin: string,
|
ltCoin: string,
|
||||||
@@ -2161,6 +2165,8 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* This endpoint allows you to purchase a leveraged token with a specified amount.
|
* This endpoint allows you to purchase a leveraged token with a specified amount.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
purchaseSpotLeveragedToken(
|
purchaseSpotLeveragedToken(
|
||||||
params: PurchaseSpotLeveragedTokenParamsV5,
|
params: PurchaseSpotLeveragedTokenParamsV5,
|
||||||
@@ -2170,6 +2176,8 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Redeem leveraged token.
|
* Redeem leveraged token.
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
redeemSpotLeveragedToken(
|
redeemSpotLeveragedToken(
|
||||||
params: RedeemSpotLeveragedTokenParamsV5,
|
params: RedeemSpotLeveragedTokenParamsV5,
|
||||||
@@ -2179,6 +2187,8 @@ export class RestClientV5 extends BaseRestClient {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Get purchase or redemption history
|
* Get purchase or redemption history
|
||||||
|
*
|
||||||
|
* @deprecated
|
||||||
*/
|
*/
|
||||||
getSpotLeveragedTokenOrderHistory(
|
getSpotLeveragedTokenOrderHistory(
|
||||||
params?: GetSpotLeveragedTokenOrderHistoryParamsV5,
|
params?: GetSpotLeveragedTokenOrderHistoryParamsV5,
|
||||||
|
|||||||
@@ -432,41 +432,6 @@ describe('Private WRITE V5 REST API Endpoints', () => {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe('Spot Leverage Token APIs', () => {
|
|
||||||
let leverageToken: LeverageTokenInfoV5;
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
|
||||||
const tokenResult = await api.getLeveragedTokenInfo();
|
|
||||||
leverageToken = tokenResult.result.list[0];
|
|
||||||
});
|
|
||||||
|
|
||||||
it('purchaseSpotLeveragedToken()', async () => {
|
|
||||||
expect(
|
|
||||||
await api.purchaseSpotLeveragedToken({
|
|
||||||
amount: '100',
|
|
||||||
ltCoin: leverageToken.ltCoin,
|
|
||||||
}),
|
|
||||||
).toMatchObject({
|
|
||||||
// ...successResponseObjectV3(),
|
|
||||||
retCode: 175025,
|
|
||||||
// retMsg: '',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
it('redeemSpotLeveragedToken()', async () => {
|
|
||||||
expect(
|
|
||||||
await api.redeemSpotLeveragedToken({
|
|
||||||
quantity: '100',
|
|
||||||
ltCoin: leverageToken.ltCoin,
|
|
||||||
}),
|
|
||||||
).toMatchObject({
|
|
||||||
// ...successResponseObjectV3(),
|
|
||||||
retCode: 175025,
|
|
||||||
// retMsg: '',
|
|
||||||
});
|
|
||||||
});
|
|
||||||
});
|
|
||||||
|
|
||||||
describe('Spot Margin APIs', () => {
|
describe('Spot Margin APIs', () => {
|
||||||
it('toggleSpotMarginTrade()', async () => {
|
it('toggleSpotMarginTrade()', async () => {
|
||||||
expect(await api.toggleSpotMarginTrade('1')).toMatchObject({
|
expect(await api.toggleSpotMarginTrade('1')).toMatchObject({
|
||||||
|
|||||||
Reference in New Issue
Block a user