U.S. authorities said they have arrested 40 people following an 18-month FBI undercover investigation of crimes in the foreign currency exchange market.

James Comey, the U.S. Attorney for the southern district of New York, told reporters Wednesday that the investigation, dubbed "Operation Wooden Nickel", resulted in complaints and indictments against 47 people. So far, 37 arrests have been made.

Employees of some of the biggest firms on Wall Street, including JP Morgan Chase and UBS Warburg Dillon Read, have been arrested.

Comey said authorities uncovered two scams aimed at small investors and large banks.

The first scheme saw over 1,000 investors lose millions of dollars as they were conned by "classic boiler-room-type operations with fancy-sounding names" to invest in the foreign exchange market, he said.

"It wasn't fancy, just fraud," Comey said.

Victims were promised big profits from conservative investments in currency trades, but they never saw a return and their money would simply go to the accused, Comey said.

"There is plenty of legitimate commerce in the forex (foreign exchange) world. The lesson of this case and the exposure of these boiler-room schemes is this: there may be legitimate commerce but there are a lot of sharks in that water," Comey said.

"If you're going to go swimming, we in law enforcement suggest a period of careful reflection from the beach before you jump in," he added.

In the second scheme, Comey said some of the world's biggest banks were defrauded by people "inhabiting every level of the forex interbank market."

Authorities charge that the perpetrators took payoffs to steer their banks into losing currency trades set up by corrupt brokers. The winners in the trades would then kick back a portion of the money to the traders at the losing banks.

Investigators said that over six months, they found 123 trades in which winnings for the "bad guys" were over $650,000 US. Indications are that this bogus trading has been going on for over 20 years.

Global foreign exchange markets operate with no headquarters, instead running 24 hours a day via a network of traders. It operates in two parts: a regulated retail market for futures contracts, and a largely unregulated interbank market where financial institutions and other large firms arrange trades of currency.

Comey said the foreign exchange market involves about a $1 trillion US in trading every day.