Order getting rejected due to Margin unavailability even after getting Margin Check from API

gaurmmec
gaurmmec edited September 2021 in Python client
@rakeshr @sujith @themohammedfaisal This is regarding order rejection due to margin availability. I call margin API for margin requirements
Url: https://api.kite.trade/margins/basket?consider_positions=false , for 1 Lot ATM PE Sell, 1 Lot ATM CE Sell, its giving margin requirement under final attribute i.e. 160000 ,
"final": {
"type": "",
"tradingsymbol": "",
"exchange": "",
"span": 140050.5,
"exposure": 37173.325,
"option_premium": -17123.75,
"additional": 0,
"bo": 0,
"cash": 0,
"var": 0,
"pnl": {
"realised": 0,
"unrealised": 0
},
"total": 160100.075

When i fire order its executing only one leg and failing on second, looks like earlier zerodha used to consider margin benefit after execution of one leg, but now zerodha wants full PE+CE margin combined , 2,97,000 even after one leg is executed.

This is giving me a lot of problems, this was working fine earlier, it has changed from 1st Sept.

I know margin is increased but margin benefit should still be there. Kindly revert at the earliest.
  • gaurmmec
    Also we are relying on Margin API before firing orders, if API showing 160000 for ATM straddle, we are calculating our dynamic position sizing based on that amount, it has gone for a toss for last 2 days. As margin zerodha asking around 3 lakh for Banknifty straddle.
  • gaurmmec
    gaurmmec edited September 2021
    @sujith @rakeshr Kindly check margin utilisation at your side, 1 CE Sell should costs around 1.5 lakh(as mentioned by margin calculator and API by Zerodha) , when positions are already taken zerodha asking 2.3 lakh for 1 lot of CE Sell. Kindly check this urgently as my position sizing has gone for a toss. Same is happening with NIFTY.

    P.S. - When no positions are taken its utilizing 1.5 lakh only, problem is when existing positions are there.
  • sujith
    We have informed the team to take a look at this.
  • gaurmmec
    Thanks @sujith for the reply, hoping to get resolution at the earliest.
  • gaurmmec
    gaurmmec edited September 2021
    @sujith @rakeshr @themohammedfaisal Today also I
    faced the same issue, Margin available was more than 5 lakh( i was trying to sell 3 PE lots). 1 lot PE delivery margin requirement is around 1.5 lakh. It still failed. Screenshot attached. Kindly try to replicate in your system as this seems to be genuine issue at zerodha's end.

  • themohammedfaisal
    @gaurmmec I cant check the margin utilisation at the time of placing the order at 9.23 AM as you have made more trades after that, you had a margin shortfall of 13714.2 according to the screenshot.
    To speak broadly, we have not received any complaints from clients concerning this, however, Ill track your account and check margin utilisation immediately after the order is rejected for margins.

    We have tried to replicate the issue in our internal accounts and have found no issue with margin benefit being passed on.

    Also, there have been no changes to our risk management system in the past week that cause this issue that you are reporting.
  • gaurmmec
    gaurmmec edited September 2021
    @themohammedfaisal Kindly check my orders, Rejected order was the last order at that time, after that I placed 2 orders for squaring off one leg. Suddenly I am facing this issue post 1 sept. I am not able to sell 3 lots of PE even after 5 lakh in my account. I am not able to utilize more than 70 pct, earlier I used to utilize 90 pct margin. I added 1 sec delay as well after call sell and call buy to get margin benefit. Sequence of my Orders: Call Sell/Call Buy/Put Sell/Put Buy so that i get margin benefit. I had 7 lakh plus funds in my accounts and I could not even sell 3 lots of Call 3 lots of Puts.
  • gaurmmec
    @rakeshr @sujith @themohammedfaisal Kindly check, today also i faced this issue on one of my account DV0674 where it did not allow me to sell 3 lots of PE with more than 5 lakh in this account.

    P.S. - I did not face this issue on last Thursday. Request you to check your system again.
  • pseudo
    I apply a buffer of 1.5 times of the required margin given by API, still my orders often fail due to this same issue.
Sign In or Register to comment.