Hi there:
I was trying to get historical market data for ‘AAPL’:
d = datetime.strptime(‘2016-01-03 09:00:00-04:00’, ‘%Y-%m-%d %H:%M:%S%z’)
d1 = datetime.strptime(‘2016-01-03 16:00:00-04:00’, ‘%Y-%m-%d %H:%M:%S%z’)
rest = tradeapi.REST()
barset = rest.get_barset(‘AAPL’, ‘minute’, 1, d.isoformat(), d1.isoformat())
The above code returns me empty result set. If I change ‘2016’ to ‘2017’ then it will return bar data. Is there no data available through alpaca data api before 2016? Is there any other way i could get historical stock data?
Thanks a bunch,
Mike