I just want to know about the Kite Connect API which provides Historical API (Addon), does it provide Exchange 1 minute / 2 minute / 5 minute snapshot / delayed data directly or it generates candle from tick by tick data at their end and provide them as historical data.
If we generate candle at our end, it will not match exactly with the one we see on Zerodha charts. This is because Zerodha uses Exchange snapshot data on charts. You can see same chart in Zerodha as well as Upstox as well as Fyers as they all use snapshot data provided by Exchange for charts. However, TradingView will show different chart as they generate candle at their end using Tick Data from Exchange.
Now my question is whether the Historical API provides the same snapshot data that is visible on Zerodha charts / which is exactly going to be matched with Zerodha charts?
But, we don't recommend polling Historical data APIs during live candle formation for reasons stated in this and this threads.
Exchange bhav-copy provide daily candle data. My doubt is on intraday candle data. Let's take the example of HCLTECH 1 minute chart.
I've active subscription of Kite Connect API. I listened to all ticks received for HCLTECH yesterday and I created 1 min candle based on the tick for HCLTECH. Then I found that somewhere candle close and somewhere candle open has not matched with Zerodha HCLTECH 1 minute chart with the one I generated at my end. Then I searched and found that Zerodha intraday chart uses NSE 1 minute snapshot data and for that reason 1 minute chart data shown on Zerodha chart will never match 100% with the one I'm generating at my end. I guess @sujith only wrote this in some other topic. Then I compared zerodha charts with Upstox and Fyers and found that intraday charts are exactly same for all of them. It means they all are using exchange 1 minute snapshot data on their charts. Now my 1 minute candle data will not match with them because I'm not using NSE 1 minute snapshot data, instead I'm creating candle at my end using Tick Data. The same applies for TradingView also. Their intraday chart is different than Zerodha / Upstox / Fyers as they also generate candle at their end.
Now my question is if I subscribe to the Historical API, will I get NSE snapshot data when I will fetch 1 minute data for a stock or I will get different data (Zerodha may create 1 minute candle with tick by tick data at their end and provide to API users)?
We also make candles using the tick data that we receive just like you did. But the setup we use is different, hence it may not match 100% but the basic idea is to capture the trend.
You can refer to this thread to get more clarity.
So if I subscribe to Historical Data, will it provide exactly same 1 minute data that is visible on Zerodha charts?
For live strategies, we suggest you generate candles at your end. Just like how you tested right now.
Try setting up things on the cloud, maybe the values will be nearer.
I've seen that in few cases, we can see huge profit in manual backtesting derived from zerodha charts, whereas, on the other hand, same gives losses when applied on candle generated using Tick Data.