Cancel Order
As long as an order is open or pending in the system, it can be canceled.
POST: /apiV2/cancelOrder
https://connect.thefirstock.com/apiV2/cancelOrder
Request Details
Parameter | Description |
---|---|
orderNumber | orderNumber, which needs to be cancelled |
userId | User Id of the login user |
jKey | Key Obtained on login success. |
Code
curl --X POST 'https://connect.thefirstock.com/apiV2/cancelOrder' \
--H 'Content-Type: application/json' \
--d '{
"userId": "",
"jKey": "",
"orderNumber": ""
}'
from thefirstock import thefirstock
cancelOrder = thefirstock.firstock_cancelOrder(
orderNumber=""
)
const Firstock = require('thefirstock');
const firstock = new Firstock();
firstock.cancelOrder({orderNumber:""},(err, result)=>{
console.log("Error, ", err)
console.log("Result: ", result)
})
using thefirstock;
class Program
{
public static void Main()
{
Firstock firstock = new Firstock();
var result = firstock.cancelOrder(orderNumber: "");
}
}
Success Response Details
Parameter | Description |
---|---|
data.requestTime | Reaponse received time. |
status | Success |
data.orderNumber | orderNumber of the canceled order. |
Failure Response Details
Parameter | Description |
---|---|
Status | Failed |
data | Type of error |
requestTime | Response received time. |
Sample Success Response
{
"Status": "Success",
"data": {
"requestTime": "",
"orderNumber": ""
}
]
}
{
"Status": "Failed",
"data": "Rejected : ORA:Order not found to Cancel",
"requestTime": ""
}