(Adds details throughout and updates prices)

* TSX ends up 170.82 points, or 0.8%, at 20,919.40

* Posts highest closing level since May 4

* Energy advances 2.4%; oil climbs 1.8%

* Technology rises 1.9%

TORONTO, May 30 (Reuters) - Canada's main stock index rose on Monday to its highest level in nearly four weeks, led by gains for energy and technology shares, as an easing of China's COVID-19 restrictions helped soothe investor concern about the economic outlook.

The Toronto Stock Exchange's S&P/TSX composite index ended up 170.82 points, or 0.8%, at 20,919.40, its highest closing level since May 4.

Trading volumes were lower than usual, with U.S. markets closed for a public holiday. Still, the index was gaining ground for a seventh straight day, its longest winning streak since last October.

Gains for the index came as world share markets rose on bets of a possible slowdown in U.S. monetary tightening and after Shanghai announced an end to its two-month long COVID-19 lockdown.

"A reopening of key economic hubs in China and suggestions the U.S. Federal Reserve might slow the pace of interest rate hikes are helping to boost sentiment, at least in the short term," said Russ Mould, investment director at AJ Bell.

Oil climbed 1.8% to $117.17 a barrel, helped additionally by expectations that the European Union will eventually reach an agreement to ban Russian oil imports.

The Toronto market's energy shares ended 2.4% higher, while technology gained 1.9% and heavily weighted financials were up 0.8%.

Canadian banks wrapped up the second-quarter earnings season last week, with most reporting better-than-expected profits, in large part by reducing the amounts of funds they set aside for future loan losses, raising questions among investors and analysts about whether they are too sanguine about looming risks.

The TSX was on track to gain 0.8% in May after slumping 5.2% in April, its biggest monthly decline since March 2020.

Economic data showed that Canada posted a current account surplus of C$5 billion in the first quarter, its largest since 2008. (Reporting by Fergal Smith; Additional reporting by Amal S in Bengaluru; Editing by Andrea Ricci)