Commerce Secretary Malcolm Baldridge told a congressional committee yesterday that the United States will use the Export-Import Bank as a weapon to retaliate against any country engaging in an export subsidy war.

Testifying before a Joint Economic Committee trade subcommittee, Baldridge said other countries are taking advantage of the United States by heavily subsidizing their exports. U.S. officials will attempt to negotiate down the export subsidies of other countries but "we need a weapon of retaliation," he said. Trade should be a matter of "strict competition" rather than which country can subsidize its exports the most, Baldridge said.

Rep. Fred Richmond (D-N.Y.), chairman of the subcommittee, asked Baldridge what weapon the United States would use. "The Ex-Im Bank is the best one," Baldridge said. "It's under control there. It's in sophisticated hands."

Baldridge and other administration officials have said they will lead a campaign to restore federal funds for the Ex-Im Bank next year if the United States and other trading nations can't agree on reducing export subsidies. The bank's budget was cut by the Reagan administration to show that the business community will share in a sacrifices of the president's economic program.

Baldridge's statement yesterday was the second warning of trade retaliation within a week from a top U.S. official. Last week, R. Tim McNamar, deputy Treasury secretary, told a gathering in France that U.S. trading partners can expect stiff retaliation if they restrict free trade or provoke an export credit subsidy war.

Baldridge said the administration's decision to cut the Ex-Im Bank's budget, along with other programs, was "for the greater goods." But he added, "I can't see it long term if other countries are going to take advantage of us in long-term financing."

The Commerce secretary added that it is "far preferable to negotiate down subsidies with Japan and Europe than for all of us to get in that type of a race."

During the last three years the United States and other industrial nations have attempted to modify international guidelines for interest rates, terms and down payments for official export credit programs. The minimum interest rates of the arrangement haven't changed significantly in the last five years, but as market interest rates have soared, so have credit subsidies.

The Reagan administration's postion is that export subsidies represent a transfer of money from the average citizen to a subsidized industry and foreign buyer of the particular good.

The administration is attempting to raise the international export credit minimum interest rates, and to provide a mechanism to reflect market trends automatically.

On the auto imports issue, Baldridge said the Japanese government and its auto companies still are arguing about how many cars each manufacturer will be allowed to ship to the United States in light of Japan's recent decision to restrict auto shipments here. Baldridge also said the Japanese still are shipping a large number of automobiles here, but he said he is confident that imports will taper off by the end of the year.