The Toronto stock market looked set for a small gain at the open Wednesday morning as commodity prices advanced amid hopes that Greece is close to arriving at a deal that will see it get a crucial, second bailout to stave off bankruptcy.

The Canadian dollar was little changed, down 0.02 of a cent to 100.5 cents US.

U.S. futures advanced with the Dow Jones industrial futures ahead 20 points to 12,851, the Nasdaq futures gained 3.5 points to 2,532.8 while the S&P 500 futures rose 1.1 points to 1,345.8.

Greece has been kept solvent for the last two years by €110 billion in international rescue loans. But it needs to get its hands on another €130 billion. Otherwise, it will not have enough money to pay off a big bond redemption on March 20.

However, in order to get the money, the country’s coalition leaders must agree on a new slate of tough austerity measures.

On Wednesday, the leaders were to study a draft deal that was prepared with the country’s debt inspectors.

Meanwhile, The Wall Street Journal said that the European Central Bank is prepared to contribute to lightening Greece’s debt burden, which should help pave the way to an agreement. According to the report, the ECB would essentially give up on profits that it stands to gain on its Greek bond holdings by handing them over to the European bailout fund, which then will sell them back to Greece. Athens would gain billions in the deal.

Oil prices gained ground after an unexpected drop in U.S. crude supplies suggested demand is improving.

The March crude contract on the New York Mercantile Exchange gained 87 cents to US$99.28 a barrel after the American Petroleum Institute said Tuesday that crude inventories fell 4.5 million barrels last week. Analysts surveyed by Platts, the energy information arm of McGraw-Hill Cos., had predicted an increase of 2.3 million barrels.

The Energy Department’s Energy Information Administration reports its weekly supply data — the market benchmark — later Wednesday.

Copper prices also advanced as the March contract in New York gained four cents to US$3.91 a pound.

Gold prices stepped back with the April contract down $2.20 to US$1,746.20 an ounce.

In earnings news, WestJet (TSX:WJA) said it is raising its dividend by 20% to six cents a share. The carrier also reported that profits fell 4.3% in the fourth quarter to $35.6 million. Revenue grew 12.9% to $721.5 million.

Fertilizer producer Agrium Inc. (TSX:AGU) said quarterly profits increased 43% to US$193 million in the fourth quarter. Agrium’s sales were up 32% to $3.18 billion.

TMX Group Inc. (TSX:X) said its profits dropped 21% to $52.7 million in the fourth quarter. Revenue dropped seven per cent to $161.7 million from $174.1 million. TMX Group chief financial officer Michael Ptasznik said the results reflect “the slowdown in listing and equity trading markets during the fourth quarter.”

European bourses were mainly higher as London’s FTSE 100 index dipped 0.02%, Frankfurt’s DAX gained 0.64% and the Paris CAC 40 was up 0.45%.

Earlier in Asia, Tokyo’s Nikkei 225 index gained 1.1%, Hong Kong’s Hang Seng surged 1.5% while mainland China’s Shanghai Composite Index jumped 2.4% and the smaller Shenzhen Composite Index gained 2.8%.