From e369f2279a7ae9cb4409936f5156f29fb9c68a6b Mon Sep 17 00:00:00 2001 From: JJ-Cro Date: Thu, 5 Jun 2025 16:46:41 +0200 Subject: [PATCH] feat(4.1.10): add new WSTickerOptionV5 and WSTickerSpotV5 interfaces for enhanced websocket event handling --- package-lock.json | 4 +-- package.json | 2 +- src/types/websockets/ws-events.ts | 42 ++++++++++++++++++++++++++++++- 3 files changed, 44 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index a25bf7c..ded9e86 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "bybit-api", - "version": "4.1.9", + "version": "4.1.10", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "bybit-api", - "version": "4.1.9", + "version": "4.1.10", "license": "MIT", "dependencies": { "axios": "^1.7.9", diff --git a/package.json b/package.json index 28bb012..e31ecf0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "bybit-api", - "version": "4.1.9", + "version": "4.1.10", "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/websockets/ws-events.ts b/src/types/websockets/ws-events.ts index 3f6930c..127f317 100644 --- a/src/types/websockets/ws-events.ts +++ b/src/types/websockets/ws-events.ts @@ -136,10 +136,50 @@ export interface WSTickerV5 { curPreListingPhase?: string; } +export interface WSTickerOptionV5 { + symbol: string; + bidPrice: string; + bidSize: string; + bidIv: string; + askPrice: string; + askSize: string; + askIv: string; + lastPrice: string; + highPrice24h: string; + lowPrice24h: string; + markPrice: string; + indexPrice: string; + markPriceIv: string; + underlyingPrice: string; + openInterest: string; + turnover24h: string; + volume24h: string; + totalVolume: string; + totalTurnover: string; + delta: string; + gamma: string; + vega: string; + theta: string; + predictedDeliveryPrice: string; + change24h: string; +} + +export interface WSTickerSpotV5 { + symbol: string; + lastPrice: string; + highPrice24h: string; + lowPrice24h: string; + prevPrice24h: string; + volume24h: string; + turnover24h: string; + price24hPcnt: string; + usdIndexPrice: string; +} + export type WSTickerEventV5 = WSPublicTopicEventV5< string, 'snapshot' | 'delta', - WSTickerV5 + WSTickerV5 | WSTickerOptionV5 | WSTickerSpotV5 >; export interface WSKlineV5 {