Every type exported fromDocumentation 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.
kiteconnect-ts is derived directly from the source — no types are invented or inferred. Import any type you need alongside the class:
Enums
All enums are implemented asconst objects with a matching type alias, so you get both runtime values and compile-time type checking.
Exchange
| Value | Description |
|---|---|
NSE | National Stock Exchange — equities |
BSE | Bombay Stock Exchange — equities |
NFO | NSE Futures & Options |
CDS | NSE Currency Derivatives |
BCD | BSE Currency Derivatives |
BFO | BSE Futures & Options |
MCX | Multi Commodity Exchange |
TransactionType
ProductType
| Value | Description |
|---|---|
NRML | Normal — overnight F&O positions |
MIS | Margin Intraday Square-off |
CNC | Cash and Carry — delivery equity |
CO | Cover Order |
BO | Bracket Order |
OrderType
Variety
| Value | Description |
|---|---|
regular | Standard order during market hours |
amo | After Market Order |
co | Cover Order |
bo | Bracket Order |
iceberg | Iceberg (disclosed quantity) order |
auction | Auction order |
Validity
| Value | Description |
|---|---|
DAY | Valid for the current trading day |
IOC | Immediate or Cancel |
TTL | Valid for a specified number of minutes (validity_ttl) |
TriggerType
| Value | Description |
|---|---|
single | Single trigger price, one order |
two-leg | Two trigger prices (OCO — one cancels other) |
Parameter interfaces
KiteConnectParams
Constructor parameters forKiteConnect. See the KiteConnectParams reference for full details.
API key issued by Zerodha.
Pre-set access token. Default:
null.API root URL. Default:
"https://api.kite.trade".Login redirect URL. Default:
"https://kite.trade/connect/login".Log requests and responses. Default:
false.Request timeout in milliseconds. Default:
7000.PlaceOrderParams
Exchange to route the order through.
Trading symbol of the instrument (e.g.,
RELIANCE, INFY).BUY or SELL.Order quantity.
Margin product code.
Order type.
Order validity. Defaults to
DAY.Limit price (required for
LIMIT and SL orders).Stop trigger price (required for
SL, SL-M, CO orders).Quantity to show in the public order book (equities only).
Square-off target for bracket orders.
Stop-loss for bracket orders.
Trailing stop-loss for bracket orders.
Validity in minutes for
TTL orders.Total legs for iceberg order variety.
Disclosed quantity per iceberg leg.
Auction identifier for
auction variety.Optional label (alphanumeric, max 20 chars).
ConvertPositionParams
Exchange of the instrument.
Trading symbol.
BUY or SELL.Whether to convert the overnight or day position.
Quantity to convert.
Current product code.
Target product code.
GTTParams
'single' or 'two-leg'.Trading symbol.
Exchange.
One value for
single, two values for two-leg.Current last traded price used as the reference.
MarginOrder
An order object used as input toorderMargins() and orderBasketMargins().
Exchange.
Trading symbol.
BUY or SELL.Order variety.
Product code.
Order type.
Order quantity.
Limit price (optional).
Trigger price (optional).
Response interfaces
SessionData
Returned bygenerateSession() and renewAccessToken().
Permanent user ID registered with the broker and exchanges.
User’s real name.
Abbreviated version of the user’s name.
User’s registered email.
Role at the broker —
individual for all retail users.Broker identifier.
Exchanges enabled on the account.
Margin product types enabled for the user.
Order types enabled for the user.
API key for which authentication was performed.
The authentication token for all subsequent requests. Expires at 6 AM the next day.
Token for public session validation.
Long-standing token for renewing access (available to approved platforms).
User’s last login timestamp.
Full URL to the user’s PNG avatar, if set.
Order
Returned bygetOrders(), getOrderHistory(), and as postback data.
Unique order ID.
Parent order ID for multi-leg orders (CO).
Exchange-assigned order ID.
null if the order never reached the exchange.User ID of the order placer.
Order variety (regular, amo, co, etc.).
Current status:
COMPLETE, REJECTED, CANCELLED, OPEN, or others.Trading symbol of the instrument.
Exchange.
Numeric instrument identifier.
BUY or SELL.Order type.
Margin product code.
Order validity.
Limit price at order placement.
Total quantity ordered.
Stop trigger price.
Average fill price (complete orders only).
Remaining unfilled quantity.
Quantity already filled.
Disclosed quantity in the public order book.
When the order was registered by the API.
When the order was registered by the exchange.
When the order state last changed at the exchange.
Human-readable status description.
Raw OMS status message for failed orders.
Quantity that was cancelled.
Arbitrary metadata attached by the system.
Optional order tag.
Deduplication request ID.
Market protection flag:
0 or 1.Trade
Returned bygetTrades() and getOrderTrades().
Exchange-assigned trade ID.
Associated order ID.
Exchange-assigned order ID.
Trading symbol.
Exchange.
Numeric instrument identifier.
BUY or SELL.Margin product code.
Price at which the quantity was filled.
Filled quantity for this trade.
Total order quantity.
When the trade was filled at the exchange.
When the order was placed.
When the order was registered at the exchange.
Position
Returned insidegetPositions().
Trading symbol.
Exchange.
Numeric instrument identifier.
Product code applied to the position.
Net quantity held.
Quantity carried forward from the previous day.
Lot size multiplier for P&L calculation.
Average acquisition price.
Previous day’s closing price.
Current market price.
Net value of the position.
Net profit and loss.
Mark-to-market returns.
Unrealised intraday returns.
Realised intraday returns.
Quantity bought.
Average buy price.
Net value of buys.
M2M on bought quantity.
Quantity bought today.
Average buy price today.
Value of today’s buys.
Quantity sold.
Average sell price.
Net value of sells.
M2M on sold quantity.
Quantity sold today.
Average sell price today.
Value of today’s sells.
PortfolioHolding
Returned bygetHoldings().
Trading symbol.
Exchange.
Numeric instrument identifier.
Standard ISIN for stocks listed on multiple exchanges.
Margin product applied to the holding.
Purchase price.
Net quantity (T+1 + realised).
Quantity sold from the net holding.
Quantity on T+1 (post-execution, pre-delivery).
Quantity delivered to DEMAT.
Quantity authorised at the depository for sale.
Date from which the authorised quantity can be sold.
Quantity carried forward overnight.
Quantity pledged as collateral.
Type of collateral.
true if the holding has a price discrepancy.Average acquisition price.
Current market price.
Previous day’s closing price.
Net profit and loss.
Absolute day change.
Percentage day change.
Instrument
Returned bygetInstruments().
Numeric token for WebSocket subscriptions.
Exchange-issued token.
Trading symbol.
Company name (equity instruments).
Last traded price.
Expiry date (derivatives only).
Strike price (options only).
Minimum price movement.
Quantity per lot.
Instrument type.
Market segment.
Exchange.
Quote
Returned bygetQuote() as values in a Record<string, Quote>.
Numeric instrument identifier.
Exchange timestamp of the quote packet.
Last trade timestamp.
Last traded price.
Total volume traded today.
Volume-weighted average price.
Total pending buy quantity.
Total pending sell quantity.
Last traded quantity.
Outstanding contracts (F&O only).
Absolute change from previous close.
Current lower circuit limit.
Current upper circuit limit.
Open interest.
Highest OI recorded today.
Lowest OI recorded today.
5-level market depth.
UserMargin
Returned bygetMargins().
Whether this segment is enabled for the user.
Net cash balance available for trading.
UserProfile
Returned bygetProfile().
Permanent user ID.
Real name.
Short name.
Email.
Role —
individual for retail users.Broker identifier.
Enabled exchanges.
Enabled product types.
Enabled order types.
PNG avatar URL.
Margin
Full margin response fromorderMargins() and orderBasketMargins(). Extends CompactMargin.
equity or commodity.Trading symbol.
Exchange.
Total margin blocked.
SPAN margin.
Exposure margin.
Option premium.
Additional margin.
Bracket order margin.
Cash credit.
VAR margin.
Leverage allowed for the trade.
CompactMargin
Compact margin response returned when you pass'compact' to orderMargins().
equity or commodity.Trading symbol.
Exchange.
Total margin blocked.
MFOrder
Returned bygetMFOrders().
Unique order ID.
Exchange-assigned order ID.
ISIN of the fund.
Current status (COMPLETE, REJECTED, CANCELLED, OPEN).
Human-readable status description.
AMC folio number for completed buy orders.
Fund name.
API registration timestamp.
Exchange registration timestamp.
Exchange settlement ID.
BUY or SELL.Amount invested.
Order variety (
regular, sip).FRESH or ADDITIONAL (null for SELL).Units allotted or sold.
Buy or sell price.
Latest NAV.
Allotted or sold NAV.
User ID of the placer.
Date of latest NAV.
Optional order tag.
MFSIP
Returned bygetMFSIPS().
Unique SIP ID.
ISIN of the fund.
Fund name.
growth or payout.BUY or SELL.ACTIVE, PAUSED, or CANCELLED.When the SIP was registered.
monthly, weekly, or quarterly.Upcoming instalment date.
Amount per instalment.
Total instalments (-1 for indefinite).
Date of the last triggered instalment.
Remaining instalments (-1 for indefinite).
Day of month for monthly SIPs (0 otherwise).
Number of completed instalments.
Optional tag.
MFHolding
Returned bygetMFHoldings().
AMC folio number.
Average NAV at purchase.
Latest NAV.
Date of latest NAV.
Pledged quantity.
Fund name.
ISIN.
Net returns on the holding.
Available quantity.
MFInstrument
Returned bygetMFInstruments().
ISIN of the fund.
AMC code as per the exchange.
Fund name.
Whether purchases are allowed.
Whether redemptions are allowed.
Minimum first-purchase amount.
Buy amount must be a multiple of this.
Minimum additional purchase amount.
Minimum sell quantity.
Sell quantity multiple.
growth or payout.equity, debt, or elss.direct or regular.Settlement type (e.g.,
T1, T2).Latest NAV.
Date of latest NAV.
Trigger
Returned bygetGTT() and inside the array from getGTTs().
GTT trigger ID.
User ID of the trigger owner.
Trigger type (
single or two-leg).Creation timestamp.
Last update timestamp.
Expiry timestamp.
Status:
active, triggered, disabled, expired, cancelled, rejected, or deleted.Array of GTT order legs.
Arbitrary metadata.