The New York Attorney General has filed a securities fraud lawsuit against Barclays.
It claims the bank gave an unfair edge to its US high-frequency trading clients even as it claimed to be protecting other customers from the traders.
The lawsuit alleges that the bank promised to get the best possible prices for customers looking to buy or sell shares, but that it took steps that instead maximised the banks' profits.
It claims the bank executed nearly all of its customers' stock orders on a trading venue it owns known as a "dark pool," instead of on exchanges or other venues that might have offered better prices.
The New York Attorney General's suit is the highest profile case yet in authorities' sweeping efforts to ensure that dealers and other traders are not ripping off investors in increasingly automated stock markets.
These probes have been progressing for up to a year, but took on additional urgency in recent months, after author Michael Lewis released the book "Flash Boys: A Wall Street Revolt."
The best-selling book contends that markets are rigged.
Barclays told customers who chose to trade in its dark pool that they would be protected from "predatory traders," which use their speed advantage to deprive other investors of small profits on every trade.
But in fact, customers were not protected at all, and the bank in fact courted predatory high-frequency traders in part by charging them virtually nothing, New York Attorney General Eric Schneiderman alleged.
"We take these allegations very seriously," Barclays said in a statement. It added that it is cooperating with authorities, it is looking at the matter internally, and that the integrity of markets is a top priority for the bank.
The US is looking at dark pools, which are typically owned by brokers, including all of the big banks, and where participants are anonymous and trading information is hidden until after the trades are completed.
Dark pools were originally created to allow investors to execute big trades without tipping off the market. But ever-larger volumes of trades have been shunted into dark pools, and the opacity of the markets may be resulting in more and more investors getting ripped off.
The US Securities and Exchange Commission has also taken an increased interest in issues surrounding dark pools and high-frequency trading.
SEC Chair Mary Jo White earlier this month said her agency is developing a series of rules that would seek to make markets more transparent and fair for all investors, and the agency has also stepped up enforcement actions against dark pool operators.
Banks have admitted to bad behaviour in other markets, after probes showed collusion in currency trading and short-term interest rate products, among other areas.
The Attorney General's complaint against Barclays, which is based on internal communications provided by former employees, says while the firm told its clients it would keep high-frequency traders that engage in "predatory" trading practices out of its dark pool, it never actually prevented any trader from participating.
For instance, Barclays falsified marketing material it said showed the extent and type of high-frequency traders in its dark pool by not including high-frequency trading firm Tradebot Systems, the complaint said.
Barclays had already identified Tradebot, which at the time was the largest participant in the dark pool, as having been engaged in aggressive trading behaviour.
Barclays wooed high-frequency traders by disclosing detailed, sensitive information about other customers to the firms to help ensure their aggressive trading strategies were effective, and by charging them almost nothing, the complaint said.
The complaint did not specify the amount of damages being sought from Barclays.
Barclays also told its clients it does not favour its own dark pool when routing client orders to trading venues, when in reality it was doing just that, the complaint said.
One former Barclays employee told the Attorney General's office that based on the high amount of client orders Barclays was sending to its own dark pool, better trading opportunities may have been missed elsewhere.
There was a lot going on in the dark pool that was not in the best interests of Barclays clients, one former director said, according to the complaint.
"The practice of almost ensuring that every counterparty would be a high-frequency firm, it seems to me that that wouldn't be in the best interest of their clients . . . It's almost like they are building a car and saying it has an airbag and there is no airbag or brakes."
The SEC is considering forcing dark pools and firms that match customers' orders internally to tell regulators and the public how they operate. In early June, the SEC filed a civil lawsuit against dark pool operator Liquidnet for allegedly improperly using its subscribers' confidential trading information to market its services.