From caa23be70c849b1d1f463f26a92c57998be67542 Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Sat, 18 Feb 2023 17:19:05 +0000 Subject: [PATCH 1/2] v3.4.2: fix() missing property from linear client set trading stop method --- package.json | 2 +- src/types/request/linear.ts | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index a07eddc..6381c22 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "3.4.1", + "version": "3.4.2", "description": "Complete & robust node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & integration tests.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/types/request/linear.ts b/src/types/request/linear.ts index 6fb1f4f..3ec68fe 100644 --- a/src/types/request/linear.ts +++ b/src/types/request/linear.ts @@ -163,6 +163,7 @@ export interface LinearSetTradingStopRequest { sl_trigger_by?: string; sl_size?: number; tp_size?: number; + position_idx?: 0 | 1 | 2; } export interface LinearGetTradeRecordsRequest { From 165043eb0f7d6a68a7efa716c18b3f0c9ae4e0b6 Mon Sep 17 00:00:00 2001 From: tiagosiebler Date: Sat, 18 Feb 2023 17:22:36 +0000 Subject: [PATCH 2/2] fix noisy test --- test/contract/private.read.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/contract/private.read.test.ts b/test/contract/private.read.test.ts index 9ab08d8..f070fb4 100644 --- a/test/contract/private.read.test.ts +++ b/test/contract/private.read.test.ts @@ -30,7 +30,8 @@ describe('Private Contract REST API GET Endpoints', () => { expect( await api.getHistoricOrders({ symbol, cursor, limit: 1 }) ).toMatchObject({ - retCode: API_ERROR_CODE.DB_ERROR_WRONG_CURSOR, + ...successResponseObjectV3(), + // retCode: API_ERROR_CODE.DB_ERROR_WRONG_CURSOR, }); });