Traders also took in another surprise — the early release of minutes from the latest U.S. Federal Reserve monetary policy meeting last month that showed a variety of opinions on when it should end its current economic stimulus.
The loonie rose 0.18 of a cent to 98.58 cents US.
The minutes showed that some Federal Reserve officials favoured an end to the bond buying program known as quantitative easing as early as this summer.
Several others thought that if labour conditions improved as expected the Fed could slow purchases later in the year and stop them by year-end. However, that meeting took place well before the release of a dismal jobs report for March that was released last Friday.
The Fed released the minutes early after discovering that some copies had been sent by mistake to Capitol Hill staffers and trade groups on Tuesday.
Meanwhile, customs data showed that China posted an unexpected trade deficit of US$800 million in March as imports rose 14.1 per cent after having grown five per cent in the combined January-February period.
The report suggested Chinese manufacturers and consumers might be buying more, raising hopes for a stronger performance from the world's second-biggest economy.
Traders had expected China to post a $15.3-billion surplus last month.
The trade data followed the release of another report Tuesday that showed China’s consumer prices rose at a 2.1 per cent rate in March. That was down from the previous month’s 3.2 per cent and well below the official target of 3.5 per cent for the year.
The showing gives China some leeway in being able to take further measures to stimulate growth, which came in at 7.9 per cent in the three months ended in December, up from the previous quarter’s 7.4 per cent.
Meanwhile, analysts pointed out that there was some weakness in the trade data released Tuesday.
Peter Buchanan, a senior economist at CIBC World Markets, said imports of a number of key resources were not showing much improvement.
"Crude oil imports actually fell by about two per cent on the year. Imports of copper, while rebounding from February’s holiday-depressed levels, eased by 31 per cent from the matching 2012 period, suggesting continuing destocking pressures," he said.
"The continuing softness is a number of key areas . . . is further evidence that China will not provide the sort of lift to commodity markets this time around as in the wake of the last recession four years ago."
Commodity prices were mixed following initial strong gains in the wake of the Chinese inflation data.
The May crude contract on the New York Mercantile Exchange shed early declines to edge up 44 cents to US$94.64 a barrel as data showed crude supplies rose much less than expected last week in the U.S.
Inventories grew by 300,000 barrels, against the 1.4 million barrels that economists had expected.
May copper dipped two cents to US$3.42 a pound.
June gold bullion in New York fell $27.90 to US$1,558.80 an ounce after Goldman Sachs cut its price target for the precious metal. The investment bank said it now expects an average price for gold in 2013 of $1,545, down from a prior forecast of $1,610.
It was the second cut for their gold forecast in less than two months. Also, Cyprus said it was selling some gold from its reserves to contribute to the country's bailout. Gold has fallen seven per cent so far this year.
Meanwhile, ratings agency Fitch cut its rating on China's long-term local currency sovereign debt on Tuesday, citing potential risks from rapid growth in credit and local government debt loads. The rating was cut from AA minus to a still healthy A plus.
The change is unlikely to cause trouble for the government because it has relatively low debt levels compared with other major economies. Fitch left its rating on China’s foreign currency government debt unchanged.