Documentation for Margins API

ro207
ro207 edited July 2020 in General
Hi,

I've been trying to understand how I could programmatically fetch MIS margins from Kite Connect. I could find an API Endpoint on this forum which returns a JSON which seems to have the necessary data - https://api.kite.trade/margins/equity.
1. This API endpoint does not seem to be mentioned anywhere in the Kite Connect Documentation. Any reason why? Is this an unofficial API endpoint?
2. Can I rely on this API to compute MIS margins, as there seems to be no other way to find out the margin I consume for an order?
3. How frequently are these multipliers updated?
4. How frequently are you updating the documentation?

Best,
Ronak.
Tagged:
  • apocalypse
    +1

    Facing the same issue. Kite Trade staff, please do let us know more about this.
  • rakeshr
    @ro207 @apocalypse
    We are working on this. We will give the data dump endpoint, which will have all data shown here.
  • sujith
    Kite Connect provides the margins data only. You will have to do the calculations.
    It is managed by the RMS team and they do update it multiple times during the day.

    PS: We are planning to include the required margins API soon on the Kite Connect APIs. We will include that in the client libraries and update the documentation once it is released.
  • apocalypse
    apocalypse edited July 2020
    @sujith I am not asking for any calculations!

    If you refer to the question asked, it asks the following about the existing endpoint:
    1. Whether it's an officially supported endpoint (not sure why this is not there in your documentation)
    2. Whether we can rely on it to give up-to-date data

    I am happy to do a multiplication/division with the MIS multiplier myself.

    @rakeshr Thanks for your reply. I am not sure whether you will be able to give me any timeline about the new endpoint, so not even asking. Could you please answer the above questions about the existing endpoint?

    Thanks in advance! :)
  • rakeshr
    @apocalypse
    1. Whether it's an officially supported endpoint (not sure why this is not there in your documentation)
    These are just add-on utility/data dump for the community, not an official endpoint.
    2. Whether we can rely on it to give up-to-date data
    It is completely managed by our RMS team and they do keep updating it mostly. But we don't guarantee anything here, it is just an add-on utility provided for the community.
  • ro207
    @rakeshr @sujith
    In that case, is there any way to know / API that I can use to find out what margin was used for a particular executed MIS trade?
  • ro207
    @rakeshr Any update on the above Q?
  • rakeshr
    @ro207
    In that case, is there any way to know / API that I can use to find out what margin was used for a particular executed MIS trade?
    Maybe fetch margin available/funds before and after the order placement and calculate.
  • apocalypse
    Maybe fetch margin available/funds before and after the order placement and calculate.
    Thanks for your response. I understand that you suggest that I check available margins before and after, but isn't this error prone to race conditions? If accidentally 2 orders are placed at the same time, wouldn't this lead to a miscalculation in my program?

    How can I find out the margin consumed in a robust way?
  • sujith
    You can start using margin calculation API as mentioned here.
Sign In or Register to comment.