What prompted the U.S. formally to state its Open Door policy in 1899 and 1900?
It was aimed at protecting US interests in China
During the First Sino-Japanese War in 1895, China faced imminent threat of being partitioned and colonized by imperialist powers such as Britain, France, Russia, Japan and Germany. After winning the Spanish–American War of 1898, with the newly acquired territory the Philippine Islands, the United States increased its presence in Asia. It felt threatened by other powers' much larger spheres of influence in China and worried that it might lose access to the Chinese market if the country was partitioned.
As a response, William Woodville Rockhill formulated the Open Door Policy to safeguard American business opportunities and other interests in China. On September 6, 1899, U.S. Secretary of State John Hay sent notes to the major powers asking them to declare formally that they would uphold Chinese territorial and administrative integrity and would not interfere with the free use of the treaty ports within their spheres of influence in China. The Open Door Policy stated that all nations, including the United States, could have equal access to the Chinese market.
In reply, each country tried to evade Hay's request, taking the position that it could not commit itself until the other nations had complied. However, by July 1900, Hay announced that each of the powers had granted consent in principle. Although treaties made after 1900 refer to the Open Door Policy, competition among the various powers for special concessions within China for railroad rights, mining rights, loans, foreign trade ports, and so forth, continued unabated.