The dollar edged down on Friday but hovered near a two-year high and looked set to wrap up its third week of gains while markets digested a raft of global central bank action and the looming risk of a U.S. government shutdown.

The dollar was down 0.20% against a basket of six other currencies at 108.2, but earlier in the day rose to a two-year peak at 108.54.

Currencies overall took a breather after a broad greenback rally that drove its peers to milestone lows, with the South Korean won sinking to a 15-year trough, the Canadian dollar at its weakest in more than four years and the Australian and New Zealand dollars hitting two-year lows.

That did not stop the euro from hitting a one-month low of $1.03435 on Friday, after U.S. President-elect Donald Trump said the European Union must purchase U.S. oil and gas to make up for its "tremendous deficit" with the world's largest economy, or face tariffs.

The single currency quickly pared losses against the dollar and was last up 0.16% at $1.038.

"The euro is trading a little bit firmer this morning. So it's clear that markets aren't too bothered about that just yet," said Michael Brown, strategist at Pepperstone.

"I think it's just an opening salvo in what we all know is going to be a sort of a trade war take-two between the U.S. and Europe."

In the background, a government shutdown loomed over the U.S., after a spending bill backed by Trump failed in the House of Representatives on Thursday.

Government funding is due to expire at midnight on Friday. If lawmakers fail to extend that deadline, the U.S. government will begin a partial shutdown that would interrupt funding for everything from border enforcement to national parks and cut off paychecks for more than 2 million federal workers.

A shutdown would directly reduce GDP growth by around 0.15 percentage point for each week it lasts, according to Goldman Sachs, but growth would rise by the same amount after the shutdown was resolved.

The yen weakened to a five-month low of 157.93 per dollar on Friday, as it continues to remain under pressure from the Bank of Japan's reluctance to further raise rates.

It later recouped some of those losses and last traded 0.5% higher at 156.66 per dollar after top Japanese finance officials said the government is "alarmed" by recent foreign exchange moves and is ready to intervene if speculative moves were deemed excessive.

The BOJ kept interest rates unchanged on Thursday and its governor stayed vague on how soon it could push up borrowing costs, just a day after the Federal Reserve pointed to fewer U.S. rate cuts next year.

Sterling earlier slipped to a one-month trough of $1.2475 but was last flat at $1.2499.

Bank of England (BoE) policymakers voted 6-3 to keep interest rates on hold on Thursday, a bigger split than economists had predicted, as officials disagreed over how to respond to a slowing economy that remains beset by inflation pressures.

DOLLAR DOMINANCE

The dollar was set to end the week with a 1% gain against a basket of currencies, underpinned by expectations that U.S. rates will stay higher for longer. Markets are now pricing in fewer than 40 bps of Fed rate cuts for 2025.

Focus is now on the release of the core PCE price data - the Fed's preferred measure of inflation - later on Friday, for further clues on the outlook for the U.S. economy.

"I don't think the market is going to be particularly sensitive to the figures, given that we've already had this month's CPI and PPI data," said Pepperstone's Brown.

The Australian and New Zealand dollars were also grappling to stay off two-year lows on Friday, with the Aussie last flat at $0.6238.

The kiwi was up 0.18% to $0.5641. Both Antipodean currencies were on track for a weekly fall of about 2%.

(Reporting by Rae Wee and Greta Rosen Fondahn; Editing by Jacqueline Wong, Jamie Freed and Hugh Lawson)