Cancel AMO Order
The Cancel Order API provides user with the capability to cancel open or pending order. To cancel a pending order within the order book, user simply needs to provide the oms_order_id of the targeted order. Upon successful completion of the cancellation request, a success
response status code will be returned, indicating the order's successful cancellation. This API streamlines the process of order management, empowering users to swiftly retract orders as needed, thereby enhancing flexibility and responsiveness in trading activities.
Endpoint: /api/v1/orders/
Method-Type: DELETE
Request Packet
{
"oms_order_id":"202403111778",
"client_id": "clientId",
"execution_type": "AMO"
}
Body Params
FieldName |
Datatype |
Description |
oms_order_id |
String |
Represents the unique id of order given by oms. |
client_id |
String |
The unique ID of the user placing the order. |
execution_type |
String |
The execution type of the order, which is AMO for after market orders. |
Example
data = pocket.cancelOrder({
"oms_order_id":"202403111778",
"client_id": "clientId",
"execution_type": "AMO"
})
Response
{
"data": {
"oms_order_id": "202403111506"
},
"message": "Order cancellation request submitted for OMS Order: 202403111506",
"status": "success"
}
Key |
Description |
oms_order_id |
Unique identifier for the OMS order. |
message |
Information message about the order cancellation request. |
status |
Status of the order cancellation request (e.g., success). |
Error Response
{
"status": "error",
"message": "Request Unauthorised",
"error_code": 40000,
"data":{
}
}