Place Order
Request to be POSTed to uri : /NorenWClientTP/PlaceOrder
Request Details :
Json Fields | Possible value | Description |
---|---|---|
uid* | Logged in User Id | |
actid* | Login users account ID | |
exch* | NSE / NFO / BSE / MCX/CDS/NCX/BFO/BCD | Exchange (Select from ‘exarr’ Array provided in User Details response) |
tsym* | Unique id of contract on which order to be placed. (use url encoding to avoid special char error for symbols like M&M) | |
qty* | Order Quantity | |
prc* | Order Price | |
trgprc | Only to be sent in case of SL / SL-M order. | |
dscqty | Disclosed quantity (Max 10% for NSE, and 50% for MCX) | |
prd* | C / M / H /I / B /F /S /P ( C-Delivery , M-Carry Forward(CF) ,H-Cover Order,I-Intraday,B-Bracketorder,F-MTF,S-Special,P-Special2) | Product name (Select from ‘prarr’ Array provided in User Details response, and if same is allowed for selected, exchange. Show product display name, for user to select, and send corresponding prd in API call) |
trantype* | B / S | B -> BUY, S -> SELL |
prctyp* | LMT / MKT / SL-LMT / SL-MKT / DS / 2L / 3L | |
ret* | DAY / EOS / IOC | Retention type (Show options as per allowed exchanges) |
remarks | Any tag by user to mark order. | |
ordersource | MOB / WEB / TT | Used to generate exchange info fields. |
bpprc | Book Profit Price applicable only if product is selected as B (Bracket order ) | |
blprc | Book loss Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
trailprc | Trailing Price applicable only if product is selected as H and B (High Leverage and Bracket order ) | |
ext_remarks | External remarks | |
cl_ord_id | Cli Order Id | |
channel | Channel | |
usr_agent | User Agent | |
app_inst_id | App Install Id | |
amo | The message "Invalid AMO" will be displayed if the "amo" field is not sent with a "Yes" value. If amo is not required, do not send this field. | |
tsym2 | Trading symbol of second leg, mandatory for price type 2L and 3L (use url encoding to avoid special char error for symbols like M&M) | |
trantype2 | Transaction type of second leg, mandatory for price type 2L and 3L | |
qty2 | Quantity for second leg, mandatory for price type 2L and 3L | |
prc2 | Price for second leg, mandatory for price type 2L and 3L | |
tsym3 | Trading symbol of third leg, mandatory for price type 3L (use url encoding to avoid special char error for symbols like M&M) | |
trantype3 | Transaction type of third leg, mandatory for price type 3L | |
qty3 | Quantity for third leg, mandatory for price type 3L | |
prc3 | Price for third leg, mandatory for price type 3L | |
algo_id | Exchange approved algo id | |
naic_code | ||
instname | Instrument Name | |
ordersource | Order Source |
Example :
curl https://apitest.kambala.co.in/NorenWClientTP/PlaceOrder \
-d "jData={\"uid\":\"VIDYA\", \"actid\":\"CLIENT1\", \"exch\":\"NSE\", \"tsym\":\"ACC-EQ\",
\"qty\":\"50\", \"price\":\"1400\", \"prd\":\"H\", \"trantype\":\"B\", \"prctyp\":\"LMT\",
\"ret\":\"DAY\"}“ \
-d “jKey=GHUDWU53H32MTHPA536Q32WR”
Response Details :
Response data will be in json format with below fields.
Json Fields | Possible value | Description |
---|---|---|
stat | Ok or Not_Ok | Place order success or failure indication. |
request_time | Response received time. | |
norenordno | It will be present only on successful Order placement to OMS. | |
emsg | This will be present only if Order placement fails |
Sample Success Response:
{
"request_time": "10:48:03 20-05-2020",
"stat": "Ok",
"norenordno": "20052000000017"
}
Sample Error Response :
{
"stat": "Not_Ok",
"request_time": "20:40:01 19-05-2020",
"emsg": "Error Occurred : 2 \"invalid input\""
}
Example
- Python
- JavaScript
- Java
- dotNet
let orderparams = {
'buy_or_sell' : 'B',
'product_type' : 'C',
'exchange' : 'NSE',
'tradingsymbol' : 'CANBK-EQ',
'quantity' : 1,
'discloseqty' : 0,
'price_type' : 'LMT',
'price' : 175.0
};
api.place_order(orderparams)
.then((reply) => {
console.log(reply);
}
ret = api.place_order(buy_or_sell='B', product_type='C',
exchange='NSE', tradingsymbol='CANBK-EQ',
quantity=1, discloseqty=0,price_type='SL-LMT', price=200.00, trigger_price=199.50,
retention='DAY', remarks='my_order_001')
JSONObject reply = api.place_order("B","I", "NSE", "CANBK-EQ", 1, 0, "LMT", 220.0, "java", null, null, null, null, null, null);
System.out.println(reply.toString());
PlaceOrder order = new PlaceOrder();
order.uid = uid;
order.actid = actid;
order.exch = "NSE";
order.tsym = "M&M-EQ";
order.qty = "10";
order.dscqty = "0";
order.prc = "100.5";
order.prd = "I";
order.trantype = "B";
order.prctyp = "LMT";
order.ret = "DAY";
order.ordersource = "API";
nApi.SendPlaceOrder(Handlers.OnResponseNOP, order);