code: def _cancel_orphan_orders(self, orderId):
          
          orders = self.ibConn.orders
          for order in orders:
              order = orders[order]
              if order['parentId'] != orderId:
                  self.ibConn.cancelOrder(order['id'])
docs: cancel child orders when parent is gone