It looks like you're new here. If you want to get involved, click one of these buttons!
....
....
positions_list = kite.positions()
day_positions = positions_list['day']
print (day_positions)
....
....
1) When I try to iterate over "day_positions" to fetch currently opened positions, I am getting position quantity as non 0 for overnight strikes that I have already closed today. [{'tradingsymbol': 'NIFTY2161015500PE', 'exchange': 'NFO', 'instrument_token': 12234242, 'product': 'MIS', 'quantity': -450, 'overnight_quantity': 0, 'multiplier': 1, 'average_price': 48.52083333333333, 'close_price': 48.8, 'last_price': 40.25, 'value': 22106.24999999999, 'pnl': 3993.749999999989, 'm2m': 3993.749999999989, 'unrealised': 3993.749999999989, 'realised': 0, 'buy_quantity': 450, 'buy_price': 47.91666666666667, 'buy_value': 21562.500000000004, 'buy_m2m': 21562.500000000004, 'sell_quantity': 900, 'sell_price': 48.52083333333333, 'sell_value': 43668.74999999999, 'sell_m2m': 43668.74999999999, 'day_buy_quantity': 450, 'day_buy_price': 47.91666666666667, 'day_buy_value': 21562.500000000004, 'day_sell_quantity': 900, 'day_sell_price': 48.52083333333333, 'day_sell_value': 43668.74999999999}, {'tradingsymbol': 'NIFTY2161015600PE', 'exchange': 'NFO', 'instrument_token': 12235266, 'product': 'MIS', 'quantity': 450, 'overnight_quantity': 0, 'multiplier': 1, 'average_price': 77.86666666666666, 'close_price': 77.05, 'last_price': 66.15, 'value': -35647.5, 'pnl': -5879.999999999996, 'm2m': -5879.999999999996, 'unrealised': -5879.999999999996, 'realised': 0, 'buy_quantity': 900, 'buy_price': 77.86666666666666, 'buy_value': 70080, 'buy_m2m': 70080, 'sell_quantity': 450, 'sell_price': 76.51666666666667, 'sell_value': 34432.5, 'sell_m2m': 34432.5, 'day_buy_quantity': 900, 'day_buy_price': 77.86666666666667, 'day_buy_value': 70080, 'day_sell_quantity': 450, 'day_sell_price': 76.51666666666667, 'day_sell_value': 34432.5}]
Can you private message the client id?
I checked 'net' positions. It is correctly showing quantity values for only my open positions.
I am wondering what is 'day' positions data for then? It is still showing very random values for quantity. I have been using 'day' positions only until I faced this issue today.
If we have to check currently opened positions(MIS or NRML), should we always use 'net' positions and check for positions that have quantity value as non 0?
Please clarify.
Thanks.
net
positions and check for non zero Qty. You can also go through this similar thread, which explains regarding day and overnight Qty.But I could not understand why my day positions are showing non 0 value for quantity even though I do not have any open positions(MIS or NRML) for those strikes.
Also I missed mentioning that I had converted all my NRML positions to MIS today morning. But since they are all closed now, my day positions should also show 0 for quantity.
For instance, below 'day' position is a converted one from NRML to MIS. But since my position is currently closed, quantity should have appeared as 0. Whereas it's showing "-450" (SELL), which is not even right and opposite of the position I had taken. I think there is some bug here. Thanks.
It is a concept from NEST, a little complicated. To keep it simple we show only net positions on Kite mobile app but the Kite web shows both but the net positions take precedence.
We would suggest you use net positions only.