Market data APIs are missing close or settlement price for each day and also on expiry. It should include each day’s close or settlement price.
Look how Aliceblue is doing:
These are much needed to backtest EoD mark-to-market. Also for each day’s position tracking.
From your message, it seems you’re suggesting that the close price you need is missing from the historical candle API’s response.
However, the screenshot you shared indicates that the close price is not zero in the fifth element of the array.
Could you please provide more details to clarify the issue you’re experiencing?
The first screenshot shared is from Upstox. They are per minute candles. The last candle seen is 15:29:00 - suggesting that the OHLCVs are for that minute (minute starting at 15:29:00 and ending by 15:29:59.999999).
Exchange publishes close prices after 15:30:00 IST. Hence, for the historical data to also record close prices, there should be “another” entry in the OHLC CSV with the time at which exchange published close price.
Second screenshot is from a fellow broker Aliceblue. They are sharing close prices (as can be seen by the timestamp of 15:30:51 - they are not prices coming at off times!)