* Iran strikes at bases hosting U.S. forces in Iraq
* Yen jumps to three-month peak, then retreats
* Trump tweets: 'All is well!'
* Graphic: World FX rates in 2019 http://tmsnrt.rs/2egbfVh
By Tom Westbrook
SINGAPORE, Jan 8 (Reuters) - Currencies whipsawed on Wednesday as the safe-haven yen first jumped on news of Iranian missile strikes on bases hosting U.S. troops in Iraq, before retreating as investors wagered it would not trigger a wider conflict in the region.
More than a dozen ballistic missiles shot through the night from Iranian territory toward the two Iraqi military bases. The attack was a retaliation for the U.S. killing of Iranian commander Qassem Soleimani, Iranian officials said.
The air strikes early on Wednesday came hours after the general's funeral, and sent the yen to a three-month high - until the absence of immediate reports of casualties steadied nerves.
Twitter posts from both sides playing down the prospect of further escalation also helped calm the currency market.
U.S. President Donald Trump tweeted that a damage assessment was "So far, so good!" and said "all is well," promising a further statement on Wednesday morning. Iranian Foreign Minister Mohammad Javad Zarif Tweeted that the attack was "proportionate" and that "we do not seek escalation or war."
Iraq's military said there were no casualties among Iraqi military forces.
The yen JPY= , regarded as a haven in times of turmoil by virtue of Japan's status as the world's biggest creditor, had leapt as much as 0.8% to 107.63 per dollar. But by afternoon, it was back only a little above where it began the day.
"If the market was really worried that the end of the world was nigh, dollar/yen would have collapsed, and that's clearly not been the case," said Stuart Oakley, global head of flow FX at Nomura in Singapore.
The Swiss franc CHF= similarly gave back gains and so did gold, by a lesser extent. The precious metal still sat at an almost seven-year high XAU= , just below $1600 per ounce. GOL/
Investors' focus will now be on what response, if any, the United States is planning.
"Essentially people are betting that this is not going to be our main focus three months from now," said Westpac analyst Sean Callow.
Oil prices, which initially jumped, fell back too as analysts said market tension could ease as long as oil production facilities remain unaffected by attacks. O/R
China's yuan CNH= , by afternoon, held on to most of Tuesday's steep gains at 6.9460 per dollar, after a bumpy ride.
Elsewhere, the dollar mostly hung on to overnight gains on other major currencies, and wound up steady against the Aussie AUD=D3 , kiwi NZD=D3 , euro EUR= and pound GBP= after a volatile session.
The greenback had been buoyed on Tuesday by a strong showing in a non-manufacturing business survey, which had analysts boosting fourth-quarter economic growth forecasts and looking for strength from U.S. labour market data due on Friday.