...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
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.
@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.
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.
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.