The dollar gained slightly against most major currencies on Wednesday to stabilize after falling over the past few sessions and rose sharply against the volatile yen as the Japanese fiscal year nears its end.

The dollar index, which measures the greenback's performance against six major currencies, rose 0.15 percent to 102.64. It had fallen in the past two sessions and is expected to record a monthly loss of 2.1 percent, falling victim to market turmoil caused by problems in the banking sector.

The euro fell 0.1 percent to $1.0834, while the sterling recorded a slight decline to $1.2316, just below the session's highest level in nearly two months, which it recorded in the last session at $1.2348.

We're back to feeling calm for the time being, but I don't think it's over, said Jane Foley, Rabobank's head of foreign exchange strategies.

The yen's volatility continued as the Japanese fiscal year ended on Friday. The dollar touched the highest level in a week and rose 0.8 percent in the latest trading to 131.99 yen, while the euro rose 0.6 percent against the Japanese currency to 142.9 yen.

The yen had recorded its highest levels in about two months against both the dollar and the euro last week, benefiting from the demand for safe assets, but Foley said that the market may witness less demand for safe havens this week.

As for other currencies, the Australian dollar fell 0.5 percent to $ 0.6674 after a reading showed that consumer price inflation in Australia slowed to the lowest level in eight months, which creates a new justification for the Reserve Bank (Central Australia) to stop its campaign to raise interest rates next week.

Bitcoin rose three percent to $28,142, to stabilize after falling after problems with Binance, the largest cryptocurrency exchange, which is facing a lawsuit from the US Commodity Futures Trading Commission.