Hi, What is the return type of kite.positions() in python? Does it return a list or dictionary or mixed dictionary?
I want to find out if I have a open position of tradingsymbol: NIFTY20SEPFUT for example. If it is there then the algo has to continue monitoring the position instead of buying/selling a new one.
How can I traverse through list of kite.positions?
@sujith - thanks for this. I was looking for piece of code on how to find out if an instrument is part of today's position. I figured it out myself. I still have a question.
How do I know whether the position is closed or still open? Is there a status field?
How do I know whether the position is closed or still open? Is there a status field?
If negative then it is a short position else it is a long position.