The United States is close to meeting President Carter's pledge to leaders of the world's industrial nations to cut American oil consumption by 5 percent, according to a top Carter administration energy official.

Although complaints still are being voiced about the American appetite for oil, Deputy Energy Secretary John O'Leary acknowledged this week that U.S. oil consumption has dropped 700,000 to 830,000 barrels a day-about 4 per cent of normal daily consumption.

Carter's pledge, in which most other industrial nations joined, was intended to counter foreign governments' criticism of American oil consumption and to tell oil-exporting nations that the United States would curb its oil consumption. The pledge was taken in the wake of the loss of six million barrels a day of Iranian oil exports.

Neither the president's promise nor the reduction in demand succeeded in heading off much higher oil prices, which now appear to be the principal legacy of that disruption instead of the continued shortages that were feared.

O'Leary said the shortage due to the Iranian situation was only about 1.7 million barrels a day because other countries increased production. Now that Iran has resumed exports of 2.5 million barrels a day, worldwide supply and demand are back in ballance, he said.

O'Leary's comment, in an interview, contrasts sharply with statements only two weeks ago from Energy Secretary James Schlesinger who castigated Americans for using oil at a record rate of 21 million barrels a day.

Schlesinger's deputy was hardly challenging his boss's position, but the apparent discrepancy underscores how hard it is to determine whether there is a shortage of oil, and if there is, how large it may be. Similarly, it highlights the lack of adequate statistics on U.S. oil demand.

O'Leary said the oil savings come from three developments:

Electric power is being generated using coal and nuclear power in one part of the country and then transported to other parts-primarily on the East Coast-that would otherwise have to use oil to generate it locally. "We are saving about 250,000 barrels a day from wheeling power to the oil areas," O'Leary said.

Some large industrial and utility oil users, such as Consolidated Edison Co. in New York, are switching to natural gas under special new rules making gas available to them. These switches have cut oil consumption by between 150,000 and 180,000 barrels a day already, according to Energy Department estimates.

Mos oil companies are making available to their wholesale customers only 85 percent to 95 percent of the gasoline and home heating oil they bought in a comparable month last year. This has meant shorter hours for gasoline station operations and some closings. O'Leary said this action has cut demand by 300,000 to 400,000 barrels a day during March.

O'Leary confidently predicted that it will not be necessary to use any of the possible mandatory conservation measures including gasoline rationing, stand-by authority for which has been requested from Congress, to reach the promised 5 percent reduction.

The three types of savings already occuring, plus voluntary decisions to keep thermostats in nonresidential buildings higher in summer and lower in winter, and better enforcement of the 55 mile-an-hour speed limit, will allow the United States to meet its goal, he explained.

Moreover, this week's 9 percent increase in oil prices by the Organization of Petroleum Exporting Countries "may have the effect of drying up wolrd (oil) demand to some degree," O'Leary added.

Keeping world supply and demand in balance will require a "rock-steady Iran," O'Leary cautioned. And, he added, "We have a debit to work off of more than 100 million barrels" in terms of stocks that were used during the Iranian shut off.

O'Leary acknowledged that the record-high demand numbers, about which Schlesinger complained, do not conclusively show that use was actually that high. "All of our demand data are 'apparent consumption' data," he said. "We have no acutal consumption data."

What the numbers show is what the experts call "disappearance from primary stocks"-basically changes in the level of crude oil and refined product supplies in pipelines, at refineries, or at oil company distribution plants. No one knows what is happening to the amount of gasoline in the tanks of the corner filling station, much less to the amount in each car's gas tank. Nor is there any information about the amount of oil most industrial users have on hand.

Many oil industry officials believe the surge in demand shown in the official numbers really indicates only that many oil users, including individual car owners, have been topping aff their tanks out of fear of future shortages. Thus, the demand peak is only "apparent," not real, in their opinion.

O'Leary, however, thinks that much of the increase in the demand for gasoline, at least, is quite real. "The disappearance of gasoline is hard to explain in terms of stocking alone," he said. "I think we are driving more."