Order placing API returns status = success even when order failed due to margin shortfall

I placed an order to sell few options, the last option sell failed due to margin shortfall, but API returned success

code used was:

response = requests.post(url, json=data, headers=headers)

@Pradeep_Jaiswar @Ketan any help here?

I recommend checking your funds and margin before placing an order, as order rejections due to insufficient funds occur within the order management system after you receive your initial acknowledgment with the order number.

We are developing a margin API that will enable you to calculate the required margin for all your orders within a bucket or strategy.

The margin API will be useful

Yes, the margin API is currently in development and will be available for customers soon.