NEW YORK, May 5 (Reuters) - The dollar rose for a third straight session against most major currencies on Tuesday, bolstered by U.S. services data last month that was better than market expectations.

The greenback’s gains were also supported after U.S. President Donald Trump stepped up verbal attacks on China, raising fears of a new trade war.
Analysts said the dollar, as a safe-haven currency, also posted gains despite increased risk appetite as countries and some U.S. states started to reopen.
“The dollar is going to benefit from any type of chaos and we are still in this kind of market, even though we’re seeing some risk-on sentiment with some U.S. states gradually re-opening,” said Juan Perez, currency analyst, at Monex Inc. In Washington.
The greenback’s gains came at the expense of the euro, which weakened across the board after a German constitutional court ruled that the Bundesbank must stop buying government bonds if the European Central Bank cannot prove those purchases are needed.
The decision did not apply to the ECB’s latest pandemic-fighting program, a 750 billion-euro scheme to prop up the economy, but the ruling unsettled financial markets, which had been calmed by aggressive ECB asset purchases to prevent the coronavirus crisis leading to an economic meltdown.
The dollar, meanwhile, edged higher after data showed a better-than-expected reading for the U.S. services sector in April. The U.S. Institute for Supply Management’s non-manufacturing index fell to 41.8 last month, from 52.5 in March, but the April level was higher than the consensus forecast of 36.8.
That data, however, was offset by a report showing U.S. business activity plumbed record lows in April. Data firm IHS Markit said its flash U.S. Composite Output Index, which tracks the manufacturing and services sectors, tumbled to 27.0 last month, the lowest since the series began in late 2009.
Still, the dollar came out on top, and the dollar index =USD was up 0.2% at 99.706 =USD.
The euro, meanwhile, fell 0.5% to $1.0856 EUR=EBS in the wake of the German court ruling, Refinitiv data showed.
The presence of a large long position in the single currency, which has intensified the selling pressure, also hurt the euro.
The dollar gained 0.5% versus the Swiss franc, another safe-haven currency, to 0.9708 franc CHF=EBS, but slipped 0.1% against the yen to 106.585 yen JPY=EBS.
Overall risk appetite was helped by gains in U.S. stocks and crude futures CLc1, which advanced 16%, with Brent LCOc1 up around 10% as production fell and countries around the globe, including Italy, Finland and several U.S. states, eased lockdown restrictions. [O/R]
As a result, commodity currencies rose, with the Australian dollar AUD=D3 up 0.6% at 64.57 U.S. cents. It also rose after the Reserve Bank of Australia left its targets for the cash rate and three-year government bond yields unchanged at 0.25%.
Trading was light because of public holidays in Japan and China. The yuan CNH=D3 rose to 7.1186 per dollar in offshore trade, recovering from a six-week low of 7.1560 hit in the previous session, but well below its range last month.