Incorrect bar data/history querying for 1m bars?


This morning I have queried for the most recent 2000 1m bars. A subset of the response is below:


At 8:01 EST, the high on ToS (and other apps) shows 441.18, and at 8:02 EST it is 442.15.

Why is Alpaca (via SIP) showing me 442?

I have very similar issues. I’m checking minute data on Yahoo Finance and it seems that whenever there is a time gap in the Alpaca stream, it sets the price of the latest timestamp when there was available data. So for example: the price at 16:30 is $170.1 both on Yahoo and Alpaca. The price at 16:31 is $170.23 on Yahoo, but there is a time gap on Alpaca. So when Alpaca ‘gets back on track’ at 16:33, the price is set to $170.23, however on Yahoo the current price has already dropped to 169.8. What could be the cause and the fix?

@Tamas_Kiraly Which endpoint are you using to stream data? Is it wss:// or wss:// If it is the iex feed then the streamed data only represents trades and quotes executed on the IEX exchange and not full market SIP data. This manifests two issues 1) there will be times when bars are not created simply because there were no eligible trades on the IEX exchange during that time (no trades = no bar) which can appear like a ‘gap’ and 2) the bar data can be different from full market data which other providers display. This is simply because the bars are calculated from the IEX sub-set of full market data. Could that be the issue?

Yes, it might be the issue. However this makes testing impossible since it yields false results if I’m making a trade at a certain price according to the wss price, and the live price has already changed. I’m currently on the free plan, but is there a guarantee that there will be no data skips in the paid plan using SIP data stream?

@Tamas_Kiraly The paid full market data plan contains aggregate trade bars from the full market. There won’t be any ‘missing’ data however, there will be times when a bar potentially isn’t generated because there were not any ‘valid’ trades during that time. This is expected and true for all data providers. Maybe check out this article for how bars are created.