Net positions are zero, even though positions are open

ZL4353
At 3:05PM i am closing all my open positions. I am consuming kite.positions() api to identify open position using quantity in net positions. But looks like api is giving zero quantity for net position ('quantity' in position['net']).
  • ZL4353
    Please can someone respond
  • ZL4353
    @sujith Please can you respond
  • sujith
    You seem to have positions.
  • sujith
    Is it empty on Kite web?
  • ZL4353
    Sorry, i am not getting you. do you mean kite.poistions()['net'] returning empty? No it was not returning empty, it was returning closed position only. open position was not there. To give you more idea, i am continuously polling open position using kite.postions() api and at around 3:05PM i am closing all positions. I have checked till around 3:02PM api was working as expected, and was giving all open positions (with quantity). But after, quantity in net positions were 0 only, though i can see, my trade was still open. I had to manually close my trade, automation didn't square off my trade.
  • ZL4353
    @sujith please respond
  • sujith
    sujith edited June 2020
    Kite web uses the same APIs to display the values. Can you let us know which field you are looking for? You need to paste the complete stack trace with debug logs when it happens next time.
  • ZL4353
    Ok. Thanks sujith. I will add the code and logs, if this happens again.
  • sujith
    You can set debug flag true while creating kiteconnect object.
Sign In or Register to comment.