Free subscription does not provide data for last 15 mins

Hi

I just joined Alpaca and trying to access market data via Python. On the subscription page it says that free plan includes Real-Time market data, however when trying to send the request I am getting following response:

alpaca_trade_api.rest.APIError: your subscription does not permit querying data from the past 15 minutes

So does the free plan includes real-time data or not?

3 Likes

I am receiving the same error message when trying to query hourly bar data.

df = api.get_bars(symbol, TimeFrame.Hour, yesterday, today, adjustment=‘raw’).df[symbol].

I only need the hour close data on the same day, so that is why the start and end days are only one day. I am just not sure what is causing the error.

Or is there a different way to query for Hour bars on alpaca?

I am getting a similar error. When I try to buy the market data subscription I get an ‘internal server error’.

Is it possible to get a community response to this error? I am trying to get 1-hour bar data but am receiving this error. I can query minute or day data with no problem.

It seems to work if you make your end date string to be strictly less than 15 minutes ago. Something like this in Python:

import datetime

end = (datetime.datetime.now(datetime.timezone.utc) - datetime.timedelta(minutes=15)).strftime('%Y-%m-%dT%H:%M:%SZ')