I can see difference in OHLC levels between kite web chart (PFA) and value returned by getOHLC() method in java client. for example, today(31-10-2017) at 9.30 AM I called, getOHLC() method for BAJAJ-AUTO (NSE) and levelsI received are: Open: 3270.05 High: 3285.95 Low: 3270.05 Close: 3282.2
Here Open price is 3270.05 as per getOHLC() API. But, in kite web hourly chart, Open price is 3273.95 for the first candle.
Please see attached image for Bajaj-Auto chart for today.
Why this difference is there between API and Chart data?
Hi @krtrader, Kite web charts and historical data API are from the same source(database) and hence there won't be any difference between the data. A minute and hour charts are generated using the ticks that are received during the market hours at our end whereas day candles are generated using the bhav copy data provided by the exchange. Besides, if you look at a minute or hour candle, the open refers to first tick of that time interval whereas day candle is the open of the day.
Check out the response for minute, hour and day candles for BAJAJ-AUTO here, minute:
I understood that this difference is because of difference between bhav copy and actual tick data. Please confirm on below:
1. getOHLC() method returns data using bhav copy, right? 2. Is it possible to get OHLC based on tick interval using any API (other than subscribing to web socket)
Hi @krtrader, 1. getOHLC() method returns data using bhav copy, right? It will return tick data and OHLC data is of the day. bhav copy is generated at the end of the day. During the day it will return tick data. 2. Is it possible to get OHLC based on tick interval using any API (other than subscribing to web socket) Websockets will give you OHLC of the day. Interval's OHLC is provided only on historical API.
It will return tick data and OHLC data is of the day. bhav copy is generated at the end of the day. During the day it will return tick data.
No, for the Bajaj-Auto, I got below response at around 31-OCT-2017 9.30 AM Open: 3270.05 High: 3285.95 Low: 3270.05 Close: 3282.2
My question was, Is (open, high, low and close) returned by getOHLC() API is based on bhav copy? I am not talking about lastPrice returned by the API (it must be based on tick during the day). But these OHLC values also based on tick during the day? If it is, then why API has returned open=3270.05 instead of 3273.95?
Hi, The bhav copy is generated by end of the day post-market settlement which is around 17:30 or 16:30. If you request for OHLC before that then it will return OHLC of the tick data.
Hi @krtrader, Let us say today is 31st October 2017 and you request for 31st October 2017 day's candle at 9:30 AM then you will get OHLC of day candle which is generated using tick data. If you request for the same candle post 18:30 then you will get day candle data which is generated using bhav copy provided by the exchange.
Sir, I am not talking about Day's candle. I am asking about return value of getOHLC API during the DAY. What will be the OHLC values returned by getOHLC API during day. Is it based on tick data or Bhav copy?
My original question was why there is difference between values of getOHLC API (calling during day) and kite chart values? Yes, there is a difference. If you want I can share more examples of today also. I am not saying that something is wrong but I just want the clarification.
Kite web charts and historical data API are from the same source(database) and hence there won't be any difference between the data.
A minute and hour charts are generated using the ticks that are received during the market hours at our end whereas day candles are generated using the bhav copy data provided by the exchange.
Besides, if you look at a minute or hour candle, the open refers to first tick of that time interval whereas day candle is the open of the day.
Check out the response for minute, hour and day candles for BAJAJ-AUTO here,
minute: hour: day: All the above values will be same on Kite web also.
I understood that this difference is because of difference between bhav copy and actual tick data.
Please confirm on below:
1. getOHLC() method returns data using bhav copy, right?
2. Is it possible to get OHLC based on tick interval using any API (other than subscribing to web socket)
1. getOHLC() method returns data using bhav copy, right?
It will return tick data and OHLC data is of the day. bhav copy is generated at the end of the day. During the day it will return tick data.
2. Is it possible to get OHLC based on tick interval using any API (other than subscribing to web socket)
Websockets will give you OHLC of the day. Interval's OHLC is provided only on historical API.
Open: 3270.05 High: 3285.95 Low: 3270.05 Close: 3282.2
My question was, Is (open, high, low and close) returned by getOHLC() API is based on bhav copy?
I am not talking about lastPrice returned by the API (it must be based on tick during the day). But these OHLC values also based on tick during the day?
If it is, then why API has returned open=3270.05 instead of 3273.95?
The bhav copy is generated by end of the day post-market settlement which is around 17:30 or 16:30.
If you request for OHLC before that then it will return OHLC of the tick data.
if you want I can give you more examples of such price differences
Let us say today is 31st October 2017 and you request for 31st October 2017 day's candle at 9:30 AM then you will get OHLC of day candle which is generated using tick data.
If you request for the same candle post 18:30 then you will get day candle data which is generated using bhav copy provided by the exchange.
I am asking about return value of getOHLC API during the DAY.
What will be the OHLC values returned by getOHLC API during day. Is it based on tick data or Bhav copy?
My original question was why there is difference between values of getOHLC API (calling during day) and kite chart values?
Yes, there is a difference. If you want I can share more examples of today also.
I am not saying that something is wrong but I just want the clarification.
getOHLC will give you day's OHLC not that minute's OHLC.
The chart will have that minute's OHLC.