The API for retrieving OHLC Quote does not take date as an input. My assumption is that the OHLC data is for the current day... or is it for the previous day session? Assuming that the OHLC Quote is for the current day, 1. What quote will it give before start of trading? Since there is no data to be given yet. 2. What quote will it give during the trading session, since the High, Low and Close are not yet known. 3. NSE takes some time to declare the Close after calculating VWAP. So at what time will the OHLC Quote start reflecting the proper CLose value after end of the session?
1. What quote will it give before start of trading? Since there is no data to be given yet.
It will show the OHLC of the previous day. The close price will be the BHAV copy close price.
2. What quote will it give during the trading session, since the High, Low and Close are not yet known.
The API will return OHL of the current day and the close price of the previous day.
3. NSE takes some time to declare the Close after calculating VWAP. So at what time will the OHLC Quote start reflecting the proper CLose value after end of the session?
It is updated before the next trading day. Usually post BOD, at around 06:30 AM.
Thanks. I am trying to get the OHLC quote of the previous day as an input for my current day trading algorithm. So for example for Nifty Derivatives and Equity, what would you suggest as the best time to schedule the OHLC quote call daily in my program... say between 6:30 AM and 9:15 AM (or is it 9:00 AM)?
Thanks. Will do as advised. Might I suggest 2 enhancements to the API... 1. In the OHLC Quote, add a field for date. That way there will be no confusion and it can be programmatically checked whether the response is for the desired date. It will also allow you to handle the middle of trading session case more elegantly by having two OHLC in the OHLC quote. One with today's date and only OHL fields populated and the other with yesterday's date and just Close data. The current scheme of mixing two day's data in the same OHLC is confusing if not outright wrong. 2. Add an optional input field for date in the OHLC Quote API. When this optional date field is not present, it can behave as it does today. When the date field is supplied, it can supply the OHLC data for the specified date. This will extend the functionality of the API, which is sorely needed as most algorithms check for OHLC data of the last few sessions.
The timestamp field is already available under full market quotes. You can refer to this documentation for all response attributes.
One with today's date and only OHL fields populated and the other with yesterday's date and just Close data.
We didn't get you on this? Currently, we show the current day's OHL, with yesterday's close post-trading start i.e after 9 AM. As, Close value here in quote/depth, has to be day's close, so, it's taken as the previous day's(as the current day is still running). We have also mentioned the same under response attributes definition. You can refer this.
Add an optional input field for date in the OHLC Quote API
If you need a date/timestamp field, why do you go for Quote API instead? Which has a timestamp along with more other fields.
@rakeshr I went through your API. While I can get the time stamp in the full quote of the API, this API call will always give the OHLC quote of the current/previous day. There is no way to get the OHLC data of 2 or 3 sessions in the past. As I had written before, if you API can take Input parameter that the user can send to the API (not output parameter that comes from the API), then the user can supply the desired date in the query and get the OHLC data of that date an not necessarily the previous/current session OHLC data.
I am trying to get the OHLC quote of the previous day as an input for my current day trading algorithm. So for example for Nifty Derivatives and Equity, what would you suggest as the best time to schedule the OHLC quote call daily in my program... say between 6:30 AM and 9:15 AM (or is it 9:00 AM)?
1. In the OHLC Quote, add a field for date. That way there will be no confusion and it can be programmatically checked whether the response is for the desired date. It will also allow you to handle the middle of trading session case more elegantly by having two OHLC in the OHLC quote. One with today's date and only OHL fields populated and the other with yesterday's date and just Close data. The current scheme of mixing two day's data in the same OHLC is confusing if not outright wrong.
2. Add an optional input field for date in the OHLC Quote API. When this optional date field is not present, it can behave as it does today. When the date field is supplied, it can supply the OHLC data for the specified date. This will extend the functionality of the API, which is sorely needed as most algorithms check for OHLC data of the last few sessions.
timestamp
field is already available under full market quotes. You can refer to this documentation for all response attributes. We didn't get you on this?Currently, we show the current day's OHL, with yesterday's close post-trading start i.e after 9 AM. As, Close value here in quote/depth, has to be day's close, so, it's taken as the previous day's(as the current day is still running). We have also mentioned the same under response attributes definition. You can refer this. If you need a date/timestamp field, why do you go for Quote API instead? Which has a timestamp along with more other fields.
As I had written before, if you API can take Input parameter that the user can send to the API (not output parameter that comes from the API), then the user can supply the desired date in the query and get the OHLC data of that date an not necessarily the previous/current session OHLC data.