A Bracket Order helps traders manage risk by placing a stop loss and a target order together with a regular order. The stop loss order protects against losses, while the target order aims for profitability in the trade.
Endpoint: /api/v1/orders/kart
Method-Type: POST
Request Packet
{
"client_id": "clintId",
"device": "WEB",
"disclosed_quantity": 0,
"exchange": "NSE",
"execution_type": "BO",
"instrument_token": "11915",
"is_trailing": true,
"order_side": "BUY",
"order_type": "LIMIT",
"price": 18.3,
"product": "MIS",
"quantity": 1,
"square_off_value": 1,
"stop_loss_value": 1,
"trailing_stop_loss": "0.05",
"trigger_price": 0,
"user_order_id": 10002,
"validity": "DAY"
}
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, IOCproduct StringCNC, MIS, NRMLorder_side StringBUY or SELLdevice StringWeb or Mobileuser_order_id IntegerRepresents the unique id of order. trigger_price Floatprice at which target is set stop_loss_value Floatvalue at which Sl will get hit square_off_value Floatvalue at which position will get squared off. trailing_stop_loss Floatadjusts sell order accordingly to reduce losses. is_trailing BooleanTRUE or FALSEexecution_type StringBO
Example
data=pocket.placeConditionalOrder({
"client_id": clintId,
"device": "WEB",
"disclosed_quantity": 0,
"exchange": "NSE",
"execution_type": "BO",
"instrument_token": "11915",
"is_trailing": True,
"order_side": "BUY",
"order_type": "LIMIT",
"price": 18.3,
"product": "MIS",
"quantity": 1,
"square_off_value": 1,
"stop_loss_value": 1,
"trailing_stop_loss": "0.05",
"trigger_price": 0,
"user_order_id": 10002,
"validity": "DAY"
})
Response
{
"data":{
"data":{
"basket_id": "202403132873",
"message": "basket Order Placed Successfully"
}
},
"message": "Order place successfully",
"status": "success"
}
Parameter Description basket_id Identifier for the basket order message Confirmation message for the order status Status of the order modification
Error Response
{
"data": {},
"error_code": 44000,
"message": "`product` is invalid",
"status": "error"
}