Good-Till-Triggered (GTT) orders are standing instructions that automatically place an exchange order when an instrument’s last traded price crosses a threshold you set. Unlike regular orders, GTTs persist across trading sessions until the trigger fires, the GTT expires (one year from creation), or you explicitly delete it. KiteConnect supports two trigger types: single (one price level, one order leg) and OCO (two price levels — a stop-loss below and a target above — where the first to trigger fires the order).Documentation 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.
getGTTs
Retrieve all active and historical GTTs for your account.Promise<Trigger[]>. Key fields on each Trigger:
| Field | Type | Description |
|---|---|---|
id | number | Unique GTT trigger ID |
type | string | single or two-leg |
status | string | Current GTT status (see status list below) |
condition.tradingsymbol | string | Instrument symbol |
condition.exchange | string | Exchange |
condition.trigger_values | number[] | Price levels that activate the trigger |
condition.last_price | number | Price at the time the GTT was created |
orders | object[] | Order leg(s) that execute when triggered |
created_at | string | Creation timestamp |
updated_at | string | Last updated timestamp |
expires_at | string | Expiry timestamp (one year from creation) |
getGTT
Retrieve a single GTT by its trigger ID.Promise<Trigger>.
placeGTT
Create a new GTT. You must pass aGTTParams object describing the trigger type, instrument, price levels, and order legs to execute.
GTT_TYPE_SINGLE requires exactly 1 value in trigger_values.GTT_TYPE_OCO requires exactly 2 values — typically a stop-loss price (lower) and a target price (higher).Single-leg GTT
Place a sell order automatically if the stock falls to ₹1,400.OCO (two-leg) GTT
Set a stop-loss at ₹900 and a target at ₹1,200. Whichever price is touched first fires the corresponding order leg.Promise<{ trigger_id: number }>.
GTTParams fields
kc.GTT_TYPE_SINGLE ('single') or kc.GTT_TYPE_OCO ('two-leg').Exchange trading symbol of the instrument (e.g.,
RELIANCE, INFY).Exchange where the instrument is listed:
NSE, BSE, NFO, BFO, CDS, MCX.List of price levels. Single GTT takes exactly 1 value; OCO takes exactly 2.
The instrument’s current last traded price at the time you create the GTT.
This is used by the exchange to validate the trigger direction.
One or two order leg objects. Each leg has:
transaction_type—BUYorSELLquantity— number of unitsproduct—CNC,NRML, orMISorder_type—LIMIT,MARKET,SL, orSL-Mprice— limit price for the order leg
modifyGTT
Update an existing GTT’s trigger values or order legs.Promise<{ trigger_id: number }>. You must supply the full GTTParams object — the API replaces the GTT in its entirety.
deleteGTT
Permanently delete a GTT. This cannot be undone.Promise<{ trigger_id: number }>.
GTT status values
A GTT moves through these statuses during its lifecycle:| Status | Description |
|---|---|
active | The GTT is live and monitoring the price condition. |
triggered | The trigger condition was met and the order was submitted to the exchange. |
disabled | The GTT has been temporarily disabled by the system. |
expired | The GTT reached its one-year expiry without being triggered. |
cancelled | The GTT was cancelled by the user. |
rejected | The triggered order was rejected by the exchange. |
deleted | The GTT was deleted by the user via deleteGTT(). |
KiteConnect instance: