feat(4.1.10): add new WSTickerOptionV5 and WSTickerSpotV5 interfaces for enhanced websocket event handling

This commit is contained in:
JJ-Cro
2025-06-05 16:46:41 +02:00
parent fc6fe3a261
commit e369f2279a
3 changed files with 44 additions and 4 deletions

4
package-lock.json generated
View File

@@ -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",

View File

@@ -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",

View File

@@ -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 {