The U.S. dollar <.DXY> hit a nearly seven-week low against a basket of currencies, pressured by lingering concerns about U.S. President Donald Trump's protectionist stance.

A more protectionist United States would threaten Canada's economy. But Canadian officials are convinced Mexico will suffer the most damage from changes to the North American Free Trade agreement, under which Canada sends 75 percent of its exports to the United States.

"There might be a new trade deal coming down the pipe but expectations are that it would be beneficial for both parties (Canada and the United States)," said Hosen Marjaee, senior managing director at Manulife Asset Management.

Trump signed orders on Tuesday smoothing the path for the Keystone XL pipeline, giving a lift to the shares of Canada's energy companies and helping to push the country's benchmark stock index to a near record high.

If constructed, Keystone would provide oil producers in Canada with a quicker route to send crude to U.S. Gulf Coast refiners. Oil is one of Canada's major exports.

The Canadian dollar ended at C$1.3067 to the greenback, or 76.53 U.S. cents, stronger than Tuesday's close of C$1.3161, or 75.98 U.S. cents.

The currency's weakest level of the session was C$1.3163, while it touched its strongest since Jan. 18 at C$1.3062.

Oil clawed back earlier losses even after data showed a build in U.S. crude inventories, reinforcing traders' sentiment that oil is trapped in a range by expected OPEC production cuts and U.S. output growth. [O/R]

U.S. crude oil futures settled unchanged at $53.18 a barrel.

Canadian government bond prices were lower across a steeper yield curve in sympathy with U.S. Treasuries as record highs on Wall Street reduced demand for safe haven assets, such as bonds.

The two-year fell 5.5 Canadian cents to yield 0.819 percent and the 10-year declined 54 Canadian cents to yield 1.823 percent.

The 10-year yield touched its highest intraday since Dec. 22 at 1.830 percent.

(Reporting by Fergal Smith; Editing by Alistair Bell)

By Fergal Smith