Previous Close Price instead of LTP in Open Positions ( maybe for first time )

manojmo
Hi,
If a buy order is successful, and i query the open positions, the lastPrice sometimes shows the previous close rather than the current price. Perhaps this happens the first time we query the open position, not sure. There is also a closePrice in the Position POJO. Will using that avoid the problem ?

regards,
manoj
  • manojmo
    manojmo edited April 2
    For example at around 11:32, ANANTRAJ price was returned as 448.2, which is actually its previous close.
    Similarly
    11:58 AUBANK : 874.9
  • manojmo
    I do have some other code around this functionality, which could be at fault, so it could be my problem, checking it out now.
  • manojmo
    So, sorry, my bad. The issue wasn't with the open positions, but with the OHLC quote, and specifically what the "close" means here. Its the previous day's close, not the latest price today, and that was problem.
  • Nivas
    ohlc.close of the quote endpoint is the closing price of the instrument from the last trading day. For more details, please refer to the documentation.
Sign In or Register to comment.