Grabbing Minute Bar Data from Yesterday Afterhours
I am trying to get minute bar data from yesterday afterhours period to get the total volume done in afterhours. I know we can do this with the function service.get_market_hours and I was wondering if there was an alternative way to do this (trying to do it in a marketview) and keep getting the error: "AttributeError: 'FilterService' object has no attribute 'get_market_hours'. Below is the code I am using as of right now from CQ documentation
self.yest_ah_vol = float(sum(md.bar.minute(start=service.get_market_hours(date_offset=-1)[1] , end=service.get_market_hours(date_offset=-1)[1] + service.time_interval(4) , include_extended=True, today_only=False).volume))