We reviewed the logs for the order ID you provided and found that the required margin was approximately 60k at the time, while your available funds were less than the required margin. This is why you encountered the error.
To avoid this issue, you can use our Margin API to check the required margin for orders before placing them.
{"status":"error","errors":[{"errorCode":"UDAPI10000","message":"This request is not supported by Upstox API","propertyPath":null,"invalidValue":null,"error_code":"UDAPI10000","property_path":null,"invalid_value":null}]}
Hi @Mandar_Salvi
I noticed two potential issues in the code you provided. First, instead of passing the payload in the data parameter, it should be passed in the json parameter. Second, the headers appear to be incorrect.