The Commodity Futures Trading Commission's decision to shut down the nation's grain markets temporarily last week did what it was supposed to do -- and more.

It bought the Carter administration time to figure out how to protect farmers from the fallout of the president's decison to curtail grain sales to the Soviet Union.

But in the process, the CFTC violated what had been one of the basic principles under which the regulatory agency operated -- "price neutrality."

"Our job is not to set prices," CFTC commissioners and top administrators have stressed time and time again.

The CFTC's role is to see that the markets run smoothly, prices are not manipulated and the public is protected from wrong-doing.

But the most important result of the CFTC's two-day market holiday was to prop up the prices of corn and wheat temporarily.

Had the markets been open last Monday and Tuesday, corn and wheat prices would have plunged the limit permitted by exchange regulations.

That happened anyway on Wednesday, when the trading resumed. Corn prices dropped 10 cents a bushel, wheat 20 cents, soybeans 30 cents.

In a matter of seconds, the value of the nation's 7.76-billion-bushel corn crop diminished by $776 million, and the money came out of the pockets of American farmers.

If the CFTC had left the markets open on Monday and Tuesday, prices probably would have fallen the limit on both days, and the cost to farmers would have approached $2 billion.

It was not until the end of the week -- when details of the administration's plan to aid farmers began to fall into place -- that prices rebounded. After repeated promises by Agriculture Department officials, grain traders began to become convinced that the grain the Russians were to have bought would not flood the American market.

The CFTC action clearly did what Chairman James Stone promised it would do "provide a reasonable period impact of the president's action and the details of the expected remedial governmental action to become disseminated and assessed by the market-place."

But in accomplishing its goal, the CFTC swept aside the principle of "price neutrality" to the glee of th groups with the most to gain from higher prices. The National Association of Wheat Growers, the Grain Sorghum Producers Association, the American Soybean Association and a group called Women Involved in Farm Economics (WIFE) hailed the CFTC.

The verbal warfare between the CFTC and the exchanges it regulates escalated into rhetoric as intense as that exchanged by the United States and the Soviet Union.

The analogy is not much exaggerated. The exchanges regard CFTC Chairman Stone as dangerously to the left of liberal. Some at the CFTC consider the exchanges' philosophy of government regulation to be beyond laissez faire and bordering on anarchy.

Clayton Yeutter, the former USDA official who now serves as president of the Chicago Mercantile Exchange, said Stone's televised remarks on the closing "are contrary to the most basic economic rationale underlying futures markets."

Chicago Board of Trade President Robert Wilmouth fired off a 10-page letter to Stone contending the CFTC exceeded its legal authority by closing the market. "We believe the commission's action in issuing this order was abitrary, capricious, an abuse of discretion and in excess of the commission's statutory jurisdiction and authority."

Rather than enabling the futures market to function properly, the CFTC prevented it from doing so, Wilmouth said.

The CFTC acted, he charged, not out of concern for the functioning of the futures market, "but on the basis of the urgings of representatives of the executive department of the government to do so for political purposes." o

There's plenty of evidence Wilmouth was right about both the political motivation and the statutory shakiness of the CFTC's action, but the Chicago exchange is not about to challenge the agency in court.

The last time that happened -- nearly a year ago -- the exchanges lost. The CFTC won an important legal ruling upholding its power to declare an emergency and to close themarkets when it believes prices could be manipulated.

By exerting its authority to step into the market when it sees external factors affecting prices, the CFTC has strengthened its hand further.

To the nation's commodity exchanges, the message of the market holiday is clear: The days when "self-regulation" of commodity markets meant the government would leave them alone are over.

The future of the futures markets is going to be decided in the board room of the CFTC, not in the back room of the Board of Trade.