Send orders, modify, cancel, track daily orderbook, live margins, and full API documentation
Connected as: Sandbox Trader (RQ1166) • Net Trading Margin: ₹5,00,000
Complete list of HTTP endpoints for orders, margins, profile & auth
Exchange request_token & checksum (SHA-256) to retrieve permanent access_token.
curl -X POST "https://api.kite.trade/session/token" \ -H "X-Kite-Version: 3" \ -d "api_key=xxx" \ -d "request_token=yyy" \ -d "checksum=zzz"
{
"status": "success",
"data": {
"user_id": "RQ1166",
"user_name": "Manishkumar Vadnathani",
"email": "[email protected]",
"broker": "ZERODHA",
"access_token": "zwG0td5vOR06GzgFECT2tXXqMTW6f6LI",
"public_token": "XXXXXX",
"login_time": "2026-09-09 09:15:00"
}
}Retrieve real-time funds, cash, and blocked margin breakdown across equity & commodity.
curl "https://api.kite.trade/user/margins" \ -H "X-Kite-Version: 3" \ -H "Authorization: token api_key:access_token"
{
"status": "success",
"data": {
"equity": {
"enabled": true,
"net": 500000.0,
"available": { "cash": 450000.0, "live_balance": 450000.0, "collateral": 0 },
"utilised": { "debits": 50000.0, "span": 0, "exposure": 20000.0, "m2m_realised": 1500.0 }
}
}
}Retrieve authenticated account's permissions, enabled products and exchanges.
curl "https://api.kite.trade/user/profile" \ -H "X-Kite-Version: 3" \ -H "Authorization: token api_key:access_token"
{
"status": "success",
"data": {
"user_id": "RQ1166",
"user_name": "Manishkumar Vadnathani",
"broker": "ZERODHA",
"exchanges": ["NSE", "NFO", "BFO", "CDS", "BSE", "MCX"],
"products": ["CNC", "NRML", "MIS", "MTF"]
}
}Place an order of a particular variety (regular, amo, co, iceberg, auction).
curl -X POST "https://api.kite.trade/orders/regular" \ -H "X-Kite-Version: 3" \ -H "Authorization: token api_key:access_token" \ -d "tradingsymbol=SBIN" \ -d "exchange=NSE" \ -d "transaction_type=BUY" \ -d "order_type=LIMIT" \ -d "quantity=10" \ -d "price=815.50" \ -d "product=MIS" \ -d "validity=DAY" \ -d "market_protection=-1"
{
"status": "success",
"data": {
"order_id": "260909000123456"
}
}Modify an open or pending order (order_type, quantity, price, trigger_price, etc.).
curl -X PUT "https://api.kite.trade/orders/regular/260909000123456" \ -H "X-Kite-Version: 3" \ -H "Authorization: token api_key:access_token" \ -d "order_type=LIMIT" \ -d "price=817.00" \ -d "quantity=15"
{
"status": "success",
"data": {
"order_id": "260909000123456"
}
}Cancel an open or pending order registered with the OMS.
curl -X DELETE "https://api.kite.trade/orders/regular/260909000123456" \ -H "X-Kite-Version: 3" \ -H "Authorization: token api_key:access_token"
{
"status": "success",
"data": {
"order_id": "260909000123456"
}
}Retrieve the list of all orders (open, pending, and executed) for the current day.
curl "https://api.kite.trade/orders" \ -H "X-Kite-Version: 3" \ -H "Authorization: token api_key:access_token"
{
"status": "success",
"data": [
{
"placed_by": "RQ1166",
"order_id": "260909000123456",
"status": "COMPLETE",
"exchange": "NSE",
"tradingsymbol": "SBIN",
"order_type": "LIMIT",
"transaction_type": "BUY",
"quantity": 10,
"price": 815.50,
"average_price": 815.50
}
]
}Retrieve the list of all executed trade fills generated across all orders for the day.
curl "https://api.kite.trade/trades" \ -H "X-Kite-Version: 3" \ -H "Authorization: token api_key:access_token"
{
"status": "success",
"data": [
{
"trade_id": "10000000",
"order_id": "260909000123456",
"exchange": "NSE",
"tradingsymbol": "SBIN",
"product": "MIS",
"average_price": 815.50,
"quantity": 10,
"fill_timestamp": "2026-09-09 09:16:39"
}
]
}Invalidate and destroy the API session and access_token.
curl -X DELETE "https://api.kite.trade/session/token?api_key=xxx&access_token=yyy" \ -H "X-Kite-Version: 3"
{
"status": "success",
"data": true
}Place a new GTT trigger (single leg or two-leg OCO order valid up to 1 year).
curl -X POST "https://api.kite.trade/gtt/triggers" \
-H "X-Kite-Version: 3" \
-H "Authorization: token api_key:access_token" \
-d "type=two-leg" \
-d 'condition={"exchange":"NSE", "tradingsymbol":"RELIANCE", "trigger_values":[2900.0, 3100.0], "last_price": 2985.0}' \
-d 'orders=[
{"exchange":"NSE", "tradingsymbol": "RELIANCE", "transaction_type": "SELL", "quantity": 25, "order_type": "LIMIT", "product": "CNC", "price": 2899.0},
{"exchange":"NSE", "tradingsymbol": "RELIANCE", "transaction_type": "SELL", "quantity": 25, "order_type": "LIMIT", "product": "CNC", "price": 3101.0}
]'{
"status": "success",
"data": {
"trigger_id": 105099
}
}Retrieve all active and recently triggered GTTs (past 7 days).
curl "https://api.kite.trade/gtt/triggers" \ -H "X-Kite-Version: 3" \ -H "Authorization: token api_key:access_token"
{
"status": "success",
"data": [
{
"id": 105099,
"type": "two-leg",
"status": "active",
"condition": { "exchange": "NSE", "tradingsymbol": "RELIANCE", "trigger_values": [2900, 3100], "last_price": 2985 },
"orders": [
{ "tradingsymbol": "RELIANCE", "price": 2899, "quantity": 25, "transaction_type": "SELL" },
{ "tradingsymbol": "RELIANCE", "price": 3101, "quantity": 25, "transaction_type": "SELL" }
]
}
]
}Delete/cancel an active GTT trigger before core execution.
curl -X DELETE "https://api.kite.trade/gtt/triggers/105099" \ -H "X-Kite-Version: 3" \ -H "Authorization: token api_key:access_token"
{
"status": "success",
"data": {
"trigger_id": 105099
}
}Fixed values and parameters required for order placement, variety selection, and risk management
Strongly-typed interfaces ready to drop into institutional trading services
export type KiteOrderVariety = 'regular' | 'amo' | 'co' | 'iceberg' | 'auction';
export type KiteOrderType = 'MARKET' | 'LIMIT' | 'SL' | 'SL-M';
export type KiteProduct = 'CNC' | 'NRML' | 'MIS' | 'MTF';
export type KiteValidity = 'DAY' | 'IOC' | 'TTL';
export interface KiteOrderParams {
tradingsymbol: string;
exchange: 'NSE' | 'BSE' | 'NFO' | 'CDS' | 'BCD' | 'MCX';
transaction_type: 'BUY' | 'SELL';
order_type: KiteOrderType;
quantity: number;
product: KiteProduct;
price?: number;
trigger_price?: number;
disclosed_quantity?: number;
validity: KiteValidity;
validity_ttl?: number;
iceberg_legs?: number;
iceberg_quantity?: number;
auction_number?: string;
market_protection?: number; // -1 or 1 to 100
autoslice?: boolean;
tag?: string;
}
export async function placeKiteOrder(params: KiteOrderParams, apiKey: string, accessToken: string) {
const form = new URLSearchParams();
for (const [k, v] of Object.entries(params)) {
if (v !== undefined && v !== null) form.append(k, String(v));
}
const res = await fetch(`https://api.kite.trade/orders/${params.variety || 'regular'}`, {
method: 'POST',
headers: {
'X-Kite-Version': '3',
'Authorization': `token ${apiKey}:${accessToken}`,
'Content-Type': 'application/x-www-form-urlencoded'
},
body: form.toString()
});
return await res.json();
}