Instruments margin API

rupreetg
rupreetg edited September 2018 in API clients
I am trying to get the margin for a stock using an API. I am trying this endpoint - https://api.kite.trade/margins/equity but the value I am getting is different from what I see @ https://zerodha.com/margin-calculator/Equity/. E.g. for stock ZEEL, the API endpoint gives 14x margin but the calculator online gives 7x margin.

1. Which one is correct?
2. In case margin calculator is correct, how can i get these values using an API endpoint?

Thank you for your help in advance!
  • rupreetg
    I just figured out that we get lot many values -

    mis_multiplier is 7
    mis_margin is 14.

    What is the difference between them?
  • rupreetg
    rupreetg edited September 2018
    Is there a documentation of all the fields? What is co_upper, co_lower,etc in API endpoint?
  • rakeshr
    @rupreetg
    "co_upper":4.5% is the maximum SL ,client can enter from LTP and "co_lower": 4% is the margin requirement of contract value for CO.
    mis_margin: 14.0%, means for MIS orders you need 14% margins. (essentially MIS_multiplier and MIS_margin are the same) i.e to buy Rs 100 stock,you need Rs 14(in term of mis_margin) or in term of mis multiplier- Rs 14*7=Rs98.
  • rupreetg
    Thanks Rakesh, ideally yes, mis_margin and mis_multiplier should be same but I see different values in the API hence asking.

    Here is the output of the api -
    {"margin": 0, "co_lower": 4.0, "mis_multiplier": 7.0, "tradingsymbol": "ZEEL", "co_upper": 4.5, "nrml_margin": 0, "mis_margin": 14.0}

    why are these two different? Based on the equity calculator, I am guessing I have to pick mis_multiplier as that is the value that is matching with it.

    Please share your views.
  • rakeshr
    @rupreetg
    mis_margin and mis_multiplier are same, difference is just in format of presenting i.e mis_margin is given in % , here 14% and mis_multiplier is in integer multiplier.
    As explained above,
    (essentially MIS_multiplier and MIS_margin are the same) i.e to buy Rs 100 stock,you need Rs 14(in term of mis_margin) or in term of mis multiplier- Rs 14*7=Rs98.
  • rupreetg
    ah! I get it now. Thanks a lot for explaining!
This discussion has been closed.