From e3cbfb350157b159292a026ecd8122758a8611ca Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Thu, 29 May 2025 09:24:30 +0200 Subject: [PATCH] feat(v4.1.9): new ws topic, updated response and request types --- package-lock.json | 4 ++-- package.json | 2 +- src/types/request/v5-market.ts | 1 + src/types/response/v5-position.ts | 1 + src/types/response/v5-preupgrade.ts | 1 + src/types/response/v5-trade.ts | 1 + src/types/websockets/ws-events.ts | 13 +++++++++++++ 7 files changed, 20 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index 9f716a7..a25bf7c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bybit-api", - "version": "4.1.8", + "version": "4.1.9", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bybit-api", - "version": "4.1.8", + "version": "4.1.9", "license": "MIT", "dependencies": { "axios": "^1.7.9", diff --git a/package.json b/package.json index d35d2b9..28bb012 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "4.1.8", + "version": "4.1.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", diff --git a/src/types/request/v5-market.ts b/src/types/request/v5-market.ts index 3d37b16..12ec235 100644 --- a/src/types/request/v5-market.ts +++ b/src/types/request/v5-market.ts @@ -123,6 +123,7 @@ export interface GetDeliveryPriceParamsV5 { category: 'linear' | 'inverse' | 'option'; symbol?: string; baseCoin?: string; + settleCoin?: string; limit?: number; cursor?: string; } diff --git a/src/types/response/v5-position.ts b/src/types/response/v5-position.ts index fa03842..cbf7bdb 100644 --- a/src/types/response/v5-position.ts +++ b/src/types/response/v5-position.ts @@ -110,6 +110,7 @@ export interface ExecutionV5 { blockTradeId?: string; closedSize?: string; seq: number; + extraFees: string; } export interface ClosedPnLV5 { diff --git a/src/types/response/v5-preupgrade.ts b/src/types/response/v5-preupgrade.ts index 759ad6e..bbf28f0 100644 --- a/src/types/response/v5-preupgrade.ts +++ b/src/types/response/v5-preupgrade.ts @@ -18,6 +18,7 @@ export interface PreUpgradeTransaction { tradeId: string; orderId: string; orderLinkId: string; + extraFees: string; } export interface PreUpgradeOptionsDelivery { diff --git a/src/types/response/v5-trade.ts b/src/types/response/v5-trade.ts index 889b159..08c4c92 100644 --- a/src/types/response/v5-trade.ts +++ b/src/types/response/v5-trade.ts @@ -68,6 +68,7 @@ export interface AccountOrderV5 { smpOrderId: string; createdTime: string; updatedTime: string; + extraFees: string; } export interface BatchCreateOrderResultV5 { diff --git a/src/types/websockets/ws-events.ts b/src/types/websockets/ws-events.ts index 8d073f6..3f6930c 100644 --- a/src/types/websockets/ws-events.ts +++ b/src/types/websockets/ws-events.ts @@ -449,3 +449,16 @@ export type WSSpreadExecutionEventV5 = WSPrivateTopicEventV5< 'spread.execution', WSSpreadExecutionV5[] >; + +export interface WSInsuranceV5 { + coin: string; + symbols: string; + balance: string; + updateTime: string; +} + +export type WSInsuranceEventV5 = WSPublicTopicEventV5< + 'insurance.USDT' | 'insurance.USDC' | 'insurance.inverse', + 'snapshot' | 'delta', + WSInsuranceV5[] +>;