Updation of margins on Gap down days

Today (28th Feb 2020), my automated trading program tried to place a Cover order on Nifty March Futures at 09:17:34 till about 09:17:53 . It was a sell order for at market price quantity of 150, with a Stoploss of about Rs 45 above the Last Traded Price . Below are two lines from that log.
28-Feb-2020 09:17:35.195 Placing Order Type: SELL, LTP: 11322.65, SL: 11367.9, Qty: 150
28-Feb-2020 09:17:54.938 Placing Order Type: SELL, LTP: 11335.75, SL: 11381.1, Qty: 150

None of these orders were accepted and each API call returned with a Kite Exception (since the exception does not carry the reason, I don't know what the reason is).
I checked margins, which were adequate. The only reason I could guess is that today was a sharp gap down day, and the margin range for NIFTY FUTURES hadn't been updated for a few minutes after open, such that my stoploss might not been in the acceptable range. I am trying to validate from you whether that is possible?
  • sudipto
    Ps.. The exception while placing the order was
    Which from what I could glean by reading the comment in the code says - "Represents user input errors such as missing and invalid parameters. Default code is 400."

    However this is an automated program that does trade almost every alternate day, and usually there are no issues with the inputs.
  • sujith
    Hi @sudipto,
    Due to the volatility, the margin requirement was increased. Bracket and cover orders were blocked. Your order placement request would have been rejected from our RMS which will throw input exception but the reason will always be present in the exception. You can check out the InputException structure here.

    You may also use the RSS feeds from our bulletin to know updates about the operations.
    You can check out today's bulletin message here.
  • sudipto
    @sujith Thanks got it... Is there any place where I can get the comprehensive list of all possible codes of Input Exception along with the messages? It would help in handling such errors in my program.
  • sujith
    There are way too many cases that can't be listed here. You can check out the basic structure of the Kite Trade errors here.
    Every exception will have a message with exception type.
  • sudipto
    ok thanks. Got it.
This discussion has been closed.