Skip to content

Modify Order

Single Order

Use this API to modify 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/modify' \
--header 'x-client-id: AA0605' \
--header 'x-app-key: 8ab5rt7yp2lm9qw4s1ex' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...' \
--data '{
    "order_no": "1132506091167",
    "transaction_type": "B",
    "type":"O",
    "quantity": 800,
    "trigger_price":2000,
    "price":2000
}'
import requests
import json

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

payload = json.dumps({
    "order_no": "1132506091167",
    "transaction_type": "B",
    "type": "O",
    "quantity": 800,
    "trigger_price": 2000,
    "price": 2000
})
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",
    "transaction_type": "B",
    "type": "O",
    "quantity": 800,
    "trigger_price": 2000,
    "price": 2000
});

let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://easeapi.venturasecurities.com/for365/v1/modify',
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 Modified Successfully. Your Order Ref. No. 1132506091167",
    "order_ref_no": "1132506091167"
}

Request parameters

Parameter
Description
order_no unique number of order that you want to modify
transaction_type Whether you're buying (B) or selling (S) the instrument
order_type Type of order being placed, we are supporting market (MKT), limit (LMT) order types in For365.
quantity Number of shares for equity or lots (F&O contracts) you want to buy/sell.
type This indicates, types of For265 order that you want to place, we are supporting Single Order (G) and OCO Order (O)
price This is a limit price for instrument, Order will sent to exchange with this limit price.
trigger_price This is trigger price for order, when price gets to trigger price then this For365 order will trigger.

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 modify FOR365 orders that have been placed.

Sample code

curl --location 'https://easeapi.venturasecurities.com/for365/v1/modify' \
--header 'x-client-id: AA0605' \
--header 'x-app-key: 8ab5rt7yp2lm9qw4s1ex' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer eyJraWQiOiJRMUd0YmNyZVwvZWo5U0JZUHBiVGxOc1U1...' \
--data '{
    "order_no": "1132506091167",
    "transaction_type": "B",
    "type":"O",
    "quantity": 800,
    "target_price": 1500,
    "target_trigger_price": 1500,
    "sl_price": 1400,
    "sl_trigger_price": 1400
}'
import requests
import json

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

payload = json.dumps({
    "order_no": "1132506091167",
    "transaction_type": "B",
    "type": "O",
    "quantity": 800,
    "target_price": 1500,
    "target_trigger_price": 1500,
    "sl_price": 1400,
    "sl_trigger_price": 1400
})

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",
    "transaction_type": "B",
    "type": "O",
    "quantity": 800,
    "target_price": 1500,
    "target_trigger_price": 1500,
    "sl_price": 1400,
    "sl_trigger_price": 1400
});

let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://easeapi.venturasecurities.com/for365/v1/modify',
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 submitted successfully. Your Order Ref No. 1132506091189",
    "order_ref_no": "1132506091189"
}

Request parameters

Parameter
Description
order_no unique number of order that you want to modify
transaction_type Whether you're buying (B) or selling (S) the instrument
order_type Type of order being placed, we are supporting market (MKT), limit (LMT) order types in For365.
quantity Number of shares for equity or lots (F&O contracts) you want to buy/sell.
type This indicates, types of For265 order that you want to place, we are supporting Single Order (G) and OCO Order (O)
target_price This is a limit price for instrument when this For365 target order triggers. Order will be with this limit price.
target_trigger_price This is target trigger price for order, when price gets to trigger price then this For365 order will trigger.
sl_price This is a limit price for instrument when this For365 stoploss order triggers. Order will be with this limit price.
sl_trigger_price This is stoploss trigger price for order, when price gets to trigger price then this For365 order will trigger.

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.