Error: "Your subscription does not permit querying data from the past 15 minutes"

Hi,

In my Node.js app, I am sending the following options to getBarsV2

{
start: 2022-07-10T02:27:57.115Z,
end: 2022-07-10T02:42:57.115Z,
timeframe: ‘15Min’
}

And getting the following error:

Error: code: 422, message: your subscription does not permit querying data from the past 15 minutes

I have tried longer and shorter timeframes as well but to no avail, no options appear to work.

Would appreciate very much if someone could point out my mistake.

This is a well-known limitation of the Free data subscription. You can buy an Unlimited data plan or modify your code to prevent requesting data that is not available on your subscription level.

Thank you Oleg. I have now subscribed and am no longer getting that error. However, I do not seem to be calling the getBarsV2 correctly.

Is this the correct way to pass options?

        const resp = await this.alpaca.getBarsV2(
          stock, {
            limit: 1, 
            timeframe: '1Min'
          })

@James99 Unfortunately, I don’t have too much experience with the Python SDK. I think it’s better to ask this question directly on GitHub.