TORONTO - The Canadian dollar advanced against the greenback Tuesday as solid trade data from China improved confidence about the global outlook for economic growth.

The loonie was up 0.26 of a cent at 104.04 cents US.

China's global trade surplus widened to US$11.4 billion in April as import growth fell amid government efforts to cool an overheated economy and exports rose by nearly 30 per cent.

The gap exceeded private sector forecasts of US$5 billion to $10 billion and was a strong rebound after China reported a rare trade deficit in the first quarter of this year.

Traders will also be anxiously eyeing the latest inflation data from China on Wednesday. Inflation has been stubbornly high and China has made several moves to slow the economy to control high prices, especially for food.

Metal prices headed higher following the release of the Chinese trade data, with the July copper contract on the New York Mercantile Exchange up three cents at US$4.05 a pound.

Oil prices were little changed as traders looked ahead to U.S. inventory figures coming out later in the day, while U.S. exchange operator CME Group said it was raising the margin requirements for trade in a wide range of oil products by 25 per cent. This is CME's third increase in oil maintenance margins this year.

"Changes in margins tend to drive temporary price fluctuations, while strong Chinese exports are supportive of longer-term oil prices," observed Scotia Capital chief currency strategist Camilla Sutton.

"Accordingly, we view recent events as positive for oil prices, the Canadian economy and the Canadian dollar."

Crude inventories likely rose 1.6 million barrels last week, continuing an uptrend since early January, according to analysts surveyed by Platts, the energy information arm of McGraw-Hill Cos..

The June crude contract on the Nymex added a dime to US$102.65 a barrel.

Bullion prices also advanced with the June gold contract on the Nymex up $11 at US$1,514.20 an ounce.