Missing market data bars

Hello everyone,

I am new to Alpaca and I am working on a trading bot with a paper account to try out a strategy. When using the alpaca api to retrieve 15 minutes bars (tradeapi.get_barset). I noticed there are quite a few missing data points. This is an example with ‘AAPL’. At the end it jumps from open time 15:45 to 16:30 the next bar. The same happens at other instances in time.

Is there anyone who can tell me what the cause of this is. Is it due to the fact that its outside of trading hours or are gaps in the data a common thing. Should I use the polygon integration to avoid this?

Any help is welcome!

Thanks in advance.


Hey there,

I noticed the exact same issue! I think this is def a problem on their end as there is missing data with the minute bars too…the polygon probably works but that’s only for non-paper accounts.

I’ve noticed the same thing to! I hope they can get a fix going soon.

some people dont understand when a stock price doesn’t move there is no new data point… think about that for a min!


I am sorry not everyone is as smart as you, but I would like to know if this is THE cause so I can fill the blanks or if there is actual missing data and my bot is making decisions based on inaccurate data. This makes a lot of difference in the way these gaps should be treated.

Kris - if there is no price movement that means the bid and ask should be forward filled. Returning an NA or an empty cell is very misleading. The cell should be empty if everyone cancels their order and there’s nobody left in the market, not if there is no price movement. I also highly doubt this is the reason for missing bars since this data is made available for free. There’s a reason companies charge a minimum of $3k/mo for market data.

you have a lot to learn.

Lol ok. Go look at algoseek or direct CME data and let me know if anything is missing.

no thanks, im good…

Cool. Reliable market data vendors do not return missing data when no trades happen.

btw your attitude is why your not making money, learn to accept advice

All equity data providers that I have worked with, including 3k/mo data providers, do not return data when data is missing. Trading platforms also do not show minutes where there is no trading activity. The reason why CME data doesn’t have anything missing is because of the nature of the futures market being active all the time. If your algo needs liquidity to properly function, choose equities that have sufficient liquidity. Trading afterhours will always result in missing data.

You also are not getting NBBO data. You are getting 15 minute bar data. NBBO data would provide you with all of the best bid and offers for every moment in time. Two very very different things.

1 Like