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.
| Params | Values | Description |
|---|---|---|
| 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_type | INTRADAY | It consists of one leg only. Open orders will be squared off automatically before market close. |
DELIVERY | Order position will be carried over to next day under holding. | |
BTST | Buy today sell tomorrow. It will be squared off automatically before next day market close. | |
COVER | It 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. | |
BRACKET | It 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. | |
MTF | Margin 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_type | RL | Regular limit order. |
RL-MKT | Regular market order. | |
SL | Stoploss limit order. | |
SL-MKT | Stoploss market order. | |
| validity | DAY | Order valid for the same day. |
IOC | Order valid only for immediate execution else cancelled. | |
GTD | Order valid for specified number of days. | |
GTC | Order valid until user cancels the order. | |
EOS | Order valid for the specific session. | |
EOSESS | Order valid till end of session for BSE. | |
EOTODY | Order valid till end of day for BSE. | |
| order_status | PENDING | Order is pending or partially executed at exchange. |
EXECUTED | Order is fully executed at exchange. | |
CANCELLED | Order is cancelled at exchange. | |
OMSXMITTED | Order is received by OMS but not submitted to exchange. | |
OMSREJECT | Order is rejected by OMS. | |
ORDERERROR | Order is not valid, rejected by exchange. | |
ADMINREJECT | Order is rejected by OMS Admin. | |
EXXMITTED | Order is submitted to exchange, but confirmation is not received. | |
AMOACCEPTED | AMO order is received by OMS. | |
AMOWITHDRAWN | AMO order is cancelled. |
📄️ Place Order - Any Scrip
Lets you place a fresh buy order or sell order.
📄️ Modify Order
Lets you modify an existing pending order
📄️ Cancel Order
This call can be used to cancel an existing pending order.
📄️ Place Cover Order
Lets you place a cover order. Which means, it allows to place a market order or a limit order along with a stop loss order.
📄️ Modify Cover Order
Lets you modify an existing cover order which is pending in the order book.
📄️ Cancel Cover Order
Lets you cancel an existing cover order which is pending in the order book.
📄️ Place Bracket Order
Lets you place a bracket order. which means, you can place a Buy/sell order along with a square off order and a stop loss order.
📄️ Modify Bracket Order
Lets you modify an existing bracket order which is pending in the order book.
📄️ Exit Bracket Order
Lets you cancel an existing bracket order which is pending in the order book.
📄️ OrderBook
This call displays all the orders placed by the User in a single window.
📄️ Order History
This call would fetch the entire state wise data for particular order.
📄️ Place Multileg/Spread Order
Lets you place a multileg order/spread order.
📄️ Cancel Multileg/Spread Order
Lets you cancel an existing multileg order/spread order from the order book.
📄️ Trade Book
This call would return back the entire data of trades from completed orders tab.