The S&P/TSX composite index closed 107.24 points higher at 12,540.77, while the TSX Venture Exchange was ahead 18.54 points at 1,239.84.
The Canadian dollar rose 0.99 of a cent to 101.50 cents US.
On Wall Street, the cliff aversion triggered a rally with the Dow Jones industrials jumping 308.41 points to 13,412.55.
The Nasdaq rose 92.75 points to 3,112.26 and the S&P 500 index gained 36.23 points to 1,462.42.
The budget deal, reached just before midnight Tuesday, left several issues unresolved and it was unclear how long markets would be lifted by the agreement.
"The last couple of weeks people were starting to worry whether or not this thing would even get done, and the fact that we did avert the fiscal cliff has put people in a good mood and a buying mood," said Sadiq Adatia, chief investment officer of Sun Life Global Investments.
But Adatia said the positive momentum of traders will likely be tested in the coming sessions.
"I don't think this rally will be long lasting, but it does help the start of the year."
The bill that Congress approved calls for higher taxes on incomes over $400,000 for individuals and $450,000 for couples, a victory for President Barack Obama. Earnings above those amounts would be taxed at a rate of 39.6 per cent, up from 35 per cent. It also delays for two months $109 billion worth of across-the-board spending cuts that were set to kick in this week.
Though fiscal cliff fears have eased, investors still have a host of issues to worry about — not least the prospect of more debates over unresolved longer-term U.S. budget issues.
The next major debate will involve what is known as the debt ceiling — which is essentially how much the government is allowed to borrow. President Obama has said he will not negotiate the issue.
In commodities, oil prices rose with the February contract on the New York Mercantile Exchange ahead $1.30 to US$93.12 a barrel.
The TSX gold sector was higher as the March bullion contract moved ahead $13 to US$1,688.80 an ounce. Copper prices for the March contract were up 8.4 cents to US$3.74 a pound.
Metals and mining stocks were the biggest gainer, rising 3.8 per cent. Teck Resources (TSX:TCK.B) was up $1.35 to $37.50.
Shares in Petrobank Energy and Resources Ltd. (TSX:PBG) fell 91 per cent in the first trading day since the company completed a major reorganization.
The company, now referred to as New Petrobank, announced on Monday it had completed the spinoff of its 57 per cent stake in PetroBakken Energy Ltd. (TSX:PBN), a light oil-focused company. Its stock closed at $1.17, a drop of $11.23.
BlackBerry-maker Research In Motion (TSX:RIM) shares fell 23 cents to $11.57 as reports surfaced that Apple may be testing its next iPhone model and operating system with a mid-year release target.