Today at day close the algo sent two orders, BANKNIFTY23NOVFUT BUY five lots orderid 231117202841293 BANKNIFTY23NOV43000CE SELL five lots orderid 231117202841490
The API returned a "success" status along with the order IDs. However, in the kiteweb login, it said that the options order BANKNIFTY23NOV43000CE orderid BANKNIFTY23NOV43000CE was rejected, because of "insufficient margin" - required 38,76,860 where as available margin is 32,98,495.
Two issues, 1) Why is the margin requirement so ridiculously high? Looks like an error from the zerodha RMS. 2) If the order is not meeting the margin req, why is the system returning a success status along with order ID?
For the first query, can you private message the client id? We will check and get back to you.
For the second query, an order_place success means the order place request has gone through successfully from Kite trade to OMS, it doesn't guarantee any kind of execution. You will have to fetch orderbook and check after a second or couple of seconds to know the status of the order.
Thanks for the answers @sujith . Messaged you the user ID. Will process orders accordingly, but I would expect zerodha not to return any order ID when the basic margin requirement is not met.
If order is blocked by our mini-RMS then you will see a 400 error but when it reaches OMS and it is rejected by the RMS then you will see order entry in the orderbook.
For the second query, an order_place success means the order place request has gone through successfully from Kite trade to OMS, it doesn't guarantee any kind of execution. You will have to fetch orderbook and check after a second or couple of seconds to know the status of the order.