Realtime data much less dense than Historical data?

Earlier today I did a test of the streaming API, where I subscribed to trades of QQQ. I was receiving about 1 trade every 1-5 seconds, sometimes there would be gaps of 10-15 seconds.

Then later today, I hit the trades history endpoint, and there’s at least 10x, maybe 100x more trades during that same window. Easily 10-20 trades per second in many cases.

Is the realtime endpoint throttled or limited in some way? Or am I subscribing to the realtime streaming data in an incorrect way? I’m using the Typescript SDK at GitHub - alpacahq/alpaca: A TypeScript Node.js library for the https://alpaca.markets REST API and WebSocket streams., and using alpacaStream.subscribe("trades", ["QQQ"]); as my subscription call.

Thanks!

Hi @Lee :wave:,

What plan are you subscribed to? The free plan allows for only IEX ‘realtime’ (i.e. <15mins) data for BOTH historical and streaming endpoints, however you can still access full SIP data for ‘delayed’ data (i.e. >15mins). Note that for historical calls, the feed parameter defaults to whatever gives you the most data at the time you make the query.

If this is the case, then you can get trade parity with the stream by using feed='iex' in the historical api calls/library you’re using, however based on my reading of the library you are using it looks like it might not be supported. Try out the officially supported Node.js library if possible: GitHub - alpacahq/alpaca-trade-api-js: Node.js library for Alpaca Trade API.

We are currently actively looking into changing this to make it less confusing in the future.

Best,

Dylan @ Alpaca

Hi @dylan , thanks for the reply!

I’m on the free plan currently. I was able to add feed='iex' to my current history calls to get data that looks the same as the live data I’m currently receiving through the Typescript API. So thanks for that heads-up.

Can you share a link to SIP pricing, or a link to the contact page for your sales team? Within the technical documentation for the 2 subscription types, it just says “contact us” for SIP but no info or link to how to go about doing that.

Cheers,

Lee

You can find pricing info here: Unlimited access to real-time US stock market data | Alpaca Data API. As for upgrading your subscription, I guess it’s a little hidden, but from your account dashboard you click the top right hand corner drop down, then click ‘Market Data Subscription’