def check_market_open(self): instrument = self.get_instrument() if instrument["state"] != "Open" and instrument["state"] != "Closed": raise errors.MarketClosedError( "The instrument %s is not open. State: %s" % (self.symbol, instrument["state"])) return True
def check_market_open(self): logger.info("[ExchangeInterface][check_market_open]") instrument = self.get_instrument() if instrument["state"] != "Open" and instrument["state"] != "Closed": raise errors.MarketClosedError( "The instrument %s is not open. State: %s" % (self.symbol, instrument["state"]))
def check_market_open(self): instrument = self.get_instrument() if instrument["state"] not in ['Open', 'Closed']: raise errors.MarketClosedError( f"Market {self.symbol} not open. State: {instrument['state']}" )