These are not the only ways in which big market players make money at the expense of other investors. The Senate Permanent Subcommittee on Investigations recently held a hearing on “maker-taker” pricing in which stock exchanges pay rebates to brokers for sending them buy-and-sell orders. The practice has been around for years, as a growing number of exchanges — there are now 11 public exchanges in the United States — have battled for business. What is new is the compelling evidence that the rebates are corrupting.

Under federal trading rules, brokers must provide “best execution,” which usually means finding the best stock prices for clients who pay them to buy and sell shares. But the rules also recognize that for some trades, getting the best price is only one part of best execution; the speed, size and cost of a trade must also be considered.

Research presented at the Senate hearing showed that under the guise of making subjective judgments about best execution, brokers were routinely sending orders to venues that paid the highest rebates.

In the last quarter of 2012, for example, the brokerage TD Ameritrade sent all nonmarketable customer orders — those that can’t be completed immediately based on the market price — to the one exchange that paid the highest rebate. In the first quarter of 2014, it sent nonmarketable orders to two venues that paid the highest rebates.

Senator Carl Levin, the subcommittee chairman, rightly called it “a frankly pretty incredible coincidence” that the firm’s judgment on best execution for tens of millions of customers had invariably led it to use the venues that paid the highest rebates. Under questioning, Steven Quirk, an executive of TD Ameritrade, conceded that in the trades cited by Mr. Levin the firm had virtually always used exchanges that paid the most. He also estimated that the firm made $80 million last year from maker-taker rebates.

Meanwhile, many brokerages promote their low trading costs. But the fees to trade stocks do not include the hidden costs that are incurred when investors don’t get the best price. A study from 2012 estimated that rebates cost individual investors, mutual funds and pension funds as much as $5 billion a year.

Securities regulators clearly need to better enforce the best execution requirements on brokers, and require better disclosure on brokers’ routing decisions and the rebates they earn. If Congress won’t provide more resources for enforcement, rebates need to be passed along to the customer or eliminated altogether.