The once beleaguered dollar was so strong during February, March and April that the federal government was able to repay all the currencies it had borrowed earlier from West Germany, Switerland and Japan.

The New York Federal Reserve Bank said the Fed and the Treasury have paid back all of the more than $6.1 billion in foreign exchange that they have used to defend the dollar in stormier times, like last fall.

New York Fed officials said the dollar, which only last October was being spurned by all foreign currency traders, suddenly came into "heavy demand reflecting growing confidence in the U.S. and foreign governments' efforts to correct what had become an excessive decline in the dollar."

The United States and other major countries have special lines of credit with one another called "swap agreements." If the government wants to intervene in foreign currency markets to keep up demand for the dollar vis-a-vis the Swiss franc, the Federal Reserve may call on its swap line with Switerland and use the francs to buy dollars.

It is the first time the United States has not been in debt to its swap line creditors since the middle of 1969.

What the Fed did during February, March and April was use the strengthening dollar to buy up yen, Swiss francs and West German marks. Not only did they buy enough foreign currencies to repay $6.13 billion, but the Treasury and the Fed added another $1.1 billion to their holdings of the three currencies.

In total, the Fed and the Treasury bought up $7.2 billion of the three currencies. By contrast, during the previous six months, when the dollar was under assault the United States had to sell about $9.4 billion of these same currencies to prop the dollar's value.

On November 1, in the middle of a dollar crisis, the Carter administration announced a major program to strengthen the U.S. currency. One of the major prongs of the program was sizable increase, to $30 billion, in the amount of foreign currencies it could borrow under the swap arrangements.

In early February, the U.S. had to sell $656 million in marks, Swiss francs and yen to support the dollar.

After that, however, accordint to New York Fed Senior Vice President Scott E. Pardee, the markets turned around as a result both of the Carter program and the "general impression" that the United States would fare better in the worlwide energy shortage than other countries would.

From early February to April 30th, the dollar gained one percent against the mark and the Swiss franc and 10 percent against the yen.

Overall, according to Pardee and Executive Vice President Alan R. Holmes the worlds' central banks intervened in foreign exchange markets to the tune of $38 billion during February, March and April, surpassing the previous record $33.1 billion in November, December and January.

This time, much of the intervention was done to keep the dollar from rising too sharply.