Once your KiteTicker connection is open, you useDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/anurag-roy/kiteconnect-ts/llms.txt
Use this file to discover all available pages before exploring further.
subscribe() and setMode() to tell the server which instruments to stream and at what granularity. Each instrument is identified by its numeric token, and you can mix modes across tokens — for example, streaming full depth on a handful of liquid contracts while tracking the rest in LTP mode.
Instrument tokens are available from
KiteConnect.getInstruments(). The token for a symbol is the instrument_token field in the response.subscribe(tokens)
Send an array of instrument tokens to start receiving ticks for those instruments. New subscriptions default toltp mode unless you call setMode() afterward.
unsubscribe(tokens)
Stop receiving ticks for the given tokens. The server immediately stops sending updates for unsubscribed tokens.setMode(mode, tokens)
Assign a tick mode to an array of tokens. You can call this at any time to upgrade or downgrade the data for a set of subscribed instruments.Tick structures by mode
- ltp
- quote
- full
The smallest packet — 8 bytes. Delivered for all instrument types.Example tick:
autoReconnect(t, max_retry, max_delay)
Configure or toggle auto-reconnect at any time. This method is also called internally during construction using the params you pass to the constructor.| Parameter | Type | Default | Description |
|---|---|---|---|
t | boolean | — | true to enable, false to disable |
max_retry | number | 50 | Maximum reconnection attempts (up to 300) |
max_delay | number | 60 | Maximum interval in seconds between retries (minimum 5) |
disconnect()
Close the WebSocket connection immediately. Theclose event fires when the connection shuts down cleanly.
connected()
Check whether the WebSocket is currently open and ready to send or receive messages.true when the underlying socket is in the OPEN state, false otherwise.