Bars API endpoint returning 0 close price, low price, high price

I am seeing the same problem as well with the v2 bar streaming api. Invalid High Low data:

{Symbol:GME Open:117.21 High:0 Low:0 Close:0 Volume:100 Timestamp:2021-03-03 07:27:00 -0800 PST}

2 Likes

This is the data stream and is used for both paper and live.

I am in the same boat. Been doing some long haul testing and the invalid / inconsistent data coming in completely breaks any algos relying on Alpaca data streams.

Here is a slack thread about this with a response from alpaca: https://alpaca-community.slack.com/archives/CRCR2VB8R/p1614780958324400

Screenshotted the alpaca reply:

2 Likes

Thanks @Kithlak. Maybe I could chime in the Slack thread. I definitely think representing this occurrence with zeros is a bad idea, and I’m disappointed Alpaca introduced this change to the API consumers without notice. It could have caused serious damage.

Getting these as well.
I am using Alpaca.Markets in C# to get the data.

Edit: Just upgraded Alpaca.Markets thinking it would work but doesn’t seem to be building. This is a little annoying as I am doing this for a school project :sweat_smile:

this doesn’t make so much sense to me, my algo goes through all the s&p 500 and today couldn’t perform action on a single ticker (out of more than 500!!) because this “0” issue occurred in all the ticker, so also the “technical explanation” doesn’t seem so satisfying. Why this didn’t occur until a week ago? what changed so dramatically in the stock market to create this? Sounds weird…

My only guess is they are refactoring their data after dropping polygon.io

Idk, currently looking for a new data source. Even if they changed the data back (looks like there is no intention of changing it) the complete lack of transparency before making this switch has me shook.

3 Likes

Same here. I’m looking for a new provider given the lack of ownership of this change. If my application had users this would have gotten me in a lot of trouble.

Yes, I agree, the complete absence of transparency on such a huge issue represents a big alert, which definitely will prevent me from investing real money :sweat_smile:

welcome to my world mate.

So if that’s what they’re doing now, what did they do before?

If a bar only had odd lot orders, did they just copy the opening price to the low/high/close? Did they copy the last known low/high/close to the odd lot bar? Did they omit the bar entirely?

Why did this all of the sudden change? Why did they break something that was working and providing meaningful data for others? Omitting 0 for high/low prices would be easy to implement, but algos do not just base their trading strategy off of last high/low prices and use other metrics as well, which are also reporting 0.

What is the guidance around the following fields, which are >>always<< 0:

Accumulated Volume
Official Open Price
VWAP
AveragePrice

This was frustrating. Of course it will affect anything with a moving average and it is hard to imagine a testing team allowing this to go public without notification that code would need to be updated to randomly reject the minute bars value. That I’m not willing to do. I considered that perhaps this was due to the price action actually being the VWAP in the bars data and that for the minutes where zero was recorded, there was a division by zero error where the result was then substituted with a zero. It appears this is not the case however, there is volume recorded in the minute bars where the price action represented as zero. I’m looking forward to updates on this issue.

There’s actually two things wrong with the Alpaca data: 1) recently, in the minute close data, 0 has been appearing; 2) missing minutes. My algo has been fixing 2) by filling missing minutes with the previous valid data, and now fixing 1) by filling the 0 with the previous valid data.

I’ve found data from twelvedata.com much more reliable. This graph shows twelvedata in blue and Alpaca data in red (from 580 (9:40AM) on 3/3/2021 for ‘CAN’). The ‘up’ arrows are where the Alpaca data is missing a close value for a particular minute. The ‘down’ arrow is where Alpaca is reporting zero.

2 Likes

the issue here that everyone lacks to understand, is the reliance y’all have on minute bars

my point is use more then one data source, this has me like how is anyone even looking at discrepancies

I don’t have a lack of understanding now. It’s clear to me that this production API is unstable, and Alpaca did not take ownership of a breaking change that occurred. Versioning major changes or at least providing advance notice of breaking changes in current versions is standard practice of an API service provider. Mistakes happen, but I haven’t seen any effort to acknowledge it in this case… not even in the most obvious place - the status page. This tells me a lot about the company and the services it provides. I hope I’m wrong and things change. It’s still not too late to acknowledge the issue, but I want to know how they will make sure it doesn’t happen again. Otherwise, the services Alpaca provides are not reliable for real, paying users.

the issue here that everyone lacks to understand, is the reliance y’all have on minute bars

What exactly are you saying? The API can and should be used any way that is documented.

I actually use alpaca and love their services I think the issue here with aggregating data from only one provider, or accumulating most of your equity in one strategy. If youre intentionally accepting data and your strategy that’s causing you a negative outcome just because of a change that more accurately represent it’s the data from the Sip Network that sounds like a huge systemic issue. One word of advice don’t always look at the price in one place

No @kris. The issue here is the API proved unstable. It’s not okay when an API service provider breaks a contract on a whim and doesn’t take any ownership. You’re making assumptions and telling people how to use the API, but it’s irrelevant - consumers should be able to use the API however they see fit. It doesn’t matter how many strategies one has implemented or additional data sources one has added. If this service from Alpaca is unstable, who’s to say when the next Alpaca service will become unstable. I’m not panicking… but if my program had 1,000s of users with 100s of thousand of dollars being traded - you’re damn right I would be panicking.

2 Likes