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 |
|---|---|---|
| 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. | |
| order_status | PENDING | Order is pending or partially executed at exchange. |
EXECUTED | Order is fully executed at exchange. | |
CANCELLED | Order is cancelled at exchange. | |
OMS_XMITTED / OMSXMITTED | Order is received by OMS but not submitted to exchange. | |
OMS_REJECT / OMSREJECT | Order is rejected by OMS. | |
ORDER_ERROR / ORDERERROR | Order is not valid, rejected by exchange. | |
ADMIN_REJECT / ADMINREJECT | Order is rejected by OMS Admin. | |
EXCHANGE_XMITTED / EXXMITTED | Order is submitted to exchange, but confirmation is not received. | |
AMO_SUBMITTED / AMOACCEPTED | AMO order is received by OMS. | |
AMO_CANCELLED / AMOWITHDRAWN | AMO order is cancelled. |
📄️ Place Order
The Place order API lets you place a new order.
📄️ Modify Order
The Modify order API lets you modify a pending order.
📄️ Cancel Order
The Cancel order API lets you cancel a pending order.
📄️ Place Cover Order
A cover order is a two-legged order. First leg is market order and second leg is stop loss order.
📄️ Modify Cover Order
The Modify cover order API lets you modify a pending cover order.
📄️ Cancel Cover Order
The Cancel cover order API lets you cancel a pending cover order.
📄️ Place Bracket Order
Bracket order is three-legged order. Along with the execution of main leg order, the system places two more orders i.e. profit leg and stoploss leg. It allows traders to place an order along with Stop loss and Profit order in single request.
📄️ Modify Bracket Order
The Modify bracket order API lets you modify a pending bracket order. The expected parameter in the API order_id should be the main leg order id (as received in response from place bracket order API).
📄️ Exit Bracket Order
The exit bracket order API lets you exit the that particular order of a user.
📄️ Trade book
The Trade Book API lets you fetch list of trades executed of current day by the user
📄️ Order Book
The Order book API lets you fetch all orders of a user along with the latest status.
📄️ Order history
Order history keeps audit trail (modifications/changes) of an order. It will provide track of a particular order along with its activities done.