OHLC not searching correct close price

I'm getting wrong close price for instrument 'BANKNIFTY20OCTFUT' by using API kite.ohlc(), as per NSE closing price of 16th Oct is - 23,584.25 whereas kite.ohlc() returning - 23110.3 (one day old record ie. of 15th Oct) rest all data is coming correct. Please check what is the issue with Close price
result = {'open': 23201.2, 'high': 23717, 'low': 23183, 'close': 23110.3}, wrong close price
  • rakeshr
    I'm getting wrong close price for instrument 'BANKNIFTY20OCTFUT' by using API kite.ohlc()
    It's not wrong. We update Close on the next trading day. So, Close field would be updated on next trading morning i.e Monday, in above case.
  • indiatechpython
    Hi Rakesh - why its like that when Open,High, low and LTP getting updated on the same day and even NSE update Close price on the same day, my whole Algo logic is based on current day closing price :(. It there any other API
  • rakeshr
    The reason, why we don't update the close price of Friday over Weekends is
    If we show Friday's close in OHLC, the change% in the market watch will be zero and if users want to see Friday changes it wouldn’t be possible, so we synch data on Monday early morning.
    It there any other API
    There are Historical Data APIs, but again it's a chargeable add-on. If you just need the previous close, you can try storing the last tick/LTP of the day, in your setup as close price.
  • indiatechpython
    I have taken historical services data also , does it will give close price of futures like - 'BANKNIFTY20OCTFUT' on same day after market closing.
  • rakeshr
    Yes, you can get day close in day's candle period.
Sign In or Register to comment.