I tried to modify the SL order using the endpoint https://api-hft.upstox.com/v3/order/modify and the pay load values are payload = {
“validity”: “DAY”,
“price”: price,
“order_id”: str(order_id),
“order_type”: order_type,
“trigger_price”: trigger_price,
}
I am getting the error message as 2025-01-21 15:07:52 - ERROR - Failed to update the order 250121000538195. Response code = 400, error message = {‘status’: ‘error’, ‘errors’: [{‘errorCode’: ‘UDAPI100038’, ‘message’: ‘Invalid input passed to the API’, ‘propertyPath’: None, ‘invalidValue’: None, ‘error_code’: ‘UDAPI100038’, ‘property_path’: None, ‘invalid_value’: None}]}
I don’t know which input value is invalid. Please check .
I can able to execute other requests, so it is not the problem with ‘ACCESS_TOKEN’.
Hi @AE9225,
Welcome to the Upstox Community!
We are checking this and will get back to you soon, thanks.
Hi @AE9225,
Could you please share a cURL request for the payload mentioned above? The message you provided is unclear about the format of each value in the key-value pairs. For reference, you can check out example codes at Upstox API Documentation - Modify Order.
Thank you!
(post deleted by author)
The problem is in request invocation. I change the invocation code to
response = requests.put(url, headers=headers, json=payload)
Now it is resolved. Please close this.
1 Like
Thanks @AE9225 for confirming.