Is a 5-10 sec delay in stream data normal?


I have been streaming A channel second data from Alpaca/Polygon and I am noticing a 5-10 delay in the streaming data timestamps compared to what the Exchange timestamp. It looks like the stream data are 5-10 secs delayed. Is this delay normal?

Here is how I have been comparing the timestamps.

From the streamconn data, I look at the ‘start’ element.

I then make a call to exchange_time = api.get_clock() using the alpaca_trade_api

When I compare the exchange_time to the start time, I see a 5-10 sec difference. The start time is always slower than the exchange_time time.

I cannot find anything in Alpaca or Polygon that states what the expected delay is. In case it makes a difference, I am using Paper API credentials to make the calls.


1 Like

For streaming minute bars, a 4 second delay from Polygon is expected.

Read Strategy Section

Thanks for the reference. Any idea what the expected delay should be for the seconds stream? Would it be the same 4 seconds?

From my experience, no - the latency shouldn’t be that long, but I haven’t timed it myself.

It would be good idea to use this stripped down sample program as a reference/test:

…just to make sure it’s not periphery code that’s causing the delay (eg database or writing to file). Try with just one stock first.

I’m noticing the second data coming in is 3 hours off and minute data is 5 seconds off…

I’m getting the same timestamps as well; off by hours in the second ticks. It just started for me today and hopefully it’s an anomaly. Typically, I see 5 second deltas in the second data which is tolerable but not great. So no, this should not be normal.

The 3hr delay in the seconds stream is a bug that started yesterday and Polygon is trying to fix tonight. As for the 5 sec delay in seconds and minutes streams normally, I’ve been told this is by design to make sure all the ticks have come in for that second / minute. If you guys aren’t in the Alpaca and Polygon Slack channels, you should sign up. The most up to date info is there. Thanks!

1 Like