Alpaca Data API does not have data earlier than 2016?

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,

Hey @Michael_Trump

Alpaca’s Data API usually goes back 5 years for historical minute data ( so back until 8/2015) but sometimes there are missing data points all the way at the beginning. With a funded live trading account I know you have access to Polygon’s historical tick and bar data however.


1 Like