code: def cancelMarketDepth(self, contracts=None):
          
          if contracts == None:
              contracts = list(self.contracts.values())
          elif not isinstance(contracts, list):
              contracts = [contracts]
  
          for contract in contracts:
              tickerId = self.tickerId(self.contractString(contract))
              self.ibConn.cancelMktDepth(tickerId=tickerId)
docs: Cancel streaming market data for contract
          https://www.interactivebrokers.com/en/software/api/apiguide/java/cancelmktdepth.htm