Lag in kite.margins

zuser
I am using kite.margins to check the availability of the margin before placing the trade. I check the margin requirements at https://api.kite.trade/margins/futures. However, it seems that despite having sufficient margin in the account returned by kite.margins, RMS rejects the trades. This could be due to the lag in kite.margins. I have also observed the lag of 3-5 mins in margin updation on kite dashboard. I am talking about the margin balance left after a trade execution(and not overnight settlement of delay of t+1, t+2).

Is this expected? Any updates on kite.margins api to be released?
  • sujith
    Can you give us an order id for which this issue happened?
  • sujith
    sujith edited September 2020
    Is this a consistent issue or intermittent? Since how long you are facing this issue?
  • sujith
    You are saying, funds in the account are not updated immediately right?
    Not the margins requirement API.
  • sujith
    Did you check out the new margins calculation API?
  • kiranMaya
    is storing margin values at session start at 8:5am enough ? will margin values changes drastically with price change ? assume order requirement at day start is 30k , and I have 35k in account , will the margin requirement change more than 35k for the same symbol due to price change ? do i have to make call and check for margin requirement before placing an order to avoid insufficient funds error?
  • rakeshr
    @kiranMaya
    will the margin requirement change more than 35k for the same symbol due to price change ? do i have to make call and check for margin requirement before placing an order to avoid insufficient funds error?
    Yes, we will recommend you make a fresh request for margin fetch before placing an order to avoid margin requirement error. As the margin requirement calculation not only depends on the LTP movement but also on other factors like existing positions and open orders. And this calculation is a bit difficult to be done at your end.
  • zuser
    Did you check out the new margins calculation API?
    @sujith I will check. This is useful.

    However, my issue is with the updation of the available balance after the order is executed. Say I have 1 lac INR at any point of time in trading account and margin required for an order is 75K. After that order is successfully executed, kite.margins(segment="equity")['available']['live_balance'] should return 25K. That is not updated immediately. So if I check the available amount before placing the next order using kite.margins, it would still be 1 lac and if my second order's margin requirement >25K, it would be rejected.

    This has been happening consistently for couple of months. Is kite.margins(segment="equity")['available']['live_balance'] right way to check the available balance?
  • sujith
    @zuser,
    You can check out this thread to know more about the funds. You seem to be looking at a wrong param.
Sign In or Register to comment.