Skip to main content

Order

This section provided to information of API calls to do the order management i.e. place fresh order, modify or cancel already submitted valid orders. Retrieve the order and trade book. Using Order API, various type of orders Intraday, Delivery, Bracket Order, Cover order, etc. can be placed. Order type here is used as Product Type in System. Kindly refer to the respective API call for more detail.

🌐 Global Constants

Here are some of the constants enum values used for placing orders.

ParamsValuesDescription
exchange (segment id)NSE_EQ (1), NSE_FO (2), BSE_EQ (8), BSE_FO (4), MCX_FO (16), NCDEX_FO (64), NSE_CUR (2048), NSE_COMM (32768), BSE_CUR (268435456), BSE_COMM (16384), MSE_CUR (1024), NSE_OTS (536870912)Exchange segment
product_typeINTRADAYIt consists of one leg only. Open orders will be squared off automatically before market close.
DELIVERYOrder position will be carried over to next day under holding.
BTSTBuy today sell tomorrow. It will be squared off automatically before next day market close.
COVERIt consists of two legs. MAIN_LEG which is market order and SL_LEG which will be square off stop loss order of MAIN_LEG. Open orders will be squared off automatically before market close.
BRACKETIt consists of three leg order. MAIN_LEG which is placed as Market or Limit, SL_LEG which is square off stop loss order and PROFIT_LEG which is square off order. Open orders will be squared off automatically before market close.
MTFMargin Trading or Margin Trading Facility (MTF) is a facility provided by brokers to their clients in which the client does not have to pay full amount for carrying overnight positions.
order_typeRLRegular limit order.
RL-MKTRegular market order.
SLStoploss limit order.
SL-MKTStoploss market order.
validityDAYOrder valid for the same day.
IOCOrder valid only for immediate execution else cancelled.
GTDOrder valid for specified number of days.
GTCOrder valid until user cancels the order.
EOSOrder valid for the specific session.
EOSESSOrder valid till end of session for BSE.
EOTODYOrder valid till end of day for BSE.
order_statusPENDINGOrder is pending or partially executed at exchange.
EXECUTEDOrder is fully executed at exchange.
CANCELLEDOrder is cancelled at exchange.
OMSXMITTEDOrder is received by OMS but not submitted to exchange.
OMSREJECTOrder is rejected by OMS.
ORDERERROROrder is not valid, rejected by exchange.
ADMINREJECTOrder is rejected by OMS Admin.
EXXMITTEDOrder is submitted to exchange, but confirmation is not received.
AMOACCEPTEDAMO order is received by OMS.
AMOWITHDRAWNAMO order is cancelled.