Modify Order
API to modify an open or pending order.To perform a modification, the orderId is a required field. Along with the orderId, you should include any optional parameters that require modification. If no optional parameters are included in the modification request, the default values will be assumed from the original order.
Improved execution speed
- Experience faster trading with our upgraded API, designed for more efficient order executions and quicker market opportunities. Learn more
Header Parameters
Name | Required | Type | Description |
---|---|---|---|
Authorization | true | string | Requires the format Bearer access_token where access_token is obtained from the Token API. |
Content-Type | true | string | Indicates the media type of the resource, set as application/json . |
Accept | true | string | Defines the content format the client expects, which should be set to application/json . |
Request Body
{
"quantity": 1,
"validity": "DAY",
"price": 120.01,
"order_id": "1644490272000",
"order_type": "MARKET",
"disclosed_quantity": 0,
"trigger_price": 0
}
Name | Required | Type | Description |
---|---|---|---|
quantity | false | integer (int32) | Quantity with which the order was placed |
validity | true | string | Order validity (DAY- Day and IOC- Immediate or Cancel (IOC) order). Possible values: DAY , IOC . |
price | true | number (float) | Price at which the order was placed |
order_id | true | string | The order ID for which the order must be modified. For the regex pattern applicable to this field, see the Field Pattern Appendix. |
order_type | true | string | Type of order. It can be one of the following MARKET refers to market order LIMILT refers to Limit Order SL refers to Stop Loss Limit SL-M refers to Stop Loss Market. Possible values: MARKET , LIMIT , SL , SL-M . |
disclosed_quantity | false | integer (int32) | Indicates the volume to be displayed in the market depth. If provided, this value must be non-zero. |
trigger_price | true | number (float) | If the order is a stop loss order then the trigger price to be set is mentioned here |
Responses
- 200
- 4XX
Response Body
{
"status": "success",
"data": {
"order_id": "1644490272000"
}
}
Name | Type | Description |
---|---|---|
status | string | A string indicating the outcome of the request. Typically success for successful operations. |
data | object | Response data for modify order request |
data.order_id | string | Order ID |
Error codes
Error code | Description |
---|---|
UDAPI1004 | Valid order type is required - Please ensure you provide an acceptable type for the order. |
UDAPI1007 | Validity is required - You need to specify the duration or validity for the order. |
UDAPI1056 | The 'order_type' is invalid - The order type you've provided isn't recognized or accepted. |
UDAPI1055 | The 'validity' is invalid - The provided validity doesn't match any of the recognized types. |
UDAPI1008 | Price is required - Please specify the desired price for your order. |
UDAPI1036 | The 'trigger_price' is required - A trigger price must be specified for this type of order. |
UDAPI1030 | 'price' is not required - For this order type, you don't need to specify a price. |
UDAPI1029 | 'price' is required - A valid price must be provided for this type of order. |
UDAPI1031 | Price and Trigger price both are required - Both price values, regular and trigger, need to be provided for this order. |
UDAPI1032 | Only 'trigger_price' is required - For this type of order, only a trigger price value needs to be specified. |
UDAPI100049 | Access to this API has been restricted for your account. Please use 'Uplink Business' to place/modify/cancel the order. - Use 'Uplink Business' for order operations. |
UDAPI100010 | Order not found - The system couldn't locate the order you're referring to. |
UDAPI100041 | Modifications of already cancelled/rejected/completed orders is not allowed - You cannot make changes to orders that are already finalized in some manner. |
UDAPI1039 | Disclosed quantity should not be less than 10% of the quantity - The revealed amount in your order should be at least 10% of the total order amount. |
UDAPI1003 | Order id is required - Thrown when order number is not provided. |
Examples
A comprehensive set of examples is provided to illustrate various use cases and implementation scenarios for this API. To view detailed examples and access sample code, please refer to: API Examples.
Loading...