A Cover Order help traders protect against losses by placing a stop loss order together with a regular order. This means that if the price moves in an unexpected way, the stop loss order kicks in to limit losses. When buying a Cover Order, the limit price must be higher than the stop-loss trigger price. Conversely, when selling a Cover Order, the limit price must be lower than the stop loss trigger price.
Endpoint: /api/v1/orders/kart
Method-Type: POST
Request Packet
{
"exchange": "NSE",
"instrument_token": "14366",
"client_id": "clientId",
"order_type": "LIMIT",
"price": 13,
"quantity": 1,
"disclosed_quantity": 0,
"validity": "DAY",
"product": "MIS",
"order_side": "BUY",
"device": "WEB",
"execution_type": "CO",
"is_trailing": true,
"stop_loss_value": 12,
"trailing_stop_loss": "0.05",
"trigger_price": 0,
"user_order_id": 10002,
}
Body Params
FieldName Datatype Description exchange StringNSE, BSE, NFO, MCXinstrument_token StringRepresents the unique id of instrument. client_id StringRepresents the unique id of user or username. order_type StringLIMIT, SLprice Floatthe price at which order needs to be placed quantity Integertotal quantity to buy disclosed_quantity Integerhidden quantity from the market. validity StringDAY or IOCproduct StringCNC, MIS, NRMLorder_side StringBUY or SELLdevice StringWeb or Mobileis_trailing BooleanTrue or Falseexecution_type StringCOstop_loss_value Floatvalue at which Sl will get hit trailing_stop_loss Floatadjusts sell order accordingly to reduce losses.
Example Code
response = pocket.placeConditionalOrder({
"exchange": "NSE",
"instrument_token": "14366",
"client_id": "clientId",
"order_type": "LIMIT",
"price": 13,
"quantity": 1,
"disclosed_quantity": 0,
"validity": "DAY"
"product": "MIS",
"order_side": "BUY",
"device": "WEB",
"execution_type": "CO",
"is_trailing": True,
"stop_loss_value": 12,
"trailing_stop_loss": "0.05",
"trigger_price": 0,
"user_order_id": 10002,
})
Response
{
"data":{
"data":{
"basket_id": "20210531-23",
"message": "basket Order Placed Successfully"}
},
"message": "Order place successfully",
"status": "success"
}
Error Response
{
"data": {},
"error_code": 44000,
"message": "`product` is invalid",
"status": "error"
}
Error Code Description 44000 In case of any of the parameter like Exchange, order_type, product being invalid or order price is out of DPR range. 45000 In case of Invalid Price or Quantity. 45010 Something Went Wrong message occurs if you have given wrong instrument token