The Modify Order API enables users to make changes in the bracket order, pending within the order book. To execute a modification, users must provide the oms_order_id, last_activity_reference and exchange_order_id which can be obtained from the order book. User can modify parameters like price, quantity, order type, and validity. This API facilitates efficient management of orders by allowing users to tailor their orders to meet changing market conditions or trading strategies seamlessly.
Endpoint: /api/v1/orders/kart
Method-Type: PUT
Request Packet
{
"client_id": "<client id>",
"disclosed_quantity": 0,
"exchange": "NSE",
"exchange_order_id": "1100000007437522",
"execution_type": "BO",
"filled_quantity": 0,
"instrument_token": 14366,
"is_trailing":false,
"last_activity_reference": "1394876196271146000",
"oms_order_id": "20240314659",
"order_type": "LIMIT",
"price": 11.5,
"quantity": 1,
"product": "MIS",
"remaining_quantity": 1,
"square_off_value": 0.9,
"stop_loss_value": 0.06,
"trailing_stop_loss": 0,
"trigger_price": 0,
"validity": "DAY",
}
Body Params
FieldName Datatype Description exchange StringNSE, BSE, NFO, MCXinstrument_token String Represents the unique id of instrument. client_id String Represents the unique id of user or username. order_type String LIMIT, SLprice Number the price at which order needs to be placed quantity Number total quantity to buy disclosed_quantity Number hidden quantity from the market. validity String DAY, IOCproduct String CNC, MIS, NRMLuser_order_id Number Represents the unique id of order. filled_quantity Number Number of quantity which are traded. remaining_quantity Number Number of quantity which are pending. last_activity_reference Number Unique id of Last modification. oms_order_id Number Represents the oms id of order. exchange_order_id Number Order Id generated by the exchange trigger_price Number price at which target is set stop_loss_value Number value at which Sl will get hit square_off_value Number value at which position will get squared off. trailing_stop_loss Number adjusts sell order accordingly to reduce losses. is_trailing Boolean TRUE or FALSEexecution_type String BO
Example Code
data=pocket.modifyConditionalOrder( {
"client_id": "<client id>",
"disclosed_quantity": 0,
"exchange": "NSE",
"exchange_order_id": "1100000007437522",
"execution_type": "BO",
"filled_quantity": 0,
"instrument_token": 14366,
"is_trailing":False,
"last_activity_reference": "1394876196271146000",
"oms_order_id": "20240314659",
"order_type": "LIMIT",
"price": 11.5,
"quantity": 1,
"product": "MIS",
"remaining_quantity": 1,
"square_off_value": 0.9,
"stop_loss_value": 0.06,
"trailing_stop_loss": 0,
"trigger_price": 0,
"validity": "DAY",
})
Response
{
"data": {
"basket_id": "",
"message": "basket Order modified Successfully"
},
"message": "Order modified 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": "`trigger_price` is invalid",
"status": "error"
}