Federal regulators yesterday ordered virtually all of the nation's grain markets to shut down today and tomorrow in an effort to cushion the impact of President Carter's decision to curtail grain shipments to the Soviet Union.

The two-day suspension of trading in wheat, corn, oats, soybeans and soybean products was ordered by the Commodity Futures Trading Commision after an emergency meeting yesterdyay afternoon to prevent what the commission chairman called "potential chaos."

The CFTC decision directly affects only the trading of "futures contracts" calling for delivery of grain at some future date. But cash grain buyers all over the nation look to the futures market to determine the prices they pay, so closing the futures market effectively shuts down America's multibillion-dollar grain business.

World grain markets are also likely to be disrupted by the order because they, too, follow American futures prices.

CFTC Chairman James Stone said his agency acted after consulting with the U.S. Department of Agriculture.

Stone said the two-day delay would give the markets time to adjust to Carter's decision to slash grain shipments to the Soviets in retaliation for their invasion of Afghanistan.

Stone said the CFTC would meet again tomorrow afternoon to reassess the suspension and decide what further action, if any, to take.

On Friday night the president announced he was cutting the amount of grain the United States will sell to Russia between October 1979 and September 1980 from 25 million tons to 8 million tons, the minimum promised under a five-year Soviet-American trade agreement.

The decision threatened to dump 17 million tons of grain that had been committed to the Soviets into the market.

The sudden availability of grain is expected to send farm prices plummeting and may cause political problems for Carter in Iowa, a leading grain producing state.

Secretary of Agriculture Bob Bergland promised on Saturday "to take every action, under every authority we have" to protect American farmers from economic damage resulting from the president's decision.

Administration officials are preparing plans to buy some of the grain that was to have gone to the Soviets and to pay farmers to store much of the rest of it, thus keeping it off the market.

Nevertheless, grain prices are expected to drop, at least temporarily.

By suspending grain futures trading for two days, the CFTC gave the administration time to work out details of its plan for supporting prices.

Stone said the CFTC action was not meant to prop up prices but only to prevent the markets from overreacting to the uncertainty about U.S. policy.

"A short-term closing of the markets is not going to have any longterm effect on price," Stone said.

The four commission members voted unanimously for the suspension after consulting domestic grain traders, exporters, and farm groups, commission sources said.

The suspension will stop 80 percent of the business on the Chicago Board of Trade, the nation's biggest commodity exchange, as well as most trading on the Kansas City Board of Trade and the Minneapolis Grain Exchange.

The Kansas City and Minneapolis exchanges urged the CFTC to suspend trading, but the Chicago Board of Trade lobbied against it.

After a hurriedly called meeting last night, the Board of Trade's directors issued a statement calling the CFTC action "deplorable" and "unnecessary." But the board said it would go along with the CFTC decision, rather than seek a federal court order to block the commission's action.

The suspension affects corn and wheat -- the two principal grains and Soviets have been buying -- as well as oats, soybeans, soybean meal and soybean oil. It does not stop trading in cattle and hog futures, even though prices of those items are influenced by grain prices.

Many Midwestern grain dealers stopped making purchases on Friday, when rumors of Carter's impending action against the Soviets swept through the trade.

Agri-Industries, an Iowa cooperative with more than 300 small grain elevators as members, stopped buying, United Press International reported.

"We pulled clear out," said Agri-Industries executive Maurice Van Nostrand. "There is no market for corn or soybeans. No one knows what its worth.

"I don't think anything will happen until the Chicago Board of Trade opens," he said before the two-day suspension was ordered.

Several knowledgeable grain trade sources predicted that when the markets do open Wednesday, prices will quickly fall by the limit allowed by exchange rules -- 20 cents a bushel for wheat and corn.

Corn and wheat prices in the European Common Market countries are not expected to be affected much by the U.S. decision, because they are determined by the nation's joint agricultural policy. But soybean prices in Europe are not controlled and could drop substantially.