Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,446 changes: 561 additions & 885 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "bybit-api",
"version": "4.5.3",
"version": "4.6.0",
"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",
Expand Down
18 changes: 15 additions & 3 deletions src/types/websockets/ws-general.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { AxiosRequestConfig } from 'axios';
import type { ClientRequestArgs } from 'http';
import WebSocket from 'isomorphic-ws';

Expand Down Expand Up @@ -120,9 +121,7 @@ export interface WSClientConfigurableOptions {
reconnectTimeout?: number;

restOptions?: RestClientOptions;

// eslint-disable-next-line @typescript-eslint/no-explicit-any
requestOptions?: any;
requestOptions?: AxiosRequestConfig;

wsOptions?: {
protocols?: string[];
Expand Down Expand Up @@ -158,6 +157,19 @@ export interface WebsocketClientOptions extends WSClientConfigurableOptions {
pingInterval: number;
reconnectTimeout: number;
recvWindow: number;

/**
* If true, require a "receipt" that the connection is ready for use (e.g. a specific event type)
*/
requireConnectionReadyConfirmation: boolean;
authPrivateConnectionsOnConnect: boolean;
authPrivateRequests: boolean;
reauthWSAPIOnReconnect: boolean;

/**
* Whether to use native WebSocket ping/pong frames for heartbeats
*/
useNativeHeartbeats: boolean;
}

export type WsEventInternalSrc = 'event' | 'function' | 'frame';
Loading