def less_than_one_hour_of_trading_leg_for_contract(self, contract_object: futuresContract) -> bool: trading_hours = self.get_trading_hours_for_contract(contract_object) trading_hours_checker = manyTradingStartAndEnd(trading_hours) return trading_hours_checker.less_than_one_hour_left()
def is_contract_okay_to_trade(self, futures_contract: futuresContract) -> bool: trading_hours = self.get_trading_hours_for_contract(futures_contract) trading_hours_checker = manyTradingStartAndEnd(trading_hours) return trading_hours_checker.okay_to_trade_now()