Why am I receiving a late aggregate bar through Polygon’s WebSockets?
Aggregate bar delays are intentional and designed for quality assurance purposes on our end.
Trades are occasionally sent in late. FINRA, for example, has up to 15 minutes to report a trade that happened on any of the dark pools. We deal with these delayed trades differently for second and minute aggregates. For second aggregates, we wait an additional 2 seconds for any high latency messages or late trades to come in. We broadcast the bar after that 2 second delay. We broadcast the bar and hold onto it for another 15 minutes for more trades to come in that would affect that second. It is important to note that we only hold that ‘buffer’ for 15 minutes. If any trades come in after that 15 minute buffer period, they will not be included until the end of the day. For minute aggregates, we broadcast the bars as we receive the trades and calculate them. If subsequent trades are received, we recalculate that bar and send it out again. Like the second aggregates, if a trade comes in after that 15-minute window, it will not be included in the candle until the end of the day. For daily aggregates, we are continuously calculating the 1 daily bar, so this gets updated no matter how late the trade comes in. We do this to ensure that the data we broadcast via our Stock API is correct, even if there have been changes. We feel that rebroadcasting corrected data is better than dropping subsequent details. You can read more about this in our blog post - Aggregate Bar Delays
Enter your email for an invite to our slack community!
Reimagining financial market data for the 21st century.
Can’t find the answer you’re looking for? Contact our team.