The New York Stock Exchange said Wednesday it will temporarily close its historic trading floor and move fully to electronic trading after two people tested positive for coronavirus infection at screenings it had set up this week.

All-electronic trading will begin on March 23 at the open, the exchange said. The facilities to be closed are the NYSE equities trading floor and NYSE American Options trading floor in New York, and NYSE Arca Options trading floor in San Francisco.

The closure was in part as a result of positive coronavirus tests of two people, Stacey Cunningham, President of the NYSE, told CNBC. The entrants were stopped at the medical screenings at the Big Board.

The stock market has closed at times over the years, such as during World War II and in the wake of 9/11, but this is the first time the physical trading floor of the Big Board has ever shut independently while electronic trading continues.

"We implemented a number a number of safety precautions over the past couple of weeks, and starting on Monday this week we started pre-emptive testing of employees and screening of anyone who came into the building," Cunningham said on "Closing Bell." "If that screening warranted additional testing, we tested people and they were sent home and not given access to the building. A couple of those test cases have come back positive."

"While those people were not in the building this week and the building had been cleaned and addressed prior to start of trading on Monday, I think it's reflective we're seeing things evolve," Cunningham added.

The NYSE is operated by the electronic trading group Intercontinental Exchange, which acquired it in 2012. The exchange moved into its location at 18 Broad St. in lower Manhattan in 1903. As electronic trading grew on Wall Street, the NYSE adapted, with more and more of its trading being done away from the physical floor.