OTTAWA - Canada's trade deficit shrank to $3.04 billion in July from $3.76 billion in June, thanks in part to a stronger Canadian dollar that cut the value of imports, Statistics Canada said on Wednesday.

Analysts in a Reuters poll had predicted a shortfall of $3.1 billion. In volume terms, imports fell by 2.3 per cent while exports dropped by 1.1 per cent.

The value of imports fell by 6.0 per cent from June, with lower prices accounting for most of the decline. The Canadian dollar gained 3.6 cents US against the greenback in July.

The more robust domestic currency also pushed down the value of exports, which dropped by 4.9 per cent.

Many major exporters price their goods in U.S. dollars. That means they receive fewer Canadian dollars as the value of the currency increases.

Exports to the United States, which accounted for 75.5 per cent of Canadian goods exports in July, fell by 3.2 per cent while imports plunged by 6.7 per cent. As a result, the trade surplus with the United States grew to $2.90 billion from $1.80 billion in June.