I am trying to get the time series data from the Indian stock exchange, NSE, with 5min, 15min time intervals.
In all these data, the last data bar is missing in the output. For instance, if I request for a 15min data, the 1st data bar starts with the 9:15 am IST data while the last data bar ends at 03:15 pm IST data. I need the 3:30 pm IST data as well. This happens with the 1min and 5min intervals as well. Could someone help to throw some light on this?
I am using the following code to get the data using alpha_vantage API.
from alpha_vantage.timeseries import TimeSeries
ts = TimeSeries(key='API_KEY', output_format='pandas')
data, metadata = ts.get_intraday(symbol='NSE:ESCORTS', interval='15min', outputsize='compact')
print(data)
Providing the CSV output here. The output has EST times. Need to convert them to IST though.
date,1. open,2. high,3. low,4. close,5. volume
2019-09-13 00:00:00,528.2,528.53,522.28,522.55,184692.0
2019-09-13 00:15:00,522.6137,525.0082,519.6531,521.2637,213237.0
2019-09-13 00:30:00,521.3209,521.7994,517.7455,519.4708,167645.0
2019-09-13 00:45:00,519.4187,522.8353,519.2319,520.3187,75889.0
2019-09-13 01:00:00,520.3,522.38,519.03,521.4,67312.0
2019-09-13 01:15:00,521.7602,525.213,521.41,522.4102,105305.0
2019-09-13 01:30:00,522.4666,523.9135,520.5101,521.5666,55738.0
2019-09-13 01:45:00,521.1,526.05,520.7,525.4,92231.0
2019-09-13 02:00:00,525.15,528.38,523.28,527.95,147664.0
2019-09-13 02:15:00,528.0,530.85,527.85,529.15,238392.0
2019-09-13 02:30:00,529.6,530.9,528.5,528.8,105470.0
2019-09-13 02:45:00,528.8671,535.0701,528.1134,534.1673,385941.0
2019-09-13 03:00:00,534.15,536.53,533.53,533.6,354721.0
2019-09-13 03:15:00,533.8192,534.8965,532.6944,533.3192,151856.0
2019-09-13 03:30:00,533.25,533.4,530.35,530.7,117881.0
2019-09-13 03:45:00,530.8222,532.5118,530.7101,531.2222,75945.0
2019-09-13 04:00:00,531.2,535.45,531.2,534.15,208067.0
2019-09-13 04:15:00,534.3587,535.2631,533.0112,533.2587,95106.0
2019-09-13 04:30:00,533.3105,534.6705,532.9191,533.3605,52906.0
2019-09-13 04:45:00,533.3714,535.3123,533.0101,533.3714,71323.0
2019-09-13 05:00:00,533.65,534.33,531.13,532.6,84453.0
2019-09-13 05:15:00,532.5672,533.8189,532.5176,533.1672,74472.0
2019-09-13 05:30:00,533.15,536.45,533.15,535.1,267439.0
2019-09-13 05:45:00,534.7,536.5,534.3,535.65,221096.0
As it can be seen from the above output, the data starts from 00:00:00 EST, which is 09:15 am IST and ends with 05:45:00 EST which is 03:15 pm IST. But, I would need the 3:30 pm IST data bar too, that is, data between 03:15 pm to 03:30 pm IST.