The U.S. dollar <.DXY> weakened against a basket of major currencies on nervousness about a potential victory for U.S. Republican presidential candidate Donald Trump next week.

"The pressure on the big (U.S.) dollar is buffering the downturn in oil and helping the Canadian dollar remain well pinned within its recent ranges over the past few days," said Scott Smith, senior market analyst at Cambridge Global Payments.

U.S. crude oil futures settled $1.33 lower at $45.34 a barrel after a record weekly build in U.S. crude inventories stoked investor worries about a global supply glut. [O/R]

Oil is one of Canada's major exports.

The Canadian dollar ended at C$1.3395 to the greenback, or 74.65 U.S. cents, slightly weaker than Tuesday's close of C$1.3393, or 74.67 U.S. cents.

The currency's strongest level of the session was C$1.3360, while its weakest was C$1.3423.

The Federal Reserve kept interest rates unchanged in its last policy decision before the U.S. election, but signaled it could hike rates in December as the economy gathers momentum and inflation picks up.

A Trump election win that is accompanied by greater market volatility would reduce the chances of a Fed rate hike in December, said Smith.

Against the Mexican peso the loonie touched its strongest since Oct. 10 at 14.5472 pesos.

The peso is seen as the chief proxy for market pricing of Trump's chances of winning.

Strengthening of the Canadian dollar against the peso adds to pressure on Canadian exporters who have struggled with weak growth this year. Canada competes with Mexico for exports to the United States.

Canadian government bond prices were higher across the yield curve in sympathy with U.S. Treasuries. The two-year price firmed 2 Canadian cents to yield 0.543 percent and the benchmark 10-year climbed 22 Canadian cents to yield 1.184 percent.

The 10-year yield hit its lowest intraday since Oct. 26 at 1.170 percent.

The Bank of Canada will in the coming months publish the results of its experiment with a payments system based on the technology behind the bitcoin virtual currency, Carolyn Wilkins, senior deputy governor of the Bank of Canada, said.

(Reporting by Fergal Smith, Editing by W Simon and Sandra Maler)

By Fergal Smith