Modify order throw error 400 (Modify order not working )

modify order with V2 api dosnt work , can you please check

def ModifyCorrect():

url = ""

    # Define the headers
headers = {
    'Accept': 'application/json',
    'Api-Version': '2.0',
    'Content-Type': 'application/json',
    'Authorization': f'Bearer {access_token}',  # Replace 'access_token' with your actual access token

data = {

“quantity”: 1,
“validity”: “DAY”,
“price”: 115,
“order_id”: “231103025345598”,
“order_type”: “LIMIT”,
“disclosed_quantity”: 0,
“trigger_price”: 0,

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


this is my code im getting response 400

Hi @Ashok_Kumar_k,

From a cursory glance, I see you are using disclosed quantity as 0.
Disclosed quantity is an optional field and cannot be less than 10% of the quantity as a trading rule.

This could also possibly throw an error. Can you reattempt once without disclosed quantity.

hi @AbhishekRathore ,
Thanks for your response
I tried still dint work.
Same error .

@Ashok_Kumar_k, please ensure to include json=data as shown in the corrected code below:

response = requests.request("PUT", url, headers=headers, json=data)

Thank you It worked.