People walk past the New York Stock Exchange in the Manhattan borough of New York. Photo: Reuters/Carlo Allegri

Federal authorities are investigating the market-making arms of Citadel LLC and KCG Holdings Inc., looking into the possibility that the two giants of electronic trading are giving small investors a poor deal when executing stock transactions on their behalf.

The Justice Department has subpoenaed information from Citadel and KCG related to the firms’ execution of stock trades on behalf of clients, according to people familiar with the investigation.

Authorities are examining internal data concerning the firms’ routing of customer stock orders through exchanges and other trading systems, to see whether they are giving customers unfavorable prices on trades in order to capture more profit on the transactions, according to the people familiar with the inquiry. Under Securities and Exchange Commission rules, U.S. brokers are legally required to seek the “best execution reasonably available” on orders, a standard meant to ensure that all customers get a favorable price and a swift trade.

The Justice Department has looked at a number of high-speed trading firms that pay retail brokerages to sell them their flow of customer orders for stock trades. This segment of the industry is known as wholesale market making.

The documents subpoenaed from KCG related to the firm’s market-making activities from 2009 to 2011, according to a person familiar with the KCG probe. In 2012, the head of KCG’s electronic trading group, which included its wholesale market-making arm, Jamil Nazarali, left the firm to join Citadel. Since then, Citadel’s own wholesale market maker has grown substantially under Nazarali.

The inquiry is being driven by Justice Department authorities who previously investigated banks for alleged wrongdoing in the market for residential mortgage-backed securities, these people said. Making those cases, which yielded billions of dollars in penalties, required investigators to master some of finance’s most complex markets. The current undertaking presents similar technical challenges.

It isn’t clear what sort of evidence the federal investigators may have compiled in their inquiries. And it is possible that no cases will result from the investigations.

A spokesman for KCG declined to comment, as did a Justice Department spokesman. In an August 2015 filing with the SEC, KCG disclosed the existence of a Justice Department probe but provided no details.

A spokeswoman for Citadel said she could neither confirm nor deny the firm’s involvement in the investigations, but said Citadel cooperates fully with any requests from enforcement agencies.

“As one of the largest market-makers and providers of liquidity in the U.S., we regularly receive inquiries from and work closely with a number of regulators and others regarding our business and market practices,” said Katie Spring, a spokeswoman for Citadel. “We cooperate fully with such requests, but as a matter of practice, we simply don’t confirm any particular inquiry.”

One person familiar with the inquiry said that based on the tenor of the discussions with investigators, Citadel expects the probe will conclude with no action recommended.

If authorities do move ahead, they would be marching forcefully into the debate over high-speed trading. Critics have alleged that firms with the fastest trading technology are using speed to manipulate stock prices, giving investors a raw deal. The industry counters that its technology delivers cheaper and more transparent trades to investors.

The Justice Department inquiry is the latest example of increased scrutiny on speed traders since the “flash crash” of 2010, when markets suddenly plunged and quickly rebounded. A study commissioned by U.S. regulators later found that high-speed trading contributed to the crash.

Citadel and KCG are among several firms being examined in a separate probe by the New York state attorney general. New York authorities are examining firms that buy and sell the flow of trading orders placed by investors, according to a person familiar with that investigation. The authorities are also looking at other practices in the world of high-speed stock trading that may disadvantage retail investors. Citadel and KCG declined to comment on that inquiry.

The New York state attorney general recently reached settlements with Barclays and Credit Suisse after finding that the two banks were making inadequate disclosures related to high-frequency trading in their private stock-trading venues, known as dark pools.

Citadel is led by one of Wall Street’s most powerful billionaires. Founder and chief executive Ken Griffin topped Forbes magazine’s 2016 list of the highest-earning hedge fund managers, making $1.7 billion in 2015 alone, according to Forbes. In February, Griffin made headlines with what is believed to be the largest private art purchase ever, paying $500 million for two paintings by Willem de Kooning and Jackson Pollock.

Citadel is best known for the consistently market-beating returns of its $23 billion hedge fund. But for years, the firm also has been in the vanguard of creating alternative electronic markets for trading stocks and other financial assets.

Citadel’s own private stock-trading platform is so large that, if it were an official exchange recognized by the SEC, it would one of the largest registered exchanges in the United States — bigger than Nasdaq Inc., according to data published last month by the Financial Industry Regulatory Authority. Citadel Execution Services, the firm’s wholesale market-making unit, executes 35 percent of all trades by retail investors in U.S.-listed stocks, according to the firm.

KCG was formed in December 2012 from the merger of New Jersey-based Knight Capital Group and Chicago-based high-frequency-trading firm Getco LLC. Knight was forced into the merger after an August 2012 computer trading glitch led to millions of accidental stock orders flooding the market in less than an hour, leaving the firm with a $468 million loss.

Established in 1995, Knight was a pioneer of electronic market making. It has had previous run-ins with authorities over its handling of customer trades. In 2002, Knight paid $1.5 million to settle regulatory charges related to its market-making operations. In 2004, Knight paid $79 million to settle SEC allegations that it had overcharged customers.

Today, KCG is second only to Citadel in the market for handling stock order flow from retail brokerage firms.

KCG and many other high-frequency trading firms have shied away from the public spotlight. KCG, for example, has appeared to pivot away from some of the market-making activities now coming under scrutiny. In February, KCG sold its market-making seats on the floor of the New York Stock Exchange to Citadel.

Citadel has taken a higher profile. Last year, it set off a price war with rivals that enabled it to expand its share of the market-making business. Citadel also has argued vocally in the media, and to regulators, that its wholesaling operation is good for investors. The head of Citadel Execution Services, Nazarali, secured a seat last year on the SEC’s new Equity Markets Structure Advisory Committee, where he has cast himself as a spokesperson for the interests of retail investors.

The Justice Department inquiry appears aimed at a pillar of the market’s structure: the strategy whereby market-making wholesalers such as Citadel pay retail brokerages for their clients’ order flow.

The practice of paying for order flow, per se, is legal. But it also has been controversial, going back to the days of disgraced Wall Street investment manager Bernard Madoff, who pioneered the practice of buying client trades.

Critics contend that practice poses a potential conflict of interest for retail brokerage firms: They may be tempted to sell customer orders to the highest bidder rather than to the market maker who will obtain the best prices and fastest execution for investors. A related question has dogged the market makers: Why are firms willing to pay for stock orders if they are in turn executing those trades at the best available prices?

Small, day-trading investors make up the majority of the customers of mass-market brokerage firms such as TD Ameritrade, Charles Schwab and E*Trade. These firms sell their stream of stock-trading orders to market makers such as Citadel and KCG.

The market makers find the small trades attractive, because they are less likely to move the market than the massive trades made by big institutional investors. Handling high volumes of small trades allows firms like KCG and Citadel to make reliable profits. The market makers collect the “spread” between the price paid by a buyer and reaped by a seller, while still vowing to give customers comparatively advantageous prices.

TD Ameritrade spokeswoman Kim Hillyer said the firm does not comment on regulatory actions. A spokeswoman for E*Trade said the firm ensures that clients get the best possible execution of stock orders by conducting regular internal and external reviews. A Schwab spokesman said Schwab routes orders to wholesalers based solely on which one gets customers the best prices.

Citadel points to statistics showing that the average price paid by investors on most stock trades has declined steadily in recent years, as high-speed firms such as itself have assumed a greater role in market-making on electronic exchanges.

Critics say these statistics might not tell the whole story. Most of these statistics are based on a relatively slow data feed that lists current stock prices, critics say. Market-maker firms have access to numerous faster data feeds showing more up-to-date prices.

Investigators believe this information gap means that a firm could claim it got the optimal deal for a client based on the prices on the slower data feed, even as the firm knew a better price existed on a faster feed. Securities lawyers say this could constitute a breach of a firm’s legal obligations. In December, the U.S. Financial Industry Regulatory Authority warned firms against the practice.

Justice Department investigators seem interested in what Citadel’s high-speed traders do with a stock order between the instant Citadel receives that order from a retail brokerage and the moment it ultimately executes the trade on behalf of a client, according to people familiar with the probe.

The blink-of-an-eye process usually takes Citadel upwards of 20 milliseconds, or 20 one-thousandths of a second. That’s a long time in the world of high-frequency trading, however, where it takes seven milliseconds for a signal to travel between New York and Chicago.

The Department of Justice is using a statute known as the Financial Institutions Reform, Recovery and Enforcement Act, or Firrea, to conduct its probe. Adopted in 1989 during the savings-and-loan crisis, Firrea was dusted off and redeployed by prosecutors after the 2008 financial crisis.

The statute empowers the Justice Department to pursue criminal violations involving banks by pursuing a civil lawsuit, which has a lower standard of proof, to collect penalties. In contrast to facts produced by grand jury subpoenas used in a criminal probe, which are tightly held, information gleaned from a Firrea subpoena can be shared more freely with other prosecutors and enforcement agencies.

Since 2012, the Justice Department has used the Firrea process to extract billions of dollars in settlements from banks and other firms for misconduct in the housing market before the financial crisis. Firrea charges underpinned most of the government case that resulted in a $5 billion settlement with Goldman Sachs last month, as well as a $25 billion settlement with Bank of America, a $13 billion settlement with JPMorgan Chase, and a $7 billion settlement with Citigroup, all connected to actions in the packaging and sale of mortgage-backed securities.

As regulators have scrutinized the practice of paying for order flow, some prominent firms have changed their policies. Fidelity stopped accepting payment for many types of orders from market makers in early 2015. Schwab last year modified its policies on order payment to avoid any appearance of impropriety, according to a firm spokesperson.

Goldman Sachs exited the wholesale market-making business altogether last summer. At the same time, it announced that the firm’s dark pool was going to stop using the controversial slower data feed and rely instead solely on faster private market feeds.

Citadel has emerged as a champion of the industry. It has been the leading voice opposing SEC approval of a new stock exchange, IEX, owned by a consortium of buy-side investors. IEX plans to institute a short, 350-millionths-of-a-second delay in the execution of stock orders, in what it says is an effort to minimize the advantages of high-speed traders.

Citadel has waged a public campaign to block the new exchange. In public comments to the SEC, it has argued that the speed delay will lead to outdated share prices, harming investors.