Skip to content

Cancel Order

Single Order

Use this API to cancel FOR365 orders that have been placed.

Note

If your app type is partner you will not be able to call this API. Please go to the EaseAPI For Business section to see how partners can use EaseAPI.

Sample code

curl --location 'https://easeapi.venturasecurities.com/for365/v1/cancel' \
--header 'x-client-id: AA0605' \
--header 'x-app-key: 8ab5rt7yp2lm9qw4s1ex' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...' \
--data '{
    "order_no": "1132506091167"
}'
import requests
import json

url = "https://easeapi.venturasecurities.com/for365/v1/cancel"

payload = json.dumps({
    "order_no": "1132506091167"
})
headers = {
    'x-client-id': 'AA0605',
    'x-app-key': '8ab5rt7yp2lm9qw4s1ex',
    'Content-Type': 'application/json',
    'Authorization': 'Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
const axios = require('axios');
let data = JSON.stringify({
    "order_no": "1132506091167"
});

let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://easeapi.venturasecurities.com/for365/v1/cancel',
headers: { 
    'x-client-id': 'AA0605', 
    'x-app-key': '8ab5rt7yp2lm9qw4s1ex', 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...'
},
data : data
};

axios.request(config)
.then((response) => {
    console.log(JSON.stringify(response.data));
})
.catch((error) => {
    console.log(error);
});

Response

{
    "success": true,
    "message": "Order cancellation request submitted successfully. Your Order Ref. No. 1132506091172",
    "order_ref_no": "1132506091172"
}

Request parameters

Parameter
Description
order_no unique number of order that you want to cancel

Response parameters

Parameter
Description
success Indicates the status of the order based on its execution. It can be either true or false
message A message providing a reason when order gets processed.
order_ref_no Order id of your order.

OCO Order

Use this API to cancel FOR365 orders that have been placed.

Sample code

curl --location 'https://easeapi.venturasecurities.com/for365/v1/cancel' \
--header 'x-client-id: AA0605' \
--header 'x-app-key: 8ab5rt7yp2lm9qw4s1ex' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...' \
--data '{
    "order_no": "1132506091167"
}'
import requests
import json

url = "https://easeapi.venturasecurities.com/for365/v1/cancel"

payload = json.dumps({
    "order_no": "1132506091167"
})

headers = {
    'x-client-id': 'AA0605',
    'x-app-key': '8ab5rt7yp2lm9qw4s1ex',
    'Content-Type': 'application/json',
    'Authorization': 'Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...'
}

response = requests.request("POST", url, headers=headers, data=payload)

print(response.text)
const axios = require('axios');
let data = JSON.stringify({
    "order_no": "1132506091167"
});

let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://easeapi.venturasecurities.com/for365/v1/cancel',
headers: { 
    'x-client-id': 'AA0605', 
    'x-app-key': '8ab5rt7yp2lm9qw4s1ex', 
    'Content-Type': 'application/json', 
    'Authorization': 'Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...'
},
data : data
};

axios.request(config)
.then((response) => {
    console.log(JSON.stringify(response.data));
})
.catch((error) => {
    console.log(error);
});

Response

{
    "success": true,
    "message": "Order cancellation request submitted successfully. Your Order Ref. No. 1132506091172",
    "order_ref_no": "1132506091172"
}

Request parameters

Parameter
Description
order_no unique number of order that you want to cancel

Response parameters

Parameter
Description
success Indicates the status of the order based on its execution. It can be either true or false
message A message providing a reason when order gets processed.
order_ref_no Order id of your order.