Skip to content

API Reference


API Reference / WebSocketManagerConfig

Interface: WebSocketManagerConfig

Defined in: src/ws/WebSocketManager.ts:10

Configuration for the WebSocket Manager.

Extends

Properties

token?

optional token?: string

Defined in: src/types/ws.types.ts:173

Inherited from

DhanWSOptions.token


clientId

clientId: string

Defined in: src/types/ws.types.ts:174

Inherited from

DhanWSOptions.clientId


marketFeedUrl?

optional marketFeedUrl?: string

Defined in: src/types/ws.types.ts:175

Inherited from

DhanWSOptions.marketFeedUrl


orderUpdateUrl?

optional orderUpdateUrl?: string

Defined in: src/types/ws.types.ts:176

Inherited from

DhanWSOptions.orderUpdateUrl


depthUrl?

optional depthUrl?: string

Defined in: src/types/ws.types.ts:177

Inherited from

DhanWSOptions.depthUrl


reconnectDelayMs?

optional reconnectDelayMs?: number

Defined in: src/types/ws.types.ts:178

Inherited from

DhanWSOptions.reconnectDelayMs


maxReconnectAttempts?

optional maxReconnectAttempts?: number

Defined in: src/types/ws.types.ts:180

Inherited from

DhanWSOptions.maxReconnectAttempts


marketSocketFactory?

optional marketSocketFactory?: (url) => WebSocketLike

Defined in: src/types/ws.types.ts:181

Parameters

url

string

Returns

WebSocketLike

Inherited from

DhanWSOptions.marketSocketFactory


orderSocketFactory?

optional orderSocketFactory?: (url) => WebSocketLike

Defined in: src/types/ws.types.ts:182

Parameters

url

string

Returns

WebSocketLike

Inherited from

DhanWSOptions.orderSocketFactory


depthSocketFactory?

optional depthSocketFactory?: (url) => WebSocketLike

Defined in: src/types/ws.types.ts:183

Parameters

url

string

Returns

WebSocketLike

Inherited from

DhanWSOptions.depthSocketFactory


tokenProvider?

optional tokenProvider?: () => string | Promise<string>

Defined in: src/types/ws.types.ts:184

Returns

string | Promise<string>

Inherited from

DhanWSOptions.tokenProvider


orderUserType?

optional orderUserType?: "SELF" | "PARTNER"

Defined in: src/types/ws.types.ts:185

Inherited from

DhanWSOptions.orderUserType


partnerId?

optional partnerId?: string

Defined in: src/types/ws.types.ts:186

Inherited from

DhanWSOptions.partnerId


partnerSecret?

optional partnerSecret?: string

Defined in: src/types/ws.types.ts:187

Inherited from

DhanWSOptions.partnerSecret


logger?

optional logger?: Logger

Defined in: src/types/ws.types.ts:188

Inherited from

DhanWSOptions.logger


maxInstrumentsPerBatch?

optional maxInstrumentsPerBatch?: number

Defined in: src/ws/WebSocketManager.ts:12

Maximum instruments per subscription batch (Dhan limit: 5000)


enableAutoReconnect?

optional enableAutoReconnect?: boolean

Defined in: src/ws/WebSocketManager.ts:14

Enable automatic reconnection with exponential backoff


maxReconnectDelayMs?

optional maxReconnectDelayMs?: number

Defined in: src/ws/WebSocketManager.ts:16

Maximum reconnection delay in ms (default: 30000)

Overrides

DhanWSOptions.maxReconnectDelayMs


enableGreeksCalculation?

optional enableGreeksCalculation?: boolean

Defined in: src/ws/WebSocketManager.ts:18

Enable Greeks calculation on ticks


defaultRiskFreeRate?

optional defaultRiskFreeRate?: number

Defined in: src/ws/WebSocketManager.ts:20

Default risk-free rate for Greeks


defaultImpliedVolatility?

optional defaultImpliedVolatility?: number

Defined in: src/ws/WebSocketManager.ts:22

Default IV for Greeks

Community project — not affiliated with Dhan. MIT License.