Skip to content

API Reference


API Reference / DhanWSOptions

Interface: DhanWSOptions ​

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

Extended by ​

Properties ​

token? ​

optional token?: string

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


clientId ​

clientId: string

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


marketFeedUrl? ​

optional marketFeedUrl?: string

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


orderUpdateUrl? ​

optional orderUpdateUrl?: string

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


depthUrl? ​

optional depthUrl?: string

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


reconnectDelayMs? ​

optional reconnectDelayMs?: number

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


maxReconnectDelayMs? ​

optional maxReconnectDelayMs?: number

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


maxReconnectAttempts? ​

optional maxReconnectAttempts?: number

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


marketSocketFactory? ​

optional marketSocketFactory?: (url) => WebSocketLike

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

Parameters ​

url ​

string

Returns ​

WebSocketLike


orderSocketFactory? ​

optional orderSocketFactory?: (url) => WebSocketLike

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

Parameters ​

url ​

string

Returns ​

WebSocketLike


depthSocketFactory? ​

optional depthSocketFactory?: (url) => WebSocketLike

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

Parameters ​

url ​

string

Returns ​

WebSocketLike


tokenProvider? ​

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

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

Returns ​

string | Promise<string>


orderUserType? ​

optional orderUserType?: "SELF" | "PARTNER"

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


partnerId? ​

optional partnerId?: string

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


partnerSecret? ​

optional partnerSecret?: string

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


logger? ​

optional logger?: Logger

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

Community project — not affiliated with Dhan. MIT License.