Cancel Order
API to cancel an open or pending which can be applied to both After Market Orders (AMO) and regular orders. It may also serve to exit a Cover Order (CO).
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. |
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"
}
}
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 |
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...