Modify Order V3 Beta
This is an enhanced version of the Modify Order API which includes latency information in the meta object of the response, providing insight into the time Upstox took to process your request.
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
}
For all the field description, please refer to the Modify Order API documentation as all the fields are same as those used when modifing an order using the Modify Order API.
Responses
- 200
- 4XX
Response Body
{
"status": "success",
"data": {
"order_id": "1644490272000"
},
"metadata": {
"latency": 40
}
}
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 |
metadata | object | Order metadata associated with successful order modified. |
metadata.latency | integer | The overall time taken by API platform to process the order modification request, measured in milliseconds. |
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...