How to get overnight FnO position in kite connect

...iam using kitexl to call getpositions but getting nothing except labels also how to get orderid of FnO overnight orders on next day of placing orders
  • sujith
    There is no straightforward way to map positions and orders as of now on Kite Connect. I am not sure if @HowUTrade has come up with a solution for this.
  • madhukar
    @sujith is this problem specifically limited to only kitexl or for the apps in python etc...I mean is there no way to get overnight positions though kite connect API or oderids of those positions ...because usually FnO positions remain for few days and there seems no way to get them to kitexl.
  • HowUTrade

    The GetPositions call, by default fetches intraday positions only.
    To get Net positions (OverNight + Intraday), you have to call GetPositions("Net").

    You need to modify your VBA position functions
    Kite.GetPositions() --> Kite.GetPositions("Net")

    Positions (whether overnight or intraday) will not have order id, it's just net quantity of all orders placed in that symbol in that day.

    In your case, once position is fetched, look for overnight_quantity column,
    it should be > 0 if you are Net Overnight BUY position
    < 0 if you are Net Overnight SHORT position

    You have to place opposite order with same quantity and product ("NRML") to close your overnight positions.
Sign In or Register to comment.