Constructors
Methods
close
- close(): void
Returns void
connect
- connect(): void
Returns void
onDepth
- onDepth(
cb: (symbol: string, exchange: string, depth: MarketDepth) => void,
): () => void Parameters
- cb: (symbol: string, exchange: string, depth: MarketDepth) => void
Returns () => void
onLtp
- onLtp(cb: (e: LtpEvent) => void): () => void
Returns () => void
onOrderUpdate
- onOrderUpdate(cb: (e: OrderUpdateEvent) => void): () => void
Parameters
- cb: (e: OrderUpdateEvent) => void
Returns () => void
onState
- onState(cb: (state: WsState) => void): () => void
Returns () => void
subscribe
- subscribe(
mode: WsMode,
symbol: string,
exchange: string,
depthLevel?: number,
): void Parameters
- mode: WsMode
- symbol: string
- exchange: string
OptionaldepthLevel: number
Returns void
subscribeOrders
- subscribeOrders(): void
Returns void
unsubscribe
- unsubscribe(mode: WsMode, symbol: string, exchange: string): void
Parameters
- mode: WsMode
- symbol: string
- exchange: string
Returns void
unsubscribeOrders
- unsubscribeOrders(): void
Returns void
Subscribe to control frames — auth / subscribe acks and server errors.