The gap between what Canada sells to the world and what it buys from other countries expanded to the largest point on record in July, as its trade deficit expanded to an all-time high of $2.3 billion.

Exports fell 3.4 per cent during the month, Statistics Canada reported Tuesday. That was more than the corresponding decline in imports, which were down 2.2 per cent.

Exports of energy products fell 8.5 per cent to $8.2 billion for the month, the data agency reported, while exports of automotive products dropped 5.3 per cent to $5.9 billion.

"This is about as bad as it gets for Canadian exporters, at least so far," Scotiabank economist Derek Holt said in a note following the release of the data. "[And] the details are worse."

U.S. weakness

Most of the weakness in exports was related to the United States, where exports fell five per cent on a monthly basis. A full 72 per cent of Canada's exports in July were bound for the U.S., Holt noted.

Exports actually increased by 0.9 per cent to the EU, and by 14 per cent to other OECD nations.

"The pattern by country would suggest the difficulties are related to exporting into the U.S. which is Canada’s dominant trading partner and where currency effects are most pronounced," Holt said.

The Canadian dollar rallied in July and August, and currently trades just below the 103 cents US level. That's roughly four cents above where it was at the end of June, at 98.37 cents.

For as long as Statistics Canada has tracked the metric, Canada has posted trade surpluses almost exclusively as the country's economy was largely based on exporting natural resources and finished manufactured goods. But since the recession that began in 2008, the figure has seesawed wildly.

The previous record trade deficit came in September 2010, at $2.33 billion. Tuesday's data for July was slightly larger, at $2.34 billion.