Use this file to discover all available pages before exploring further.
kiteconnect-ts exports values as JavaScript const objects rather than TypeScript enum declarations. This is intentional: it lets you pass a plain string literal or use the const object interchangeably, giving you full autocomplete and type-checking without forcing you to import anything. Class member constants are also available on every KiteConnect and KiteTicker instance for drop-in compatibility with kiteconnectjs.
Every parameter that accepts a specific set of values is typed as a union of string literals. You can pass the string directly and TypeScript will validate it at compile time.
import { KiteConnect } from 'kiteconnect-ts';const kc = new KiteConnect({ api_key: 'YOUR_API_KEY' });const instruments = await kc.getInstruments(['NSE']);
2
Option 2: Imported const object
Import the named const object and access its members. This is the recommended approach when you want explicit names in your code and full IDE autocompletion.
import { Exchange, KiteConnect } from 'kiteconnect-ts';const kc = new KiteConnect({ api_key: 'YOUR_API_KEY' });const instruments = await kc.getInstruments([Exchange.NSE]);
3
Option 3: Class member constants
Every constant is also exposed as a readonly member on the KiteConnect instance. This is primarily for backwards compatibility when migrating from kiteconnectjs.
import { KiteConnect } from 'kiteconnect-ts';const kc = new KiteConnect({ api_key: 'YOUR_API_KEY' });const instruments = await kc.getInstruments([kc.EXCHANGE_NSE]);