TORONTO - The Canadian dollar was slightly higher against the American currency Wednesday, losing much of its early gains amid a sharp drop in commodity prices and positive economic news.

The loonie rose 0.03 of a cent to 104.45 cents US after earlier running as high as 105.12 cents US.

The dollar was supported by data showing that Canada's trade surplus rose sharply in March. The surplus came in at $627 million, up from $356 million in February as exports increased 3.5 per cent and imports grew 2.8 per cent.

Higher commodities, particularly oil, are supportive of the currency. But oil and metals retreated Wednesday amid mixed signs of energy demand in the U.S. while metal prices declined on worries about a slowing of the Chinese economy.

The June crude contract on the New York Mercantile Exchange fell $2.56 to US$101.32 a barrel after the Energy Information Administration said that crude inventories rose 3.8 million barrels last week, much more than the increase of 1.6 million barrels that analysts expected. Also, gasoline inventories unexpectedly rose.

Prices were also under pressure after the U.S. Energy Department's Energy Information Administration said it now expects demand for oil to grow by 1.4 million barrels a day in 2011, about 120,000 barrels a day less that it forecast a month ago.

Meanwhile, the Chinese government released data showing inflation remains stubbornly high while industrial output dropped more than expected in April.

Chinese consumer prices rose 5.3 per cent over a year earlier, driven by an 11.5 per cent jump in food costs and higher than the government's four per cent target for the year "and that increases the likelihood of more interest rate increases and slowing the Chinese economy," observed Jeff Bradacs, senior investment analyst at Manulife Asset Management.

Also, growth in China's industrial output eased in April, declining from March's 14.8 per cent to 13.4 per cent, below the 14.5 per cent reading that economists expected.

Worries about a deepening slowdown in China helped push the July copper contract on the Nymex down a dime to US$3.94 a pound. China is the world's biggest consumer of the metal.

Bullion prices were also lower, with the June gold contract in New York down $10.10 to US$1,506.80 an ounce.