Cancel Order V3 Beta
This is an enhanced version of the Cancel 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. |
Accept | true | string | Defines the content format the client expects, which should be set to application/json . |
Query Parameters
Name | Required | Type | Description |
---|---|---|---|
order_id | true | string | The order ID for which the order must be cancelled. For the regex pattern applicable to this field, see the Field Pattern Appendix. |
Responses
- 200
- 4XX
Response Body
{
"status": "success",
"data": {
"order_id": "1644490272000"
},
"metadata": {
"latency": 30
}
}
Name | Type | Description |
---|---|---|
status | string | A string indicating the outcome of the request. Typically success for successful operations. |
data | object | Response data for Cancel order request |
data.order_id | string | Reference order ID |
metadata | object | Order metadata associated with successful cancelled order. |
metadata.latency | integer | The overall time taken by API platform to process the order cancellation request, measured in milliseconds. |
Error codes
Error code | Description |
---|---|
UDAPI1023 | Order id is required - Please ensure you provide an order id. |
UDAPI1010 | Order id accepts only alphanumeric characters and '-'. - The order id you've provided isn't accepted. |
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. |
UDAPI100040 | Cancel of already cancelled/rejected/completed order is not allowed - You cannot cancel orders that are already finalized in some manner. |
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...