US Stock intraday history data missing extended hours?

Hey @brian Is extended hours minute data available in the US Stock history dataset? And if not, any other way to get it? I pulled in some data into Jupyter using get_data, and data only appears to be available during standard market hours. Does the data not exist, or is it a matter of me pulling it incorrectly? I’m using the code below within a Zipline environment notebook.

The reason I need full extended hours data is that my trading strategies depend on indicators being based on both after hours and market hours data. i.e. My 60min 20 period moving average indicator needs to be based on the last 1,200 minutes. We use this specific indicator as a profit target, once we’ve entered a short mean reversion trade. The goal is to take profits when we get back to the 60min20ma. Without factoring in price action from 4pm-8pm EST and 4am-9:30am EST, the indicator values are off, at least for our purposes.

I’m really hoping this is possible within QuantRocket as it’s essential, and I’m already in love with the product, so please don’t break my heart :wink:

 prices = get_prices("usstock-minute", start_date="2020-12-22", end_date="2020-12-23", fields=["Open","High","Low","Close", "Volume"])
 prices[380:400]

And as you can see the data stops at market close.

Heres a way I’ve pulled 1 min outside regular trading hours:
!quantrocket history create-ibkr-db 'DB-NAME' --universes 'MY-UNIVERSE' --outside-rth --bar-size '1 min' --start-date '2020-01-01' --shard 'sid,time'

Thanks for the tip, but unfortunately I’m not using interactive brokers. Seems like this might not be consistent with the US Stock data provider, which I believe is Polygon behind the scenes. From what I can tell, it looks like the extended hours minute data is available, but it’s not making its way into the Zipline data bundle, and I’m assuming it has to do with the Zipline trading calendar used, but not sure how to fix. Kind of stuck at this point.

Currently the only data provider with extended hours data is Interactive Brokers.

You’re breaking my heart @brian! Any chance we can get a Polygon history downloader going? Or, if you can provide direction, I’m happy to do the development for it…