The Place Order API allows you to place buy or sell orders across all supported exchange segments and order types. It supports product types like NRML, CNC, MIS, CO, and BO, and includes specialized fields for Bracket Orders (BO) and Cover Orders (CO).
POST <Base URL>/quick/order/rule/ms/place
Replace <Base URL>
with the relevant Kotak environment base URL provided in response from /tradeApiValidate api.
Name | Type | Description |
---|---|---|
accept | string | Should always be application/json |
Sid | string | session sid generated on login |
Auth | string | session token generated on login |
neo-fin-key | string | static value: neotradeapi |
Content-Type | string | Always application/x-www-form-urlencoded |
The request body is sent as a single field named jData
, which is a stringified JSON object and must be URL-encoded.
curl -X POST "<baseUrl>/quick/order/rule/ms/place" \\
-H "Auth: <session_token>" \\
-H "Sid: <session_sid>" \\
-H "neo-fin-key: neotradeapi" \\
-H "Content-Type: application/x-www-form-urlencoded" \\
--data-urlencode 'jData={
"am": "NO",
"dq": "0",
"es": "nse_cm",
"mp": "0",
"pc": "CNC",
"pf": "N",
"pr": "0",
"pt": "MKT",
"qt": "1",
"rt": "DAY",
"tp": "0",
"ts": "ITBEES-EQ",
"tt": "B"
}'
jData
){
"am": "NO",
"dq": "0",
"es": "nse_cm",
"mp": "0",
"pc": "MIS",
"pf": "N",
"pr": "0",
"pt": "L",
"qt": "1",
"rt": "DAY",
"tp": "0",
"ts": "******-**",
"tt": "B",
"sot": "", *// Only for BO*
"slt": "", *// Only for BO*
"slv": "", *// Only for BO*
"sov": "", *// Only for BO*
"tlt": "", *// Only for BO*
"tsv": "" *// Only for BO*
}
Name | Type | Description | Allowed / Example Values |
---|---|---|---|
am | string | After Market Order flag. | "NO" (normal), "YES" (AMO) |
dq | string | Disclosed quantity. | "0" or a partial quantity |
es | string | Exchange segment code. | "nse_cm", "bse_cm", "nse_fo", "bse_fo", "cde_fo" |
mp | string | Market protection value (used in some market orders). | "0" or numerical value |
pc | string | Product code. | "NRML", "CNC", "MIS", "CO", "BO" |
pf | string | Portfolio flag. | "N" |
pr | string | Price for limit order, "0" for market order. | e.g. "0", "450.5" |
pt | string | Order type. | "L" (Limit), "MKT" (Market), "SL" (Stoploss), "SL-M" (SL-Market) |
qt | string | Order quantity. | e.g. "1", "100", etc. |
rt | string | Validity or order duration. | "DAY", "IOC" |
tp | string | Trigger price (used for SL/SL-M/CO). | "0" or actual trigger price. |
ts | string | Trading symbol (from scrip master file). | e.g., "ITBEES-EQ" |
tt | string | Transaction type. | "B" (Buy), "S" (Sell) |
sot | string | Square off type. Only for BO. | "Absolute", "Ticks" |
slt | string | Stop loss type. Only for BO. | "Absolute", "Ticks" |
slv | string | Stop loss value. Only for BO. | numeric (e.g. "5.00") |
sov | string | Square off value. Only for BO. | numeric (e.g. "10.00") |
tlt | string | Trailing stop loss indicator. Only for BO. | "Y" (yes), "N" (no) |
tsv | string | Trailing stop loss value. Only for BO and if tlt is Y. | numeric (e.g. "2.00"), else "0" |
{
"nOrdNo": "250720000007242",
"stat": "Ok",
"stCode": 200
}
Name | Type | Description |
---|---|---|
nOrdNo | string | Unique order number assigned to your request |
stat | string | Status message, "Ok" if successful |
stCode | int | HTTP status code, 200 for success |